From 27b297e37e90aefb1b9389754f91378293c7f085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 20 May 2019 11:17:53 +0200 Subject: [PATCH 01/71] Add initial values and threshold to load Safe --- src/routes/load/components/DetailsForm/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/load/components/DetailsForm/index.jsx b/src/routes/load/components/DetailsForm/index.jsx index b46c6dcc..ba344aac 100644 --- a/src/routes/load/components/DetailsForm/index.jsx +++ b/src/routes/load/components/DetailsForm/index.jsx @@ -71,7 +71,7 @@ export const safeFieldsValidation = async (values: Object) => { ) const safeMaster = await getSafeMasterContract() const masterCopy = safeMaster.address - + const sameMasterCopy = checksummedProxyAddress === masterCopy if (!sameMasterCopy) { errors[FIELD_LOAD_ADDRESS] = SAFE_MASTERCOPY_ERROR From 065b1b24cefdd253cee0d507f661c60ec83f13db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 20 May 2019 14:49:26 +0200 Subject: [PATCH 02/71] Add owners list to load Safe review page --- src/routes/load/components/DetailsForm/index.jsx | 2 +- src/routes/load/components/ReviewInformation/index.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/load/components/DetailsForm/index.jsx b/src/routes/load/components/DetailsForm/index.jsx index ba344aac..b46c6dcc 100644 --- a/src/routes/load/components/DetailsForm/index.jsx +++ b/src/routes/load/components/DetailsForm/index.jsx @@ -71,7 +71,7 @@ export const safeFieldsValidation = async (values: Object) => { ) const safeMaster = await getSafeMasterContract() const masterCopy = safeMaster.address - + const sameMasterCopy = checksummedProxyAddress === masterCopy if (!sameMasterCopy) { errors[FIELD_LOAD_ADDRESS] = SAFE_MASTERCOPY_ERROR diff --git a/src/routes/load/components/ReviewInformation/index.jsx b/src/routes/load/components/ReviewInformation/index.jsx index 85fc856f..8a2bae21 100644 --- a/src/routes/load/components/ReviewInformation/index.jsx +++ b/src/routes/load/components/ReviewInformation/index.jsx @@ -12,7 +12,7 @@ import Link from '~/components/layout/Link' import Paragraph from '~/components/layout/Paragraph' import Hairline from '~/components/layout/Hairline' import { - xs, sm, lg, border, secondary, + xs, sm, md, lg, border, secondary, } from '~/theme/variables' import { shortVersionOf } from '~/logic/wallets/ethAddresses' import { getAccountsFrom } from '~/routes/open/utils/safeDataExtractor' From 8a25ac1ee224cff93337b95675aacd3d12515aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 20 May 2019 17:51:38 +0200 Subject: [PATCH 03/71] Codestyle fixes --- src/routes/load/components/ReviewInformation/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/load/components/ReviewInformation/index.jsx b/src/routes/load/components/ReviewInformation/index.jsx index 8a2bae21..85fc856f 100644 --- a/src/routes/load/components/ReviewInformation/index.jsx +++ b/src/routes/load/components/ReviewInformation/index.jsx @@ -12,7 +12,7 @@ import Link from '~/components/layout/Link' import Paragraph from '~/components/layout/Paragraph' import Hairline from '~/components/layout/Hairline' import { - xs, sm, md, lg, border, secondary, + xs, sm, lg, border, secondary, } from '~/theme/variables' import { shortVersionOf } from '~/logic/wallets/ethAddresses' import { getAccountsFrom } from '~/routes/open/utils/safeDataExtractor' From 635695629807eee3241d32151f182d1ab7dbb796 Mon Sep 17 00:00:00 2001 From: mmv Date: Fri, 31 May 2019 17:58:35 +0400 Subject: [PATCH 04/71] add token contracts for testing purposes and refactor TokenMovements utils --- build/contracts/DevDependenciesGetter.json | 148 + build/contracts/GnosisMath.json | 32360 +++++++++++++++++++ build/contracts/GnosisStandardToken.json | 5638 ++++ build/contracts/Migrations.json | 1379 + build/contracts/Proxied.json | 983 + build/contracts/Proxy.json | 1006 + build/contracts/StandardTokenData.json | 5419 ++++ build/contracts/Token.json | 1865 ++ build/contracts/TokenOMG.json | 1008 + build/contracts/TokenRDN.json | 1008 + src/test/safe.dom.funds.test.js | 154 +- src/test/utils/tokenMovements.js | 8 +- yarn.lock | 8 +- 13 files changed, 50882 insertions(+), 102 deletions(-) create mode 100644 build/contracts/DevDependenciesGetter.json create mode 100644 build/contracts/GnosisMath.json create mode 100644 build/contracts/GnosisStandardToken.json create mode 100644 build/contracts/Migrations.json create mode 100644 build/contracts/Proxied.json create mode 100644 build/contracts/Proxy.json create mode 100644 build/contracts/StandardTokenData.json create mode 100644 build/contracts/Token.json create mode 100644 build/contracts/TokenOMG.json create mode 100644 build/contracts/TokenRDN.json diff --git a/build/contracts/DevDependenciesGetter.json b/build/contracts/DevDependenciesGetter.json new file mode 100644 index 00000000..77f80b7a --- /dev/null +++ b/build/contracts/DevDependenciesGetter.json @@ -0,0 +1,148 @@ +{ + "contractName": "DevDependenciesGetter", + "abi": [], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/mmv/work/safe-react/contracts/DevDependencies.sol\":\"DevDependenciesGetter\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"/home/mmv/work/safe-react/contracts/DevDependencies.sol\":{\"keccak256\":\"0xc649617f3c51e58509bdd0910726bd84a52f232b6aaf5790ac72f6e84ccb1b58\",\"urls\":[\"bzzr://57b15b2fd6a6a15523665a1f369e8b395a5649504f807114fedff42cf1b430b3\"]},\"/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol\":{\"keccak256\":\"0x099d05859e51af8b24539b47e0d181a17409d51063263f8a8d53280818c69d4d\",\"urls\":[\"bzzr://4eb926d078f8111367c3a180e7eb99f36528b95c871e1004c626f1cb5487f5dc\"]},\"/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol\":{\"keccak256\":\"0xbd1fc040f6b4f7b68bb7e6b745d02c571d7baf992c5a3a34d57392f624d7043c\",\"urls\":[\"bzzr://fdd020e4fe5f62e961acccce8733276ad3aca6dbe7ccff3f860476774cf6bdab\"]},\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":{\"keccak256\":\"0xdec5028208406e811c449a04e2932f7efeae629388cb6124550b8b048a645556\",\"urls\":[\"bzzr://f3d13a708f543b3ce72745cab321e6daf25d935fd12ba55a4152f1113eb6d5e4\"]},\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]},\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3fe6080604052600080fdfea165627a7a723058205e4f8760788b4c49e4643557d735f7312e842b538cebaa480b66c5e3577d34cb0029", + "deployedBytecode": "0x6080604052600080fdfea165627a7a723058205e4f8760788b4c49e4643557d735f7312e842b538cebaa480b66c5e3577d34cb0029", + "sourceMap": "116:33:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;116:33:0;;;;;;;", + "deployedSourceMap": "116:33:0:-;;;;;", + "source": "pragma solidity ^0.5.2;\n\nimport \"../src/test/contracts/TokenOMG.sol\";\nimport \"../src/test/contracts/TokenRDN.sol\";\n\ncontract DevDependenciesGetter {}", + "sourcePath": "/home/mmv/work/safe-react/contracts/DevDependencies.sol", + "ast": { + "absolutePath": "/home/mmv/work/safe-react/contracts/DevDependencies.sol", + "exportedSymbols": { + "DevDependenciesGetter": [ + 4 + ] + }, + "id": 5, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:0" + }, + { + "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol", + "file": "../src/test/contracts/TokenOMG.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 5, + "sourceUnit": 90, + "src": "25:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol", + "file": "../src/test/contracts/TokenRDN.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 5, + "sourceUnit": 118, + "src": "70:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4, + "linearizedBaseContracts": [ + 4 + ], + "name": "DevDependenciesGetter", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 5, + "src": "116:33:0" + } + ], + "src": "0:149:0" + }, + "legacyAST": { + "absolutePath": "/home/mmv/work/safe-react/contracts/DevDependencies.sol", + "exportedSymbols": { + "DevDependenciesGetter": [ + 4 + ] + }, + "id": 5, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:0" + }, + { + "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol", + "file": "../src/test/contracts/TokenOMG.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 5, + "sourceUnit": 90, + "src": "25:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol", + "file": "../src/test/contracts/TokenRDN.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 5, + "sourceUnit": 118, + "src": "70:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4, + "linearizedBaseContracts": [ + 4 + ], + "name": "DevDependenciesGetter", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 5, + "src": "116:33:0" + } + ], + "src": "0:149:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.10", + "updatedAt": "2019-05-31T13:47:05.338Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/GnosisMath.json b/build/contracts/GnosisMath.json new file mode 100644 index 00000000..a8148fca --- /dev/null +++ b/build/contracts/GnosisMath.json @@ -0,0 +1,32360 @@ +{ + "contractName": "GnosisMath", + "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": "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": "nums", + "type": "int256[]" + } + ], + "name": "max", + "outputs": [ + { + "name": "maxNum", + "type": "int256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"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\":\"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\":\"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 - Stefan George - \",\"methods\":{\"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)\"},\"max(int256[])\":{\"details\":\"Returns maximum of an array\",\"params\":{\"nums\":\"Numbers to look through\"},\"return\":\"Maximum number\"}},\"title\":\"Math library - Allows calculation of logarithmic and exponential functions\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/Math.sol\":\"GnosisMath\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]}},\"version\":1}", + "bytecode": "0x6107c7610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806345b8bafc1161006557806345b8bafc146100cb578063c2ee3a08146100e8578063ccc13814146100f0578063e46751e31461019357610087565b8063027806771461008c57806324902e24146100a657806324d4e90a146100ae575b600080fd5b6100946101b0565b60408051918252519081900360200190f35b6100946101bc565b610094600480360360208110156100c457600080fd5b50356101c9565b610094600480360360208110156100e157600080fd5b5035610433565b6100946104a2565b6100946004803603602081101561010657600080fd5b81019060208101813564010000000081111561012157600080fd5b82018360208201111561013357600080fd5b8035906020019184602083028401116401000000008311171561015557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506104aa945050505050565b610094600480360360208110156101a957600080fd5b503561050b565b67b17217f7d1cf79ac81565b680171547652b82fe17781565b60008082116101d757600080fd5b60006101e283610433565b90506000808212156101fc578160000384901b9050610201565b5082811c5b6000600160401b8201600160401b808403028161021a57fe5b059050806000600160401b828181800205028161023357fe5b0590506003810582019150600160401b83600160401b8584028161025357fe5b05028161025c57fe5b0590506005810582019150600160401b83600160401b8584028161027c57fe5b05028161028557fe5b0590506007810582019150600160401b83600160401b858402816102a557fe5b0502816102ae57fe5b0590506009810582019150600160401b83600160401b858402816102ce57fe5b0502816102d757fe5b059050600b810582019150600160401b83600160401b858402816102f757fe5b05028161030057fe5b059050600d810582019150600160401b83600160401b8584028161032057fe5b05028161032957fe5b059050600f810582019150600160401b83600160401b8584028161034957fe5b05028161035257fe5b0590506011810582019150600160401b83600160401b8584028161037257fe5b05028161037b57fe5b0590506013810582019150600160401b83600160401b8584028161039b57fe5b0502816103a457fe5b0590506015810582019150600160401b83600160401b858402816103c457fe5b0502816103cd57fe5b0590506017810582019150600160401b83600160401b858402816103ed57fe5b0502816103f657fe5b05905060198105919091019060028202680171547652b82fe17770010000000000000000000000000000000087020501955050505050505b919050565b603f1960c1608160011d5b8183600101121561049b576000811280156104625750600160401b8160000385901b105b8061047e57506000811215801561047e5750600160401b84821c105b1561048b5780915061048f565b8092505b5080820160011d61043e565b5050919050565b600160401b81565b6000808251116104b957600080fd5b50600160ff1b60005b825181101561050557818382815181106104d857fe5b602002602001015113156104fd578281815181106104f257fe5b602002602001015191505b6001016104c2565b50919050565b600068851591f9dd5b9b40d782131561052357600080fd5b682c5c85fdf473de6af21982121561053d5750600061042e565b67b17217f7d1cf79ac600160401b83020591506000806000841261056d575050600160401b808305908307610593565b6001600160401b8505039150600160401b846000038161058957fe5b07600160401b0390505b80600160401b8067b17217f7d1cf79ab83020401600160401b828402049150600160401b673d7f7bff058b1d5083020401600160401b828402049150600160401b670e35846b82505fc583020401600160401b828402049150600160401b670276556df749cee583020401600160401b828402049150600160401b665761ff9e299cc483020401600160401b828402049150600160401b660a184897c363c383020401600160401b828402049150600160401b65ffe5fe2c458683020401600160401b828402049150600160401b65162c0223a5c883020401600160401b828402049150600160401b6501b5253d395e83020401600160401b828402049150600160401b641e4cf5158b83020401600160401b828402049150600160401b6401e8cac73583020401600160401b828402049150600160401b631c3bd65083020401600160401b828402049150600160401b630181619383020401600160401b828402049150600160401b6213149683020401600160401b828402049150600160401b61e1b783020401600160401b828402049150600160401b6109c7830204016000841261077e576000846101000382600082121561074e57fe5b901c11156107645760001994505050505061042e565b8381600082121561077157fe5b901b94505050505061042e565b8360000381600082121561078e57fe5b901c94505050505061042e56fea165627a7a72305820d26dc8b24dd7c68e2f89fece45705ad86fdf64f8fd1558a361fec835e4ab8bfa0029", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806345b8bafc1161006557806345b8bafc146100cb578063c2ee3a08146100e8578063ccc13814146100f0578063e46751e31461019357610087565b8063027806771461008c57806324902e24146100a657806324d4e90a146100ae575b600080fd5b6100946101b0565b60408051918252519081900360200190f35b6100946101bc565b610094600480360360208110156100c457600080fd5b50356101c9565b610094600480360360208110156100e157600080fd5b5035610433565b6100946104a2565b6100946004803603602081101561010657600080fd5b81019060208101813564010000000081111561012157600080fd5b82018360208201111561013357600080fd5b8035906020019184602083028401116401000000008311171561015557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506104aa945050505050565b610094600480360360208110156101a957600080fd5b503561050b565b67b17217f7d1cf79ac81565b680171547652b82fe17781565b60008082116101d757600080fd5b60006101e283610433565b90506000808212156101fc578160000384901b9050610201565b5082811c5b6000600160401b8201600160401b808403028161021a57fe5b059050806000600160401b828181800205028161023357fe5b0590506003810582019150600160401b83600160401b8584028161025357fe5b05028161025c57fe5b0590506005810582019150600160401b83600160401b8584028161027c57fe5b05028161028557fe5b0590506007810582019150600160401b83600160401b858402816102a557fe5b0502816102ae57fe5b0590506009810582019150600160401b83600160401b858402816102ce57fe5b0502816102d757fe5b059050600b810582019150600160401b83600160401b858402816102f757fe5b05028161030057fe5b059050600d810582019150600160401b83600160401b8584028161032057fe5b05028161032957fe5b059050600f810582019150600160401b83600160401b8584028161034957fe5b05028161035257fe5b0590506011810582019150600160401b83600160401b8584028161037257fe5b05028161037b57fe5b0590506013810582019150600160401b83600160401b8584028161039b57fe5b0502816103a457fe5b0590506015810582019150600160401b83600160401b858402816103c457fe5b0502816103cd57fe5b0590506017810582019150600160401b83600160401b858402816103ed57fe5b0502816103f657fe5b05905060198105919091019060028202680171547652b82fe17770010000000000000000000000000000000087020501955050505050505b919050565b603f1960c1608160011d5b8183600101121561049b576000811280156104625750600160401b8160000385901b105b8061047e57506000811215801561047e5750600160401b84821c105b1561048b5780915061048f565b8092505b5080820160011d61043e565b5050919050565b600160401b81565b6000808251116104b957600080fd5b50600160ff1b60005b825181101561050557818382815181106104d857fe5b602002602001015113156104fd578281815181106104f257fe5b602002602001015191505b6001016104c2565b50919050565b600068851591f9dd5b9b40d782131561052357600080fd5b682c5c85fdf473de6af21982121561053d5750600061042e565b67b17217f7d1cf79ac600160401b83020591506000806000841261056d575050600160401b808305908307610593565b6001600160401b8505039150600160401b846000038161058957fe5b07600160401b0390505b80600160401b8067b17217f7d1cf79ab83020401600160401b828402049150600160401b673d7f7bff058b1d5083020401600160401b828402049150600160401b670e35846b82505fc583020401600160401b828402049150600160401b670276556df749cee583020401600160401b828402049150600160401b665761ff9e299cc483020401600160401b828402049150600160401b660a184897c363c383020401600160401b828402049150600160401b65ffe5fe2c458683020401600160401b828402049150600160401b65162c0223a5c883020401600160401b828402049150600160401b6501b5253d395e83020401600160401b828402049150600160401b641e4cf5158b83020401600160401b828402049150600160401b6401e8cac73583020401600160401b828402049150600160401b631c3bd65083020401600160401b828402049150600160401b630181619383020401600160401b828402049150600160401b6213149683020401600160401b828402049150600160401b61e1b783020401600160401b828402049150600160401b6109c7830204016000841261077e576000846101000382600082121561074e57fe5b901c11156107645760001994505050505061042e565b8381600082121561077157fe5b901b94505050505061042e565b8360000381600082121561078e57fe5b901c94505050505061042e56fea165627a7a72305820d26dc8b24dd7c68e2f89fece45705ad86fdf64f8fd1558a361fec835e4ab8bfa0029", + "sourceMap": "200:9220:5:-;;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": "200:9220:5:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;356:45;;;:::i;:::-;;;;;;;;;;;;;;;;407:49;;;:::i;3474:1779::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3474:1779:5;;:::i;5367:429::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5367:429:5;;:::i;304:46::-;;;:::i;5918:221::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5918:221:5;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;5918:221:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5918:221:5;;;;;;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;5918:221:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;5918:221:5;;-1:-1:-1;5918:221:5;;-1:-1:-1;;;;;5918:221:5:i;610:2761::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;610:2761:5;;:::i;356:45::-;383:18;356:45;:::o;407:49::-;437:19;407:49;:::o;3474:1779::-;3515:3;3542:1;3538;:5;3530:14;;;;;;3598:9;3610:12;3620:1;3610:9;:12::i;:::-;3598:24;;3632:5;3659:1;3651:5;:9;3647:81;;;3681:5;3680:6;;3670:1;:17;;3662:26;;3647:81;;;-1:-1:-1;3711:16:5;;;3647:81;3942:8;-1:-1:-1;;;3982:1:5;:12;-1:-1:-1;;;331:19:5;3954:1;:12;3953:25;:42;;;;;;;-1:-1:-1;3953:42:5;4005:11;-1:-1:-1;;;3953:42:5;331:19;4047:11;;;:22;:29;:40;;;;;;;-1:-1:-1;4118:1:5;4047:40;4108:11;4097:22;;;;-1:-1:-1;;;4167:4:5;-1:-1:-1;;;4149:4:5;4139:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4213:1:5;4139:43;4203:11;4192:22;;;;-1:-1:-1;;;4262:4:5;-1:-1:-1;;;4244:4:5;4234:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4308:1:5;4234:43;4298:11;4287:22;;;;-1:-1:-1;;;4357:4:5;-1:-1:-1;;;4339:4:5;4329:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4403:1:5;4329:43;4393:11;4382:22;;;;-1:-1:-1;;;4452:4:5;-1:-1:-1;;;4434:4:5;4424:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4498:2:5;4424:43;4488:12;4477:23;;;;-1:-1:-1;;;4548:4:5;-1:-1:-1;;;4530:4:5;4520:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4594:2:5;4520:43;4584:12;4573:23;;;;-1:-1:-1;;;4644:4:5;-1:-1:-1;;;4626:4:5;4616:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4690:2:5;4616:43;4680:12;4669:23;;;;-1:-1:-1;;;4740:4:5;-1:-1:-1;;;4722:4:5;4712:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4786:2:5;4712:43;4776:12;4765:23;;;;-1:-1:-1;;;4836:4:5;-1:-1:-1;;;4818:4:5;4808:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4882:2:5;4808:43;4872:12;4861:23;;;;-1:-1:-1;;;4932:4:5;-1:-1:-1;;;4914:4:5;4904:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4978:2:5;4904:43;4968:12;4957:23;;;;-1:-1:-1;;;5028:4:5;-1:-1:-1;;;5010:4:5;5000:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;5074:2:5;5000:43;5064:12;5053:23;;;;-1:-1:-1;;;5124:4:5;-1:-1:-1;;;5106:4:5;5096:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;5170:2:5;5096:43;5160:12;5149:23;;;;;5235:1;:11;;437:19;5189:29;;;:43;:57;5182:64;;;;;;;3474:1779;;;;:::o;5367:429::-;-1:-1:-1;;5460:3:5;5577:7;5589:1;5576:14;5600:190;5618:2;5608;5613:1;5608:6;5607:13;5600:190;;;5646:1;5640:3;:7;:32;;;;;-1:-1:-1;;;5662:3:5;5661:4;;5651:1;:15;;:21;5640:32;:68;;;;5683:1;5676:3;:8;;:32;;;;-1:-1:-1;;;;5688:14:5;;;:20;5676:32;5636:109;;;5715:3;5710:8;;5636:109;;;5742:3;5737:8;;5636:109;-1:-1:-1;5766:7:5;;;5778:1;5765:14;5600:190;;;5367:429;;;;;:::o;304:46::-;-1:-1:-1;;;304:46:5;:::o;5918:221::-;5971:10;6015:1;6001:4;:11;:15;5993:24;;;;;;-1:-1:-1;;;;6060:6:5;6055:77;6076:4;:11;6072:1;:15;6055:77;;;6108:6;6098:4;6103:1;6098:7;;;;;;;;;;;;;;:16;6094:38;;;6125:4;6130:1;6125:7;;;;;;;;;;;;;;6116:16;;6094:38;6089:3;;6055:77;;;;5918:221;;;:::o;610:2761::-;651:4;799:22;794:1;:27;;786:36;;;;;;-1:-1:-1;;946:1:5;:26;942:40;;;-1:-1:-1;981:1:5;974:8;;942:40;383:18;-1:-1:-1;;;1036:12:5;;:23;1032:27;;1195:9;1214:6;1239:1;1234;:6;1230:191;;-1:-1:-1;;;;;1264:12:5;;;;1299;;1230:191;;;1366:1;-1:-1:-1;;;1351:1:5;:12;:16;1343:24;;-1:-1:-1;;;1397:1:5;1396:2;;:13;;;;;;-1:-1:-1;;;1385:25:5;1381:29;;1230:191;1968:1;-1:-1:-1;;;331:19:5;2016:18;:25;;:31;2006:41;-1:-1:-1;;;2064:8:5;;;:14;;-1:-1:-1;;;;2098:18:5;:25;;:31;2088:41;-1:-1:-1;;;2146:8:5;;;:14;;-1:-1:-1;;;;2180:17:5;:24;;:30;2170:40;-1:-1:-1;;;2227:8:5;;;:14;;-1:-1:-1;;;;2261:17:5;:24;;:30;2251:40;-1:-1:-1;;;2308:8:5;;;:14;;-1:-1:-1;;;;2342:16:5;:23;;:29;2332:39;-1:-1:-1;;;2388:8:5;;;:14;;-1:-1:-1;;;;2422:15:5;:22;;:28;2412:38;-1:-1:-1;;;2467:8:5;;;:14;;-1:-1:-1;;;;2501:14:5;:21;;:27;2491:37;-1:-1:-1;;;2545:8:5;;;:14;;-1:-1:-1;;;;2579:14:5;:21;;:27;2569:37;-1:-1:-1;;;2623:8:5;;;:14;;-1:-1:-1;;;;2657:13:5;:20;;:26;2647:36;-1:-1:-1;;;2700:8:5;;;:14;;-1:-1:-1;;;;2734:12:5;:19;;:25;2724:35;-1:-1:-1;;;2776:8:5;;;:14;;-1:-1:-1;;;;2810:11:5;:18;;:24;2800:34;-1:-1:-1;;;2851:8:5;;;:14;;-1:-1:-1;;;;2885:10:5;:17;;:23;2875:33;-1:-1:-1;;;2925:8:5;;;:14;;-1:-1:-1;;;;2959:9:5;:16;;:22;2949:32;-1:-1:-1;;;2998:8:5;;;:14;;-1:-1:-1;;;;3032:8:5;:15;;:21;3022:31;-1:-1:-1;;;3070:8:5;;;:14;;-1:-1:-1;;;;3104:6:5;:13;;:19;3094:29;-1:-1:-1;;;3140:8:5;;;:14;;-1:-1:-1;;;;3174:5:5;:12;;:18;3164:28;3215:1;3206:10;;3202:162;;3262:1;3253:5;3247:3;:11;3236:6;:23;;;;;;;;;;:27;3232:54;;;-1:-1:-1;;3265:21:5;;;;;;;;3232:54;3317:5;3307:6;:15;;;;;;;;;;3300:22;;;;;;;;3202:162;3358:5;3357:6;;3346;:18;;;;;;;;;;3339:25;;;;;;;", + "source": "pragma solidity ^0.5.2;\n\n/// @title Math library - Allows calculation of logarithmic and exponential functions\n/// @author Alan Lu - \n/// @author Stefan George - \nlibrary GnosisMath {\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) public pure returns (uint) {\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) return 0;\n // Transform so that e^x -> 2^x\n x = x * int(ONE) / int(LN2);\n // 2^x = 2^whole(x) * 2^frac(x)\n // ^^^^^^^^^^ is a bit shift\n // so Taylor expand on z = frac(x)\n int shift;\n uint z;\n if (x >= 0) {\n shift = x / int(ONE);\n z = uint(x % int(ONE));\n } else {\n shift = x / int(ONE) - 1;\n z = ONE - uint(-x % int(ONE));\n }\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 // >>> ONE = 0x10000000000000000\n // >>> print('\\n'.join(hex(int(mp.log(2)**i / mp.factorial(i) * ONE)) for i in range(1, 7)))\n // 0xb17217f7d1cf79ab\n // 0x3d7f7bff058b1d50\n // 0xe35846b82505fc5\n // 0x276556df749cee5\n // 0x5761ff9e299cc4\n // 0xa184897c363c3\n uint zpow = z;\n uint result = ONE;\n result += 0xb17217f7d1cf79ab * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x3d7f7bff058b1d50 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0xe35846b82505fc5 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x276556df749cee5 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x5761ff9e299cc4 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0xa184897c363c3 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0xffe5fe2c4586 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x162c0223a5c8 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x1b5253d395e * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x1e4cf5158b * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x1e8cac735 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x1c3bd650 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x1816193 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x131496 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0xe1b7 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x9c7 * zpow / ONE;\n if (shift >= 0) {\n if (result >> (256 - shift) > 0) return (2 ** 256 - 1);\n return result << shift;\n } else return result >> (-shift);\n }\n\n /// @dev Returns natural logarithm value of given x\n /// @param x x\n /// @return ln(x)\n function ln(uint x) public pure returns (int) {\n require(x > 0);\n // binary search for floor(log2(x))\n int ilog2 = floorLog2(x);\n int z;\n if (ilog2 < 0) z = int(x << uint(-ilog2));\n else z = int(x >> uint(ilog2));\n // z = x * 2^-⌊log₂x⌋\n // so 1 <= z < 2\n // and ln z = ln x - ⌊log₂x⌋/log₂e\n // so just compute ln z using artanh series\n // and calculate ln x from that\n int term = (z - int(ONE)) * int(ONE) / (z + int(ONE));\n int halflnz = term;\n int termpow = term * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 3;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 5;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 7;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 9;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 11;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 13;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 15;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 17;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 19;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 21;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 23;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 25;\n return (ilog2 * int(ONE)) * int(ONE) / int(LOG2_E) + 2 * halflnz;\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) public pure returns (int lo) {\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) hi = mid;\n else 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) public pure returns (int maxNum) {\n require(nums.length > 0);\n maxNum = -2 ** 255;\n for (uint i = 0; i < nums.length; i++) if (nums[i] > maxNum) maxNum = nums[i];\n }\n\n /// @dev Returns whether an add operation causes an overflow\n /// @param a First addend\n /// @param b Second addend\n /// @return Did no overflow occur?\n function safeToAdd(uint a, uint b) internal pure returns (bool) {\n return a + b >= a;\n }\n\n /// @dev Returns whether a subtraction operation causes an underflow\n /// @param a Minuend\n /// @param b Subtrahend\n /// @return Did no underflow occur?\n function safeToSub(uint a, uint b) internal pure returns (bool) {\n return a >= b;\n }\n\n /// @dev Returns whether a multiply operation causes an overflow\n /// @param a First factor\n /// @param b Second factor\n /// @return Did no overflow occur?\n function safeToMul(uint a, uint b) internal pure returns (bool) {\n return b == 0 || a * b / b == a;\n }\n\n /// @dev Returns sum if no overflow occurred\n /// @param a First addend\n /// @param b Second addend\n /// @return Sum\n function add(uint a, uint b) internal pure returns (uint) {\n require(safeToAdd(a, b));\n return a + b;\n }\n\n /// @dev Returns difference if no overflow occurred\n /// @param a Minuend\n /// @param b Subtrahend\n /// @return Difference\n function sub(uint a, uint b) internal pure returns (uint) {\n require(safeToSub(a, b));\n return a - b;\n }\n\n /// @dev Returns product if no overflow occurred\n /// @param a First factor\n /// @param b Second factor\n /// @return Product\n function mul(uint a, uint b) internal pure returns (uint) {\n require(safeToMul(a, b));\n return a * b;\n }\n\n /// @dev Returns whether an add operation causes an overflow\n /// @param a First addend\n /// @param b Second addend\n /// @return Did no overflow occur?\n function safeToAdd(int a, int b) internal pure returns (bool) {\n return (b >= 0 && a + b >= a) || (b < 0 && a + b < a);\n }\n\n /// @dev Returns whether a subtraction operation causes an underflow\n /// @param a Minuend\n /// @param b Subtrahend\n /// @return Did no underflow occur?\n function safeToSub(int a, int b) internal pure returns (bool) {\n return (b >= 0 && a - b <= a) || (b < 0 && a - b > a);\n }\n\n /// @dev Returns whether a multiply operation causes an overflow\n /// @param a First factor\n /// @param b Second factor\n /// @return Did no overflow occur?\n function safeToMul(int a, int b) internal pure returns (bool) {\n return (b == 0) || (a * b / b == a);\n }\n\n /// @dev Returns sum if no overflow occurred\n /// @param a First addend\n /// @param b Second addend\n /// @return Sum\n function add(int a, int b) internal pure returns (int) {\n require(safeToAdd(a, b));\n return a + b;\n }\n\n /// @dev Returns difference if no overflow occurred\n /// @param a Minuend\n /// @param b Subtrahend\n /// @return Difference\n function sub(int a, int b) internal pure returns (int) {\n require(safeToSub(a, b));\n return a - b;\n }\n\n /// @dev Returns product if no overflow occurred\n /// @param a First factor\n /// @param b Second factor\n /// @return Product\n function mul(int a, int b) internal pure returns (int) {\n require(safeToMul(a, b));\n return a * b;\n }\n}\n", + "sourcePath": "@gnosis.pm/util-contracts/contracts/Math.sol", + "ast": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", + "exportedSymbols": { + "GnosisMath": [ + 1458 + ] + }, + "id": 1459, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 331, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:5" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title Math library - Allows calculation of logarithmic and exponential functions\n @author Alan Lu - \n @author Stefan George - ", + "fullyImplemented": true, + "id": 1458, + "linearizedBaseContracts": [ + 1458 + ], + "name": "GnosisMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 334, + "name": "ONE", + "nodeType": "VariableDeclaration", + "scope": 1458, + "src": "304:46:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 332, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "304:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30783130303030303030303030303030303030", + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "331:19:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18446744073709551616_by_1", + "typeString": "int_const 18446744073709551616" + }, + "value": "0x10000000000000000" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 337, + "name": "LN2", + "nodeType": "VariableDeclaration", + "scope": 1458, + "src": "356:45:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 335, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "356:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307862313732313766376431636637396163", + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "383:18:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12786308645202655660_by_1", + "typeString": "int_const 12786308645202655660" + }, + "value": "0xb17217f7d1cf79ac" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 340, + "name": "LOG2_E", + "nodeType": "VariableDeclaration", + "scope": 1458, + "src": "407:49:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 338, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "407:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30783137313534373635326238326665313737", + "id": 339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "437:19:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_26613026195688644983_by_1", + "typeString": "int_const 26613026195688644983" + }, + "value": "0x171547652b82fe177" + }, + "visibility": "public" + }, + { + "body": { + "id": 712, + "nodeType": "Block", + "src": "657:2714:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 348, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "794:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32343534393731323539383738393039383836363739", + "id": 349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "799:22:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2454971259878909886679_by_1", + "typeString": "int_const 2454971259878909886679" + }, + "value": "2454971259878909886679" + }, + "src": "794:27:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 347, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "786:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "786:36:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 352, + "nodeType": "ExpressionStatement", + "src": "786:36:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 353, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "946:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 355, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "950:22:5", + "subExpression": { + "argumentTypes": null, + "hexValue": "383138333233373533323932393639393632323237", + "id": 354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "951:21:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_818323753292969962227_by_1", + "typeString": "int_const 818323753292969962227" + }, + "value": "818323753292969962227" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_818323753292969962227_by_1", + "typeString": "int_const -818323753292969962227" + } + }, + "src": "946:26:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 359, + "nodeType": "IfStatement", + "src": "942:40:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "981:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 346, + "id": 358, + "nodeType": "Return", + "src": "974:8:5" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 360, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1032:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 361, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1036:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1044:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1040:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1040:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1036:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 367, + "name": "LN2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 337, + "src": "1055:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1051:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1051:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1036:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1032:27:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 371, + "nodeType": "ExpressionStatement", + "src": "1032:27:5" + }, + { + "assignments": [ + 373 + ], + "declarations": [ + { + "constant": false, + "id": 373, + "name": "shift", + "nodeType": "VariableDeclaration", + "scope": 712, + "src": "1195:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 372, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1195:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 374, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "1195:9:5" + }, + { + "assignments": [ + 376 + ], + "declarations": [ + { + "constant": false, + "id": 376, + "name": "z", + "nodeType": "VariableDeclaration", + "scope": 712, + "src": "1214:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 375, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1214:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 377, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "1214:6:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 378, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1234:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1239:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1234:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 423, + "nodeType": "Block", + "src": "1329:92:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 400, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "1343:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 401, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1351:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 403, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1359:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 402, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1355:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1355:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1351:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1366:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1351:16:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1343:24:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 409, + "nodeType": "ExpressionStatement", + "src": "1343:24:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 410, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "1381:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 411, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1385:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "1396:2:5", + "subExpression": { + "argumentTypes": null, + "id": 413, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1397:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 416, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1405:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1401:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1401:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1396:13:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1391:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1391:19:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1385:25:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1381:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 422, + "nodeType": "ExpressionStatement", + "src": "1381:29:5" + } + ] + }, + "id": 424, + "nodeType": "IfStatement", + "src": "1230:191:5", + "trueBody": { + "id": 399, + "nodeType": "Block", + "src": "1242:81:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 381, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "1256:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 382, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1264:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 384, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1272:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1268:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1268:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1264:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1256:20:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 388, + "nodeType": "ExpressionStatement", + "src": "1256:20:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 389, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "1290:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 391, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1299:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1307:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1303:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1303:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1299:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1294:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1294:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1290:22:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 398, + "nodeType": "ExpressionStatement", + "src": "1290:22:5" + } + ] + } + }, + { + "assignments": [ + 426 + ], + "declarations": [ + { + "constant": false, + "id": 426, + "name": "zpow", + "nodeType": "VariableDeclaration", + "scope": 712, + "src": "1956:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 425, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1956:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 428, + "initialValue": { + "argumentTypes": null, + "id": 427, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "1968:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1956:13:5" + }, + { + "assignments": [ + 430 + ], + "declarations": [ + { + "constant": false, + "id": 430, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 712, + "src": "1979:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 429, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1979:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 432, + "initialValue": { + "argumentTypes": null, + "id": 431, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1993:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1979:17:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 433, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2006:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307862313732313766376431636637396162", + "id": 434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2016:18:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12786308645202655659_by_1", + "typeString": "int_const 12786308645202655659" + }, + "value": "0xb17217f7d1cf79ab" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 435, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2037:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2016:25:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 437, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2044:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2016:31:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2006:41:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 440, + "nodeType": "ExpressionStatement", + "src": "2006:41:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 441, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2057:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 442, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2064:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 443, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2071:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2064:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 445, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2075:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2064:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2057:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 448, + "nodeType": "ExpressionStatement", + "src": "2057:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 449, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2088:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307833643766376266663035386231643530", + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2098:18:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4431396893595737424_by_1", + "typeString": "int_const 4431396893595737424" + }, + "value": "0x3d7f7bff058b1d50" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 451, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2119:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2098:25:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 453, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2126:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2098:31:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2088:41:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 456, + "nodeType": "ExpressionStatement", + "src": "2088:41:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 457, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2139:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 458, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2146:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 459, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2153:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2146:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 461, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2157:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2146:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2139:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 464, + "nodeType": "ExpressionStatement", + "src": "2139:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 465, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2170:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078653335383436623832353035666335", + "id": 466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2180:17:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1023870087579328453_by_1", + "typeString": "int_const 1023870087579328453" + }, + "value": "0xe35846b82505fc5" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 467, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2200:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2180:24:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 469, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2207:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2180:30:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2170:40:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 472, + "nodeType": "ExpressionStatement", + "src": "2170:40:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 473, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2220:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 474, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2227:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 475, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2234:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2227:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 477, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2238:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2227:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2220:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 480, + "nodeType": "ExpressionStatement", + "src": "2220:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 481, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2251:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078323736353536646637343963656535", + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2261:17:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_177423166116318949_by_1", + "typeString": "int_const 177423166116318949" + }, + "value": "0x276556df749cee5" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 483, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2281:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2261:24:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 485, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2288:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2261:30:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2251:40:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 488, + "nodeType": "ExpressionStatement", + "src": "2251:40:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 489, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2301:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 490, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2308:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 491, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2315:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2308:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 493, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2319:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2308:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2301:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 496, + "nodeType": "ExpressionStatement", + "src": "2301:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 497, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2332:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "30783537363166663965323939636334", + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2342:16:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_24596073471909060_by_1", + "typeString": "int_const 24596073471909060" + }, + "value": "0x5761ff9e299cc4" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 499, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2361:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2342:23:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 501, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2368:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2342:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2332:39:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 504, + "nodeType": "ExpressionStatement", + "src": "2332:39:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 505, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2381:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 506, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2388:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 507, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2395:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2388:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 509, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2399:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2388:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2381:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 512, + "nodeType": "ExpressionStatement", + "src": "2381:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 513, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2412:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307861313834383937633336336333", + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2422:15:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2841449829983171_by_1", + "typeString": "int_const 2841449829983171" + }, + "value": "0xa184897c363c3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 515, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2440:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2422:22:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 517, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2447:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2422:28:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2412:38:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "2412:38:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 521, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2460:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 522, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2467:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 523, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2474:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2467:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 525, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2478:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2467:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2460:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 528, + "nodeType": "ExpressionStatement", + "src": "2460:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 529, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2491:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078666665356665326334353836", + "id": 530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2501:14:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_281363276907910_by_1", + "typeString": "int_const 281363276907910" + }, + "value": "0xffe5fe2c4586" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 531, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2518:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2501:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 533, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2525:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2501:27:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2491:37:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 536, + "nodeType": "ExpressionStatement", + "src": "2491:37:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 537, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2538:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 538, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2545:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 539, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2552:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2545:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 541, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2556:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2545:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2538:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 544, + "nodeType": "ExpressionStatement", + "src": "2538:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 545, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2569:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078313632633032323361356338", + "id": 546, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2579:14:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_24378270262728_by_1", + "typeString": "int_const 24378270262728" + }, + "value": "0x162c0223a5c8" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 547, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2596:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2579:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 549, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2603:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2579:27:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2569:37:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 552, + "nodeType": "ExpressionStatement", + "src": "2569:37:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 553, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2616:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 554, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2623:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2630:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2623:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 557, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2634:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2623:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2616:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 560, + "nodeType": "ExpressionStatement", + "src": "2616:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 561, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2647:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "30783162353235336433393565", + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2657:13:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1877525477726_by_1", + "typeString": "int_const 1877525477726" + }, + "value": "0x1b5253d395e" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 563, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2673:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2657:20:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 565, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2680:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2657:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2647:36:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 568, + "nodeType": "ExpressionStatement", + "src": "2647:36:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 569, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2693:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 570, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2700:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 571, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2707:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2700:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 573, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2711:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2700:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2693:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 576, + "nodeType": "ExpressionStatement", + "src": "2693:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 577, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2724:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307831653463663531353862", + "id": 578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2734:12:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_130140149131_by_1", + "typeString": "int_const 130140149131" + }, + "value": "0x1e4cf5158b" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 579, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2749:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2734:19:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 581, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2756:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2734:25:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2724:35:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 584, + "nodeType": "ExpressionStatement", + "src": "2724:35:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 585, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2769:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 586, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2776:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 587, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2783:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2776:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 589, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2787:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2776:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2769:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 592, + "nodeType": "ExpressionStatement", + "src": "2769:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 593, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2800:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078316538636163373335", + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2810:11:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8200570677_by_1", + "typeString": "int_const 8200570677" + }, + "value": "0x1e8cac735" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 595, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2824:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2810:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 597, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2831:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2810:24:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2800:34:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 600, + "nodeType": "ExpressionStatement", + "src": "2800:34:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 601, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2844:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 602, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2851:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 603, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2858:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2851:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 605, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2862:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2851:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2844:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 608, + "nodeType": "ExpressionStatement", + "src": "2844:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 609, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2875:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "30783163336264363530", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2885:10:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_473683536_by_1", + "typeString": "int_const 473683536" + }, + "value": "0x1c3bd650" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 611, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2898:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2885:17:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 613, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2905:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2885:23:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2875:33:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 616, + "nodeType": "ExpressionStatement", + "src": "2875:33:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 617, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2918:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 618, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2925:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 619, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2932:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2925:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 621, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2936:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2925:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2918:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "2918:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 625, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2949:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307831383136313933", + "id": 626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2959:9:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_25256339_by_1", + "typeString": "int_const 25256339" + }, + "value": "0x1816193" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 627, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2971:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2959:16:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 629, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2978:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2959:22:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2949:32:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 632, + "nodeType": "ExpressionStatement", + "src": "2949:32:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 633, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2991:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 634, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2998:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 635, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "3005:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2998:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 637, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3009:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2998:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2991:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 640, + "nodeType": "ExpressionStatement", + "src": "2991:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 641, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3022:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078313331343936", + "id": 642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3032:8:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1250454_by_1", + "typeString": "int_const 1250454" + }, + "value": "0x131496" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 643, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3043:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3032:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 645, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3050:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3032:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3022:31:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 648, + "nodeType": "ExpressionStatement", + "src": "3022:31:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 649, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3063:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 650, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3070:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 651, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "3077:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3070:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 653, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3081:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3070:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3063:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 656, + "nodeType": "ExpressionStatement", + "src": "3063:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 657, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3094:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307865316237", + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3104:6:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57783_by_1", + "typeString": "int_const 57783" + }, + "value": "0xe1b7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 659, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3113:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3104:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 661, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3120:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3104:19:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3094:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 664, + "nodeType": "ExpressionStatement", + "src": "3094:29:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 665, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3133:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 666, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3140:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 667, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "3147:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3140:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 669, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3151:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3140:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3133:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 672, + "nodeType": "ExpressionStatement", + "src": "3133:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 673, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3164:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078396337", + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3174:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2503_by_1", + "typeString": "int_const 2503" + }, + "value": "0x9c7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 675, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3182:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3174:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 677, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3189:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3174:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3164:28:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "3164:28:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 681, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "3206:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 682, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3215:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3206:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 705, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3346:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "3357:6:5", + "subExpression": { + "argumentTypes": null, + "id": 706, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "3358:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 708, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3356:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3346:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 346, + "id": 710, + "nodeType": "Return", + "src": "3339:25:5" + }, + "id": 711, + "nodeType": "IfStatement", + "src": "3202:162:5", + "trueBody": { + "id": 704, + "nodeType": "Block", + "src": "3218:115:5", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 684, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3236:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "323536", + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3247:3:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 686, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "3253:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3247:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 688, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3246:13:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3236:23:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 690, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3262:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3236:27:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "3232:54:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", + "typeString": "int_const 1157...(70 digits omitted)...9935" + }, + "id": 696, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", + "typeString": "int_const 1157...(70 digits omitted)...9936" + }, + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3273:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323536", + "id": 693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3278:3:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + }, + "src": "3273:8:5", + "typeDescriptions": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", + "typeString": "int_const 1157...(70 digits omitted)...9936" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3284:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3273:12:5", + "typeDescriptions": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", + "typeString": "int_const 1157...(70 digits omitted)...9935" + } + } + ], + "id": 697, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3272:14:5", + "typeDescriptions": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", + "typeString": "int_const 1157...(70 digits omitted)...9935" + } + }, + "functionReturnParameters": 346, + "id": 698, + "nodeType": "Return", + "src": "3265:21:5" + } + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 700, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3307:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 701, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "3317:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3307:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 346, + "id": 703, + "nodeType": "Return", + "src": "3300:22:5" + } + ] + } + } + ] + }, + "documentation": "@dev Returns natural exponential function value of given x\n @param x x\n @return e**x", + "id": 713, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "exp", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 343, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 342, + "name": "x", + "nodeType": "VariableDeclaration", + "scope": 713, + "src": "623:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 341, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "623:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "622:7:5" + }, + "returnParameters": { + "id": 346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 345, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 713, + "src": "651:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 344, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "651:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "650:6:5" + }, + "scope": 1458, + "src": "610:2761:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1067, + "nodeType": "Block", + "src": "3520:1733:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 721, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "3538:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3542:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3538:5:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 720, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "3530:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3530:14:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 725, + "nodeType": "ExpressionStatement", + "src": "3530:14:5" + }, + { + "assignments": [ + 727 + ], + "declarations": [ + { + "constant": false, + "id": 727, + "name": "ilog2", + "nodeType": "VariableDeclaration", + "scope": 1067, + "src": "3598:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 726, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3598:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 731, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 729, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "3620:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 728, + "name": "floorLog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1144, + "src": "3610:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_int256_$", + "typeString": "function (uint256) pure returns (int256)" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3610:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3598:24:5" + }, + { + "assignments": [ + 733 + ], + "declarations": [ + { + "constant": false, + "id": 733, + "name": "z", + "nodeType": "VariableDeclaration", + "scope": 1067, + "src": "3632:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 732, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3632:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 734, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "3632:5:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 735, + "name": "ilog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "3651:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 736, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3659:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3651:9:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 749, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 733, + "src": "3703:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 751, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "3711:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "ilog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "3721:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3716:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3716:11:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3711:16:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3707:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3707:21:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3703:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 758, + "nodeType": "ExpressionStatement", + "src": "3703:25:5" + }, + "id": 759, + "nodeType": "IfStatement", + "src": "3647:81:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 738, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 733, + "src": "3662:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 740, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "3670:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "3680:6:5", + "subExpression": { + "argumentTypes": null, + "id": 742, + "name": "ilog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "3681:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3675:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3675:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3670:17:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3666:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3666:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3662:26:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 748, + "nodeType": "ExpressionStatement", + "src": "3662:26:5" + } + }, + { + "assignments": [ + 761 + ], + "declarations": [ + { + "constant": false, + "id": 761, + "name": "term", + "nodeType": "VariableDeclaration", + "scope": 1067, + "src": "3942:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 760, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3942:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 779, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 762, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 733, + "src": "3954:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 764, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3962:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3958:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3958:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3954:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 767, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3953:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 769, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3974:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 768, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3970:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3970:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3953:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 772, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 733, + "src": "3982:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 774, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3990:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3986:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3986:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3982:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 777, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3981:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3953:42:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3942:53:5" + }, + { + "assignments": [ + 781 + ], + "declarations": [ + { + "constant": false, + "id": 781, + "name": "halflnz", + "nodeType": "VariableDeclaration", + "scope": 1067, + "src": "4005:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 780, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "4005:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 783, + "initialValue": { + "argumentTypes": null, + "id": 782, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4019:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4005:18:5" + }, + { + "assignments": [ + 785 + ], + "declarations": [ + { + "constant": false, + "id": 785, + "name": "termpow", + "nodeType": "VariableDeclaration", + "scope": 1067, + "src": "4033:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 784, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "4033:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 799, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 786, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4047:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 787, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4054:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4047:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 790, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4065:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4061:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4061:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4047:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 793, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4072:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4047:29:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 796, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4083:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 795, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4079:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4079:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4047:40:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4033:54:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 800, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4097:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 801, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4108:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4118:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "4108:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4097:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 805, + "nodeType": "ExpressionStatement", + "src": "4097:22:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 806, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4129:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 807, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4139:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 808, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4149:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4139:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 811, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4160:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 810, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4156:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 812, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4156:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4139:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 814, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4167:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4139:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 817, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4178:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4174:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4174:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4139:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4129:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 821, + "nodeType": "ExpressionStatement", + "src": "4129:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 822, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4192:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 823, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4203:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4213:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "4203:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4192:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 827, + "nodeType": "ExpressionStatement", + "src": "4192:22:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 828, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4224:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 829, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4234:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 830, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4244:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4234:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 833, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4255:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 832, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4251:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4251:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4234:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 836, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4262:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4234:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 839, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4273:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 838, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4269:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4269:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4234:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4224:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 843, + "nodeType": "ExpressionStatement", + "src": "4224:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 844, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4287:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 845, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4298:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "37", + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4308:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "src": "4298:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4287:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 849, + "nodeType": "ExpressionStatement", + "src": "4287:22:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 850, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4319:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 851, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4329:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 852, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4339:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4329:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 855, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4350:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4346:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4346:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4329:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 858, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4357:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4329:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 861, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4368:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4364:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4364:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4329:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4319:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 865, + "nodeType": "ExpressionStatement", + "src": "4319:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 866, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4382:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 867, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4393:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "39", + "id": 868, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4403:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_9_by_1", + "typeString": "int_const 9" + }, + "value": "9" + }, + "src": "4393:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4382:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 871, + "nodeType": "ExpressionStatement", + "src": "4382:22:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 872, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4414:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 873, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4424:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 874, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4434:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4424:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 877, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4445:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4441:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4441:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4424:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 880, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4452:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4424:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 883, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4463:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4459:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 884, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4459:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4424:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4414:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 887, + "nodeType": "ExpressionStatement", + "src": "4414:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 888, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4477:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 889, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4488:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3131", + "id": 890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4498:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_11_by_1", + "typeString": "int_const 11" + }, + "value": "11" + }, + "src": "4488:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4477:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 893, + "nodeType": "ExpressionStatement", + "src": "4477:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 894, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4510:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 895, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4520:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 896, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4530:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4520:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 899, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4541:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4537:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 900, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4537:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4520:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 902, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4548:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4520:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 905, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4559:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 904, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4555:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4555:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4520:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4510:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 909, + "nodeType": "ExpressionStatement", + "src": "4510:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 910, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4573:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 911, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4584:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3133", + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4594:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_13_by_1", + "typeString": "int_const 13" + }, + "value": "13" + }, + "src": "4584:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4573:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "4573:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 916, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4606:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 917, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4616:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 918, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4626:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4616:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 921, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4637:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 920, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4633:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4633:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4616:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 924, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4644:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4616:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 927, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4655:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4651:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4651:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4616:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4606:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 931, + "nodeType": "ExpressionStatement", + "src": "4606:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 932, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4669:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 933, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4680:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3135", + "id": 934, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4690:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "15" + }, + "src": "4680:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4669:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 937, + "nodeType": "ExpressionStatement", + "src": "4669:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 938, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4702:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 939, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4712:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 940, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4722:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4712:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 943, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4733:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4729:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4729:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4712:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 946, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4740:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4712:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 949, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4751:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4747:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 950, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4747:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4712:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4702:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 953, + "nodeType": "ExpressionStatement", + "src": "4702:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 954, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4765:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 955, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4776:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3137", + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4786:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_17_by_1", + "typeString": "int_const 17" + }, + "value": "17" + }, + "src": "4776:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4765:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 959, + "nodeType": "ExpressionStatement", + "src": "4765:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 960, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4798:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 961, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4808:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 962, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4818:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4808:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 965, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4829:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4825:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4825:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4808:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 968, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4836:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4808:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 971, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4847:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 970, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4843:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 972, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4843:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4808:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4798:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 975, + "nodeType": "ExpressionStatement", + "src": "4798:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 976, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4861:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 977, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4872:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3139", + "id": 978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4882:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_19_by_1", + "typeString": "int_const 19" + }, + "value": "19" + }, + "src": "4872:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4861:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 981, + "nodeType": "ExpressionStatement", + "src": "4861:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 982, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4894:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 983, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4904:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 984, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4914:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4904:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4925:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4921:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4921:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4904:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 990, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4932:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4904:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 993, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4943:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4939:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4939:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4904:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4894:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 997, + "nodeType": "ExpressionStatement", + "src": "4894:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 998, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4957:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 999, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4968:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 1000, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4978:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "4968:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4957:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1003, + "nodeType": "ExpressionStatement", + "src": "4957:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1004, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4990:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1005, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "5000:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1006, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5010:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5000:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1009, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5021:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1008, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5017:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1010, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5000:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1012, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5028:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5000:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1015, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5039:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5035:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5035:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5000:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4990:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1019, + "nodeType": "ExpressionStatement", + "src": "4990:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1020, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "5053:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "5064:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3233", + "id": 1022, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5074:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_23_by_1", + "typeString": "int_const 23" + }, + "value": "23" + }, + "src": "5064:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5053:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1025, + "nodeType": "ExpressionStatement", + "src": "5053:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1026, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "5086:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1027, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "5096:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1028, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5106:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5096:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1031, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5117:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1030, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5113:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1032, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5113:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5096:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1034, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5124:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5096:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1037, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5135:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1036, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5131:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5131:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5096:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5086:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "5086:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1042, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "5149:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1043, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "5160:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3235", + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5170:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_25_by_1", + "typeString": "int_const 25" + }, + "value": "25" + }, + "src": "5160:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5149:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1047, + "nodeType": "ExpressionStatement", + "src": "5149:23:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1048, + "name": "ilog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "5190:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1050, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5202:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5198:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1051, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5198:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5190:16:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 1053, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5189:18:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1055, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5214:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1054, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5210:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5210:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5189:29:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1059, + "name": "LOG2_E", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "5225:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1058, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5221:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1060, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5221:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5189:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5235:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1063, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "5239:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5235:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5189:57:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 719, + "id": 1066, + "nodeType": "Return", + "src": "5182:64:5" + } + ] + }, + "documentation": "@dev Returns natural logarithm value of given x\n @param x x\n @return ln(x)", + "id": 1068, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ln", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 716, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 715, + "name": "x", + "nodeType": "VariableDeclaration", + "scope": 1068, + "src": "3486:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 714, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3486:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3485:8:5" + }, + "returnParameters": { + "id": 719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 718, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1068, + "src": "3515:3:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 717, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3515:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3514:5:5" + }, + "scope": 1458, + "src": "3474:1779:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1143, + "nodeType": "Block", + "src": "5423:373:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1075, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "5433:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "5438:3:5", + "subExpression": { + "argumentTypes": null, + "hexValue": "3634", + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5439:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_64_by_1", + "typeString": "int_const -64" + } + }, + "src": "5433:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1079, + "nodeType": "ExpressionStatement", + "src": "5433:8:5" + }, + { + "assignments": [ + 1081 + ], + "declarations": [ + { + "constant": false, + "id": 1081, + "name": "hi", + "nodeType": "VariableDeclaration", + "scope": 1143, + "src": "5451:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1080, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5451:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1083, + "initialValue": { + "argumentTypes": null, + "hexValue": "313933", + "id": 1082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5460:3:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_193_by_1", + "typeString": "int_const 193" + }, + "value": "193" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5451:12:5" + }, + { + "assignments": [ + 1085 + ], + "declarations": [ + { + "constant": false, + "id": 1085, + "name": "mid", + "nodeType": "VariableDeclaration", + "scope": 1143, + "src": "5566:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1084, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5566:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1092, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1086, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1081, + "src": "5577:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1087, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "5582:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5577:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 1089, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5576:9:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5589:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5576:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5566:24:5" + }, + { + "body": { + "id": 1141, + "nodeType": "Block", + "src": "5622:168:5", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1099, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5640:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5646:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5640:7:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1102, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "5651:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "5661:4:5", + "subExpression": { + "argumentTypes": null, + "id": 1104, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5662:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5656:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 1106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5656:10:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5651:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1108, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5669:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5651:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5640:32:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1111, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5676:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5683:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5676:8:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1114, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "5688:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1116, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5698:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5693:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 1117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5693:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5688:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1119, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5705:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5688:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5676:32:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5640:68:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1127, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "5737:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1128, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5742:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5737:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1130, + "nodeType": "ExpressionStatement", + "src": "5737:8:5" + }, + "id": 1131, + "nodeType": "IfStatement", + "src": "5636:109:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1123, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1081, + "src": "5710:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1124, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5715:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5710:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1126, + "nodeType": "ExpressionStatement", + "src": "5710:8:5" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1132, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5759:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1133, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1081, + "src": "5766:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1134, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "5771:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5766:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 1136, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5765:9:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5778:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5765:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5759:20:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1140, + "nodeType": "ExpressionStatement", + "src": "5759:20:5" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1093, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "5608:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5613:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5608:6:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 1096, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5607:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1097, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1081, + "src": "5618:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5607:13:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1142, + "nodeType": "WhileStatement", + "src": "5600:190:5" + } + ] + }, + "documentation": "@dev Returns base 2 logarithm value of given x\n @param x x\n @return logarithmic value", + "id": 1144, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "floorLog2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1071, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1070, + "name": "x", + "nodeType": "VariableDeclaration", + "scope": 1144, + "src": "5386:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1069, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5386:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5385:8:5" + }, + "returnParameters": { + "id": 1074, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1073, + "name": "lo", + "nodeType": "VariableDeclaration", + "scope": 1144, + "src": "5415:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1072, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5415:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5414:8:5" + }, + "scope": 1458, + "src": "5367:429:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1190, + "nodeType": "Block", + "src": "5983:156:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1153, + "name": "nums", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1147, + "src": "6001:4:5", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + "id": 1154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6001:11:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6015:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6001:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1152, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "5993:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5993:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1158, + "nodeType": "ExpressionStatement", + "src": "5993:24:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1159, + "name": "maxNum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1150, + "src": "6027:6:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_minus_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const -578...(70 digits omitted)...9968" + }, + "id": 1163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "6036:2:5", + "subExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6037:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_2_by_1", + "typeString": "int_const -2" + } + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323535", + "id": 1162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6042:3:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "6036:9:5", + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const -578...(70 digits omitted)...9968" + } + }, + "src": "6027:18:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1165, + "nodeType": "ExpressionStatement", + "src": "6027:18:5" + }, + { + "body": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1177, + "name": "nums", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1147, + "src": "6098:4:5", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + "id": 1179, + "indexExpression": { + "argumentTypes": null, + "id": 1178, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "6103:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6098:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 1180, + "name": "maxNum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1150, + "src": "6108:6:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "6098:16:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1188, + "nodeType": "IfStatement", + "src": "6094:38:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1182, + "name": "maxNum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1150, + "src": "6116:6:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1183, + "name": "nums", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1147, + "src": "6125:4:5", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + "id": 1185, + "indexExpression": { + "argumentTypes": null, + "id": 1184, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "6130:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6125:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "6116:16:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1187, + "nodeType": "ExpressionStatement", + "src": "6116:16:5" + } + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1170, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "6072:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1171, + "name": "nums", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1147, + "src": "6076:4:5", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6076:11:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6072:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1189, + "initializationExpression": { + "assignments": [ + 1167 + ], + "declarations": [ + { + "constant": false, + "id": 1167, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 1189, + "src": "6060:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6060:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1169, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1168, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6069:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6060:10:5" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "6089:3:5", + "subExpression": { + "argumentTypes": null, + "id": 1174, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "6089:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1176, + "nodeType": "ExpressionStatement", + "src": "6089:3:5" + }, + "nodeType": "ForStatement", + "src": "6055:77:5" + } + ] + }, + "documentation": "@dev Returns maximum of an array\n @param nums Numbers to look through\n @return Maximum number", + "id": 1191, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "max", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1148, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1147, + "name": "nums", + "nodeType": "VariableDeclaration", + "scope": 1191, + "src": "5931:17:5", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[]" + }, + "typeName": { + "baseType": { + "id": 1145, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5931:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1146, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5931:5:5", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", + "typeString": "int256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5930:19:5" + }, + "returnParameters": { + "id": 1151, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1150, + "name": "maxNum", + "nodeType": "VariableDeclaration", + "scope": 1191, + "src": "5971:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1149, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5971:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5970:12:5" + }, + "scope": 1458, + "src": "5918:221:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1206, + "nodeType": "Block", + "src": "6374:34:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1200, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1193, + "src": "6391:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1201, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1195, + "src": "6395:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6391:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1203, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1193, + "src": "6400:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6391:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1199, + "id": 1205, + "nodeType": "Return", + "src": "6384:17:5" + } + ] + }, + "documentation": "@dev Returns whether an add operation causes an overflow\n @param a First addend\n @param b Second addend\n @return Did no overflow occur?", + "id": 1207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToAdd", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1196, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1193, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1207, + "src": "6329:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1192, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6329:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1195, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1207, + "src": "6337:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1194, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6337:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6328:16:5" + }, + "returnParameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1207, + "src": "6368:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6368:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6367:6:5" + }, + "scope": 1458, + "src": "6310:98:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1220, + "nodeType": "Block", + "src": "6644:30:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1216, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1209, + "src": "6661:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1217, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1211, + "src": "6666:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6661:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1215, + "id": 1219, + "nodeType": "Return", + "src": "6654:13:5" + } + ] + }, + "documentation": "@dev Returns whether a subtraction operation causes an underflow\n @param a Minuend\n @param b Subtrahend\n @return Did no underflow occur?", + "id": 1221, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToSub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1209, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "6599:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1208, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6599:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1211, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "6607:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1210, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6607:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6598:16:5" + }, + "returnParameters": { + "id": 1215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "6638:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6638:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6637:6:5" + }, + "scope": 1458, + "src": "6580:94:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1242, + "nodeType": "Block", + "src": "6913:48:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1230, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1225, + "src": "6930:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6935:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6930:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1233, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "6940:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1234, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1225, + "src": "6944:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6940:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1236, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1225, + "src": "6948:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6940:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1238, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "6953:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6940:14:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6930:24:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1229, + "id": 1241, + "nodeType": "Return", + "src": "6923:31:5" + } + ] + }, + "documentation": "@dev Returns whether a multiply operation causes an overflow\n @param a First factor\n @param b Second factor\n @return Did no overflow occur?", + "id": 1243, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToMul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1223, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6868:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1222, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6868:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1225, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6876:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1224, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6876:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6867:16:5" + }, + "returnParameters": { + "id": 1229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1228, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6907:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1227, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6907:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6906:6:5" + }, + "scope": 1458, + "src": "6849:112:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1263, + "nodeType": "Block", + "src": "7155:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1254, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1245, + "src": "7183:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1255, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1247, + "src": "7186:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1253, + "name": "safeToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1207, + 1338 + ], + "referencedDeclaration": 1207, + "src": "7173:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7173:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1252, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "7165:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7165:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1258, + "nodeType": "ExpressionStatement", + "src": "7165:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1259, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1245, + "src": "7206:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1260, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1247, + "src": "7210:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7206:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1251, + "id": 1262, + "nodeType": "Return", + "src": "7199:12:5" + } + ] + }, + "documentation": "@dev Returns sum if no overflow occurred\n @param a First addend\n @param b Second addend\n @return Sum", + "id": 1264, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1264, + "src": "7110:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1244, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7110:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1264, + "src": "7118:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7118:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7109:16:5" + }, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1264, + "src": "7149:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1249, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7149:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7148:6:5" + }, + "scope": 1458, + "src": "7097:121:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1284, + "nodeType": "Block", + "src": "7418:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1275, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1266, + "src": "7446:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1276, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1268, + "src": "7449:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1274, + "name": "safeToSub", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1221, + 1370 + ], + "referencedDeclaration": 1221, + "src": "7436:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 1277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7436:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1273, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "7428:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7428:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1279, + "nodeType": "ExpressionStatement", + "src": "7428:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1266, + "src": "7469:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1268, + "src": "7473:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7469:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1272, + "id": 1283, + "nodeType": "Return", + "src": "7462:12:5" + } + ] + }, + "documentation": "@dev Returns difference if no overflow occurred\n @param a Minuend\n @param b Subtrahend\n @return Difference", + "id": 1285, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1266, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1285, + "src": "7373:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1265, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7373:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1268, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1285, + "src": "7381:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7381:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7372:16:5" + }, + "returnParameters": { + "id": 1272, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1271, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1285, + "src": "7412:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7412:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7411:6:5" + }, + "scope": 1458, + "src": "7360:121:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1305, + "nodeType": "Block", + "src": "7683:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1296, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1287, + "src": "7711:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1297, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1289, + "src": "7714:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1295, + "name": "safeToMul", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1243, + 1394 + ], + "referencedDeclaration": 1243, + "src": "7701:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 1298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7701:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1294, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "7693:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7693:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1300, + "nodeType": "ExpressionStatement", + "src": "7693:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1301, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1287, + "src": "7734:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1302, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1289, + "src": "7738:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7734:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1293, + "id": 1304, + "nodeType": "Return", + "src": "7727:12:5" + } + ] + }, + "documentation": "@dev Returns product if no overflow occurred\n @param a First factor\n @param b Second factor\n @return Product", + "id": 1306, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1290, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1287, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1306, + "src": "7638:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1286, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7638:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1289, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1306, + "src": "7646:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1288, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7646:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7637:16:5" + }, + "returnParameters": { + "id": 1293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1292, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1306, + "src": "7677:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1291, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7677:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7676:6:5" + }, + "scope": 1458, + "src": "7625:121:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1337, + "nodeType": "Block", + "src": "7979:70:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1315, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "7997:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8002:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7997:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1318, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "8007:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "8011:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8007:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1321, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "8016:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8007:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7997:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1324, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7996:22:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "8023:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8027:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8023:5:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1328, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "8032:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1329, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "8036:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8032:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1331, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "8040:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8032:9:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8023:18:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1334, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8022:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7996:46:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1314, + "id": 1336, + "nodeType": "Return", + "src": "7989:53:5" + } + ] + }, + "documentation": "@dev Returns whether an add operation causes an overflow\n @param a First addend\n @param b Second addend\n @return Did no overflow occur?", + "id": 1338, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToAdd", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1308, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1338, + "src": "7936:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1307, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7936:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1310, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1338, + "src": "7943:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1309, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7943:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7935:14:5" + }, + "returnParameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1313, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1338, + "src": "7973:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1312, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7973:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7972:6:5" + }, + "scope": 1458, + "src": "7917:132:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1369, + "nodeType": "Block", + "src": "8283:70:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1347, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1342, + "src": "8301:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8306:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8301:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1350, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1340, + "src": "8311:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1351, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1342, + "src": "8315:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8311:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1353, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1340, + "src": "8320:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8311:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8301:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1356, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8300:22:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1357, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1342, + "src": "8327:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8331:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8327:5:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1360, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1340, + "src": "8336:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1361, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1342, + "src": "8340:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8336:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 1363, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1340, + "src": "8344:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8336:9:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8327:18:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1366, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8326:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8300:46:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1346, + "id": 1368, + "nodeType": "Return", + "src": "8293:53:5" + } + ] + }, + "documentation": "@dev Returns whether a subtraction operation causes an underflow\n @param a Minuend\n @param b Subtrahend\n @return Did no underflow occur?", + "id": 1370, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToSub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1343, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1340, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1370, + "src": "8240:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1339, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8240:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1342, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1370, + "src": "8247:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1341, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8247:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8239:14:5" + }, + "returnParameters": { + "id": 1346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1345, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1370, + "src": "8277:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1344, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8277:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8276:6:5" + }, + "scope": 1458, + "src": "8221:132:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1393, + "nodeType": "Block", + "src": "8590:52:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1379, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "8608:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8613:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8608:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1382, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8607:8:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1383, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1372, + "src": "8620:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1384, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "8624:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8620:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1386, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "8628:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8620:9:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1388, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1372, + "src": "8633:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8620:14:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1390, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8619:16:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8607:28:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1378, + "id": 1392, + "nodeType": "Return", + "src": "8600:35:5" + } + ] + }, + "documentation": "@dev Returns whether a multiply operation causes an overflow\n @param a First factor\n @param b Second factor\n @return Did no overflow occur?", + "id": 1394, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToMul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1375, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1372, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1394, + "src": "8547:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1371, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8547:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1374, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1394, + "src": "8554:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1373, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8554:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8546:14:5" + }, + "returnParameters": { + "id": 1378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1377, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1394, + "src": "8584:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1376, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8584:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8583:6:5" + }, + "scope": 1458, + "src": "8528:114:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1414, + "nodeType": "Block", + "src": "8833:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1405, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1396, + "src": "8861:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1406, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1398, + "src": "8864:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1404, + "name": "safeToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1207, + 1338 + ], + "referencedDeclaration": 1338, + "src": "8851:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 1407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8851:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "8843:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8843:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1409, + "nodeType": "ExpressionStatement", + "src": "8843:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1410, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1396, + "src": "8884:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1411, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1398, + "src": "8888:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8884:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1402, + "id": 1413, + "nodeType": "Return", + "src": "8877:12:5" + } + ] + }, + "documentation": "@dev Returns sum if no overflow occurred\n @param a First addend\n @param b Second addend\n @return Sum", + "id": 1415, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1399, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1396, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1415, + "src": "8791:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1395, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8791:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1398, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1415, + "src": "8798:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1397, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8798:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8790:14:5" + }, + "returnParameters": { + "id": 1402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1401, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1415, + "src": "8828:3:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1400, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8828:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8827:5:5" + }, + "scope": 1458, + "src": "8778:118:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1435, + "nodeType": "Block", + "src": "9093:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1426, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1417, + "src": "9121:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1427, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1419, + "src": "9124:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1425, + "name": "safeToSub", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1221, + 1370 + ], + "referencedDeclaration": 1370, + "src": "9111:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 1428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9111:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1424, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "9103:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9103:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1430, + "nodeType": "ExpressionStatement", + "src": "9103:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1431, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1417, + "src": "9144:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1432, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1419, + "src": "9148:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "9144:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1423, + "id": 1434, + "nodeType": "Return", + "src": "9137:12:5" + } + ] + }, + "documentation": "@dev Returns difference if no overflow occurred\n @param a Minuend\n @param b Subtrahend\n @return Difference", + "id": 1436, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1417, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "9051:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1416, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9051:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1419, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "9058:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1418, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9058:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9050:14:5" + }, + "returnParameters": { + "id": 1423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1422, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "9088:3:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1421, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9088:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9087:5:5" + }, + "scope": 1458, + "src": "9038:118:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1456, + "nodeType": "Block", + "src": "9355:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1447, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "9383:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1448, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1440, + "src": "9386:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1446, + "name": "safeToMul", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1243, + 1394 + ], + "referencedDeclaration": 1394, + "src": "9373:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 1449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9373:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1445, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "9365:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9365:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1451, + "nodeType": "ExpressionStatement", + "src": "9365:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1452, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "9406:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1453, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1440, + "src": "9410:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "9406:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1444, + "id": 1455, + "nodeType": "Return", + "src": "9399:12:5" + } + ] + }, + "documentation": "@dev Returns product if no overflow occurred\n @param a First factor\n @param b Second factor\n @return Product", + "id": 1457, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1438, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1457, + "src": "9313:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1437, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9313:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1440, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1457, + "src": "9320:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1439, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9320:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9312:14:5" + }, + "returnParameters": { + "id": 1444, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1443, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1457, + "src": "9350:3:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1442, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9350:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9349:5:5" + }, + "scope": 1458, + "src": "9300:118:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1459, + "src": "200:9220:5" + } + ], + "src": "0:9421:5" + }, + "legacyAST": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", + "exportedSymbols": { + "GnosisMath": [ + 1458 + ] + }, + "id": 1459, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 331, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:5" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title Math library - Allows calculation of logarithmic and exponential functions\n @author Alan Lu - \n @author Stefan George - ", + "fullyImplemented": true, + "id": 1458, + "linearizedBaseContracts": [ + 1458 + ], + "name": "GnosisMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 334, + "name": "ONE", + "nodeType": "VariableDeclaration", + "scope": 1458, + "src": "304:46:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 332, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "304:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30783130303030303030303030303030303030", + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "331:19:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18446744073709551616_by_1", + "typeString": "int_const 18446744073709551616" + }, + "value": "0x10000000000000000" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 337, + "name": "LN2", + "nodeType": "VariableDeclaration", + "scope": 1458, + "src": "356:45:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 335, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "356:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307862313732313766376431636637396163", + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "383:18:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12786308645202655660_by_1", + "typeString": "int_const 12786308645202655660" + }, + "value": "0xb17217f7d1cf79ac" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 340, + "name": "LOG2_E", + "nodeType": "VariableDeclaration", + "scope": 1458, + "src": "407:49:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 338, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "407:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30783137313534373635326238326665313737", + "id": 339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "437:19:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_26613026195688644983_by_1", + "typeString": "int_const 26613026195688644983" + }, + "value": "0x171547652b82fe177" + }, + "visibility": "public" + }, + { + "body": { + "id": 712, + "nodeType": "Block", + "src": "657:2714:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 348, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "794:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32343534393731323539383738393039383836363739", + "id": 349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "799:22:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2454971259878909886679_by_1", + "typeString": "int_const 2454971259878909886679" + }, + "value": "2454971259878909886679" + }, + "src": "794:27:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 347, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "786:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "786:36:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 352, + "nodeType": "ExpressionStatement", + "src": "786:36:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 353, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "946:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 355, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "950:22:5", + "subExpression": { + "argumentTypes": null, + "hexValue": "383138333233373533323932393639393632323237", + "id": 354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "951:21:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_818323753292969962227_by_1", + "typeString": "int_const 818323753292969962227" + }, + "value": "818323753292969962227" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_818323753292969962227_by_1", + "typeString": "int_const -818323753292969962227" + } + }, + "src": "946:26:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 359, + "nodeType": "IfStatement", + "src": "942:40:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "981:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 346, + "id": 358, + "nodeType": "Return", + "src": "974:8:5" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 360, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1032:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 361, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1036:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1044:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1040:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1040:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1036:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 367, + "name": "LN2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 337, + "src": "1055:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1051:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1051:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1036:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1032:27:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 371, + "nodeType": "ExpressionStatement", + "src": "1032:27:5" + }, + { + "assignments": [ + 373 + ], + "declarations": [ + { + "constant": false, + "id": 373, + "name": "shift", + "nodeType": "VariableDeclaration", + "scope": 712, + "src": "1195:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 372, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "1195:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 374, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "1195:9:5" + }, + { + "assignments": [ + 376 + ], + "declarations": [ + { + "constant": false, + "id": 376, + "name": "z", + "nodeType": "VariableDeclaration", + "scope": 712, + "src": "1214:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 375, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1214:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 377, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "1214:6:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 378, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1234:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1239:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1234:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 423, + "nodeType": "Block", + "src": "1329:92:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 400, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "1343:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 401, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1351:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 403, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1359:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 402, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1355:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1355:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1351:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1366:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1351:16:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1343:24:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 409, + "nodeType": "ExpressionStatement", + "src": "1343:24:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 410, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "1381:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 411, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1385:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "1396:2:5", + "subExpression": { + "argumentTypes": null, + "id": 413, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1397:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 416, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1405:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1401:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1401:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1396:13:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1391:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1391:19:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1385:25:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1381:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 422, + "nodeType": "ExpressionStatement", + "src": "1381:29:5" + } + ] + }, + "id": 424, + "nodeType": "IfStatement", + "src": "1230:191:5", + "trueBody": { + "id": 399, + "nodeType": "Block", + "src": "1242:81:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 381, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "1256:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 382, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1264:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 384, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1272:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1268:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1268:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1264:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1256:20:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 388, + "nodeType": "ExpressionStatement", + "src": "1256:20:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 389, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "1290:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 391, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "1299:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1307:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1303:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1303:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1299:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1294:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1294:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1290:22:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 398, + "nodeType": "ExpressionStatement", + "src": "1290:22:5" + } + ] + } + }, + { + "assignments": [ + 426 + ], + "declarations": [ + { + "constant": false, + "id": 426, + "name": "zpow", + "nodeType": "VariableDeclaration", + "scope": 712, + "src": "1956:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 425, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1956:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 428, + "initialValue": { + "argumentTypes": null, + "id": 427, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "1968:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1956:13:5" + }, + { + "assignments": [ + 430 + ], + "declarations": [ + { + "constant": false, + "id": 430, + "name": "result", + "nodeType": "VariableDeclaration", + "scope": 712, + "src": "1979:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 429, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1979:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 432, + "initialValue": { + "argumentTypes": null, + "id": 431, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "1993:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1979:17:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 433, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2006:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307862313732313766376431636637396162", + "id": 434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2016:18:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12786308645202655659_by_1", + "typeString": "int_const 12786308645202655659" + }, + "value": "0xb17217f7d1cf79ab" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 435, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2037:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2016:25:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 437, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2044:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2016:31:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2006:41:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 440, + "nodeType": "ExpressionStatement", + "src": "2006:41:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 441, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2057:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 442, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2064:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 443, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2071:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2064:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 445, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2075:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2064:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2057:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 448, + "nodeType": "ExpressionStatement", + "src": "2057:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 449, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2088:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307833643766376266663035386231643530", + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2098:18:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4431396893595737424_by_1", + "typeString": "int_const 4431396893595737424" + }, + "value": "0x3d7f7bff058b1d50" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 451, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2119:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2098:25:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 453, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2126:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2098:31:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2088:41:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 456, + "nodeType": "ExpressionStatement", + "src": "2088:41:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 457, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2139:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 458, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2146:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 459, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2153:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2146:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 461, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2157:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2146:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2139:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 464, + "nodeType": "ExpressionStatement", + "src": "2139:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 465, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2170:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078653335383436623832353035666335", + "id": 466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2180:17:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1023870087579328453_by_1", + "typeString": "int_const 1023870087579328453" + }, + "value": "0xe35846b82505fc5" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 467, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2200:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2180:24:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 469, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2207:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2180:30:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2170:40:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 472, + "nodeType": "ExpressionStatement", + "src": "2170:40:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 473, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2220:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 474, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2227:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 475, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2234:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2227:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 477, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2238:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2227:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2220:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 480, + "nodeType": "ExpressionStatement", + "src": "2220:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 481, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2251:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078323736353536646637343963656535", + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2261:17:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_177423166116318949_by_1", + "typeString": "int_const 177423166116318949" + }, + "value": "0x276556df749cee5" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 483, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2281:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2261:24:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 485, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2288:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2261:30:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2251:40:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 488, + "nodeType": "ExpressionStatement", + "src": "2251:40:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 489, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2301:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 490, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2308:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 491, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2315:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2308:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 493, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2319:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2308:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2301:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 496, + "nodeType": "ExpressionStatement", + "src": "2301:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 497, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2332:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "30783537363166663965323939636334", + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2342:16:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_24596073471909060_by_1", + "typeString": "int_const 24596073471909060" + }, + "value": "0x5761ff9e299cc4" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 499, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2361:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2342:23:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 501, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2368:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2342:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2332:39:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 504, + "nodeType": "ExpressionStatement", + "src": "2332:39:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 505, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2381:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 506, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2388:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 507, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2395:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2388:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 509, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2399:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2388:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2381:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 512, + "nodeType": "ExpressionStatement", + "src": "2381:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 513, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2412:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307861313834383937633336336333", + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2422:15:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2841449829983171_by_1", + "typeString": "int_const 2841449829983171" + }, + "value": "0xa184897c363c3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 515, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2440:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2422:22:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 517, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2447:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2422:28:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2412:38:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "2412:38:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 521, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2460:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 522, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2467:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 523, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2474:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2467:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 525, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2478:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2467:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2460:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 528, + "nodeType": "ExpressionStatement", + "src": "2460:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 529, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2491:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078666665356665326334353836", + "id": 530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2501:14:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_281363276907910_by_1", + "typeString": "int_const 281363276907910" + }, + "value": "0xffe5fe2c4586" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 531, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2518:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2501:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 533, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2525:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2501:27:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2491:37:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 536, + "nodeType": "ExpressionStatement", + "src": "2491:37:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 537, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2538:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 538, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2545:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 539, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2552:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2545:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 541, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2556:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2545:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2538:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 544, + "nodeType": "ExpressionStatement", + "src": "2538:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 545, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2569:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078313632633032323361356338", + "id": 546, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2579:14:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_24378270262728_by_1", + "typeString": "int_const 24378270262728" + }, + "value": "0x162c0223a5c8" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 547, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2596:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2579:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 549, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2603:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2579:27:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2569:37:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 552, + "nodeType": "ExpressionStatement", + "src": "2569:37:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 553, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2616:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 554, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2623:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2630:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2623:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 557, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2634:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2623:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2616:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 560, + "nodeType": "ExpressionStatement", + "src": "2616:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 561, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2647:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "30783162353235336433393565", + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2657:13:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1877525477726_by_1", + "typeString": "int_const 1877525477726" + }, + "value": "0x1b5253d395e" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 563, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2673:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2657:20:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 565, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2680:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2657:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2647:36:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 568, + "nodeType": "ExpressionStatement", + "src": "2647:36:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 569, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2693:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 570, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2700:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 571, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2707:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2700:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 573, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2711:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2700:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2693:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 576, + "nodeType": "ExpressionStatement", + "src": "2693:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 577, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2724:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307831653463663531353862", + "id": 578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2734:12:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_130140149131_by_1", + "typeString": "int_const 130140149131" + }, + "value": "0x1e4cf5158b" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 579, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2749:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2734:19:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 581, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2756:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2734:25:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2724:35:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 584, + "nodeType": "ExpressionStatement", + "src": "2724:35:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 585, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2769:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 586, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2776:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 587, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2783:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2776:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 589, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2787:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2776:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2769:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 592, + "nodeType": "ExpressionStatement", + "src": "2769:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 593, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2800:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078316538636163373335", + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2810:11:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8200570677_by_1", + "typeString": "int_const 8200570677" + }, + "value": "0x1e8cac735" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 595, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2824:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2810:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 597, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2831:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2810:24:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2800:34:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 600, + "nodeType": "ExpressionStatement", + "src": "2800:34:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 601, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2844:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 602, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2851:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 603, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2858:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2851:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 605, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2862:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2851:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2844:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 608, + "nodeType": "ExpressionStatement", + "src": "2844:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 609, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2875:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "30783163336264363530", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2885:10:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_473683536_by_1", + "typeString": "int_const 473683536" + }, + "value": "0x1c3bd650" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 611, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2898:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2885:17:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 613, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2905:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2885:23:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2875:33:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 616, + "nodeType": "ExpressionStatement", + "src": "2875:33:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 617, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2918:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 618, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2925:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 619, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "2932:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2925:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 621, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2936:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2925:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2918:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "2918:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 625, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "2949:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307831383136313933", + "id": 626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2959:9:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_25256339_by_1", + "typeString": "int_const 25256339" + }, + "value": "0x1816193" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 627, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2971:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2959:16:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 629, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "2978:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2959:22:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2949:32:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 632, + "nodeType": "ExpressionStatement", + "src": "2949:32:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 633, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2991:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 634, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "2998:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 635, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "3005:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2998:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 637, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3009:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2998:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2991:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 640, + "nodeType": "ExpressionStatement", + "src": "2991:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 641, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3022:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078313331343936", + "id": 642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3032:8:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1250454_by_1", + "typeString": "int_const 1250454" + }, + "value": "0x131496" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 643, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3043:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3032:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 645, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3050:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3032:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3022:31:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 648, + "nodeType": "ExpressionStatement", + "src": "3022:31:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 649, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3063:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 650, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3070:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 651, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "3077:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3070:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 653, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3081:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3070:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3063:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 656, + "nodeType": "ExpressionStatement", + "src": "3063:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 657, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3094:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "307865316237", + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3104:6:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57783_by_1", + "typeString": "int_const 57783" + }, + "value": "0xe1b7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 659, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3113:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3104:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 661, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3120:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3104:19:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3094:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 664, + "nodeType": "ExpressionStatement", + "src": "3094:29:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 665, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3133:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 666, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3140:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 667, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "3147:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3140:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 669, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3151:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3140:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3133:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 672, + "nodeType": "ExpressionStatement", + "src": "3133:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 673, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3164:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078396337", + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3174:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2503_by_1", + "typeString": "int_const 2503" + }, + "value": "0x9c7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 675, + "name": "zpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "3182:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3174:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 677, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3189:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3174:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3164:28:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "3164:28:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 681, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "3206:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 682, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3215:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3206:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 705, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3346:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "3357:6:5", + "subExpression": { + "argumentTypes": null, + "id": 706, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "3358:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 708, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3356:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3346:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 346, + "id": 710, + "nodeType": "Return", + "src": "3339:25:5" + }, + "id": 711, + "nodeType": "IfStatement", + "src": "3202:162:5", + "trueBody": { + "id": 704, + "nodeType": "Block", + "src": "3218:115:5", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 684, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3236:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "323536", + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3247:3:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 686, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "3253:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3247:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 688, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3246:13:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3236:23:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 690, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3262:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3236:27:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "3232:54:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", + "typeString": "int_const 1157...(70 digits omitted)...9935" + }, + "id": 696, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", + "typeString": "int_const 1157...(70 digits omitted)...9936" + }, + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3273:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323536", + "id": 693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3278:3:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + }, + "src": "3273:8:5", + "typeDescriptions": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", + "typeString": "int_const 1157...(70 digits omitted)...9936" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3284:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3273:12:5", + "typeDescriptions": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", + "typeString": "int_const 1157...(70 digits omitted)...9935" + } + } + ], + "id": 697, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3272:14:5", + "typeDescriptions": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", + "typeString": "int_const 1157...(70 digits omitted)...9935" + } + }, + "functionReturnParameters": 346, + "id": 698, + "nodeType": "Return", + "src": "3265:21:5" + } + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 700, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "3307:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 701, + "name": "shift", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 373, + "src": "3317:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3307:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 346, + "id": 703, + "nodeType": "Return", + "src": "3300:22:5" + } + ] + } + } + ] + }, + "documentation": "@dev Returns natural exponential function value of given x\n @param x x\n @return e**x", + "id": 713, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "exp", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 343, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 342, + "name": "x", + "nodeType": "VariableDeclaration", + "scope": 713, + "src": "623:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 341, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "623:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "622:7:5" + }, + "returnParameters": { + "id": 346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 345, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 713, + "src": "651:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 344, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "651:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "650:6:5" + }, + "scope": 1458, + "src": "610:2761:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1067, + "nodeType": "Block", + "src": "3520:1733:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 721, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "3538:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3542:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3538:5:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 720, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "3530:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3530:14:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 725, + "nodeType": "ExpressionStatement", + "src": "3530:14:5" + }, + { + "assignments": [ + 727 + ], + "declarations": [ + { + "constant": false, + "id": 727, + "name": "ilog2", + "nodeType": "VariableDeclaration", + "scope": 1067, + "src": "3598:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 726, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3598:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 731, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 729, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "3620:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 728, + "name": "floorLog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1144, + "src": "3610:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_int256_$", + "typeString": "function (uint256) pure returns (int256)" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3610:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3598:24:5" + }, + { + "assignments": [ + 733 + ], + "declarations": [ + { + "constant": false, + "id": 733, + "name": "z", + "nodeType": "VariableDeclaration", + "scope": 1067, + "src": "3632:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 732, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3632:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 734, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "3632:5:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 735, + "name": "ilog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "3651:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 736, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3659:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3651:9:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 749, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 733, + "src": "3703:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 751, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "3711:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "ilog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "3721:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3716:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3716:11:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3711:16:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3707:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3707:21:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3703:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 758, + "nodeType": "ExpressionStatement", + "src": "3703:25:5" + }, + "id": 759, + "nodeType": "IfStatement", + "src": "3647:81:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 738, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 733, + "src": "3662:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 740, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "3670:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "3680:6:5", + "subExpression": { + "argumentTypes": null, + "id": 742, + "name": "ilog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "3681:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3675:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3675:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3670:17:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3666:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3666:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3662:26:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 748, + "nodeType": "ExpressionStatement", + "src": "3662:26:5" + } + }, + { + "assignments": [ + 761 + ], + "declarations": [ + { + "constant": false, + "id": 761, + "name": "term", + "nodeType": "VariableDeclaration", + "scope": 1067, + "src": "3942:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 760, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3942:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 779, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 762, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 733, + "src": "3954:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 764, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3962:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3958:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3958:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3954:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 767, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3953:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 769, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3974:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 768, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3970:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3970:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3953:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 772, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 733, + "src": "3982:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 774, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "3990:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3986:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3986:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3982:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 777, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3981:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "3953:42:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3942:53:5" + }, + { + "assignments": [ + 781 + ], + "declarations": [ + { + "constant": false, + "id": 781, + "name": "halflnz", + "nodeType": "VariableDeclaration", + "scope": 1067, + "src": "4005:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 780, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "4005:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 783, + "initialValue": { + "argumentTypes": null, + "id": 782, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4019:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4005:18:5" + }, + { + "assignments": [ + 785 + ], + "declarations": [ + { + "constant": false, + "id": 785, + "name": "termpow", + "nodeType": "VariableDeclaration", + "scope": 1067, + "src": "4033:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 784, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "4033:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 799, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 786, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4047:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 787, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4054:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4047:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 790, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4065:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4061:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4061:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4047:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 793, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4072:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4047:29:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 796, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4083:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 795, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4079:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4079:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4047:40:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4033:54:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 800, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4097:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 801, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4108:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4118:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "4108:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4097:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 805, + "nodeType": "ExpressionStatement", + "src": "4097:22:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 806, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4129:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 807, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4139:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 808, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4149:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4139:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 811, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4160:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 810, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4156:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 812, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4156:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4139:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 814, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4167:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4139:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 817, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4178:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4174:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4174:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4139:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4129:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 821, + "nodeType": "ExpressionStatement", + "src": "4129:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 822, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4192:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 823, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4203:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4213:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "4203:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4192:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 827, + "nodeType": "ExpressionStatement", + "src": "4192:22:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 828, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4224:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 829, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4234:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 830, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4244:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4234:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 833, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4255:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 832, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4251:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4251:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4234:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 836, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4262:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4234:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 839, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4273:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 838, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4269:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4269:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4234:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4224:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 843, + "nodeType": "ExpressionStatement", + "src": "4224:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 844, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4287:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 845, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4298:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "37", + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4308:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "src": "4298:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4287:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 849, + "nodeType": "ExpressionStatement", + "src": "4287:22:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 850, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4319:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 851, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4329:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 852, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4339:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4329:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 855, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4350:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4346:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4346:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4329:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 858, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4357:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4329:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 861, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4368:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4364:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4364:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4329:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4319:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 865, + "nodeType": "ExpressionStatement", + "src": "4319:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 866, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4382:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 867, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4393:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "39", + "id": 868, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4403:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_9_by_1", + "typeString": "int_const 9" + }, + "value": "9" + }, + "src": "4393:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4382:22:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 871, + "nodeType": "ExpressionStatement", + "src": "4382:22:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 872, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4414:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 873, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4424:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 874, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4434:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4424:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 877, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4445:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4441:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4441:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4424:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 880, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4452:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4424:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 883, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4463:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4459:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 884, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4459:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4424:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4414:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 887, + "nodeType": "ExpressionStatement", + "src": "4414:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 888, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4477:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 889, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4488:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3131", + "id": 890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4498:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_11_by_1", + "typeString": "int_const 11" + }, + "value": "11" + }, + "src": "4488:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4477:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 893, + "nodeType": "ExpressionStatement", + "src": "4477:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 894, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4510:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 895, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4520:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 896, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4530:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4520:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 899, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4541:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4537:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 900, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4537:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4520:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 902, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4548:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4520:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 905, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4559:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 904, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4555:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4555:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4520:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4510:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 909, + "nodeType": "ExpressionStatement", + "src": "4510:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 910, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4573:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 911, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4584:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3133", + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4594:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_13_by_1", + "typeString": "int_const 13" + }, + "value": "13" + }, + "src": "4584:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4573:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "4573:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 916, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4606:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 917, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4616:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 918, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4626:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4616:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 921, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4637:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 920, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4633:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4633:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4616:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 924, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4644:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4616:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 927, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4655:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4651:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4651:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4616:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4606:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 931, + "nodeType": "ExpressionStatement", + "src": "4606:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 932, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4669:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 933, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4680:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3135", + "id": 934, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4690:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "15" + }, + "src": "4680:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4669:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 937, + "nodeType": "ExpressionStatement", + "src": "4669:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 938, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4702:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 939, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4712:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 940, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4722:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4712:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 943, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4733:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4729:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4729:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4712:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 946, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4740:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4712:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 949, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4751:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4747:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 950, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4747:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4712:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4702:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 953, + "nodeType": "ExpressionStatement", + "src": "4702:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 954, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4765:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 955, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4776:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3137", + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4786:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_17_by_1", + "typeString": "int_const 17" + }, + "value": "17" + }, + "src": "4776:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4765:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 959, + "nodeType": "ExpressionStatement", + "src": "4765:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 960, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4798:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 961, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4808:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 962, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4818:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4808:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 965, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4829:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4825:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4825:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4808:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 968, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4836:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4808:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 971, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4847:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 970, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4843:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 972, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4843:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4808:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4798:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 975, + "nodeType": "ExpressionStatement", + "src": "4798:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 976, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4861:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 977, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4872:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3139", + "id": 978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4882:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_19_by_1", + "typeString": "int_const 19" + }, + "value": "19" + }, + "src": "4872:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4861:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 981, + "nodeType": "ExpressionStatement", + "src": "4861:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 982, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4894:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 983, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4904:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 984, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4914:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4904:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4925:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4921:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4921:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4904:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 990, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "4932:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4904:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 993, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "4943:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4939:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4939:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4904:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4894:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 997, + "nodeType": "ExpressionStatement", + "src": "4894:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 998, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "4957:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 999, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4968:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 1000, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4978:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "4968:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4957:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1003, + "nodeType": "ExpressionStatement", + "src": "4957:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1004, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "4990:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1005, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "5000:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1006, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5010:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5000:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1009, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5021:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1008, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5017:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1010, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5000:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1012, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5028:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5000:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1015, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5039:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5035:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5035:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5000:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "4990:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1019, + "nodeType": "ExpressionStatement", + "src": "4990:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1020, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "5053:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "5064:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3233", + "id": 1022, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5074:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_23_by_1", + "typeString": "int_const 23" + }, + "value": "23" + }, + "src": "5064:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5053:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1025, + "nodeType": "ExpressionStatement", + "src": "5053:23:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1026, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "5086:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1027, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "5096:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1028, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5106:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5096:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1031, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5117:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1030, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5113:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1032, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5113:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5096:25:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1034, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5124:4:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5096:32:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1037, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5135:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1036, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5131:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5131:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5096:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5086:53:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "5086:53:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1042, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "5149:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1043, + "name": "termpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "5160:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3235", + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5170:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_25_by_1", + "typeString": "int_const 25" + }, + "value": "25" + }, + "src": "5160:12:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5149:23:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1047, + "nodeType": "ExpressionStatement", + "src": "5149:23:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1048, + "name": "ilog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "5190:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1050, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5202:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5198:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1051, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5198:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5190:16:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 1053, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5189:18:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1055, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5214:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1054, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5210:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5210:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5189:29:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1059, + "name": "LOG2_E", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "5225:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1058, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5221:3:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": "int" + }, + "id": 1060, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5221:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5189:43:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5235:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1063, + "name": "halflnz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "5239:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5235:11:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5189:57:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 719, + "id": 1066, + "nodeType": "Return", + "src": "5182:64:5" + } + ] + }, + "documentation": "@dev Returns natural logarithm value of given x\n @param x x\n @return ln(x)", + "id": 1068, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ln", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 716, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 715, + "name": "x", + "nodeType": "VariableDeclaration", + "scope": 1068, + "src": "3486:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 714, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3486:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3485:8:5" + }, + "returnParameters": { + "id": 719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 718, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1068, + "src": "3515:3:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 717, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "3515:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3514:5:5" + }, + "scope": 1458, + "src": "3474:1779:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1143, + "nodeType": "Block", + "src": "5423:373:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1075, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "5433:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "5438:3:5", + "subExpression": { + "argumentTypes": null, + "hexValue": "3634", + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5439:2:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_64_by_1", + "typeString": "int_const -64" + } + }, + "src": "5433:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1079, + "nodeType": "ExpressionStatement", + "src": "5433:8:5" + }, + { + "assignments": [ + 1081 + ], + "declarations": [ + { + "constant": false, + "id": 1081, + "name": "hi", + "nodeType": "VariableDeclaration", + "scope": 1143, + "src": "5451:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1080, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5451:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1083, + "initialValue": { + "argumentTypes": null, + "hexValue": "313933", + "id": 1082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5460:3:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_193_by_1", + "typeString": "int_const 193" + }, + "value": "193" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5451:12:5" + }, + { + "assignments": [ + 1085 + ], + "declarations": [ + { + "constant": false, + "id": 1085, + "name": "mid", + "nodeType": "VariableDeclaration", + "scope": 1143, + "src": "5566:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1084, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5566:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1092, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1086, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1081, + "src": "5577:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1087, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "5582:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5577:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 1089, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5576:9:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5589:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5576:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5566:24:5" + }, + { + "body": { + "id": 1141, + "nodeType": "Block", + "src": "5622:168:5", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1099, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5640:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5646:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5640:7:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1102, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "5651:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "5661:4:5", + "subExpression": { + "argumentTypes": null, + "id": 1104, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5662:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5656:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 1106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5656:10:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5651:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1108, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5669:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5651:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5640:32:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1111, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5676:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5683:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5676:8:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1114, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "5688:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1116, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5698:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5693:4:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint" + }, + "id": 1117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5693:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5688:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1119, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5705:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5688:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5676:32:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5640:68:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1127, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "5737:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1128, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5742:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5737:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1130, + "nodeType": "ExpressionStatement", + "src": "5737:8:5" + }, + "id": 1131, + "nodeType": "IfStatement", + "src": "5636:109:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1123, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1081, + "src": "5710:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1124, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5715:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5710:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1126, + "nodeType": "ExpressionStatement", + "src": "5710:8:5" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1132, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "5759:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1133, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1081, + "src": "5766:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1134, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "5771:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5766:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 1136, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5765:9:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5778:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5765:14:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5759:20:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1140, + "nodeType": "ExpressionStatement", + "src": "5759:20:5" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1093, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1073, + "src": "5608:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5613:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5608:6:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 1096, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5607:8:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1097, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1081, + "src": "5618:2:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "5607:13:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1142, + "nodeType": "WhileStatement", + "src": "5600:190:5" + } + ] + }, + "documentation": "@dev Returns base 2 logarithm value of given x\n @param x x\n @return logarithmic value", + "id": 1144, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "floorLog2", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1071, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1070, + "name": "x", + "nodeType": "VariableDeclaration", + "scope": 1144, + "src": "5386:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1069, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5386:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5385:8:5" + }, + "returnParameters": { + "id": 1074, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1073, + "name": "lo", + "nodeType": "VariableDeclaration", + "scope": 1144, + "src": "5415:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1072, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5415:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5414:8:5" + }, + "scope": 1458, + "src": "5367:429:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1190, + "nodeType": "Block", + "src": "5983:156:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1153, + "name": "nums", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1147, + "src": "6001:4:5", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + "id": 1154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6001:11:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6015:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6001:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1152, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "5993:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5993:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1158, + "nodeType": "ExpressionStatement", + "src": "5993:24:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1159, + "name": "maxNum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1150, + "src": "6027:6:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_minus_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const -578...(70 digits omitted)...9968" + }, + "id": 1163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "6036:2:5", + "subExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6037:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_2_by_1", + "typeString": "int_const -2" + } + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323535", + "id": 1162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6042:3:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "6036:9:5", + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const -578...(70 digits omitted)...9968" + } + }, + "src": "6027:18:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1165, + "nodeType": "ExpressionStatement", + "src": "6027:18:5" + }, + { + "body": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1177, + "name": "nums", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1147, + "src": "6098:4:5", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + "id": 1179, + "indexExpression": { + "argumentTypes": null, + "id": 1178, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "6103:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6098:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 1180, + "name": "maxNum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1150, + "src": "6108:6:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "6098:16:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1188, + "nodeType": "IfStatement", + "src": "6094:38:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1182, + "name": "maxNum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1150, + "src": "6116:6:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1183, + "name": "nums", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1147, + "src": "6125:4:5", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + "id": 1185, + "indexExpression": { + "argumentTypes": null, + "id": 1184, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "6130:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6125:7:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "6116:16:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1187, + "nodeType": "ExpressionStatement", + "src": "6116:16:5" + } + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1170, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "6072:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1171, + "name": "nums", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1147, + "src": "6076:4:5", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[] memory" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6076:11:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6072:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1189, + "initializationExpression": { + "assignments": [ + 1167 + ], + "declarations": [ + { + "constant": false, + "id": 1167, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 1189, + "src": "6060:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6060:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1169, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1168, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6069:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6060:10:5" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "6089:3:5", + "subExpression": { + "argumentTypes": null, + "id": 1174, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "6089:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1176, + "nodeType": "ExpressionStatement", + "src": "6089:3:5" + }, + "nodeType": "ForStatement", + "src": "6055:77:5" + } + ] + }, + "documentation": "@dev Returns maximum of an array\n @param nums Numbers to look through\n @return Maximum number", + "id": 1191, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "max", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1148, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1147, + "name": "nums", + "nodeType": "VariableDeclaration", + "scope": 1191, + "src": "5931:17:5", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", + "typeString": "int256[]" + }, + "typeName": { + "baseType": { + "id": 1145, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5931:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 1146, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5931:5:5", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", + "typeString": "int256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5930:19:5" + }, + "returnParameters": { + "id": 1151, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1150, + "name": "maxNum", + "nodeType": "VariableDeclaration", + "scope": 1191, + "src": "5971:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1149, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "5971:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5970:12:5" + }, + "scope": 1458, + "src": "5918:221:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1206, + "nodeType": "Block", + "src": "6374:34:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1200, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1193, + "src": "6391:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1201, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1195, + "src": "6395:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6391:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1203, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1193, + "src": "6400:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6391:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1199, + "id": 1205, + "nodeType": "Return", + "src": "6384:17:5" + } + ] + }, + "documentation": "@dev Returns whether an add operation causes an overflow\n @param a First addend\n @param b Second addend\n @return Did no overflow occur?", + "id": 1207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToAdd", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1196, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1193, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1207, + "src": "6329:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1192, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6329:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1195, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1207, + "src": "6337:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1194, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6337:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6328:16:5" + }, + "returnParameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1207, + "src": "6368:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6368:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6367:6:5" + }, + "scope": 1458, + "src": "6310:98:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1220, + "nodeType": "Block", + "src": "6644:30:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1216, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1209, + "src": "6661:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1217, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1211, + "src": "6666:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6661:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1215, + "id": 1219, + "nodeType": "Return", + "src": "6654:13:5" + } + ] + }, + "documentation": "@dev Returns whether a subtraction operation causes an underflow\n @param a Minuend\n @param b Subtrahend\n @return Did no underflow occur?", + "id": 1221, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToSub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1209, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "6599:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1208, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6599:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1211, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "6607:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1210, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6607:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6598:16:5" + }, + "returnParameters": { + "id": 1215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "6638:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6638:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6637:6:5" + }, + "scope": 1458, + "src": "6580:94:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1242, + "nodeType": "Block", + "src": "6913:48:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1230, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1225, + "src": "6930:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6935:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6930:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1233, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "6940:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1234, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1225, + "src": "6944:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6940:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1236, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1225, + "src": "6948:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6940:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1238, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "6953:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6940:14:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6930:24:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1229, + "id": 1241, + "nodeType": "Return", + "src": "6923:31:5" + } + ] + }, + "documentation": "@dev Returns whether a multiply operation causes an overflow\n @param a First factor\n @param b Second factor\n @return Did no overflow occur?", + "id": 1243, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToMul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1223, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6868:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1222, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6868:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1225, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6876:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1224, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6876:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6867:16:5" + }, + "returnParameters": { + "id": 1229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1228, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "6907:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1227, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6907:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6906:6:5" + }, + "scope": 1458, + "src": "6849:112:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1263, + "nodeType": "Block", + "src": "7155:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1254, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1245, + "src": "7183:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1255, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1247, + "src": "7186:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1253, + "name": "safeToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1207, + 1338 + ], + "referencedDeclaration": 1207, + "src": "7173:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7173:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1252, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "7165:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7165:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1258, + "nodeType": "ExpressionStatement", + "src": "7165:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1259, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1245, + "src": "7206:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1260, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1247, + "src": "7210:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7206:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1251, + "id": 1262, + "nodeType": "Return", + "src": "7199:12:5" + } + ] + }, + "documentation": "@dev Returns sum if no overflow occurred\n @param a First addend\n @param b Second addend\n @return Sum", + "id": 1264, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1264, + "src": "7110:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1244, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7110:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1264, + "src": "7118:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7118:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7109:16:5" + }, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1264, + "src": "7149:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1249, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7149:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7148:6:5" + }, + "scope": 1458, + "src": "7097:121:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1284, + "nodeType": "Block", + "src": "7418:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1275, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1266, + "src": "7446:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1276, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1268, + "src": "7449:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1274, + "name": "safeToSub", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1221, + 1370 + ], + "referencedDeclaration": 1221, + "src": "7436:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 1277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7436:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1273, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "7428:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7428:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1279, + "nodeType": "ExpressionStatement", + "src": "7428:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1266, + "src": "7469:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1268, + "src": "7473:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7469:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1272, + "id": 1283, + "nodeType": "Return", + "src": "7462:12:5" + } + ] + }, + "documentation": "@dev Returns difference if no overflow occurred\n @param a Minuend\n @param b Subtrahend\n @return Difference", + "id": 1285, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1266, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1285, + "src": "7373:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1265, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7373:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1268, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1285, + "src": "7381:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7381:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7372:16:5" + }, + "returnParameters": { + "id": 1272, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1271, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1285, + "src": "7412:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7412:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7411:6:5" + }, + "scope": 1458, + "src": "7360:121:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1305, + "nodeType": "Block", + "src": "7683:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1296, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1287, + "src": "7711:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1297, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1289, + "src": "7714:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1295, + "name": "safeToMul", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1243, + 1394 + ], + "referencedDeclaration": 1243, + "src": "7701:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 1298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7701:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1294, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "7693:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7693:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1300, + "nodeType": "ExpressionStatement", + "src": "7693:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1301, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1287, + "src": "7734:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1302, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1289, + "src": "7738:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7734:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1293, + "id": 1304, + "nodeType": "Return", + "src": "7727:12:5" + } + ] + }, + "documentation": "@dev Returns product if no overflow occurred\n @param a First factor\n @param b Second factor\n @return Product", + "id": 1306, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1290, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1287, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1306, + "src": "7638:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1286, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7638:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1289, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1306, + "src": "7646:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1288, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7646:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7637:16:5" + }, + "returnParameters": { + "id": 1293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1292, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1306, + "src": "7677:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1291, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7677:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7676:6:5" + }, + "scope": 1458, + "src": "7625:121:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1337, + "nodeType": "Block", + "src": "7979:70:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1315, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "7997:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8002:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7997:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1318, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "8007:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "8011:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8007:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1321, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "8016:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8007:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7997:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1324, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7996:22:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "8023:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8027:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8023:5:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1328, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "8032:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1329, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "8036:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8032:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1331, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "8040:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8032:9:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8023:18:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1334, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8022:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7996:46:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1314, + "id": 1336, + "nodeType": "Return", + "src": "7989:53:5" + } + ] + }, + "documentation": "@dev Returns whether an add operation causes an overflow\n @param a First addend\n @param b Second addend\n @return Did no overflow occur?", + "id": 1338, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToAdd", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1308, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1338, + "src": "7936:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1307, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7936:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1310, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1338, + "src": "7943:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1309, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "7943:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7935:14:5" + }, + "returnParameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1313, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1338, + "src": "7973:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1312, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7973:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7972:6:5" + }, + "scope": 1458, + "src": "7917:132:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1369, + "nodeType": "Block", + "src": "8283:70:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1347, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1342, + "src": "8301:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8306:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8301:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1350, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1340, + "src": "8311:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1351, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1342, + "src": "8315:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8311:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1353, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1340, + "src": "8320:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8311:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8301:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1356, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8300:22:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1357, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1342, + "src": "8327:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8331:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8327:5:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1360, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1340, + "src": "8336:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1361, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1342, + "src": "8340:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8336:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 1363, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1340, + "src": "8344:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8336:9:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8327:18:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1366, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8326:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8300:46:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1346, + "id": 1368, + "nodeType": "Return", + "src": "8293:53:5" + } + ] + }, + "documentation": "@dev Returns whether a subtraction operation causes an underflow\n @param a Minuend\n @param b Subtrahend\n @return Did no underflow occur?", + "id": 1370, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToSub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1343, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1340, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1370, + "src": "8240:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1339, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8240:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1342, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1370, + "src": "8247:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1341, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8247:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8239:14:5" + }, + "returnParameters": { + "id": 1346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1345, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1370, + "src": "8277:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1344, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8277:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8276:6:5" + }, + "scope": 1458, + "src": "8221:132:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1393, + "nodeType": "Block", + "src": "8590:52:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1379, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "8608:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8613:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8608:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1382, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8607:8:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1383, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1372, + "src": "8620:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1384, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "8624:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8620:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1386, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "8628:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8620:9:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1388, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1372, + "src": "8633:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8620:14:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1390, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8619:16:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8607:28:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1378, + "id": 1392, + "nodeType": "Return", + "src": "8600:35:5" + } + ] + }, + "documentation": "@dev Returns whether a multiply operation causes an overflow\n @param a First factor\n @param b Second factor\n @return Did no overflow occur?", + "id": 1394, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeToMul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1375, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1372, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1394, + "src": "8547:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1371, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8547:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1374, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1394, + "src": "8554:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1373, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8554:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8546:14:5" + }, + "returnParameters": { + "id": 1378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1377, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1394, + "src": "8584:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1376, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8584:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8583:6:5" + }, + "scope": 1458, + "src": "8528:114:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1414, + "nodeType": "Block", + "src": "8833:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1405, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1396, + "src": "8861:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1406, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1398, + "src": "8864:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1404, + "name": "safeToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1207, + 1338 + ], + "referencedDeclaration": 1338, + "src": "8851:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 1407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8851:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "8843:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8843:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1409, + "nodeType": "ExpressionStatement", + "src": "8843:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1410, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1396, + "src": "8884:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1411, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1398, + "src": "8888:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "8884:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1402, + "id": 1413, + "nodeType": "Return", + "src": "8877:12:5" + } + ] + }, + "documentation": "@dev Returns sum if no overflow occurred\n @param a First addend\n @param b Second addend\n @return Sum", + "id": 1415, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1399, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1396, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1415, + "src": "8791:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1395, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8791:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1398, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1415, + "src": "8798:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1397, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8798:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8790:14:5" + }, + "returnParameters": { + "id": 1402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1401, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1415, + "src": "8828:3:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1400, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "8828:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8827:5:5" + }, + "scope": 1458, + "src": "8778:118:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1435, + "nodeType": "Block", + "src": "9093:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1426, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1417, + "src": "9121:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1427, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1419, + "src": "9124:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1425, + "name": "safeToSub", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1221, + 1370 + ], + "referencedDeclaration": 1370, + "src": "9111:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 1428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9111:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1424, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "9103:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9103:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1430, + "nodeType": "ExpressionStatement", + "src": "9103:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1431, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1417, + "src": "9144:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1432, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1419, + "src": "9148:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "9144:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1423, + "id": 1434, + "nodeType": "Return", + "src": "9137:12:5" + } + ] + }, + "documentation": "@dev Returns difference if no overflow occurred\n @param a Minuend\n @param b Subtrahend\n @return Difference", + "id": 1436, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1417, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "9051:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1416, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9051:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1419, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "9058:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1418, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9058:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9050:14:5" + }, + "returnParameters": { + "id": 1423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1422, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "9088:3:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1421, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9088:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9087:5:5" + }, + "scope": 1458, + "src": "9038:118:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1456, + "nodeType": "Block", + "src": "9355:63:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1447, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "9383:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "argumentTypes": null, + "id": 1448, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1440, + "src": "9386:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 1446, + "name": "safeToMul", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1243, + 1394 + ], + "referencedDeclaration": 1394, + "src": "9373:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", + "typeString": "function (int256,int256) pure returns (bool)" + } + }, + "id": 1449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9373:15:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1445, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1581, + "src": "9365:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9365:24:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1451, + "nodeType": "ExpressionStatement", + "src": "9365:24:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 1454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1452, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "9406:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1453, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1440, + "src": "9410:1:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "9406:5:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 1444, + "id": 1455, + "nodeType": "Return", + "src": "9399:12:5" + } + ] + }, + "documentation": "@dev Returns product if no overflow occurred\n @param a First factor\n @param b Second factor\n @return Product", + "id": 1457, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1438, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1457, + "src": "9313:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1437, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9313:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1440, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1457, + "src": "9320:5:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1439, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9320:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9312:14:5" + }, + "returnParameters": { + "id": 1444, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1443, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1457, + "src": "9350:3:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 1442, + "name": "int", + "nodeType": "ElementaryTypeName", + "src": "9350:3:5", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9349:5:5" + }, + "scope": 1458, + "src": "9300:118:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1459, + "src": "200:9220:5" + } + ], + "src": "0:9421:5" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.10", + "updatedAt": "2019-05-31T13:47:05.349Z", + "devdoc": { + "author": "Alan Lu - Stefan George - ", + "methods": { + "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)" + }, + "max(int256[])": { + "details": "Returns maximum of an array", + "params": { + "nums": "Numbers to look through" + }, + "return": "Maximum number" + } + }, + "title": "Math library - Allows calculation of logarithmic and exponential functions" + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/GnosisStandardToken.json b/build/contracts/GnosisStandardToken.json new file mode 100644 index 00000000..da7e48c1 --- /dev/null +++ b/build/contracts/GnosisStandardToken.json @@ -0,0 +1,5638 @@ +{ + "contractName": "GnosisStandardToken", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns number of allowed tokens for given address\",\"params\":{\"owner\":\"Address of token owner\",\"spender\":\"Address of token spender\"},\"return\":\"Remaining allowance for spender\"},\"approve(address,uint256)\":{\"details\":\"Sets approved amount of tokens for spender. Returns success\",\"params\":{\"spender\":\"Address of allowed account\",\"value\":\"Number of approved tokens\"},\"return\":\"Was approval successful?\"},\"balanceOf(address)\":{\"details\":\"Returns number of tokens owned by given address\",\"params\":{\"owner\":\"Address of token owner\"},\"return\":\"Balance of owner\"},\"totalSupply()\":{\"details\":\"Returns total supply of tokens\",\"return\":\"Total supply\"},\"transfer(address,uint256)\":{\"details\":\"Transfers sender's tokens to a given address. Returns success\",\"params\":{\"to\":\"Address of token receiver\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Allows allowed third party to transfer tokens from one address to another. Returns success\",\"params\":{\"from\":\"Address from where tokens are withdrawn\",\"to\":\"Address to where tokens are sent\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"}},\"title\":\"Standard token contract with overflow protection\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":\"GnosisStandardToken\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":{\"keccak256\":\"0xdec5028208406e811c449a04e2932f7efeae629388cb6124550b8b048a645556\",\"urls\":[\"bzzr://f3d13a708f543b3ce72745cab321e6daf25d935fd12ba55a4152f1113eb6d5e4\"]},\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]},\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061046a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c806370a082311161005057806370a0823114610107578063a9059cbb1461012d578063dd62ed3e1461015957610072565b8063095ea7b31461007757806318160ddd146100b757806323b872dd146100d1575b600080fd5b6100a36004803603604081101561008d57600080fd5b506001600160a01b038135169060200135610187565b604080519115158252519081900360200190f35b6100bf6101ee565b60408051918252519081900360200190f35b6100a3600480360360608110156100e757600080fd5b506001600160a01b038135811691602081013590911690604001356101f4565b6100bf6004803603602081101561011d57600080fd5b50356001600160a01b0316610321565b6100a36004803603604081101561014357600080fd5b506001600160a01b03813516906020013561033c565b6100bf6004803603604081101561016f57600080fd5b506001600160a01b0381358116916020013516610407565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461021d908363ffffffff61043216565b158061025a57506001600160a01b0384166000908152600160209081526040808320338452909152902054610258908363ffffffff61043216565b155b8061028b57506001600160a01b038316600090815260208190526040902054610289908363ffffffff61043716565b155b156102985750600061031a565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b6001600160a01b031660009081526020819052604090205490565b3360009081526020819052604081205461035c908363ffffffff61043216565b158061038e57506001600160a01b03831660009081526020819052604090205461038c908363ffffffff61043716565b155b1561039b575060006101e8565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a72305820ff1365cba5e4da22531e778b7eb65ead37c9fffc75a05077592ef24d319a85850029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100725760003560e01c806370a082311161005057806370a0823114610107578063a9059cbb1461012d578063dd62ed3e1461015957610072565b8063095ea7b31461007757806318160ddd146100b757806323b872dd146100d1575b600080fd5b6100a36004803603604081101561008d57600080fd5b506001600160a01b038135169060200135610187565b604080519115158252519081900360200190f35b6100bf6101ee565b60408051918252519081900360200190f35b6100a3600480360360608110156100e757600080fd5b506001600160a01b038135811691602081013590911690604001356101f4565b6100bf6004803603602081101561011d57600080fd5b50356001600160a01b0316610321565b6100a36004803603604081101561014357600080fd5b506001600160a01b03813516906020013561033c565b6100bf6004803603604081101561016f57600080fd5b506001600160a01b0381358116916020013516610407565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461021d908363ffffffff61043216565b158061025a57506001600160a01b0384166000908152600160209081526040808320338452909152902054610258908363ffffffff61043216565b155b8061028b57506001600160a01b038316600090815260208190526040902054610289908363ffffffff61043716565b155b156102985750600061031a565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b6001600160a01b031660009081526020819052604090205490565b3360009081526020819052604081205461035c908363ffffffff61043216565b158061038e57506001600160a01b03831660009081526020819052604090205461038c908363ffffffff61043716565b155b1561039b575060006101e8565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a72305820ff1365cba5e4da22531e778b7eb65ead37c9fffc75a05077592ef24d319a85850029", + "sourceMap": "443:2599:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;443:2599:4;;;;;;;", + "deployedSourceMap": "443:2599:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;443:2599:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2098:196;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2098:196:4;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2955:85;;;:::i;:::-;;;;;;;;;;;;;;;;1430:451;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1430:451:4;;;;;;;;;;;;;;;;;:::i;2776:100::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2776:100:4;-1:-1:-1;;;;;2776:100:4;;:::i;785:333::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;785:333:4;;;;;;;;:::i;2504:128::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2504:128:4;;;;;;;;;;:::i;2098:196::-;2187:10;2160:4;2176:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;2176:31:4;;;;;;;;;;;:39;;;2230:36;;;;;;;2160:4;;2176:31;;2187:10;;2230:36;;;;;;;;-1:-1:-1;2283:4:4;2098:196;;;;;:::o;2955:85::-;3022:11;;2955:85;:::o;1430:451::-;-1:-1:-1;;;;;1527:14:4;;1506:4;1527:14;;;;;;;;;;;:31;;1552:5;1527:31;:24;:31;:::i;:::-;1526:32;:104;;;-1:-1:-1;;;;;;1563:16:4;;;;;;:10;:16;;;;;;;;1580:10;1563:28;;;;;;;;:67;;1615:5;1563:67;:38;:67;:::i;:::-;1562:68;1526:104;:138;;;-1:-1:-1;;;;;;1635:12:4;;:8;:12;;;;;;;;;;;:29;;1658:5;1635:29;:22;:29;:::i;:::-;1634:30;1526:138;1522:181;;;-1:-1:-1;1687:5:4;1680:12;;1522:181;-1:-1:-1;;;;;1712:14:4;;;:8;:14;;;;;;;;;;;:23;;;;;;;-1:-1:-1;1745:16:4;;;;;1762:10;1745:28;;;;;;;:37;;;;;;;1792:12;;;;;;;;;;;;;:21;;;;;;1828:25;;;;;;;1792:12;;1828:25;;;;;;;;;;;-1:-1:-1;1870:4:4;1430:451;;;;;;:::o;2776:100::-;-1:-1:-1;;;;;2854:15:4;2831:4;2854:15;;;;;;;;;;;;2776:100::o;785:333::-;873:10;843:4;864:20;;;;;;;;;;;:37;;895:5;864:37;:30;:37;:::i;:::-;863:38;:72;;;-1:-1:-1;;;;;;906:12:4;;:8;:12;;;;;;;;;;;:29;;929:5;906:29;:22;:29;:::i;:::-;905:30;863:72;859:115;;;-1:-1:-1;958:5:4;951:12;;859:115;993:10;984:8;:20;;;;;;;;;;;:29;;;;;;;-1:-1:-1;;;;;1023:12:4;;;;;;;;;:21;;;;;;1059:31;;;;;;;1023:12;;993:10;1059:31;;;;;;;;;;;-1:-1:-1;1107:4:4;785:333;;;;:::o;2504:128::-;-1:-1:-1;;;;;2599:17:4;;;2576:4;2599:17;;;:10;:17;;;;;;;;:26;;;;;;;;;;;;;2504:128::o;6580:94:5:-;-1:-1:-1;6661:6:5;;6580:94::o;6310:98::-;6391:5;;-1:-1:-1;6391:10:5;;6310:98::o", + "source": "pragma solidity ^0.5.2;\nimport \"./Token.sol\";\nimport \"./Math.sol\";\nimport \"./Proxy.sol\";\n\n/**\n * Deprecated: Use Open Zeppeling one instead\n */\ncontract StandardTokenData {\n /*\n * Storage\n */\n mapping(address => uint) balances;\n mapping(address => mapping(address => uint)) allowances;\n uint totalTokens;\n}\n\n/**\n * Deprecated: Use Open Zeppeling one instead\n */\n/// @title Standard token contract with overflow protection\ncontract GnosisStandardToken is Token, StandardTokenData {\n using GnosisMath for *;\n\n /*\n * Public functions\n */\n /// @dev Transfers sender's tokens to a given address. Returns success\n /// @param to Address of token receiver\n /// @param value Number of tokens to transfer\n /// @return Was transfer successful?\n function transfer(address to, uint value) public returns (bool) {\n if (!balances[msg.sender].safeToSub(value) || !balances[to].safeToAdd(value)) {\n return false;\n }\n\n balances[msg.sender] -= value;\n balances[to] += value;\n emit Transfer(msg.sender, to, value);\n return true;\n }\n\n /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success\n /// @param from Address from where tokens are withdrawn\n /// @param to Address to where tokens are sent\n /// @param value Number of tokens to transfer\n /// @return Was transfer successful?\n function transferFrom(address from, address to, uint value) public returns (bool) {\n if (!balances[from].safeToSub(value) || !allowances[from][msg.sender].safeToSub(\n value\n ) || !balances[to].safeToAdd(value)) {\n return false;\n }\n balances[from] -= value;\n allowances[from][msg.sender] -= value;\n balances[to] += value;\n emit Transfer(from, to, value);\n return true;\n }\n\n /// @dev Sets approved amount of tokens for spender. Returns success\n /// @param spender Address of allowed account\n /// @param value Number of approved tokens\n /// @return Was approval successful?\n function approve(address spender, uint value) public returns (bool) {\n allowances[msg.sender][spender] = value;\n emit Approval(msg.sender, spender, value);\n return true;\n }\n\n /// @dev Returns number of allowed tokens for given address\n /// @param owner Address of token owner\n /// @param spender Address of token spender\n /// @return Remaining allowance for spender\n function allowance(address owner, address spender) public view returns (uint) {\n return allowances[owner][spender];\n }\n\n /// @dev Returns number of tokens owned by given address\n /// @param owner Address of token owner\n /// @return Balance of owner\n function balanceOf(address owner) public view returns (uint) {\n return balances[owner];\n }\n\n /// @dev Returns total supply of tokens\n /// @return Total supply\n function totalSupply() public view returns (uint) {\n return totalTokens;\n }\n}\n", + "sourcePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "ast": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "exportedSymbols": { + "GnosisStandardToken": [ + 329 + ], + "StandardTokenData": [ + 135 + ] + }, + "id": 330, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 119, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", + "file": "./Token.sol", + "id": 120, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1564, + "src": "24:21:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", + "file": "./Math.sol", + "id": 121, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1459, + "src": "46:20:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", + "file": "./Proxy.sol", + "id": 122, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1495, + "src": "67:21:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "Deprecated: Use Open Zeppeling one instead", + "fullyImplemented": true, + "id": 135, + "linearizedBaseContracts": [ + 135 + ], + "name": "StandardTokenData", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 126, + "name": "balances", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "208:33:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 125, + "keyType": { + "id": 123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "216:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "208:24:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 124, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "227:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 132, + "name": "allowances", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "247:55:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 131, + "keyType": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "255:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "247:44:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 130, + "keyType": { + "id": 128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "266:24:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 129, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "285:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "name": "totalTokens", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "308:16:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 133, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "308:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "scope": 330, + "src": "144:183:4" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 136, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1563, + "src": "475:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Token_$1563", + "typeString": "contract Token" + } + }, + "id": 137, + "nodeType": "InheritanceSpecifier", + "src": "475:5:4" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 138, + "name": "StandardTokenData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 135, + "src": "482:17:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_StandardTokenData_$135", + "typeString": "contract StandardTokenData" + } + }, + "id": 139, + "nodeType": "InheritanceSpecifier", + "src": "482:17:4" + } + ], + "contractDependencies": [ + 135, + 1563 + ], + "contractKind": "contract", + "documentation": "@title Standard token contract with overflow protection", + "fullyImplemented": true, + "id": 329, + "linearizedBaseContracts": [ + 329, + 135, + 1563 + ], + "name": "GnosisStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 141, + "libraryName": { + "contractScope": null, + "id": 140, + "name": "GnosisMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1458, + "src": "512:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_GnosisMath_$1458", + "typeString": "library GnosisMath" + } + }, + "nodeType": "UsingForDirective", + "src": "506:23:4", + "typeName": null + }, + { + "body": { + "id": 192, + "nodeType": "Block", + "src": "849:269:4", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "863:38:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 155, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "895:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 150, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "864:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 153, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 151, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "873:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "873:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "864:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "864:30:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "864:37:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "905:30:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 162, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "929:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 158, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "906:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 160, + "indexExpression": { + "argumentTypes": null, + "id": 159, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "915:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "906:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToAdd", + "nodeType": "MemberAccess", + "referencedDeclaration": 1207, + "src": "906:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "906:29:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "863:72:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 169, + "nodeType": "IfStatement", + "src": "859:115:4", + "trueBody": { + "id": 168, + "nodeType": "Block", + "src": "937:37:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "958:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 149, + "id": 167, + "nodeType": "Return", + "src": "951:12:4" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 170, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "984:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 173, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 171, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "993:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "993:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "984:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 174, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1008:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "984:29:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 176, + "nodeType": "ExpressionStatement", + "src": "984:29:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 177, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1023:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "id": 178, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "1032:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1023:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1039:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1023:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "1023:21:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 184, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1068:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1068:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 186, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "1080:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 187, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1084:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 183, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "1059:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1059:31:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 189, + "nodeType": "EmitStatement", + "src": "1054:36:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1107:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 149, + "id": 191, + "nodeType": "Return", + "src": "1100:11:4" + } + ] + }, + "documentation": "@dev Transfers sender's tokens to a given address. Returns success\n @param to Address of token receiver\n @param value Number of tokens to transfer\n @return Was transfer successful?", + "id": 193, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 143, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "803:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 142, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "803:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 145, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "815:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 144, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "815:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "802:24:4" + }, + "returnParameters": { + "id": 149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 148, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "843:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 147, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "843:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "842:6:4" + }, + "scope": 329, + "src": "785:333:4", + "stateMutability": "nonpayable", + "superFunction": 1521, + "visibility": "public" + }, + { + "body": { + "id": 263, + "nodeType": "Block", + "src": "1512:369:4", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1526:32:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 208, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1552:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 204, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1527:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 206, + "indexExpression": { + "argumentTypes": null, + "id": 205, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1536:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1527:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "1527:24:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1527:31:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1562:68:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 218, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1615:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 211, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1563:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 213, + "indexExpression": { + "argumentTypes": null, + "id": 212, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1574:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1563:16:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 216, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 214, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1580:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1580:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1563:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "1563:38:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1563:67:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1526:104:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1634:30:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 226, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1658:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 222, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1635:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 224, + "indexExpression": { + "argumentTypes": null, + "id": 223, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1644:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1635:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToAdd", + "nodeType": "MemberAccess", + "referencedDeclaration": 1207, + "src": "1635:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1635:29:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1526:138:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 233, + "nodeType": "IfStatement", + "src": "1522:181:4", + "trueBody": { + "id": 232, + "nodeType": "Block", + "src": "1666:37:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1687:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 203, + "id": 231, + "nodeType": "Return", + "src": "1680:12:4" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 234, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1712:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 236, + "indexExpression": { + "argumentTypes": null, + "id": 235, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1721:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1712:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 237, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1730:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1712:23:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 239, + "nodeType": "ExpressionStatement", + "src": "1712:23:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 240, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1745:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 244, + "indexExpression": { + "argumentTypes": null, + "id": 241, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1756:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1745:16:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 245, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 242, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1762:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1762:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1745:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 246, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1777:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1745:37:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 248, + "nodeType": "ExpressionStatement", + "src": "1745:37:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 249, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1792:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 251, + "indexExpression": { + "argumentTypes": null, + "id": 250, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1801:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1792:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "id": 252, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1808:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1792:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 254, + "nodeType": "ExpressionStatement", + "src": "1792:21:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 256, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1837:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 257, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1843:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 258, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1847:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 255, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "1828:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1828:25:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 260, + "nodeType": "EmitStatement", + "src": "1823:30:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1870:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 203, + "id": 262, + "nodeType": "Return", + "src": "1863:11:4" + } + ] + }, + "documentation": "@dev Allows allowed third party to transfer tokens from one address to another. Returns success\n @param from Address from where tokens are withdrawn\n @param to Address to where tokens are sent\n @param value Number of tokens to transfer\n @return Was transfer successful?", + "id": 264, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 195, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1452:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1452:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 197, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1466:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 196, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1466:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 199, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1478:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 198, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1478:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1451:38:4" + }, + "returnParameters": { + "id": 203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 202, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1506:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 201, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1506:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1505:6:4" + }, + "scope": 329, + "src": "1430:451:4", + "stateMutability": "nonpayable", + "superFunction": 1532, + "visibility": "public" + }, + { + "body": { + "id": 291, + "nodeType": "Block", + "src": "2166:128:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 273, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "2176:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 277, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 274, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "2187:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2187:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2176:22:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 278, + "indexExpression": { + "argumentTypes": null, + "id": 276, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 266, + "src": "2199:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2176:31:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 279, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "2210:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2176:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 281, + "nodeType": "ExpressionStatement", + "src": "2176:39:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 283, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "2239:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2239:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 285, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 266, + "src": "2251:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 286, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "2260:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 282, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1512, + "src": "2230:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2230:36:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 288, + "nodeType": "EmitStatement", + "src": "2225:41:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2283:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 272, + "id": 290, + "nodeType": "Return", + "src": "2276:11:4" + } + ] + }, + "documentation": "@dev Sets approved amount of tokens for spender. Returns success\n @param spender Address of allowed account\n @param value Number of approved tokens\n @return Was approval successful?", + "id": 292, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2115:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2115:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2132:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 267, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2132:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2114:29:4" + }, + "returnParameters": { + "id": 272, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 271, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2160:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 270, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2160:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2159:6:4" + }, + "scope": 329, + "src": "2098:196:4", + "stateMutability": "nonpayable", + "superFunction": 1541, + "visibility": "public" + }, + { + "body": { + "id": 307, + "nodeType": "Block", + "src": "2582:50:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 301, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "2599:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 303, + "indexExpression": { + "argumentTypes": null, + "id": 302, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "2610:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2599:17:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 305, + "indexExpression": { + "argumentTypes": null, + "id": 304, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "2617:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2599:26:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 300, + "id": 306, + "nodeType": "Return", + "src": "2592:33:4" + } + ] + }, + "documentation": "@dev Returns number of allowed tokens for given address\n @param owner Address of token owner\n @param spender Address of token spender\n @return Remaining allowance for spender", + "id": 308, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 294, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2523:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2523:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 296, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2538:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2538:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2522:32:4" + }, + "returnParameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 299, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2576:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 298, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2576:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2575:6:4" + }, + "scope": 329, + "src": "2504:128:4", + "stateMutability": "view", + "superFunction": 1557, + "visibility": "public" + }, + { + "body": { + "id": 319, + "nodeType": "Block", + "src": "2837:39:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 315, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "2854:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 317, + "indexExpression": { + "argumentTypes": null, + "id": 316, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 310, + "src": "2863:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2854:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 314, + "id": 318, + "nodeType": "Return", + "src": "2847:22:4" + } + ] + }, + "documentation": "@dev Returns number of tokens owned by given address\n @param owner Address of token owner\n @return Balance of owner", + "id": 320, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 310, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 320, + "src": "2795:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 309, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2795:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2794:15:4" + }, + "returnParameters": { + "id": 314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 313, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 320, + "src": "2831:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 312, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2831:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2830:6:4" + }, + "scope": 329, + "src": "2776:100:4", + "stateMutability": "view", + "superFunction": 1548, + "visibility": "public" + }, + { + "body": { + "id": 327, + "nodeType": "Block", + "src": "3005:35:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 325, + "name": "totalTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "3022:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 324, + "id": 326, + "nodeType": "Return", + "src": "3015:18:4" + } + ] + }, + "documentation": "@dev Returns total supply of tokens\n @return Total supply", + "id": 328, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 321, + "nodeType": "ParameterList", + "parameters": [], + "src": "2975:2:4" + }, + "returnParameters": { + "id": 324, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 323, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 328, + "src": "2999:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2999:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2998:6:4" + }, + "scope": 329, + "src": "2955:85:4", + "stateMutability": "view", + "superFunction": 1562, + "visibility": "public" + } + ], + "scope": 330, + "src": "443:2599:4" + } + ], + "src": "0:3043:4" + }, + "legacyAST": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "exportedSymbols": { + "GnosisStandardToken": [ + 329 + ], + "StandardTokenData": [ + 135 + ] + }, + "id": 330, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 119, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", + "file": "./Token.sol", + "id": 120, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1564, + "src": "24:21:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", + "file": "./Math.sol", + "id": 121, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1459, + "src": "46:20:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", + "file": "./Proxy.sol", + "id": 122, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1495, + "src": "67:21:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "Deprecated: Use Open Zeppeling one instead", + "fullyImplemented": true, + "id": 135, + "linearizedBaseContracts": [ + 135 + ], + "name": "StandardTokenData", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 126, + "name": "balances", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "208:33:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 125, + "keyType": { + "id": 123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "216:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "208:24:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 124, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "227:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 132, + "name": "allowances", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "247:55:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 131, + "keyType": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "255:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "247:44:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 130, + "keyType": { + "id": 128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "266:24:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 129, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "285:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "name": "totalTokens", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "308:16:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 133, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "308:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "scope": 330, + "src": "144:183:4" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 136, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1563, + "src": "475:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Token_$1563", + "typeString": "contract Token" + } + }, + "id": 137, + "nodeType": "InheritanceSpecifier", + "src": "475:5:4" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 138, + "name": "StandardTokenData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 135, + "src": "482:17:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_StandardTokenData_$135", + "typeString": "contract StandardTokenData" + } + }, + "id": 139, + "nodeType": "InheritanceSpecifier", + "src": "482:17:4" + } + ], + "contractDependencies": [ + 135, + 1563 + ], + "contractKind": "contract", + "documentation": "@title Standard token contract with overflow protection", + "fullyImplemented": true, + "id": 329, + "linearizedBaseContracts": [ + 329, + 135, + 1563 + ], + "name": "GnosisStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 141, + "libraryName": { + "contractScope": null, + "id": 140, + "name": "GnosisMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1458, + "src": "512:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_GnosisMath_$1458", + "typeString": "library GnosisMath" + } + }, + "nodeType": "UsingForDirective", + "src": "506:23:4", + "typeName": null + }, + { + "body": { + "id": 192, + "nodeType": "Block", + "src": "849:269:4", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "863:38:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 155, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "895:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 150, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "864:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 153, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 151, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "873:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "873:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "864:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "864:30:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "864:37:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "905:30:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 162, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "929:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 158, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "906:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 160, + "indexExpression": { + "argumentTypes": null, + "id": 159, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "915:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "906:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToAdd", + "nodeType": "MemberAccess", + "referencedDeclaration": 1207, + "src": "906:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "906:29:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "863:72:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 169, + "nodeType": "IfStatement", + "src": "859:115:4", + "trueBody": { + "id": 168, + "nodeType": "Block", + "src": "937:37:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "958:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 149, + "id": 167, + "nodeType": "Return", + "src": "951:12:4" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 170, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "984:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 173, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 171, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "993:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "993:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "984:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 174, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1008:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "984:29:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 176, + "nodeType": "ExpressionStatement", + "src": "984:29:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 177, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1023:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "id": 178, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "1032:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1023:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1039:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1023:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "1023:21:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 184, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1068:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1068:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 186, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "1080:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 187, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1084:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 183, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "1059:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1059:31:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 189, + "nodeType": "EmitStatement", + "src": "1054:36:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1107:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 149, + "id": 191, + "nodeType": "Return", + "src": "1100:11:4" + } + ] + }, + "documentation": "@dev Transfers sender's tokens to a given address. Returns success\n @param to Address of token receiver\n @param value Number of tokens to transfer\n @return Was transfer successful?", + "id": 193, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 143, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "803:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 142, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "803:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 145, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "815:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 144, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "815:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "802:24:4" + }, + "returnParameters": { + "id": 149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 148, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "843:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 147, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "843:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "842:6:4" + }, + "scope": 329, + "src": "785:333:4", + "stateMutability": "nonpayable", + "superFunction": 1521, + "visibility": "public" + }, + { + "body": { + "id": 263, + "nodeType": "Block", + "src": "1512:369:4", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1526:32:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 208, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1552:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 204, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1527:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 206, + "indexExpression": { + "argumentTypes": null, + "id": 205, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1536:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1527:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "1527:24:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1527:31:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1562:68:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 218, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1615:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 211, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1563:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 213, + "indexExpression": { + "argumentTypes": null, + "id": 212, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1574:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1563:16:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 216, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 214, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1580:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1580:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1563:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "1563:38:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1563:67:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1526:104:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1634:30:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 226, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1658:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 222, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1635:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 224, + "indexExpression": { + "argumentTypes": null, + "id": 223, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1644:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1635:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToAdd", + "nodeType": "MemberAccess", + "referencedDeclaration": 1207, + "src": "1635:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1635:29:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1526:138:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 233, + "nodeType": "IfStatement", + "src": "1522:181:4", + "trueBody": { + "id": 232, + "nodeType": "Block", + "src": "1666:37:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1687:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 203, + "id": 231, + "nodeType": "Return", + "src": "1680:12:4" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 234, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1712:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 236, + "indexExpression": { + "argumentTypes": null, + "id": 235, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1721:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1712:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 237, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1730:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1712:23:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 239, + "nodeType": "ExpressionStatement", + "src": "1712:23:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 240, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1745:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 244, + "indexExpression": { + "argumentTypes": null, + "id": 241, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1756:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1745:16:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 245, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 242, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1762:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1762:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1745:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 246, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1777:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1745:37:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 248, + "nodeType": "ExpressionStatement", + "src": "1745:37:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 249, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1792:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 251, + "indexExpression": { + "argumentTypes": null, + "id": 250, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1801:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1792:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "id": 252, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1808:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1792:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 254, + "nodeType": "ExpressionStatement", + "src": "1792:21:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 256, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1837:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 257, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1843:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 258, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1847:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 255, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "1828:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1828:25:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 260, + "nodeType": "EmitStatement", + "src": "1823:30:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1870:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 203, + "id": 262, + "nodeType": "Return", + "src": "1863:11:4" + } + ] + }, + "documentation": "@dev Allows allowed third party to transfer tokens from one address to another. Returns success\n @param from Address from where tokens are withdrawn\n @param to Address to where tokens are sent\n @param value Number of tokens to transfer\n @return Was transfer successful?", + "id": 264, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 195, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1452:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1452:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 197, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1466:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 196, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1466:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 199, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1478:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 198, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1478:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1451:38:4" + }, + "returnParameters": { + "id": 203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 202, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1506:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 201, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1506:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1505:6:4" + }, + "scope": 329, + "src": "1430:451:4", + "stateMutability": "nonpayable", + "superFunction": 1532, + "visibility": "public" + }, + { + "body": { + "id": 291, + "nodeType": "Block", + "src": "2166:128:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 273, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "2176:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 277, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 274, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "2187:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2187:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2176:22:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 278, + "indexExpression": { + "argumentTypes": null, + "id": 276, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 266, + "src": "2199:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2176:31:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 279, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "2210:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2176:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 281, + "nodeType": "ExpressionStatement", + "src": "2176:39:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 283, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "2239:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2239:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 285, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 266, + "src": "2251:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 286, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "2260:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 282, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1512, + "src": "2230:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2230:36:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 288, + "nodeType": "EmitStatement", + "src": "2225:41:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2283:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 272, + "id": 290, + "nodeType": "Return", + "src": "2276:11:4" + } + ] + }, + "documentation": "@dev Sets approved amount of tokens for spender. Returns success\n @param spender Address of allowed account\n @param value Number of approved tokens\n @return Was approval successful?", + "id": 292, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2115:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2115:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2132:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 267, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2132:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2114:29:4" + }, + "returnParameters": { + "id": 272, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 271, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2160:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 270, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2160:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2159:6:4" + }, + "scope": 329, + "src": "2098:196:4", + "stateMutability": "nonpayable", + "superFunction": 1541, + "visibility": "public" + }, + { + "body": { + "id": 307, + "nodeType": "Block", + "src": "2582:50:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 301, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "2599:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 303, + "indexExpression": { + "argumentTypes": null, + "id": 302, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "2610:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2599:17:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 305, + "indexExpression": { + "argumentTypes": null, + "id": 304, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "2617:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2599:26:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 300, + "id": 306, + "nodeType": "Return", + "src": "2592:33:4" + } + ] + }, + "documentation": "@dev Returns number of allowed tokens for given address\n @param owner Address of token owner\n @param spender Address of token spender\n @return Remaining allowance for spender", + "id": 308, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 294, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2523:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2523:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 296, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2538:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2538:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2522:32:4" + }, + "returnParameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 299, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2576:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 298, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2576:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2575:6:4" + }, + "scope": 329, + "src": "2504:128:4", + "stateMutability": "view", + "superFunction": 1557, + "visibility": "public" + }, + { + "body": { + "id": 319, + "nodeType": "Block", + "src": "2837:39:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 315, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "2854:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 317, + "indexExpression": { + "argumentTypes": null, + "id": 316, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 310, + "src": "2863:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2854:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 314, + "id": 318, + "nodeType": "Return", + "src": "2847:22:4" + } + ] + }, + "documentation": "@dev Returns number of tokens owned by given address\n @param owner Address of token owner\n @return Balance of owner", + "id": 320, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 310, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 320, + "src": "2795:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 309, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2795:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2794:15:4" + }, + "returnParameters": { + "id": 314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 313, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 320, + "src": "2831:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 312, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2831:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2830:6:4" + }, + "scope": 329, + "src": "2776:100:4", + "stateMutability": "view", + "superFunction": 1548, + "visibility": "public" + }, + { + "body": { + "id": 327, + "nodeType": "Block", + "src": "3005:35:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 325, + "name": "totalTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "3022:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 324, + "id": 326, + "nodeType": "Return", + "src": "3015:18:4" + } + ] + }, + "documentation": "@dev Returns total supply of tokens\n @return Total supply", + "id": 328, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 321, + "nodeType": "ParameterList", + "parameters": [], + "src": "2975:2:4" + }, + "returnParameters": { + "id": 324, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 323, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 328, + "src": "2999:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2999:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2998:6:4" + }, + "scope": 329, + "src": "2955:85:4", + "stateMutability": "view", + "superFunction": 1562, + "visibility": "public" + } + ], + "scope": 330, + "src": "443:2599:4" + } + ], + "src": "0:3043:4" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.10", + "updatedAt": "2019-05-31T13:47:05.346Z", + "devdoc": { + "methods": { + "allowance(address,address)": { + "details": "Returns number of allowed tokens for given address", + "params": { + "owner": "Address of token owner", + "spender": "Address of token spender" + }, + "return": "Remaining allowance for spender" + }, + "approve(address,uint256)": { + "details": "Sets approved amount of tokens for spender. Returns success", + "params": { + "spender": "Address of allowed account", + "value": "Number of approved tokens" + }, + "return": "Was approval successful?" + }, + "balanceOf(address)": { + "details": "Returns number of tokens owned by given address", + "params": { + "owner": "Address of token owner" + }, + "return": "Balance of owner" + }, + "totalSupply()": { + "details": "Returns total supply of tokens", + "return": "Total supply" + }, + "transfer(address,uint256)": { + "details": "Transfers sender's tokens to a given address. Returns success", + "params": { + "to": "Address of token receiver", + "value": "Number of tokens to transfer" + }, + "return": "Was transfer successful?" + }, + "transferFrom(address,address,uint256)": { + "details": "Allows allowed third party to transfer tokens from one address to another. Returns success", + "params": { + "from": "Address from where tokens are withdrawn", + "to": "Address to where tokens are sent", + "value": "Number of tokens to transfer" + }, + "return": "Was transfer successful?" + } + }, + "title": "Standard token contract with overflow protection" + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json new file mode 100644 index 00000000..c6044c22 --- /dev/null +++ b/build/contracts/Migrations.json @@ -0,0 +1,1379 @@ +{ + "contractName": "Migrations", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "last_completed_migration", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "constant": false, + "inputs": [ + { + "name": "completed", + "type": "uint256" + } + ], + "name": "setCompleted", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "new_address", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"new_address\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/mmv/work/safe-react/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"/home/mmv/work/safe-react/contracts/Migrations.sol\":{\"keccak256\":\"0x30af91a38d74f2c905faadbc4efd95a911625ffef0f13675a3501060e646705c\",\"urls\":[\"bzzr://b8dd34982b6c50cf2f1927c0b23967ab5b77ca4a0a7a8068fd79a86a968fb3ab\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101aa806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea165627a7a72305820d6f9d332fd4035368bdb390fc28d3f94281609485f5e5638d949f78492c92eb70029", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea165627a7a72305820d6f9d332fd4035368bdb390fc28d3f94281609485f5e5638d949f78492c92eb70029", + "sourceMap": "25:481:1:-;;;177:51;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;205:5:1;:18;;-1:-1:-1;;;;;;205:18:1;213:10;205:18;;;25:481;;;;;;", + "deployedSourceMap": "25:481:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:481:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;339:165;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;339:165:1;-1:-1:-1;;;;;339:165:1;;:::i;:::-;;73:36;;;:::i;:::-;;;;;;;;;;;;;;;;49:20;;;:::i;:::-;;;;-1:-1:-1;;;;;49:20:1;;;;;;;;;;;;;;232:103;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;232:103:1;;:::i;339:165::-;160:5;;-1:-1:-1;;;;;160:5:1;146:10;:19;142:26;;;401:19;434:11;401:45;;452:8;-1:-1:-1;;;;;452:21:1;;474:24;;452:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;452:47:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;452:47:1;;;;167:1;142:26;339:165;:::o;73:36::-;;;;:::o;49:20::-;;;-1:-1:-1;;;;;49:20:1;;:::o;232:103::-;160:5;;-1:-1:-1;;;;;160:5:1;146:10;:19;142:26;;;294:24;:36;232:103::o", + "source": "pragma solidity ^0.5.2;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n constructor () public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}", + "sourcePath": "/home/mmv/work/safe-react/contracts/Migrations.sol", + "ast": { + "absolutePath": "/home/mmv/work/safe-react/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 61 + ] + }, + "id": 62, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 61, + "linearizedBaseContracts": [ + 61 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 8, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 61, + "src": "49:20:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 10, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 61, + "src": "73:36:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "73:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 18, + "nodeType": "Block", + "src": "136:37:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 15, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "146:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "146:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "160:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "146:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17, + "nodeType": "IfStatement", + "src": "142:26:1", + "trueBody": { + "id": 16, + "nodeType": "PlaceholderStatement", + "src": "167:1:1" + } + } + ] + }, + "documentation": null, + "id": 19, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 11, + "nodeType": "ParameterList", + "parameters": [], + "src": "133:2:1" + }, + "src": "114:59:1", + "visibility": "internal" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "199:29:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 25, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 22, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "205:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 23, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "213:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "213:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "205:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 26, + "nodeType": "ExpressionStatement", + "src": "205:18:1" + } + ] + }, + "documentation": null, + "id": 28, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 20, + "nodeType": "ParameterList", + "parameters": [], + "src": "189:2:1" + }, + "returnParameters": { + "id": 21, + "nodeType": "ParameterList", + "parameters": [], + "src": "199:0:1" + }, + "scope": 61, + "src": "177:51:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 39, + "nodeType": "Block", + "src": "288:47:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 35, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "294:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 36, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "321:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "294:36:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 38, + "nodeType": "ExpressionStatement", + "src": "294:36:1" + } + ] + }, + "documentation": null, + "id": 40, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19, + "src": "277:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "277:10:1" + } + ], + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "254:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 29, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "254:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "253:16:1" + }, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "288:0:1" + }, + "scope": 61, + "src": "232:103:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 59, + "nodeType": "Block", + "src": "395:109:1", + "statements": [ + { + "assignments": [ + 48 + ], + "declarations": [ + { + "constant": false, + "id": 48, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 59, + "src": "401:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$61", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 47, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 61, + "src": "401:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$61", + "typeString": "contract Migrations" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 52, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 50, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "434:11:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 49, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "423:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$61_$", + "typeString": "type(contract Migrations)" + } + }, + "id": 51, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "423:23:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$61", + "typeString": "contract Migrations" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "401:45:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 56, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "474:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 53, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "452:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$61", + "typeString": "contract Migrations" + } + }, + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 40, + "src": "452:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 57, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "452:47:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58, + "nodeType": "ExpressionStatement", + "src": "452:47:1" + } + ] + }, + "documentation": null, + "id": 60, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 45, + "modifierName": { + "argumentTypes": null, + "id": 44, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19, + "src": "384:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "384:10:1" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 43, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 42, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 60, + "src": "356:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 41, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "356:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "355:21:1" + }, + "returnParameters": { + "id": 46, + "nodeType": "ParameterList", + "parameters": [], + "src": "395:0:1" + }, + "scope": 61, + "src": "339:165:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 62, + "src": "25:481:1" + } + ], + "src": "0:506:1" + }, + "legacyAST": { + "absolutePath": "/home/mmv/work/safe-react/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 61 + ] + }, + "id": 62, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 61, + "linearizedBaseContracts": [ + 61 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 8, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 61, + "src": "49:20:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 10, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 61, + "src": "73:36:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "73:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 18, + "nodeType": "Block", + "src": "136:37:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 15, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "146:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "146:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "160:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "146:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17, + "nodeType": "IfStatement", + "src": "142:26:1", + "trueBody": { + "id": 16, + "nodeType": "PlaceholderStatement", + "src": "167:1:1" + } + } + ] + }, + "documentation": null, + "id": 19, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 11, + "nodeType": "ParameterList", + "parameters": [], + "src": "133:2:1" + }, + "src": "114:59:1", + "visibility": "internal" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "199:29:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 25, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 22, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "205:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 23, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "213:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "213:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "205:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 26, + "nodeType": "ExpressionStatement", + "src": "205:18:1" + } + ] + }, + "documentation": null, + "id": 28, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 20, + "nodeType": "ParameterList", + "parameters": [], + "src": "189:2:1" + }, + "returnParameters": { + "id": 21, + "nodeType": "ParameterList", + "parameters": [], + "src": "199:0:1" + }, + "scope": 61, + "src": "177:51:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 39, + "nodeType": "Block", + "src": "288:47:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 35, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "294:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 36, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "321:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "294:36:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 38, + "nodeType": "ExpressionStatement", + "src": "294:36:1" + } + ] + }, + "documentation": null, + "id": 40, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19, + "src": "277:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "277:10:1" + } + ], + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "254:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 29, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "254:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "253:16:1" + }, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "288:0:1" + }, + "scope": 61, + "src": "232:103:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 59, + "nodeType": "Block", + "src": "395:109:1", + "statements": [ + { + "assignments": [ + 48 + ], + "declarations": [ + { + "constant": false, + "id": 48, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 59, + "src": "401:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$61", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 47, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 61, + "src": "401:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$61", + "typeString": "contract Migrations" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 52, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 50, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "434:11:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 49, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "423:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$61_$", + "typeString": "type(contract Migrations)" + } + }, + "id": 51, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "423:23:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$61", + "typeString": "contract Migrations" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "401:45:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 56, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10, + "src": "474:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 53, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "452:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$61", + "typeString": "contract Migrations" + } + }, + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 40, + "src": "452:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 57, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "452:47:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58, + "nodeType": "ExpressionStatement", + "src": "452:47:1" + } + ] + }, + "documentation": null, + "id": 60, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 45, + "modifierName": { + "argumentTypes": null, + "id": 44, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19, + "src": "384:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "384:10:1" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 43, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 42, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 60, + "src": "356:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 41, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "356:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "355:21:1" + }, + "returnParameters": { + "id": 46, + "nodeType": "ParameterList", + "parameters": [], + "src": "395:0:1" + }, + "scope": 61, + "src": "339:165:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 62, + "src": "25:481:1" + } + ], + "src": "0:506:1" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.10", + "updatedAt": "2019-05-31T13:47:05.344Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/Proxied.json b/build/contracts/Proxied.json new file mode 100644 index 00000000..15e6e14e --- /dev/null +++ b/build/contracts/Proxied.json @@ -0,0 +1,983 @@ +{ + "contractName": "Proxied", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "masterCopy", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"masterCopy\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Alan Lu - \",\"methods\":{},\"title\":\"Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":\"Proxied\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b5060a48061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a619486e14602d575b600080fd5b6033605c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff168156fea165627a7a7230582030927156db8f845fed095b245b70d15291cf8c9a8cdd88be16cdf598edc721190029", + "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063a619486e14602d575b600080fd5b6033605c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff168156fea165627a7a7230582030927156db8f845fed095b245b70d15291cf8c9a8cdd88be16cdf598edc721190029", + "sourceMap": "173:51:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;173:51:6;;;;;;;", + "deployedSourceMap": "173:51:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;173:51:6;;;;;;;;;;;;;;;;;;;196:25;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "pragma solidity ^0.5.2;\n\n/// @title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n/// @author Alan Lu - \ncontract Proxied {\n address public masterCopy;\n}\n\n/// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - \ncontract Proxy is Proxied {\n /// @dev Constructor function sets address of master copy contract.\n /// @param _masterCopy Master copy address.\n constructor(address _masterCopy) public {\n require(_masterCopy != address(0), \"The master copy is required\");\n masterCopy = _masterCopy;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n function() external payable {\n address _masterCopy = masterCopy;\n assembly {\n calldatacopy(0, 0, calldatasize)\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize, 0, 0)\n returndatacopy(0, 0, returndatasize)\n switch success\n case 0 {\n revert(0, returndatasize)\n }\n default {\n return(0, returndatasize)\n }\n }\n }\n}\n", + "sourcePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", + "ast": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", + "exportedSymbols": { + "Proxied": [ + 1463 + ], + "Proxy": [ + 1494 + ] + }, + "id": 1495, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1460, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ", + "fullyImplemented": true, + "id": 1463, + "linearizedBaseContracts": [ + 1463 + ], + "name": "Proxied", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1462, + "name": "masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1463, + "src": "196:25:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "196:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + } + ], + "scope": 1495, + "src": "173:51:6" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1464, + "name": "Proxied", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1463, + "src": "408:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Proxied_$1463", + "typeString": "contract Proxied" + } + }, + "id": 1465, + "nodeType": "InheritanceSpecifier", + "src": "408:7:6" + } + ], + "contractDependencies": [ + 1463 + ], + "contractKind": "contract", + "documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ", + "fullyImplemented": true, + "id": 1494, + "linearizedBaseContracts": [ + 1494, + 1463 + ], + "name": "Proxy", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1483, + "nodeType": "Block", + "src": "582:116:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1471, + "name": "_masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1467, + "src": "600:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "623:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1472, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "615:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "615:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "600:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "546865206d617374657220636f7079206973207265717569726564", + "id": 1476, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "627:29:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", + "typeString": "literal_string \"The master copy is required\"" + }, + "value": "The master copy is required" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", + "typeString": "literal_string \"The master copy is required\"" + } + ], + "id": 1470, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1582, + "src": "592:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "592:65:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1478, + "nodeType": "ExpressionStatement", + "src": "592:65:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1479, + "name": "masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "667:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1480, + "name": "_masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1467, + "src": "680:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "667:24:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1482, + "nodeType": "ExpressionStatement", + "src": "667:24:6" + } + ] + }, + "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.", + "id": 1484, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1467, + "name": "_masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1484, + "src": "554:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1466, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "554:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "553:21:6" + }, + "returnParameters": { + "id": 1469, + "nodeType": "ParameterList", + "parameters": [], + "src": "582:0:6" + }, + "scope": 1494, + "src": "542:156:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1492, + "nodeType": "Block", + "src": "827:462:6", + "statements": [ + { + "assignments": [ + 1488 + ], + "declarations": [ + { + "constant": false, + "id": 1488, + "name": "_masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1492, + "src": "837:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "837:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1490, + "initialValue": { + "argumentTypes": null, + "id": 1489, + "name": "masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "837:32:6" + }, + { + "externalReferences": [ + { + "_masterCopy": { + "declaration": 1488, + "isOffset": false, + "isSlot": false, + "src": "983:11:6", + "valueSize": 1 + } + } + ], + "id": 1491, + "nodeType": "InlineAssembly", + "operations": "{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}", + "src": "879:404:6" + } + ] + }, + "documentation": "@dev Fallback function forwards all transactions and returns all received return data.", + "id": 1493, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1485, + "nodeType": "ParameterList", + "parameters": [], + "src": "807:2:6" + }, + "returnParameters": { + "id": 1486, + "nodeType": "ParameterList", + "parameters": [], + "src": "827:0:6" + }, + "scope": 1494, + "src": "799:490:6", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 1495, + "src": "390:901:6" + } + ], + "src": "0:1292:6" + }, + "legacyAST": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", + "exportedSymbols": { + "Proxied": [ + 1463 + ], + "Proxy": [ + 1494 + ] + }, + "id": 1495, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1460, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ", + "fullyImplemented": true, + "id": 1463, + "linearizedBaseContracts": [ + 1463 + ], + "name": "Proxied", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1462, + "name": "masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1463, + "src": "196:25:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "196:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + } + ], + "scope": 1495, + "src": "173:51:6" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1464, + "name": "Proxied", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1463, + "src": "408:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Proxied_$1463", + "typeString": "contract Proxied" + } + }, + "id": 1465, + "nodeType": "InheritanceSpecifier", + "src": "408:7:6" + } + ], + "contractDependencies": [ + 1463 + ], + "contractKind": "contract", + "documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ", + "fullyImplemented": true, + "id": 1494, + "linearizedBaseContracts": [ + 1494, + 1463 + ], + "name": "Proxy", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1483, + "nodeType": "Block", + "src": "582:116:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1471, + "name": "_masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1467, + "src": "600:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "623:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1472, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "615:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "615:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "600:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "546865206d617374657220636f7079206973207265717569726564", + "id": 1476, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "627:29:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", + "typeString": "literal_string \"The master copy is required\"" + }, + "value": "The master copy is required" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", + "typeString": "literal_string \"The master copy is required\"" + } + ], + "id": 1470, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1582, + "src": "592:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "592:65:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1478, + "nodeType": "ExpressionStatement", + "src": "592:65:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1479, + "name": "masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "667:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1480, + "name": "_masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1467, + "src": "680:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "667:24:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1482, + "nodeType": "ExpressionStatement", + "src": "667:24:6" + } + ] + }, + "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.", + "id": 1484, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1467, + "name": "_masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1484, + "src": "554:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1466, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "554:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "553:21:6" + }, + "returnParameters": { + "id": 1469, + "nodeType": "ParameterList", + "parameters": [], + "src": "582:0:6" + }, + "scope": 1494, + "src": "542:156:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1492, + "nodeType": "Block", + "src": "827:462:6", + "statements": [ + { + "assignments": [ + 1488 + ], + "declarations": [ + { + "constant": false, + "id": 1488, + "name": "_masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1492, + "src": "837:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "837:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1490, + "initialValue": { + "argumentTypes": null, + "id": 1489, + "name": "masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "837:32:6" + }, + { + "externalReferences": [ + { + "_masterCopy": { + "declaration": 1488, + "isOffset": false, + "isSlot": false, + "src": "983:11:6", + "valueSize": 1 + } + } + ], + "id": 1491, + "nodeType": "InlineAssembly", + "operations": "{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}", + "src": "879:404:6" + } + ] + }, + "documentation": "@dev Fallback function forwards all transactions and returns all received return data.", + "id": 1493, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1485, + "nodeType": "ParameterList", + "parameters": [], + "src": "807:2:6" + }, + "returnParameters": { + "id": 1486, + "nodeType": "ParameterList", + "parameters": [], + "src": "827:0:6" + }, + "scope": 1494, + "src": "799:490:6", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 1495, + "src": "390:901:6" + } + ], + "src": "0:1292:6" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.10", + "updatedAt": "2019-05-31T13:47:05.362Z", + "devdoc": { + "author": "Alan Lu - ", + "methods": {}, + "title": "Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy." + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/Proxy.json b/build/contracts/Proxy.json new file mode 100644 index 00000000..19d58dc3 --- /dev/null +++ b/build/contracts/Proxy.json @@ -0,0 +1,1006 @@ +{ + "contractName": "Proxy", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "masterCopy", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "_masterCopy", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"masterCopy\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_masterCopy\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"author\":\"Stefan George - \",\"methods\":{\"constructor\":{\"details\":\"Constructor function sets address of master copy contract.\",\"params\":{\"_masterCopy\":\"Master copy address.\"}}},\"title\":\"Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405160208061018c8339810180604052602081101561003057600080fd5b50516001600160a01b0381166100a757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f546865206d617374657220636f70792069732072657175697265640000000000604482015290519081900360640190fd5b600080546001600160a01b039092166001600160a01b031990921691909117905560b6806100d66000396000f3fe608060405260043610601c5760003560e01c8063a619486e14604d575b600080546001600160a01b03169036908037600080368184600019f43d6000803e8080156048573d6000f35b3d6000fd5b348015605857600080fd5b50605f607b565b604080516001600160a01b039092168252519081900360200190f35b6000546001600160a01b03168156fea165627a7a723058207564d0999e7fbceb6e7089ae4db9530766f45130c894d942ebc14b3cee4d18de0029", + "deployedBytecode": "0x608060405260043610601c5760003560e01c8063a619486e14604d575b600080546001600160a01b03169036908037600080368184600019f43d6000803e8080156048573d6000f35b3d6000fd5b348015605857600080fd5b50605f607b565b604080516001600160a01b039092168252519081900360200190f35b6000546001600160a01b03168156fea165627a7a723058207564d0999e7fbceb6e7089ae4db9530766f45130c894d942ebc14b3cee4d18de0029", + "sourceMap": "390:901:6:-;;;542:156;8:9:-1;5:2;;;30:1;27;20:12;5:2;542:156:6;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;542:156:6;-1:-1:-1;;;;;600:25:6;;592:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;667:10;:24;;-1:-1:-1;;;;;667:24:6;;;-1:-1:-1;;;;;;667:24:6;;;;;;;;;390:901;;;;;;", + "deployedSourceMap": "390:901:6:-;;;;;;;;;;;;;;;;;;837:19;859:10;;-1:-1:-1;;;;;859:10:6;;921:12;;837:19;902:32;1016:1;;999:12;1016:1;983:11;-1:-1:-1;;962:56:6;1052:14;1049:1;1046;1031:36;1087:7;1111:72;;;;1240:14;1237:1;1230:25;1111:72;1150:14;1147:1;1140:25;196;;8:9:-1;5:2;;;30:1;27;20:12;5:2;196:25:6;;;:::i;:::-;;;;-1:-1:-1;;;;;196:25:6;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;196:25:6;;:::o", + "source": "pragma solidity ^0.5.2;\n\n/// @title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n/// @author Alan Lu - \ncontract Proxied {\n address public masterCopy;\n}\n\n/// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - \ncontract Proxy is Proxied {\n /// @dev Constructor function sets address of master copy contract.\n /// @param _masterCopy Master copy address.\n constructor(address _masterCopy) public {\n require(_masterCopy != address(0), \"The master copy is required\");\n masterCopy = _masterCopy;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n function() external payable {\n address _masterCopy = masterCopy;\n assembly {\n calldatacopy(0, 0, calldatasize)\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize, 0, 0)\n returndatacopy(0, 0, returndatasize)\n switch success\n case 0 {\n revert(0, returndatasize)\n }\n default {\n return(0, returndatasize)\n }\n }\n }\n}\n", + "sourcePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", + "ast": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", + "exportedSymbols": { + "Proxied": [ + 1463 + ], + "Proxy": [ + 1494 + ] + }, + "id": 1495, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1460, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ", + "fullyImplemented": true, + "id": 1463, + "linearizedBaseContracts": [ + 1463 + ], + "name": "Proxied", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1462, + "name": "masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1463, + "src": "196:25:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "196:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + } + ], + "scope": 1495, + "src": "173:51:6" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1464, + "name": "Proxied", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1463, + "src": "408:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Proxied_$1463", + "typeString": "contract Proxied" + } + }, + "id": 1465, + "nodeType": "InheritanceSpecifier", + "src": "408:7:6" + } + ], + "contractDependencies": [ + 1463 + ], + "contractKind": "contract", + "documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ", + "fullyImplemented": true, + "id": 1494, + "linearizedBaseContracts": [ + 1494, + 1463 + ], + "name": "Proxy", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1483, + "nodeType": "Block", + "src": "582:116:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1471, + "name": "_masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1467, + "src": "600:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "623:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1472, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "615:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "615:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "600:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "546865206d617374657220636f7079206973207265717569726564", + "id": 1476, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "627:29:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", + "typeString": "literal_string \"The master copy is required\"" + }, + "value": "The master copy is required" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", + "typeString": "literal_string \"The master copy is required\"" + } + ], + "id": 1470, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1582, + "src": "592:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "592:65:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1478, + "nodeType": "ExpressionStatement", + "src": "592:65:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1479, + "name": "masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "667:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1480, + "name": "_masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1467, + "src": "680:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "667:24:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1482, + "nodeType": "ExpressionStatement", + "src": "667:24:6" + } + ] + }, + "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.", + "id": 1484, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1467, + "name": "_masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1484, + "src": "554:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1466, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "554:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "553:21:6" + }, + "returnParameters": { + "id": 1469, + "nodeType": "ParameterList", + "parameters": [], + "src": "582:0:6" + }, + "scope": 1494, + "src": "542:156:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1492, + "nodeType": "Block", + "src": "827:462:6", + "statements": [ + { + "assignments": [ + 1488 + ], + "declarations": [ + { + "constant": false, + "id": 1488, + "name": "_masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1492, + "src": "837:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "837:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1490, + "initialValue": { + "argumentTypes": null, + "id": 1489, + "name": "masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "837:32:6" + }, + { + "externalReferences": [ + { + "_masterCopy": { + "declaration": 1488, + "isOffset": false, + "isSlot": false, + "src": "983:11:6", + "valueSize": 1 + } + } + ], + "id": 1491, + "nodeType": "InlineAssembly", + "operations": "{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}", + "src": "879:404:6" + } + ] + }, + "documentation": "@dev Fallback function forwards all transactions and returns all received return data.", + "id": 1493, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1485, + "nodeType": "ParameterList", + "parameters": [], + "src": "807:2:6" + }, + "returnParameters": { + "id": 1486, + "nodeType": "ParameterList", + "parameters": [], + "src": "827:0:6" + }, + "scope": 1494, + "src": "799:490:6", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 1495, + "src": "390:901:6" + } + ], + "src": "0:1292:6" + }, + "legacyAST": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", + "exportedSymbols": { + "Proxied": [ + 1463 + ], + "Proxy": [ + 1494 + ] + }, + "id": 1495, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1460, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ", + "fullyImplemented": true, + "id": 1463, + "linearizedBaseContracts": [ + 1463 + ], + "name": "Proxied", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1462, + "name": "masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1463, + "src": "196:25:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "196:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + } + ], + "scope": 1495, + "src": "173:51:6" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1464, + "name": "Proxied", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1463, + "src": "408:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Proxied_$1463", + "typeString": "contract Proxied" + } + }, + "id": 1465, + "nodeType": "InheritanceSpecifier", + "src": "408:7:6" + } + ], + "contractDependencies": [ + 1463 + ], + "contractKind": "contract", + "documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ", + "fullyImplemented": true, + "id": 1494, + "linearizedBaseContracts": [ + 1494, + 1463 + ], + "name": "Proxy", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1483, + "nodeType": "Block", + "src": "582:116:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1471, + "name": "_masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1467, + "src": "600:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "623:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1472, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "615:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "615:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "600:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "546865206d617374657220636f7079206973207265717569726564", + "id": 1476, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "627:29:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", + "typeString": "literal_string \"The master copy is required\"" + }, + "value": "The master copy is required" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", + "typeString": "literal_string \"The master copy is required\"" + } + ], + "id": 1470, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1581, + 1582 + ], + "referencedDeclaration": 1582, + "src": "592:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "592:65:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1478, + "nodeType": "ExpressionStatement", + "src": "592:65:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1479, + "name": "masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "667:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1480, + "name": "_masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1467, + "src": "680:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "667:24:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1482, + "nodeType": "ExpressionStatement", + "src": "667:24:6" + } + ] + }, + "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.", + "id": 1484, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1467, + "name": "_masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1484, + "src": "554:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1466, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "554:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "553:21:6" + }, + "returnParameters": { + "id": 1469, + "nodeType": "ParameterList", + "parameters": [], + "src": "582:0:6" + }, + "scope": 1494, + "src": "542:156:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1492, + "nodeType": "Block", + "src": "827:462:6", + "statements": [ + { + "assignments": [ + 1488 + ], + "declarations": [ + { + "constant": false, + "id": 1488, + "name": "_masterCopy", + "nodeType": "VariableDeclaration", + "scope": 1492, + "src": "837:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "837:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1490, + "initialValue": { + "argumentTypes": null, + "id": 1489, + "name": "masterCopy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "837:32:6" + }, + { + "externalReferences": [ + { + "_masterCopy": { + "declaration": 1488, + "isOffset": false, + "isSlot": false, + "src": "983:11:6", + "valueSize": 1 + } + } + ], + "id": 1491, + "nodeType": "InlineAssembly", + "operations": "{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}", + "src": "879:404:6" + } + ] + }, + "documentation": "@dev Fallback function forwards all transactions and returns all received return data.", + "id": 1493, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1485, + "nodeType": "ParameterList", + "parameters": [], + "src": "807:2:6" + }, + "returnParameters": { + "id": 1486, + "nodeType": "ParameterList", + "parameters": [], + "src": "827:0:6" + }, + "scope": 1494, + "src": "799:490:6", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 1495, + "src": "390:901:6" + } + ], + "src": "0:1292:6" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.10", + "updatedAt": "2019-05-31T13:47:05.362Z", + "devdoc": { + "author": "Stefan George - ", + "methods": { + "constructor": { + "details": "Constructor function sets address of master copy contract.", + "params": { + "_masterCopy": "Master copy address." + } + } + }, + "title": "Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract." + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/StandardTokenData.json b/build/contracts/StandardTokenData.json new file mode 100644 index 00000000..721a4480 --- /dev/null +++ b/build/contracts/StandardTokenData.json @@ -0,0 +1,5419 @@ +{ + "contractName": "StandardTokenData", + "abi": [], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{},\"notice\":\"Deprecated: Use Open Zeppeling one instead\"}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":\"StandardTokenData\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":{\"keccak256\":\"0xdec5028208406e811c449a04e2932f7efeae629388cb6124550b8b048a645556\",\"urls\":[\"bzzr://f3d13a708f543b3ce72745cab321e6daf25d935fd12ba55a4152f1113eb6d5e4\"]},\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]},\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3fe6080604052600080fdfea165627a7a72305820a0bd439ac45825ff45fb43e1f564b9f7838fc05cc32bfb75f1cfe35bd13d88370029", + "deployedBytecode": "0x6080604052600080fdfea165627a7a72305820a0bd439ac45825ff45fb43e1f564b9f7838fc05cc32bfb75f1cfe35bd13d88370029", + "sourceMap": "144:183:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;144:183:4;;;;;;;", + "deployedSourceMap": "144:183:4:-;;;;;", + "source": "pragma solidity ^0.5.2;\nimport \"./Token.sol\";\nimport \"./Math.sol\";\nimport \"./Proxy.sol\";\n\n/**\n * Deprecated: Use Open Zeppeling one instead\n */\ncontract StandardTokenData {\n /*\n * Storage\n */\n mapping(address => uint) balances;\n mapping(address => mapping(address => uint)) allowances;\n uint totalTokens;\n}\n\n/**\n * Deprecated: Use Open Zeppeling one instead\n */\n/// @title Standard token contract with overflow protection\ncontract GnosisStandardToken is Token, StandardTokenData {\n using GnosisMath for *;\n\n /*\n * Public functions\n */\n /// @dev Transfers sender's tokens to a given address. Returns success\n /// @param to Address of token receiver\n /// @param value Number of tokens to transfer\n /// @return Was transfer successful?\n function transfer(address to, uint value) public returns (bool) {\n if (!balances[msg.sender].safeToSub(value) || !balances[to].safeToAdd(value)) {\n return false;\n }\n\n balances[msg.sender] -= value;\n balances[to] += value;\n emit Transfer(msg.sender, to, value);\n return true;\n }\n\n /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success\n /// @param from Address from where tokens are withdrawn\n /// @param to Address to where tokens are sent\n /// @param value Number of tokens to transfer\n /// @return Was transfer successful?\n function transferFrom(address from, address to, uint value) public returns (bool) {\n if (!balances[from].safeToSub(value) || !allowances[from][msg.sender].safeToSub(\n value\n ) || !balances[to].safeToAdd(value)) {\n return false;\n }\n balances[from] -= value;\n allowances[from][msg.sender] -= value;\n balances[to] += value;\n emit Transfer(from, to, value);\n return true;\n }\n\n /// @dev Sets approved amount of tokens for spender. Returns success\n /// @param spender Address of allowed account\n /// @param value Number of approved tokens\n /// @return Was approval successful?\n function approve(address spender, uint value) public returns (bool) {\n allowances[msg.sender][spender] = value;\n emit Approval(msg.sender, spender, value);\n return true;\n }\n\n /// @dev Returns number of allowed tokens for given address\n /// @param owner Address of token owner\n /// @param spender Address of token spender\n /// @return Remaining allowance for spender\n function allowance(address owner, address spender) public view returns (uint) {\n return allowances[owner][spender];\n }\n\n /// @dev Returns number of tokens owned by given address\n /// @param owner Address of token owner\n /// @return Balance of owner\n function balanceOf(address owner) public view returns (uint) {\n return balances[owner];\n }\n\n /// @dev Returns total supply of tokens\n /// @return Total supply\n function totalSupply() public view returns (uint) {\n return totalTokens;\n }\n}\n", + "sourcePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "ast": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "exportedSymbols": { + "GnosisStandardToken": [ + 329 + ], + "StandardTokenData": [ + 135 + ] + }, + "id": 330, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 119, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", + "file": "./Token.sol", + "id": 120, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1564, + "src": "24:21:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", + "file": "./Math.sol", + "id": 121, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1459, + "src": "46:20:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", + "file": "./Proxy.sol", + "id": 122, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1495, + "src": "67:21:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "Deprecated: Use Open Zeppeling one instead", + "fullyImplemented": true, + "id": 135, + "linearizedBaseContracts": [ + 135 + ], + "name": "StandardTokenData", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 126, + "name": "balances", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "208:33:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 125, + "keyType": { + "id": 123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "216:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "208:24:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 124, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "227:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 132, + "name": "allowances", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "247:55:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 131, + "keyType": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "255:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "247:44:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 130, + "keyType": { + "id": 128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "266:24:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 129, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "285:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "name": "totalTokens", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "308:16:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 133, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "308:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "scope": 330, + "src": "144:183:4" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 136, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1563, + "src": "475:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Token_$1563", + "typeString": "contract Token" + } + }, + "id": 137, + "nodeType": "InheritanceSpecifier", + "src": "475:5:4" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 138, + "name": "StandardTokenData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 135, + "src": "482:17:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_StandardTokenData_$135", + "typeString": "contract StandardTokenData" + } + }, + "id": 139, + "nodeType": "InheritanceSpecifier", + "src": "482:17:4" + } + ], + "contractDependencies": [ + 135, + 1563 + ], + "contractKind": "contract", + "documentation": "@title Standard token contract with overflow protection", + "fullyImplemented": true, + "id": 329, + "linearizedBaseContracts": [ + 329, + 135, + 1563 + ], + "name": "GnosisStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 141, + "libraryName": { + "contractScope": null, + "id": 140, + "name": "GnosisMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1458, + "src": "512:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_GnosisMath_$1458", + "typeString": "library GnosisMath" + } + }, + "nodeType": "UsingForDirective", + "src": "506:23:4", + "typeName": null + }, + { + "body": { + "id": 192, + "nodeType": "Block", + "src": "849:269:4", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "863:38:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 155, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "895:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 150, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "864:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 153, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 151, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "873:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "873:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "864:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "864:30:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "864:37:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "905:30:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 162, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "929:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 158, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "906:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 160, + "indexExpression": { + "argumentTypes": null, + "id": 159, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "915:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "906:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToAdd", + "nodeType": "MemberAccess", + "referencedDeclaration": 1207, + "src": "906:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "906:29:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "863:72:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 169, + "nodeType": "IfStatement", + "src": "859:115:4", + "trueBody": { + "id": 168, + "nodeType": "Block", + "src": "937:37:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "958:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 149, + "id": 167, + "nodeType": "Return", + "src": "951:12:4" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 170, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "984:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 173, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 171, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "993:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "993:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "984:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 174, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1008:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "984:29:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 176, + "nodeType": "ExpressionStatement", + "src": "984:29:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 177, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1023:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "id": 178, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "1032:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1023:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1039:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1023:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "1023:21:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 184, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1068:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1068:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 186, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "1080:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 187, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1084:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 183, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "1059:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1059:31:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 189, + "nodeType": "EmitStatement", + "src": "1054:36:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1107:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 149, + "id": 191, + "nodeType": "Return", + "src": "1100:11:4" + } + ] + }, + "documentation": "@dev Transfers sender's tokens to a given address. Returns success\n @param to Address of token receiver\n @param value Number of tokens to transfer\n @return Was transfer successful?", + "id": 193, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 143, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "803:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 142, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "803:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 145, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "815:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 144, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "815:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "802:24:4" + }, + "returnParameters": { + "id": 149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 148, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "843:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 147, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "843:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "842:6:4" + }, + "scope": 329, + "src": "785:333:4", + "stateMutability": "nonpayable", + "superFunction": 1521, + "visibility": "public" + }, + { + "body": { + "id": 263, + "nodeType": "Block", + "src": "1512:369:4", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1526:32:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 208, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1552:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 204, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1527:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 206, + "indexExpression": { + "argumentTypes": null, + "id": 205, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1536:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1527:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "1527:24:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1527:31:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1562:68:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 218, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1615:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 211, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1563:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 213, + "indexExpression": { + "argumentTypes": null, + "id": 212, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1574:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1563:16:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 216, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 214, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1580:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1580:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1563:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "1563:38:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1563:67:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1526:104:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1634:30:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 226, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1658:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 222, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1635:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 224, + "indexExpression": { + "argumentTypes": null, + "id": 223, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1644:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1635:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToAdd", + "nodeType": "MemberAccess", + "referencedDeclaration": 1207, + "src": "1635:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1635:29:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1526:138:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 233, + "nodeType": "IfStatement", + "src": "1522:181:4", + "trueBody": { + "id": 232, + "nodeType": "Block", + "src": "1666:37:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1687:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 203, + "id": 231, + "nodeType": "Return", + "src": "1680:12:4" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 234, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1712:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 236, + "indexExpression": { + "argumentTypes": null, + "id": 235, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1721:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1712:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 237, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1730:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1712:23:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 239, + "nodeType": "ExpressionStatement", + "src": "1712:23:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 240, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1745:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 244, + "indexExpression": { + "argumentTypes": null, + "id": 241, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1756:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1745:16:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 245, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 242, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1762:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1762:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1745:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 246, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1777:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1745:37:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 248, + "nodeType": "ExpressionStatement", + "src": "1745:37:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 249, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1792:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 251, + "indexExpression": { + "argumentTypes": null, + "id": 250, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1801:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1792:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "id": 252, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1808:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1792:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 254, + "nodeType": "ExpressionStatement", + "src": "1792:21:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 256, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1837:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 257, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1843:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 258, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1847:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 255, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "1828:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1828:25:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 260, + "nodeType": "EmitStatement", + "src": "1823:30:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1870:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 203, + "id": 262, + "nodeType": "Return", + "src": "1863:11:4" + } + ] + }, + "documentation": "@dev Allows allowed third party to transfer tokens from one address to another. Returns success\n @param from Address from where tokens are withdrawn\n @param to Address to where tokens are sent\n @param value Number of tokens to transfer\n @return Was transfer successful?", + "id": 264, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 195, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1452:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1452:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 197, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1466:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 196, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1466:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 199, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1478:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 198, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1478:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1451:38:4" + }, + "returnParameters": { + "id": 203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 202, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1506:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 201, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1506:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1505:6:4" + }, + "scope": 329, + "src": "1430:451:4", + "stateMutability": "nonpayable", + "superFunction": 1532, + "visibility": "public" + }, + { + "body": { + "id": 291, + "nodeType": "Block", + "src": "2166:128:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 273, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "2176:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 277, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 274, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "2187:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2187:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2176:22:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 278, + "indexExpression": { + "argumentTypes": null, + "id": 276, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 266, + "src": "2199:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2176:31:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 279, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "2210:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2176:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 281, + "nodeType": "ExpressionStatement", + "src": "2176:39:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 283, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "2239:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2239:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 285, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 266, + "src": "2251:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 286, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "2260:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 282, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1512, + "src": "2230:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2230:36:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 288, + "nodeType": "EmitStatement", + "src": "2225:41:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2283:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 272, + "id": 290, + "nodeType": "Return", + "src": "2276:11:4" + } + ] + }, + "documentation": "@dev Sets approved amount of tokens for spender. Returns success\n @param spender Address of allowed account\n @param value Number of approved tokens\n @return Was approval successful?", + "id": 292, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2115:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2115:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2132:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 267, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2132:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2114:29:4" + }, + "returnParameters": { + "id": 272, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 271, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2160:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 270, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2160:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2159:6:4" + }, + "scope": 329, + "src": "2098:196:4", + "stateMutability": "nonpayable", + "superFunction": 1541, + "visibility": "public" + }, + { + "body": { + "id": 307, + "nodeType": "Block", + "src": "2582:50:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 301, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "2599:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 303, + "indexExpression": { + "argumentTypes": null, + "id": 302, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "2610:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2599:17:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 305, + "indexExpression": { + "argumentTypes": null, + "id": 304, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "2617:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2599:26:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 300, + "id": 306, + "nodeType": "Return", + "src": "2592:33:4" + } + ] + }, + "documentation": "@dev Returns number of allowed tokens for given address\n @param owner Address of token owner\n @param spender Address of token spender\n @return Remaining allowance for spender", + "id": 308, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 294, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2523:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2523:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 296, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2538:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2538:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2522:32:4" + }, + "returnParameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 299, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2576:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 298, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2576:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2575:6:4" + }, + "scope": 329, + "src": "2504:128:4", + "stateMutability": "view", + "superFunction": 1557, + "visibility": "public" + }, + { + "body": { + "id": 319, + "nodeType": "Block", + "src": "2837:39:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 315, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "2854:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 317, + "indexExpression": { + "argumentTypes": null, + "id": 316, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 310, + "src": "2863:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2854:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 314, + "id": 318, + "nodeType": "Return", + "src": "2847:22:4" + } + ] + }, + "documentation": "@dev Returns number of tokens owned by given address\n @param owner Address of token owner\n @return Balance of owner", + "id": 320, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 310, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 320, + "src": "2795:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 309, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2795:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2794:15:4" + }, + "returnParameters": { + "id": 314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 313, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 320, + "src": "2831:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 312, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2831:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2830:6:4" + }, + "scope": 329, + "src": "2776:100:4", + "stateMutability": "view", + "superFunction": 1548, + "visibility": "public" + }, + { + "body": { + "id": 327, + "nodeType": "Block", + "src": "3005:35:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 325, + "name": "totalTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "3022:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 324, + "id": 326, + "nodeType": "Return", + "src": "3015:18:4" + } + ] + }, + "documentation": "@dev Returns total supply of tokens\n @return Total supply", + "id": 328, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 321, + "nodeType": "ParameterList", + "parameters": [], + "src": "2975:2:4" + }, + "returnParameters": { + "id": 324, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 323, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 328, + "src": "2999:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2999:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2998:6:4" + }, + "scope": 329, + "src": "2955:85:4", + "stateMutability": "view", + "superFunction": 1562, + "visibility": "public" + } + ], + "scope": 330, + "src": "443:2599:4" + } + ], + "src": "0:3043:4" + }, + "legacyAST": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "exportedSymbols": { + "GnosisStandardToken": [ + 329 + ], + "StandardTokenData": [ + 135 + ] + }, + "id": 330, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 119, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", + "file": "./Token.sol", + "id": 120, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1564, + "src": "24:21:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", + "file": "./Math.sol", + "id": 121, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1459, + "src": "46:20:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", + "file": "./Proxy.sol", + "id": 122, + "nodeType": "ImportDirective", + "scope": 330, + "sourceUnit": 1495, + "src": "67:21:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "Deprecated: Use Open Zeppeling one instead", + "fullyImplemented": true, + "id": 135, + "linearizedBaseContracts": [ + 135 + ], + "name": "StandardTokenData", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 126, + "name": "balances", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "208:33:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 125, + "keyType": { + "id": 123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "216:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "208:24:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 124, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "227:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 132, + "name": "allowances", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "247:55:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 131, + "keyType": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "255:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "247:44:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 130, + "keyType": { + "id": 128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "266:24:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 129, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "285:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "name": "totalTokens", + "nodeType": "VariableDeclaration", + "scope": 135, + "src": "308:16:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 133, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "308:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "scope": 330, + "src": "144:183:4" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 136, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1563, + "src": "475:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Token_$1563", + "typeString": "contract Token" + } + }, + "id": 137, + "nodeType": "InheritanceSpecifier", + "src": "475:5:4" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 138, + "name": "StandardTokenData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 135, + "src": "482:17:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_StandardTokenData_$135", + "typeString": "contract StandardTokenData" + } + }, + "id": 139, + "nodeType": "InheritanceSpecifier", + "src": "482:17:4" + } + ], + "contractDependencies": [ + 135, + 1563 + ], + "contractKind": "contract", + "documentation": "@title Standard token contract with overflow protection", + "fullyImplemented": true, + "id": 329, + "linearizedBaseContracts": [ + 329, + 135, + 1563 + ], + "name": "GnosisStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 141, + "libraryName": { + "contractScope": null, + "id": 140, + "name": "GnosisMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1458, + "src": "512:10:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_GnosisMath_$1458", + "typeString": "library GnosisMath" + } + }, + "nodeType": "UsingForDirective", + "src": "506:23:4", + "typeName": null + }, + { + "body": { + "id": 192, + "nodeType": "Block", + "src": "849:269:4", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "863:38:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 155, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "895:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 150, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "864:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 153, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 151, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "873:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "873:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "864:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "864:30:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "864:37:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "905:30:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 162, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "929:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 158, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "906:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 160, + "indexExpression": { + "argumentTypes": null, + "id": 159, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "915:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "906:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToAdd", + "nodeType": "MemberAccess", + "referencedDeclaration": 1207, + "src": "906:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "906:29:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "863:72:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 169, + "nodeType": "IfStatement", + "src": "859:115:4", + "trueBody": { + "id": 168, + "nodeType": "Block", + "src": "937:37:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "958:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 149, + "id": 167, + "nodeType": "Return", + "src": "951:12:4" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 170, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "984:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 173, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 171, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "993:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "993:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "984:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 174, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1008:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "984:29:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 176, + "nodeType": "ExpressionStatement", + "src": "984:29:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 177, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1023:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "id": 178, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "1032:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1023:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1039:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1023:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "1023:21:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 184, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1068:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1068:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 186, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 143, + "src": "1080:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 187, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "1084:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 183, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "1059:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1059:31:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 189, + "nodeType": "EmitStatement", + "src": "1054:36:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1107:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 149, + "id": 191, + "nodeType": "Return", + "src": "1100:11:4" + } + ] + }, + "documentation": "@dev Transfers sender's tokens to a given address. Returns success\n @param to Address of token receiver\n @param value Number of tokens to transfer\n @return Was transfer successful?", + "id": 193, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 143, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "803:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 142, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "803:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 145, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "815:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 144, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "815:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "802:24:4" + }, + "returnParameters": { + "id": 149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 148, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 193, + "src": "843:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 147, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "843:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "842:6:4" + }, + "scope": 329, + "src": "785:333:4", + "stateMutability": "nonpayable", + "superFunction": 1521, + "visibility": "public" + }, + { + "body": { + "id": 263, + "nodeType": "Block", + "src": "1512:369:4", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1526:32:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 208, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1552:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 204, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1527:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 206, + "indexExpression": { + "argumentTypes": null, + "id": 205, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1536:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1527:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "1527:24:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1527:31:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1562:68:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 218, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1615:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 211, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1563:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 213, + "indexExpression": { + "argumentTypes": null, + "id": 212, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1574:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1563:16:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 216, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 214, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1580:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1580:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1563:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToSub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1221, + "src": "1563:38:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1563:67:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1526:104:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1634:30:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 226, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1658:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 222, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1635:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 224, + "indexExpression": { + "argumentTypes": null, + "id": 223, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1644:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1635:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeToAdd", + "nodeType": "MemberAccess", + "referencedDeclaration": 1207, + "src": "1635:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool)" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1635:29:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1526:138:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 233, + "nodeType": "IfStatement", + "src": "1522:181:4", + "trueBody": { + "id": 232, + "nodeType": "Block", + "src": "1666:37:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1687:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 203, + "id": 231, + "nodeType": "Return", + "src": "1680:12:4" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 234, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1712:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 236, + "indexExpression": { + "argumentTypes": null, + "id": 235, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1721:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1712:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 237, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1730:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1712:23:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 239, + "nodeType": "ExpressionStatement", + "src": "1712:23:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 240, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1745:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 244, + "indexExpression": { + "argumentTypes": null, + "id": 241, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1756:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1745:16:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 245, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 242, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "1762:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1762:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1745:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 246, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1777:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1745:37:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 248, + "nodeType": "ExpressionStatement", + "src": "1745:37:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 249, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1792:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 251, + "indexExpression": { + "argumentTypes": null, + "id": 250, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1801:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1792:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "id": 252, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1808:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1792:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 254, + "nodeType": "ExpressionStatement", + "src": "1792:21:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 256, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 195, + "src": "1837:4:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 257, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 197, + "src": "1843:2:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 258, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "1847:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 255, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "1828:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1828:25:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 260, + "nodeType": "EmitStatement", + "src": "1823:30:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1870:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 203, + "id": 262, + "nodeType": "Return", + "src": "1863:11:4" + } + ] + }, + "documentation": "@dev Allows allowed third party to transfer tokens from one address to another. Returns success\n @param from Address from where tokens are withdrawn\n @param to Address to where tokens are sent\n @param value Number of tokens to transfer\n @return Was transfer successful?", + "id": 264, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 195, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1452:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1452:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 197, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1466:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 196, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1466:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 199, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1478:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 198, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1478:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1451:38:4" + }, + "returnParameters": { + "id": 203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 202, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "1506:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 201, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1506:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1505:6:4" + }, + "scope": 329, + "src": "1430:451:4", + "stateMutability": "nonpayable", + "superFunction": 1532, + "visibility": "public" + }, + { + "body": { + "id": 291, + "nodeType": "Block", + "src": "2166:128:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 273, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "2176:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 277, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 274, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "2187:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2187:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2176:22:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 278, + "indexExpression": { + "argumentTypes": null, + "id": 276, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 266, + "src": "2199:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2176:31:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 279, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "2210:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2176:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 281, + "nodeType": "ExpressionStatement", + "src": "2176:39:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 283, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "2239:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2239:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 285, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 266, + "src": "2251:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 286, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "2260:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 282, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1512, + "src": "2230:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2230:36:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 288, + "nodeType": "EmitStatement", + "src": "2225:41:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2283:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 272, + "id": 290, + "nodeType": "Return", + "src": "2276:11:4" + } + ] + }, + "documentation": "@dev Sets approved amount of tokens for spender. Returns success\n @param spender Address of allowed account\n @param value Number of approved tokens\n @return Was approval successful?", + "id": 292, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2115:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2115:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2132:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 267, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2132:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2114:29:4" + }, + "returnParameters": { + "id": 272, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 271, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 292, + "src": "2160:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 270, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2160:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2159:6:4" + }, + "scope": 329, + "src": "2098:196:4", + "stateMutability": "nonpayable", + "superFunction": 1541, + "visibility": "public" + }, + { + "body": { + "id": 307, + "nodeType": "Block", + "src": "2582:50:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 301, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "2599:10:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 303, + "indexExpression": { + "argumentTypes": null, + "id": 302, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "2610:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2599:17:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 305, + "indexExpression": { + "argumentTypes": null, + "id": 304, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "2617:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2599:26:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 300, + "id": 306, + "nodeType": "Return", + "src": "2592:33:4" + } + ] + }, + "documentation": "@dev Returns number of allowed tokens for given address\n @param owner Address of token owner\n @param spender Address of token spender\n @return Remaining allowance for spender", + "id": 308, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 294, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2523:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2523:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 296, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2538:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2538:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2522:32:4" + }, + "returnParameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 299, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 308, + "src": "2576:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 298, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2576:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2575:6:4" + }, + "scope": 329, + "src": "2504:128:4", + "stateMutability": "view", + "superFunction": 1557, + "visibility": "public" + }, + { + "body": { + "id": 319, + "nodeType": "Block", + "src": "2837:39:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 315, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "2854:8:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 317, + "indexExpression": { + "argumentTypes": null, + "id": 316, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 310, + "src": "2863:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2854:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 314, + "id": 318, + "nodeType": "Return", + "src": "2847:22:4" + } + ] + }, + "documentation": "@dev Returns number of tokens owned by given address\n @param owner Address of token owner\n @return Balance of owner", + "id": 320, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 310, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 320, + "src": "2795:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 309, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2795:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2794:15:4" + }, + "returnParameters": { + "id": 314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 313, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 320, + "src": "2831:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 312, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2831:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2830:6:4" + }, + "scope": 329, + "src": "2776:100:4", + "stateMutability": "view", + "superFunction": 1548, + "visibility": "public" + }, + { + "body": { + "id": 327, + "nodeType": "Block", + "src": "3005:35:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 325, + "name": "totalTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "3022:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 324, + "id": 326, + "nodeType": "Return", + "src": "3015:18:4" + } + ] + }, + "documentation": "@dev Returns total supply of tokens\n @return Total supply", + "id": 328, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 321, + "nodeType": "ParameterList", + "parameters": [], + "src": "2975:2:4" + }, + "returnParameters": { + "id": 324, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 323, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 328, + "src": "2999:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2999:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2998:6:4" + }, + "scope": 329, + "src": "2955:85:4", + "stateMutability": "view", + "superFunction": 1562, + "visibility": "public" + } + ], + "scope": 330, + "src": "443:2599:4" + } + ], + "src": "0:3043:4" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.10", + "updatedAt": "2019-05-31T13:47:05.347Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {}, + "notice": "Deprecated: Use Open Zeppeling one instead" + } +} \ No newline at end of file diff --git a/build/contracts/Token.json b/build/contracts/Token.json new file mode 100644 index 00000000..f858bea1 --- /dev/null +++ b/build/contracts/Token.json @@ -0,0 +1,1865 @@ +{ + "contractName": "Token", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{},\"title\":\"Abstract token contract - Functions to be implemented by token contracts\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/Token.sol\":\"Token\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "/// Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md\npragma solidity ^0.5.2;\n\n/// @title Abstract token contract - Functions to be implemented by token contracts\ncontract Token {\n /*\n * Events\n */\n event Transfer(address indexed from, address indexed to, uint value);\n event Approval(address indexed owner, address indexed spender, uint value);\n\n /*\n * Public functions\n */\n function transfer(address to, uint value) public returns (bool);\n function transferFrom(address from, address to, uint value) public returns (bool);\n function approve(address spender, uint value) public returns (bool);\n function balanceOf(address owner) public view returns (uint);\n function allowance(address owner, address spender) public view returns (uint);\n function totalSupply() public view returns (uint);\n}\n", + "sourcePath": "@gnosis.pm/util-contracts/contracts/Token.sol", + "ast": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", + "exportedSymbols": { + "Token": [ + 1563 + ] + }, + "id": 1564, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1496, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "113:23:7" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Abstract token contract - Functions to be implemented by token contracts", + "fullyImplemented": false, + "id": 1563, + "linearizedBaseContracts": [ + 1563 + ], + "name": "Token", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": null, + "id": 1504, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1503, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1498, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "288:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1497, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "288:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1500, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "310:18:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1499, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "310:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1502, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "330:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1501, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "330:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "287:54:7" + }, + "src": "273:69:7" + }, + { + "anonymous": false, + "documentation": null, + "id": 1512, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1511, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1506, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1512, + "src": "362:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1505, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "362:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1508, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1512, + "src": "385:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1507, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "385:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1510, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1512, + "src": "410:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1509, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "410:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "361:60:7" + }, + "src": "347:75:7" + }, + { + "body": null, + "documentation": null, + "id": 1521, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1514, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1521, + "src": "486:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1513, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "486:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1516, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1521, + "src": "498:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1515, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "498:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "485:24:7" + }, + "returnParameters": { + "id": 1520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1519, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1521, + "src": "526:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1518, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "526:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "525:6:7" + }, + "scope": 1563, + "src": "468:64:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1532, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1528, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1523, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1532, + "src": "559:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1522, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "559:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1525, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1532, + "src": "573:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1524, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "573:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1527, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1532, + "src": "585:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1526, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "585:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "558:38:7" + }, + "returnParameters": { + "id": 1531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1530, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1532, + "src": "613:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1529, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "613:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "612:6:7" + }, + "scope": 1563, + "src": "537:82:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1541, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1537, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1534, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1541, + "src": "641:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "641:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1536, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1541, + "src": "658:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1535, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "658:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "640:29:7" + }, + "returnParameters": { + "id": 1540, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1539, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1541, + "src": "686:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1538, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "686:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "685:6:7" + }, + "scope": 1563, + "src": "624:68:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1548, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1543, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1548, + "src": "716:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "716:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "715:15:7" + }, + "returnParameters": { + "id": 1547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1546, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1548, + "src": "752:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1545, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "752:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "751:6:7" + }, + "scope": 1563, + "src": "697:61:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1557, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1550, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1557, + "src": "782:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1549, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "782:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1552, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1557, + "src": "797:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1551, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "797:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "781:32:7" + }, + "returnParameters": { + "id": 1556, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1555, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1557, + "src": "835:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1554, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "835:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "834:6:7" + }, + "scope": 1563, + "src": "763:78:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1562, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1558, + "nodeType": "ParameterList", + "parameters": [], + "src": "866:2:7" + }, + "returnParameters": { + "id": 1561, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1560, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1562, + "src": "890:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1559, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "890:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "889:6:7" + }, + "scope": 1563, + "src": "846:50:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1564, + "src": "222:676:7" + } + ], + "src": "113:786:7" + }, + "legacyAST": { + "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", + "exportedSymbols": { + "Token": [ + 1563 + ] + }, + "id": 1564, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1496, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "113:23:7" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Abstract token contract - Functions to be implemented by token contracts", + "fullyImplemented": false, + "id": 1563, + "linearizedBaseContracts": [ + 1563 + ], + "name": "Token", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": null, + "id": 1504, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1503, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1498, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "288:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1497, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "288:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1500, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "310:18:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1499, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "310:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1502, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1504, + "src": "330:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1501, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "330:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "287:54:7" + }, + "src": "273:69:7" + }, + { + "anonymous": false, + "documentation": null, + "id": 1512, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1511, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1506, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1512, + "src": "362:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1505, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "362:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1508, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1512, + "src": "385:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1507, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "385:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1510, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1512, + "src": "410:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1509, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "410:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "361:60:7" + }, + "src": "347:75:7" + }, + { + "body": null, + "documentation": null, + "id": 1521, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1514, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1521, + "src": "486:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1513, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "486:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1516, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1521, + "src": "498:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1515, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "498:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "485:24:7" + }, + "returnParameters": { + "id": 1520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1519, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1521, + "src": "526:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1518, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "526:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "525:6:7" + }, + "scope": 1563, + "src": "468:64:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1532, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1528, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1523, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1532, + "src": "559:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1522, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "559:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1525, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1532, + "src": "573:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1524, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "573:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1527, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1532, + "src": "585:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1526, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "585:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "558:38:7" + }, + "returnParameters": { + "id": 1531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1530, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1532, + "src": "613:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1529, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "613:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "612:6:7" + }, + "scope": 1563, + "src": "537:82:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1541, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1537, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1534, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1541, + "src": "641:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "641:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1536, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1541, + "src": "658:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1535, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "658:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "640:29:7" + }, + "returnParameters": { + "id": 1540, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1539, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1541, + "src": "686:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1538, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "686:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "685:6:7" + }, + "scope": 1563, + "src": "624:68:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1548, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1543, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1548, + "src": "716:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "716:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "715:15:7" + }, + "returnParameters": { + "id": 1547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1546, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1548, + "src": "752:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1545, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "752:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "751:6:7" + }, + "scope": 1563, + "src": "697:61:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1557, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1550, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1557, + "src": "782:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1549, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "782:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1552, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1557, + "src": "797:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1551, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "797:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "781:32:7" + }, + "returnParameters": { + "id": 1556, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1555, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1557, + "src": "835:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1554, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "835:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "834:6:7" + }, + "scope": 1563, + "src": "763:78:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1562, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1558, + "nodeType": "ParameterList", + "parameters": [], + "src": "866:2:7" + }, + "returnParameters": { + "id": 1561, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1560, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1562, + "src": "890:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1559, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "890:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "889:6:7" + }, + "scope": 1563, + "src": "846:50:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1564, + "src": "222:676:7" + } + ], + "src": "113:786:7" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.10", + "updatedAt": "2019-05-31T13:47:05.363Z", + "devdoc": { + "methods": {}, + "title": "Abstract token contract - Functions to be implemented by token contracts" + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/TokenOMG.json b/build/contracts/TokenOMG.json new file mode 100644 index 00000000..cd77a240 --- /dev/null +++ b/build/contracts/TokenOMG.json @@ -0,0 +1,1008 @@ +{ + "contractName": "TokenOMG", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns number of allowed tokens for given address\",\"params\":{\"owner\":\"Address of token owner\",\"spender\":\"Address of token spender\"},\"return\":\"Remaining allowance for spender\"},\"approve(address,uint256)\":{\"details\":\"Sets approved amount of tokens for spender. Returns success\",\"params\":{\"spender\":\"Address of allowed account\",\"value\":\"Number of approved tokens\"},\"return\":\"Was approval successful?\"},\"balanceOf(address)\":{\"details\":\"Returns number of tokens owned by given address\",\"params\":{\"owner\":\"Address of token owner\"},\"return\":\"Balance of owner\"},\"totalSupply()\":{\"details\":\"Returns total supply of tokens\",\"return\":\"Total supply\"},\"transfer(address,uint256)\":{\"details\":\"Transfers sender's tokens to a given address. Returns success\",\"params\":{\"to\":\"Address of token receiver\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Allows allowed third party to transfer tokens from one address to another. Returns success\",\"params\":{\"from\":\"Address from where tokens are withdrawn\",\"to\":\"Address to where tokens are sent\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol\":\"TokenOMG\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol\":{\"keccak256\":\"0x099d05859e51af8b24539b47e0d181a17409d51063263f8a8d53280818c69d4d\",\"urls\":[\"bzzr://4eb926d078f8111367c3a180e7eb99f36528b95c871e1004c626f1cb5487f5dc\"]},\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":{\"keccak256\":\"0xdec5028208406e811c449a04e2932f7efeae629388cb6124550b8b048a645556\",\"urls\":[\"bzzr://f3d13a708f543b3ce72745cab321e6daf25d935fd12ba55a4152f1113eb6d5e4\"]},\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]},\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516020806105f68339810180604052602081101561003057600080fd5b5051336000908152602081905260409020556105a5806100516000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b038135169060200135610284565b604080519115158252519081900360200190f35b61015d6102eb565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356102f1565b6101ad61041e565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b0316610423565b6100a061043e565b6101416004803603604081101561020757600080fd5b506001600160a01b038135169060200135610477565b61015d6004803603604081101561023357600080fd5b506001600160a01b0381358116916020013516610542565b6040518060400160405280600d81526020017f4f6d697365676f20546f6b656e0000000000000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461031a908363ffffffff61056d16565b158061035757506001600160a01b0384166000908152600160209081526040808320338452909152902054610355908363ffffffff61056d16565b155b8061038857506001600160a01b038316600090815260208190526040902054610386908363ffffffff61057216565b155b1561039557506000610417565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b601281565b6001600160a01b031660009081526020819052604090205490565b6040518060400160405280600381526020017f4f4d47000000000000000000000000000000000000000000000000000000000081525081565b33600090815260208190526040812054610497908363ffffffff61056d16565b15806104c957506001600160a01b0383166000908152602081905260409020546104c7908363ffffffff61057216565b155b156104d6575060006102e5565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a72305820ea99ba72da2f296e4973ee11e32209d4295c58c79dd30789d835af32ba70401c0029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b038135169060200135610284565b604080519115158252519081900360200190f35b61015d6102eb565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356102f1565b6101ad61041e565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b0316610423565b6100a061043e565b6101416004803603604081101561020757600080fd5b506001600160a01b038135169060200135610477565b61015d6004803603604081101561023357600080fd5b506001600160a01b0381358116916020013516610542565b6040518060400160405280600d81526020017f4f6d697365676f20546f6b656e0000000000000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461031a908363ffffffff61056d16565b158061035757506001600160a01b0384166000908152600160209081526040808320338452909152902054610355908363ffffffff61056d16565b155b8061038857506001600160a01b038316600090815260208190526040902054610386908363ffffffff61057216565b155b1561039557506000610417565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b601281565b6001600160a01b031660009081526020819052604090205490565b6040518060400160405280600381526020017f4f4d47000000000000000000000000000000000000000000000000000000000081525081565b33600090815260208190526040812054610497908363ffffffff61056d16565b15806104c957506001600160a01b0383166000908152602081905260409020546104c7908363ffffffff61057216565b155b156104d6575060006102e5565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a72305820ea99ba72da2f296e4973ee11e32209d4295c58c79dd30789d835af32ba70401c0029", + "sourceMap": "96:264:2:-;;;271:87;8:9:-1;5:2;;;30:1;27;20:12;5:2;271:87:2;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;271:87:2;333:10;324:8;:20;;;271:87;324:20;;;;;;:29;96:264;;;;;;", + "deployedSourceMap": "96:264:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;96:264:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;182:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;182:45:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2098:196:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2098:196:4;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2955:85;;;:::i;:::-;;;;;;;;;;;;;;;;1430:451;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1430:451:4;;;;;;;;;;;;;;;;;:::i;231:35:2:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2776:100:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2776:100:4;-1:-1:-1;;;;;2776:100:4;;:::i;141:37:2:-;;;:::i;785:333:4:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;785:333:4;;;;;;;;:::i;2504:128::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2504:128:4;;;;;;;;;;:::i;182:45:2:-;;;;;;;;;;;;;;;;;;;:::o;2098:196:4:-;2187:10;2160:4;2176:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;2176:31:4;;;;;;;;;;;:39;;;2230:36;;;;;;;2160:4;;2176:31;;2187:10;;2230:36;;;;;;;;-1:-1:-1;2283:4:4;2098:196;;;;;:::o;2955:85::-;3022:11;;2955:85;:::o;1430:451::-;-1:-1:-1;;;;;1527:14:4;;1506:4;1527:14;;;;;;;;;;;:31;;1552:5;1527:31;:24;:31;:::i;:::-;1526:32;:104;;;-1:-1:-1;;;;;;1563:16:4;;;;;;:10;:16;;;;;;;;1580:10;1563:28;;;;;;;;:67;;1615:5;1563:67;:38;:67;:::i;:::-;1562:68;1526:104;:138;;;-1:-1:-1;;;;;;1635:12:4;;:8;:12;;;;;;;;;;;:29;;1658:5;1635:29;:22;:29;:::i;:::-;1634:30;1526:138;1522:181;;;-1:-1:-1;1687:5:4;1680:12;;1522:181;-1:-1:-1;;;;;1712:14:4;;;:8;:14;;;;;;;;;;;:23;;;;;;;-1:-1:-1;1745:16:4;;;;;1762:10;1745:28;;;;;;;:37;;;;;;;1792:12;;;;;;;;;;;;;:21;;;;;;1828:25;;;;;;;1792:12;;1828:25;;;;;;;;;;;-1:-1:-1;1870:4:4;1430:451;;;;;;:::o;231:35:2:-;264:2;231:35;:::o;2776:100:4:-;-1:-1:-1;;;;;2854:15:4;2831:4;2854:15;;;;;;;;;;;;2776:100::o;141:37:2:-;;;;;;;;;;;;;;;;;;;:::o;785:333:4:-;873:10;843:4;864:20;;;;;;;;;;;:37;;895:5;864:37;:30;:37;:::i;:::-;863:38;:72;;;-1:-1:-1;;;;;;906:12:4;;:8;:12;;;;;;;;;;;:29;;929:5;906:29;:22;:29;:::i;:::-;905:30;863:72;859:115;;;-1:-1:-1;958:5:4;951:12;;859:115;993:10;984:8;:20;;;;;;;;;;;:29;;;;;;;-1:-1:-1;;;;;1023:12:4;;;;;;;;;:21;;;;;;1059:31;;;;;;;1023:12;;993:10;1059:31;;;;;;;;;;;-1:-1:-1;1107:4:4;785:333;;;;:::o;2504:128::-;-1:-1:-1;;;;;2599:17:4;;;2576:4;2599:17;;;:10;:17;;;;;;;;:26;;;;;;;;;;;;;2504:128::o;6580:94:5:-;-1:-1:-1;6661:6:5;;6580:94::o;6310:98::-;6391:5;;-1:-1:-1;6391:10:5;;6310:98::o", + "source": "pragma solidity ^0.5.2;\n\nimport \"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\";\n\ncontract TokenOMG is GnosisStandardToken {\n string public constant symbol = \"OMG\";\n string public constant name = \"Omisego Token\";\n uint8 public constant decimals = 18;\n\n constructor(\n uint amount\n )\n public \n {\n balances[msg.sender] = amount;\n }\n}", + "sourcePath": "/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol", + "ast": { + "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol", + "exportedSymbols": { + "TokenOMG": [ + 89 + ] + }, + "id": 90, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 63, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "file": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "id": 64, + "nodeType": "ImportDirective", + "scope": 90, + "sourceUnit": 330, + "src": "25:69:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 65, + "name": "GnosisStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 329, + "src": "117:19:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_GnosisStandardToken_$329", + "typeString": "contract GnosisStandardToken" + } + }, + "id": 66, + "nodeType": "InheritanceSpecifier", + "src": "117:19:2" + } + ], + "contractDependencies": [ + 135, + 329, + 1563 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 89, + "linearizedBaseContracts": [ + 89, + 329, + 135, + 1563 + ], + "name": "TokenOMG", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 69, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 89, + "src": "141:37:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 67, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "141:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "4f4d47", + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "173:5:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_eadf11d2ba45e7887d539b397ca436e3789fd0fce1853a6c2638148b7ed570cc", + "typeString": "literal_string \"OMG\"" + }, + "value": "OMG" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 72, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 89, + "src": "182:45:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 70, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "182:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "4f6d697365676f20546f6b656e", + "id": 71, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "212:15:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9c1ed8398d5ab339d23f88c4164d2f24b2812ff95a2ca7508663550dba017422", + "typeString": "literal_string \"Omisego Token\"" + }, + "value": "Omisego Token" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 75, + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 89, + "src": "231:35:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 73, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "231:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "264:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "body": { + "id": 87, + "nodeType": "Block", + "src": "318:40:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 80, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "324:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 83, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 81, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "333:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 82, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "333:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "324:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 84, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "347:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "324:29:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 86, + "nodeType": "ExpressionStatement", + "src": "324:29:2" + } + ] + }, + "documentation": null, + "id": 88, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 78, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 77, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 88, + "src": "288:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 76, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "288:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "282:21:2" + }, + "returnParameters": { + "id": 79, + "nodeType": "ParameterList", + "parameters": [], + "src": "318:0:2" + }, + "scope": 89, + "src": "271:87:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 90, + "src": "96:264:2" + } + ], + "src": "0:360:2" + }, + "legacyAST": { + "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol", + "exportedSymbols": { + "TokenOMG": [ + 89 + ] + }, + "id": 90, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 63, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "file": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "id": 64, + "nodeType": "ImportDirective", + "scope": 90, + "sourceUnit": 330, + "src": "25:69:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 65, + "name": "GnosisStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 329, + "src": "117:19:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_GnosisStandardToken_$329", + "typeString": "contract GnosisStandardToken" + } + }, + "id": 66, + "nodeType": "InheritanceSpecifier", + "src": "117:19:2" + } + ], + "contractDependencies": [ + 135, + 329, + 1563 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 89, + "linearizedBaseContracts": [ + 89, + 329, + 135, + 1563 + ], + "name": "TokenOMG", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 69, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 89, + "src": "141:37:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 67, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "141:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "4f4d47", + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "173:5:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_eadf11d2ba45e7887d539b397ca436e3789fd0fce1853a6c2638148b7ed570cc", + "typeString": "literal_string \"OMG\"" + }, + "value": "OMG" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 72, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 89, + "src": "182:45:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 70, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "182:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "4f6d697365676f20546f6b656e", + "id": 71, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "212:15:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9c1ed8398d5ab339d23f88c4164d2f24b2812ff95a2ca7508663550dba017422", + "typeString": "literal_string \"Omisego Token\"" + }, + "value": "Omisego Token" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 75, + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 89, + "src": "231:35:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 73, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "231:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "264:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "body": { + "id": 87, + "nodeType": "Block", + "src": "318:40:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 80, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "324:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 83, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 81, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "333:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 82, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "333:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "324:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 84, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "347:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "324:29:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 86, + "nodeType": "ExpressionStatement", + "src": "324:29:2" + } + ] + }, + "documentation": null, + "id": 88, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 78, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 77, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 88, + "src": "288:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 76, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "288:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "282:21:2" + }, + "returnParameters": { + "id": 79, + "nodeType": "ParameterList", + "parameters": [], + "src": "318:0:2" + }, + "scope": 89, + "src": "271:87:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 90, + "src": "96:264:2" + } + ], + "src": "0:360:2" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.10", + "updatedAt": "2019-05-31T13:47:05.345Z", + "devdoc": { + "methods": { + "allowance(address,address)": { + "details": "Returns number of allowed tokens for given address", + "params": { + "owner": "Address of token owner", + "spender": "Address of token spender" + }, + "return": "Remaining allowance for spender" + }, + "approve(address,uint256)": { + "details": "Sets approved amount of tokens for spender. Returns success", + "params": { + "spender": "Address of allowed account", + "value": "Number of approved tokens" + }, + "return": "Was approval successful?" + }, + "balanceOf(address)": { + "details": "Returns number of tokens owned by given address", + "params": { + "owner": "Address of token owner" + }, + "return": "Balance of owner" + }, + "totalSupply()": { + "details": "Returns total supply of tokens", + "return": "Total supply" + }, + "transfer(address,uint256)": { + "details": "Transfers sender's tokens to a given address. Returns success", + "params": { + "to": "Address of token receiver", + "value": "Number of tokens to transfer" + }, + "return": "Was transfer successful?" + }, + "transferFrom(address,address,uint256)": { + "details": "Allows allowed third party to transfer tokens from one address to another. Returns success", + "params": { + "from": "Address from where tokens are withdrawn", + "to": "Address to where tokens are sent", + "value": "Number of tokens to transfer" + }, + "return": "Was transfer successful?" + } + } + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/TokenRDN.json b/build/contracts/TokenRDN.json new file mode 100644 index 00000000..d729b6b8 --- /dev/null +++ b/build/contracts/TokenRDN.json @@ -0,0 +1,1008 @@ +{ + "contractName": "TokenRDN", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns number of allowed tokens for given address\",\"params\":{\"owner\":\"Address of token owner\",\"spender\":\"Address of token spender\"},\"return\":\"Remaining allowance for spender\"},\"approve(address,uint256)\":{\"details\":\"Sets approved amount of tokens for spender. Returns success\",\"params\":{\"spender\":\"Address of allowed account\",\"value\":\"Number of approved tokens\"},\"return\":\"Was approval successful?\"},\"balanceOf(address)\":{\"details\":\"Returns number of tokens owned by given address\",\"params\":{\"owner\":\"Address of token owner\"},\"return\":\"Balance of owner\"},\"totalSupply()\":{\"details\":\"Returns total supply of tokens\",\"return\":\"Total supply\"},\"transfer(address,uint256)\":{\"details\":\"Transfers sender's tokens to a given address. Returns success\",\"params\":{\"to\":\"Address of token receiver\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Allows allowed third party to transfer tokens from one address to another. Returns success\",\"params\":{\"from\":\"Address from where tokens are withdrawn\",\"to\":\"Address to where tokens are sent\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol\":\"TokenRDN\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol\":{\"keccak256\":\"0xbd1fc040f6b4f7b68bb7e6b745d02c571d7baf992c5a3a34d57392f624d7043c\",\"urls\":[\"bzzr://fdd020e4fe5f62e961acccce8733276ad3aca6dbe7ccff3f860476774cf6bdab\"]},\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":{\"keccak256\":\"0xdec5028208406e811c449a04e2932f7efeae629388cb6124550b8b048a645556\",\"urls\":[\"bzzr://f3d13a708f543b3ce72745cab321e6daf25d935fd12ba55a4152f1113eb6d5e4\"]},\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]},\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516020806105f68339810180604052602081101561003057600080fd5b5051336000908152602081905260409020556105a5806100516000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b038135169060200135610284565b604080519115158252519081900360200190f35b61015d6102eb565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356102f1565b6101ad61041e565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b0316610423565b6100a061043e565b6101416004803603604081101561020757600080fd5b506001600160a01b038135169060200135610477565b61015d6004803603604081101561023357600080fd5b506001600160a01b0381358116916020013516610542565b6040518060400160405280600c81526020017f52616964656e20546f6b656e000000000000000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461031a908363ffffffff61056d16565b158061035757506001600160a01b0384166000908152600160209081526040808320338452909152902054610355908363ffffffff61056d16565b155b8061038857506001600160a01b038316600090815260208190526040902054610386908363ffffffff61057216565b155b1561039557506000610417565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b601281565b6001600160a01b031660009081526020819052604090205490565b6040518060400160405280600381526020017f52444e000000000000000000000000000000000000000000000000000000000081525081565b33600090815260208190526040812054610497908363ffffffff61056d16565b15806104c957506001600160a01b0383166000908152602081905260409020546104c7908363ffffffff61057216565b155b156104d6575060006102e5565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a7230582028ab4b3689cc43a4746f3e3ca9561bfb18236aa987616532108a03ab4faf0ccf0029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b038135169060200135610284565b604080519115158252519081900360200190f35b61015d6102eb565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356102f1565b6101ad61041e565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b0316610423565b6100a061043e565b6101416004803603604081101561020757600080fd5b506001600160a01b038135169060200135610477565b61015d6004803603604081101561023357600080fd5b506001600160a01b0381358116916020013516610542565b6040518060400160405280600c81526020017f52616964656e20546f6b656e000000000000000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461031a908363ffffffff61056d16565b158061035757506001600160a01b0384166000908152600160209081526040808320338452909152902054610355908363ffffffff61056d16565b155b8061038857506001600160a01b038316600090815260208190526040902054610386908363ffffffff61057216565b155b1561039557506000610417565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b601281565b6001600160a01b031660009081526020819052604090205490565b6040518060400160405280600381526020017f52444e000000000000000000000000000000000000000000000000000000000081525081565b33600090815260208190526040812054610497908363ffffffff61056d16565b15806104c957506001600160a01b0383166000908152602081905260409020546104c7908363ffffffff61057216565b155b156104d6575060006102e5565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a7230582028ab4b3689cc43a4746f3e3ca9561bfb18236aa987616532108a03ab4faf0ccf0029", + "sourceMap": "96:263:3:-;;;270:87;8:9:-1;5:2;;;30:1;27;20:12;5:2;270:87:3;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;270:87:3;332:10;323:8;:20;;;270:87;323:20;;;;;;:29;96:263;;;;;;", + "deployedSourceMap": "96:263:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;96:263:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;182:44;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;182:44:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2098:196:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2098:196:4;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2955:85;;;:::i;:::-;;;;;;;;;;;;;;;;1430:451;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1430:451:4;;;;;;;;;;;;;;;;;:::i;230:35:3:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2776:100:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2776:100:4;-1:-1:-1;;;;;2776:100:4;;:::i;141:37:3:-;;;:::i;785:333:4:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;785:333:4;;;;;;;;:::i;2504:128::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2504:128:4;;;;;;;;;;:::i;182:44:3:-;;;;;;;;;;;;;;;;;;;:::o;2098:196:4:-;2187:10;2160:4;2176:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;2176:31:4;;;;;;;;;;;:39;;;2230:36;;;;;;;2160:4;;2176:31;;2187:10;;2230:36;;;;;;;;-1:-1:-1;2283:4:4;2098:196;;;;;:::o;2955:85::-;3022:11;;2955:85;:::o;1430:451::-;-1:-1:-1;;;;;1527:14:4;;1506:4;1527:14;;;;;;;;;;;:31;;1552:5;1527:31;:24;:31;:::i;:::-;1526:32;:104;;;-1:-1:-1;;;;;;1563:16:4;;;;;;:10;:16;;;;;;;;1580:10;1563:28;;;;;;;;:67;;1615:5;1563:67;:38;:67;:::i;:::-;1562:68;1526:104;:138;;;-1:-1:-1;;;;;;1635:12:4;;:8;:12;;;;;;;;;;;:29;;1658:5;1635:29;:22;:29;:::i;:::-;1634:30;1526:138;1522:181;;;-1:-1:-1;1687:5:4;1680:12;;1522:181;-1:-1:-1;;;;;1712:14:4;;;:8;:14;;;;;;;;;;;:23;;;;;;;-1:-1:-1;1745:16:4;;;;;1762:10;1745:28;;;;;;;:37;;;;;;;1792:12;;;;;;;;;;;;;:21;;;;;;1828:25;;;;;;;1792:12;;1828:25;;;;;;;;;;;-1:-1:-1;1870:4:4;1430:451;;;;;;:::o;230:35:3:-;263:2;230:35;:::o;2776:100:4:-;-1:-1:-1;;;;;2854:15:4;2831:4;2854:15;;;;;;;;;;;;2776:100::o;141:37:3:-;;;;;;;;;;;;;;;;;;;:::o;785:333:4:-;873:10;843:4;864:20;;;;;;;;;;;:37;;895:5;864:37;:30;:37;:::i;:::-;863:38;:72;;;-1:-1:-1;;;;;;906:12:4;;:8;:12;;;;;;;;;;;:29;;929:5;906:29;:22;:29;:::i;:::-;905:30;863:72;859:115;;;-1:-1:-1;958:5:4;951:12;;859:115;993:10;984:8;:20;;;;;;;;;;;:29;;;;;;;-1:-1:-1;;;;;1023:12:4;;;;;;;;;:21;;;;;;1059:31;;;;;;;1023:12;;993:10;1059:31;;;;;;;;;;;-1:-1:-1;1107:4:4;785:333;;;;:::o;2504:128::-;-1:-1:-1;;;;;2599:17:4;;;2576:4;2599:17;;;:10;:17;;;;;;;;:26;;;;;;;;;;;;;2504:128::o;6580:94:5:-;-1:-1:-1;6661:6:5;;6580:94::o;6310:98::-;6391:5;;-1:-1:-1;6391:10:5;;6310:98::o", + "source": "pragma solidity ^0.5.2;\n\nimport \"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\";\n\ncontract TokenRDN is GnosisStandardToken {\n string public constant symbol = \"RDN\";\n string public constant name = \"Raiden Token\";\n uint8 public constant decimals = 18;\n\n constructor(\n uint amount\n )\n public \n {\n balances[msg.sender] = amount;\n }\n}", + "sourcePath": "/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol", + "ast": { + "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol", + "exportedSymbols": { + "TokenRDN": [ + 117 + ] + }, + "id": 118, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 91, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "file": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "id": 92, + "nodeType": "ImportDirective", + "scope": 118, + "sourceUnit": 330, + "src": "25:69:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 93, + "name": "GnosisStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 329, + "src": "117:19:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_GnosisStandardToken_$329", + "typeString": "contract GnosisStandardToken" + } + }, + "id": 94, + "nodeType": "InheritanceSpecifier", + "src": "117:19:3" + } + ], + "contractDependencies": [ + 135, + 329, + 1563 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 117, + "linearizedBaseContracts": [ + 117, + 329, + 135, + 1563 + ], + "name": "TokenRDN", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 97, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "141:37:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 95, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "141:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "52444e", + "id": 96, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "173:5:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_78fa6b4b551b6488425a20e7b1764448d63f2b0cd5642c0dbeb50fcde3d40080", + "typeString": "literal_string \"RDN\"" + }, + "value": "RDN" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 100, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "182:44:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 98, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "182:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "52616964656e20546f6b656e", + "id": 99, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "212:14:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e7a4da2ac183bb65f42dae55d7958c5737070ead828f6f5c64f3c4d0d5b334e3", + "typeString": "literal_string \"Raiden Token\"" + }, + "value": "Raiden Token" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 103, + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "230:35:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 101, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "230:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "263:2:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "body": { + "id": 115, + "nodeType": "Block", + "src": "317:40:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 108, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "323:8:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 111, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 109, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "332:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "332:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "323:20:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 112, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "346:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "323:29:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 114, + "nodeType": "ExpressionStatement", + "src": "323:29:3" + } + ] + }, + "documentation": null, + "id": 116, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 106, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 105, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 116, + "src": "287:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 104, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "287:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "281:21:3" + }, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [], + "src": "317:0:3" + }, + "scope": 117, + "src": "270:87:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 118, + "src": "96:263:3" + } + ], + "src": "0:359:3" + }, + "legacyAST": { + "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol", + "exportedSymbols": { + "TokenRDN": [ + 117 + ] + }, + "id": 118, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 91, + "literals": [ + "solidity", + "^", + "0.5", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "file": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", + "id": 92, + "nodeType": "ImportDirective", + "scope": 118, + "sourceUnit": 330, + "src": "25:69:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 93, + "name": "GnosisStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 329, + "src": "117:19:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_GnosisStandardToken_$329", + "typeString": "contract GnosisStandardToken" + } + }, + "id": 94, + "nodeType": "InheritanceSpecifier", + "src": "117:19:3" + } + ], + "contractDependencies": [ + 135, + 329, + 1563 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 117, + "linearizedBaseContracts": [ + 117, + 329, + 135, + 1563 + ], + "name": "TokenRDN", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 97, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "141:37:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 95, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "141:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "52444e", + "id": 96, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "173:5:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_78fa6b4b551b6488425a20e7b1764448d63f2b0cd5642c0dbeb50fcde3d40080", + "typeString": "literal_string \"RDN\"" + }, + "value": "RDN" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 100, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "182:44:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string" + }, + "typeName": { + "id": 98, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "182:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "52616964656e20546f6b656e", + "id": 99, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "212:14:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e7a4da2ac183bb65f42dae55d7958c5737070ead828f6f5c64f3c4d0d5b334e3", + "typeString": "literal_string \"Raiden Token\"" + }, + "value": "Raiden Token" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 103, + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "230:35:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 101, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "230:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "263:2:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "body": { + "id": 115, + "nodeType": "Block", + "src": "317:40:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 108, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "323:8:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 111, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 109, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "332:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "332:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "323:20:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 112, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "346:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "323:29:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 114, + "nodeType": "ExpressionStatement", + "src": "323:29:3" + } + ] + }, + "documentation": null, + "id": 116, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 106, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 105, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 116, + "src": "287:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 104, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "287:4:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "281:21:3" + }, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [], + "src": "317:0:3" + }, + "scope": 117, + "src": "270:87:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 118, + "src": "96:263:3" + } + ], + "src": "0:359:3" + }, + "compiler": { + "name": "solc", + "version": "0.5.8+commit.23d335f2.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.10", + "updatedAt": "2019-05-31T13:47:05.345Z", + "devdoc": { + "methods": { + "allowance(address,address)": { + "details": "Returns number of allowed tokens for given address", + "params": { + "owner": "Address of token owner", + "spender": "Address of token spender" + }, + "return": "Remaining allowance for spender" + }, + "approve(address,uint256)": { + "details": "Sets approved amount of tokens for spender. Returns success", + "params": { + "spender": "Address of allowed account", + "value": "Number of approved tokens" + }, + "return": "Was approval successful?" + }, + "balanceOf(address)": { + "details": "Returns number of tokens owned by given address", + "params": { + "owner": "Address of token owner" + }, + "return": "Balance of owner" + }, + "totalSupply()": { + "details": "Returns total supply of tokens", + "return": "Total supply" + }, + "transfer(address,uint256)": { + "details": "Transfers sender's tokens to a given address. Returns success", + "params": { + "to": "Address of token receiver", + "value": "Number of tokens to transfer" + }, + "return": "Was transfer successful?" + }, + "transferFrom(address,address,uint256)": { + "details": "Allows allowed third party to transfer tokens from one address to another. Returns success", + "params": { + "from": "Address from where tokens are withdrawn", + "to": "Address to where tokens are sent", + "value": "Number of tokens to transfer" + }, + "return": "Was transfer successful?" + } + } + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/src/test/safe.dom.funds.test.js b/src/test/safe.dom.funds.test.js index 4e245ed1..d675e0a3 100644 --- a/src/test/safe.dom.funds.test.js +++ b/src/test/safe.dom.funds.test.js @@ -1,19 +1,13 @@ // @flow -import { fireEvent, cleanup } from '@testing-library/react' -import { List } from 'immutable' +import { render, fireEvent, cleanup } from '@testing-library/react' +import * as fetchBalancesAction from '~/logic/tokens/store/actions/fetchTokens' import { aNewStore } from '~/store' import { aMinedSafe } from '~/test/builder/safe.redux.builder' -import { sendTokenTo, sendEtherTo } from '~/test/utils/tokenMovements' -import { renderSafeView } from '~/test/builder/safe.dom.utils' -import { getWeb3, getBalanceInEtherOf } from '~/logic/wallets/getWeb3' -import { dispatchAddTokenToList } from '~/test/utils/transactions/moveTokens.helper' +import { sendTokenTo, getFirstTokenContract } from '~/test/utils/tokenMovements' +import { EXPAND_BALANCE_INDEX, renderSafeView } from '~/test/builder/safe.dom.utils' +import { getWeb3 } from '~/logic/wallets/getWeb3' +import { sendMoveTokensForm, dispatchTknBalance } from '~/test/utils/transactions/moveTokens.helper' import { sleep } from '~/utils/timer' -import TokenBalanceRecord from '~/routes/safe/store/models/tokenBalance' -import { calculateBalanceOf } from '~/routes/safe/store/actions/fetchTokenBalances' -import updateActiveTokens from '~/routes/safe/store/actions/updateActiveTokens' -import 'jest-dom/extend-expect' -import updateSafe from '~/routes/safe/store/actions/updateSafe' -import { BALANCE_ROW_TEST_ID } from '~/routes/safe/components/Balances' afterEach(cleanup) @@ -23,100 +17,70 @@ describe('DOM > Feature > Funds', () => { let accounts beforeEach(async () => { store = aNewStore() - // using 4th account because other accounts were used in other tests and paid gas safeAddress = await aMinedSafe(store) accounts = await getWeb3().eth.getAccounts() }) - it('Sends ETH with threshold = 1', async () => { + it('Sends ETH', async () => { // GIVEN - const ethAmount = '5' - await sendEtherTo(safeAddress, ethAmount) - const balanceAfterSendingEthToSafe = await getBalanceInEtherOf(accounts[0]) + const numTokens = '100' + const tokenAddress = await sendTokenTo(safeAddress, numTokens) - // WHEN - const SafeDom = renderSafeView(store, safeAddress) - await sleep(1300) - - // Open send funds modal - const balanceRows = SafeDom.getAllByTestId(BALANCE_ROW_TEST_ID) - expect(balanceRows[0]).toHaveTextContent(`${ethAmount} ETH`) - const sendButton = SafeDom.getByTestId('balance-send-btn') - fireEvent.click(sendButton) - - // Fill first send funds screen - const recipientInput = SafeDom.getByPlaceholderText('Recipient*') - const amountInput = SafeDom.getByPlaceholderText('Amount*') - const reviewBtn = SafeDom.getByTestId('review-tx-btn') - fireEvent.change(recipientInput, { target: { value: accounts[0] } }) - fireEvent.change(amountInput, { target: { value: ethAmount } }) - await sleep(200) - fireEvent.click(reviewBtn) - - // Submit the tx (Review Tx screen) - const submitBtn = SafeDom.getByTestId('submit-tx-btn') - fireEvent.click(submitBtn) - await sleep(1000) - - // THEN - const safeFunds = await getBalanceInEtherOf(safeAddress) - expect(Number(safeFunds)).toBe(0) - - const receiverFunds = await getBalanceInEtherOf(accounts[0]) - const ESTIMATED_GASCOSTS = 0.3 - expect(Number(parseInt(receiverFunds, 10) - parseInt(balanceAfterSendingEthToSafe, 10))).toBeGreaterThan( - parseInt(ethAmount, 10) - ESTIMATED_GASCOSTS, - ) - }) - - it('Sends Tokens with threshold = 1', async () => { - // GIVEN - const tokensAmount = '100' - const tokenReceiver = accounts[1] - const tokenAddress = await sendTokenTo(safeAddress, tokensAmount) - await dispatchAddTokenToList(store, tokenAddress) + await dispatchTknBalance(store, tokenAddress, safeAddress) + // const StandardToken = await fetchBalancesAction.getStandardTokenContract() + // const myToken = await StandardToken.at(tokenAddress) + // console.log(await myToken.allowance(safeAddress, accounts[2])) + // console.log(await myToken.balanceOf(safeAddress)) // WHEN const SafeDom = await renderSafeView(store, safeAddress) - await sleep(1300) + await sleep(800) - // Activate token - const safeTokenBalance = await calculateBalanceOf(tokenAddress, safeAddress, 18) - expect(safeTokenBalance).toBe(tokensAmount) - - const balanceAsRecord = TokenBalanceRecord({ - address: tokenAddress, - balance: safeTokenBalance, - }) - store.dispatch(updateActiveTokens(safeAddress, List([tokenAddress]))) - store.dispatch(updateSafe({ address: safeAddress, balances: List([balanceAsRecord]) })) - await sleep(1000) - - // Open send funds modal - const balanceRows = SafeDom.getAllByTestId(BALANCE_ROW_TEST_ID) - expect(balanceRows.length).toBe(2) - const sendButtons = SafeDom.getAllByTestId('balance-send-btn') - expect(sendButtons.length).toBe(2) - fireEvent.click(sendButtons[1]) - - // Fill first send funds screen - const recipientInput = SafeDom.getByPlaceholderText('Recipient*') - const amountInput = SafeDom.getByPlaceholderText('Amount*') - const reviewBtn = SafeDom.getByTestId('review-tx-btn') - fireEvent.change(recipientInput, { target: { value: tokenReceiver } }) - fireEvent.change(amountInput, { target: { value: tokensAmount } }) - await sleep(200) - fireEvent.click(reviewBtn) - - // Submit the tx (Review Tx screen) - const submitBtn = SafeDom.getByTestId('submit-tx-btn') - fireEvent.click(submitBtn) - await sleep(1000) + const balanceRows = SafeDom.getAllByTestId('balance-row') + const buttons = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'button') + const expandBalance = buttons[EXPAND_BALANCE_INDEX] + const receiver = accounts[2] + await sendMoveTokensForm(SafeDom, expandBalance, 20, accounts[2]) // THEN - const safeFunds = await calculateBalanceOf(tokenAddress, safeAddress, 18) - expect(Number(safeFunds)).toBe(0) - const receiverFunds = await calculateBalanceOf(tokenAddress, tokenReceiver, 18) - expect(receiverFunds).toBe(tokensAmount) + const safeFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, safeAddress, 18) + expect(Number(safeFunds)).toBe(80) + const receiverFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, receiver, 18) + expect(Number(receiverFunds)).toBe(20) + + const token = await getFirstTokenContract(getWeb3(), accounts[0]) + const nativeSafeFunds = await token.balanceOf(safeAddress) + expect(Number(nativeSafeFunds.valueOf())).toEqual(80 * 10 ** 18) + }) + + it('Sends Tokens', async () => { + // GIVEN + const numTokens = '100' + const tokenAddress = await sendTokenTo(safeAddress, numTokens) + + await dispatchTknBalance(store, tokenAddress, safeAddress) + // const StandardToken = await fetchBalancesAction.getStandardTokenContract() + // const myToken = await StandardToken.at(tokenAddress) + // console.log(await myToken.allowance(safeAddress, accounts[2])) + // console.log(await myToken.balanceOf(safeAddress)) + + // WHEN + const SafeDom = await renderSafeView(store, safeAddress) + await sleep(800) + // $FlowFixMe + const buttons = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'button') + const expandBalance = buttons[EXPAND_BALANCE_INDEX] + const receiver = accounts[2] + await sendMoveTokensForm(SafeDom, expandBalance, 20, accounts[2]) + + // THEN + const safeFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, safeAddress, 18) + expect(Number(safeFunds)).toBe(80) + const receiverFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, receiver, 18) + expect(Number(receiverFunds)).toBe(20) + + const token = await getFirstTokenContract(getWeb3(), accounts[0]) + const nativeSafeFunds = await token.balanceOf(safeAddress) + expect(Number(nativeSafeFunds.valueOf())).toEqual(80 * 10 ** 18) }) }) diff --git a/src/test/utils/tokenMovements.js b/src/test/utils/tokenMovements.js index 60cbaec5..aa86866f 100644 --- a/src/test/utils/tokenMovements.js +++ b/src/test/utils/tokenMovements.js @@ -22,9 +22,7 @@ export const checkBalanceOf = async (addressToTest: string, value: string) => { const createTokenOMGContract = async (web3: any, creator: string) => { const token = contract(TokenOMG) const { toBN } = web3.utils - const amount = toBN(50000) - .mul(toBN(10).pow(toBN(18))) - .toString() + const amount = toBN(50000).mul(toBN(10).pow(toBN(18))).toString() token.setProvider(web3.currentProvider) return token.new(amount, { from: creator }) @@ -33,9 +31,7 @@ const createTokenOMGContract = async (web3: any, creator: string) => { const createTokenRDNContract = async (web3: any, creator: string) => { const token = contract(TokenRDN) const { toBN } = web3.utils - const amount = toBN(50000) - .mul(toBN(10).pow(toBN(18))) - .toString() + const amount = toBN(50000).mul(toBN(10).pow(toBN(18))).toString() token.setProvider(web3.currentProvider) return token.new(amount, { from: creator }) diff --git a/yarn.lock b/yarn.lock index 7c295498..26b34c81 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1294,6 +1294,12 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.2.tgz#63985d3d8b02530e0869962f4da09142ee8e200e" integrity sha512-n/VQ4mbfr81aqkx/XmVicOLjviMuy02eenSdJY33SVA7S2J42EU0P1H0mOogfYedb3wXA0d/LVtBrgTSm04WEA== +"@gnosis.pm/mock-contract@github:gnosis/mock-contract#sol_0_5_0": + version "2.0.2" + resolved "https://codeload.github.com/gnosis/mock-contract/tar.gz/2ec1266eeef1baf7514cdb65b3a3a1aef224f3f2" + dependencies: + ethereumjs-abi "^0.6.5" + "@gnosis.pm/safe-contracts@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-contracts/-/safe-contracts-1.0.0.tgz#2b562b1e23a0da1047a9f38ef71a70f811e75dd9" @@ -6854,7 +6860,7 @@ ethereumjs-abi@0.6.5: bn.js "^4.10.0" ethereumjs-util "^4.3.0" -ethereumjs-abi@^0.6.7, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": +ethereumjs-abi@^0.6.5, ethereumjs-abi@^0.6.7, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": version "0.6.7" resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb" dependencies: From 0917f21ec110d3064b41f4ee4c3847c3f0a2c7b0 Mon Sep 17 00:00:00 2001 From: mmv Date: Mon, 3 Jun 2019 16:49:52 +0400 Subject: [PATCH 05/71] refactor send ETH test --- build/contracts/DevDependenciesGetter.json | 2 +- build/contracts/GnosisMath.json | 2 +- build/contracts/GnosisStandardToken.json | 2 +- build/contracts/Migrations.json | 2 +- build/contracts/Proxied.json | 2 +- build/contracts/Proxy.json | 2 +- build/contracts/StandardTokenData.json | 2 +- build/contracts/Token.json | 2 +- build/contracts/TokenOMG.json | 2 +- build/contracts/TokenRDN.json | 2 +- src/store/index.js | 4 +- src/test/safe.dom.funds.test.js | 38 +++++++---- src/test/safe.dom.tokens.test.js | 73 ++++++++++++++++++++++ src/test/utils/tokenMovements.js | 8 ++- yarn.lock | 8 +-- 15 files changed, 119 insertions(+), 32 deletions(-) create mode 100644 src/test/safe.dom.tokens.test.js diff --git a/build/contracts/DevDependenciesGetter.json b/build/contracts/DevDependenciesGetter.json index 77f80b7a..f4996baa 100644 --- a/build/contracts/DevDependenciesGetter.json +++ b/build/contracts/DevDependenciesGetter.json @@ -138,7 +138,7 @@ }, "networks": {}, "schemaVersion": "3.0.10", - "updatedAt": "2019-05-31T13:47:05.338Z", + "updatedAt": "2019-06-03T08:59:02.077Z", "devdoc": { "methods": {} }, diff --git a/build/contracts/GnosisMath.json b/build/contracts/GnosisMath.json index a8148fca..f02e538d 100644 --- a/build/contracts/GnosisMath.json +++ b/build/contracts/GnosisMath.json @@ -32319,7 +32319,7 @@ }, "networks": {}, "schemaVersion": "3.0.10", - "updatedAt": "2019-05-31T13:47:05.349Z", + "updatedAt": "2019-06-03T08:59:02.114Z", "devdoc": { "author": "Alan Lu - Stefan George - ", "methods": { diff --git a/build/contracts/GnosisStandardToken.json b/build/contracts/GnosisStandardToken.json index da7e48c1..e5331808 100644 --- a/build/contracts/GnosisStandardToken.json +++ b/build/contracts/GnosisStandardToken.json @@ -5582,7 +5582,7 @@ }, "networks": {}, "schemaVersion": "3.0.10", - "updatedAt": "2019-05-31T13:47:05.346Z", + "updatedAt": "2019-06-03T08:59:02.084Z", "devdoc": { "methods": { "allowance(address,address)": { diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json index c6044c22..6a0e60ac 100644 --- a/build/contracts/Migrations.json +++ b/build/contracts/Migrations.json @@ -1369,7 +1369,7 @@ }, "networks": {}, "schemaVersion": "3.0.10", - "updatedAt": "2019-05-31T13:47:05.344Z", + "updatedAt": "2019-06-03T08:59:02.080Z", "devdoc": { "methods": {} }, diff --git a/build/contracts/Proxied.json b/build/contracts/Proxied.json index 15e6e14e..016f4379 100644 --- a/build/contracts/Proxied.json +++ b/build/contracts/Proxied.json @@ -971,7 +971,7 @@ }, "networks": {}, "schemaVersion": "3.0.10", - "updatedAt": "2019-05-31T13:47:05.362Z", + "updatedAt": "2019-06-03T08:59:02.136Z", "devdoc": { "author": "Alan Lu - ", "methods": {}, diff --git a/build/contracts/Proxy.json b/build/contracts/Proxy.json index 19d58dc3..5a25d765 100644 --- a/build/contracts/Proxy.json +++ b/build/contracts/Proxy.json @@ -987,7 +987,7 @@ }, "networks": {}, "schemaVersion": "3.0.10", - "updatedAt": "2019-05-31T13:47:05.362Z", + "updatedAt": "2019-06-03T08:59:02.137Z", "devdoc": { "author": "Stefan George - ", "methods": { diff --git a/build/contracts/StandardTokenData.json b/build/contracts/StandardTokenData.json index 721a4480..64d7314a 100644 --- a/build/contracts/StandardTokenData.json +++ b/build/contracts/StandardTokenData.json @@ -5408,7 +5408,7 @@ }, "networks": {}, "schemaVersion": "3.0.10", - "updatedAt": "2019-05-31T13:47:05.347Z", + "updatedAt": "2019-06-03T08:59:02.087Z", "devdoc": { "methods": {} }, diff --git a/build/contracts/Token.json b/build/contracts/Token.json index f858bea1..b6934a6b 100644 --- a/build/contracts/Token.json +++ b/build/contracts/Token.json @@ -1854,7 +1854,7 @@ }, "networks": {}, "schemaVersion": "3.0.10", - "updatedAt": "2019-05-31T13:47:05.363Z", + "updatedAt": "2019-06-03T08:59:02.139Z", "devdoc": { "methods": {}, "title": "Abstract token contract - Functions to be implemented by token contracts" diff --git a/build/contracts/TokenOMG.json b/build/contracts/TokenOMG.json index cd77a240..c07180d9 100644 --- a/build/contracts/TokenOMG.json +++ b/build/contracts/TokenOMG.json @@ -953,7 +953,7 @@ }, "networks": {}, "schemaVersion": "3.0.10", - "updatedAt": "2019-05-31T13:47:05.345Z", + "updatedAt": "2019-06-03T08:59:02.081Z", "devdoc": { "methods": { "allowance(address,address)": { diff --git a/build/contracts/TokenRDN.json b/build/contracts/TokenRDN.json index d729b6b8..c3fdf189 100644 --- a/build/contracts/TokenRDN.json +++ b/build/contracts/TokenRDN.json @@ -953,7 +953,7 @@ }, "networks": {}, "schemaVersion": "3.0.10", - "updatedAt": "2019-05-31T13:47:05.345Z", + "updatedAt": "2019-06-03T08:59:02.082Z", "devdoc": { "methods": { "allowance(address,address)": { diff --git a/src/store/index.js b/src/store/index.js index 9542511c..b9703c0f 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,5 +1,5 @@ // @flow -import { createBrowserHistory } from 'history' +import { createBrowserHistory, createMemoryHistory } from 'history' import { connectRouter, routerMiddleware } from 'connected-react-router' import { combineReducers, createStore, applyMiddleware, compose, type Reducer, type Store, @@ -14,7 +14,7 @@ import transactions, { TRANSACTIONS_REDUCER_ID, } from '~/routes/safe/store/reducer/transactions' -export const history = createBrowserHistory() +export const history = process.env.NODE_ENV === 'test' ? createMemoryHistory() : createBrowserHistory() // eslint-disable-next-line const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose diff --git a/src/test/safe.dom.funds.test.js b/src/test/safe.dom.funds.test.js index d675e0a3..cf09cca5 100644 --- a/src/test/safe.dom.funds.test.js +++ b/src/test/safe.dom.funds.test.js @@ -8,6 +8,9 @@ import { EXPAND_BALANCE_INDEX, renderSafeView } from '~/test/builder/safe.dom.ut import { getWeb3 } from '~/logic/wallets/getWeb3' import { sendMoveTokensForm, dispatchTknBalance } from '~/test/utils/transactions/moveTokens.helper' import { sleep } from '~/utils/timer' +import { ETH_ADDRESS } from '~/logic/tokens/utils/tokenHelpers' +import { calculateBalanceOf } from '~/routes/safe/store/actions/fetchTokenBalances' +import 'jest-dom/extend-expect' afterEach(cleanup) @@ -37,20 +40,33 @@ describe('DOM > Feature > Funds', () => { await sleep(800) const balanceRows = SafeDom.getAllByTestId('balance-row') - const buttons = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'button') - const expandBalance = buttons[EXPAND_BALANCE_INDEX] - const receiver = accounts[2] - await sendMoveTokensForm(SafeDom, expandBalance, 20, accounts[2]) + expect(balanceRows[0]).toHaveTextContent(`${ethAmount} ETH`) + const sendButton = SafeDom.getByTestId('balance-send-btn') + fireEvent.click(sendButton) + + // Fill first send funds screen + const recipientInput = SafeDom.getByPlaceholderText('Recipient*') + const amountInput = SafeDom.getByPlaceholderText('Amount*') + const reviewBtn = SafeDom.getByTestId('review-tx-btn') + fireEvent.change(recipientInput, { target: { value: accounts[0] } }) + fireEvent.change(amountInput, { target: { value: ethAmount } }) + await sleep(200) + fireEvent.click(reviewBtn) + + // Submit the tx (Review Tx screen) + const submitBtn = SafeDom.getByTestId('submit-tx-btn') + fireEvent.click(submitBtn) + await sleep(1000) // THEN - const safeFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, safeAddress, 18) - expect(Number(safeFunds)).toBe(80) - const receiverFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, receiver, 18) - expect(Number(receiverFunds)).toBe(20) + const safeFunds = await calculateBalanceOf(ETH_ADDRESS, safeAddress, 18) + expect(Number(safeFunds)).toBe(0) - const token = await getFirstTokenContract(getWeb3(), accounts[0]) - const nativeSafeFunds = await token.balanceOf(safeAddress) - expect(Number(nativeSafeFunds.valueOf())).toEqual(80 * 10 ** 18) + const receiverFunds = await getBalanceInEtherOf(accounts[0]) + const ESTIMATED_GASCOSTS = 0.1 + expect(Number(parseInt(receiverFunds, 10) - parseInt(balanceAfterSendingEthToSafe, 10))).toBeGreaterThan( + parseInt(ethAmount, 10) - ESTIMATED_GASCOSTS, + ) }) it('Sends Tokens', async () => { diff --git a/src/test/safe.dom.tokens.test.js b/src/test/safe.dom.tokens.test.js new file mode 100644 index 00000000..fe5e856c --- /dev/null +++ b/src/test/safe.dom.tokens.test.js @@ -0,0 +1,73 @@ +// @flow + +import TestUtils from 'react-dom/test-utils' +import * as fetchBalancesAction from '~/logic/tokens/store/actions/fetchTokens' +import { aNewStore } from '~/store' +import { aMinedSafe } from '~/test/builder/safe.redux.builder' +import { addTknTo, getFirstTokenContract } from '~/test/utils/tokenMovements' +import { EXPAND_BALANCE_INDEX, travelToSafe } from '~/test/builder/safe.dom.utils' +import { getWeb3 } from '~/logic/wallets/getWeb3' +import { sendMoveTokensForm, dispatchTknBalance } from '~/test/utils/transactions/moveTokens.helper' +import { sleep } from '~/utils/timer' + +describe('DOM > Feature > SAFE ERC20 TOKENS', () => { + let accounts + beforeEach(async () => { + accounts = await getWeb3().eth.getAccounts() + }) + + it('sends ERC20 tokens', async () => { + // GIVEN + const store = aNewStore() + const safeAddress = await aMinedSafe(store) + + const numTokens = '100' + const tokenAddress = await addTknTo(safeAddress, numTokens) + + await dispatchTknBalance(store, tokenAddress, safeAddress) + // const StandardToken = await fetchBalancesAction.getStandardTokenContract() + // const myToken = await StandardToken.at(tokenAddress) + // console.log(await myToken.allowance(safeAddress, accounts[2])) + // console.log(await myToken.balanceOf(safeAddress)) + + // WHEN + const SafeDom = await travelToSafe(store, safeAddress) + await sleep(800) + // $FlowFixMe + const buttons = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'button') + const expandBalance = buttons[EXPAND_BALANCE_INDEX] + const receiver = accounts[2] + await sendMoveTokensForm(SafeDom, expandBalance, 20, accounts[2]) + + // THEN + const safeFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, safeAddress, 18) + expect(Number(safeFunds)).toBe(80) + const receiverFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, receiver, 18) + expect(Number(receiverFunds)).toBe(20) + + const token = await getFirstTokenContract(getWeb3(), accounts[0]) + const nativeSafeFunds = await token.balanceOf(safeAddress) + expect(Number(nativeSafeFunds.valueOf())).toEqual(80 * 10 ** 18) + }) + + it('disables send token button when balance is 0', async () => { + // GIVEN + const token = await getFirstTokenContract(getWeb3(), accounts[0]) + await dispatchTknBalance(store, token.address, safeAddress) + + // WHEN + const SafeDom = travelToSafe(store, safeAddress) + + // $FlowFixMe + const buttons = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'button') + const expandBalance = buttons[EXPAND_BALANCE_INDEX] + + TestUtils.Simulate.click(expandBalance) + await sleep(800) + + // $FlowFixMe + const balanceButtons = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'button') + const tokenButton = balanceButtons[EXPAND_BALANCE_INDEX + 1] // expand button, and the next one is for sending + expect(tokenButton.hasAttribute('disabled')).toBe(true) + }) +}) diff --git a/src/test/utils/tokenMovements.js b/src/test/utils/tokenMovements.js index aa86866f..60cbaec5 100644 --- a/src/test/utils/tokenMovements.js +++ b/src/test/utils/tokenMovements.js @@ -22,7 +22,9 @@ export const checkBalanceOf = async (addressToTest: string, value: string) => { const createTokenOMGContract = async (web3: any, creator: string) => { const token = contract(TokenOMG) const { toBN } = web3.utils - const amount = toBN(50000).mul(toBN(10).pow(toBN(18))).toString() + const amount = toBN(50000) + .mul(toBN(10).pow(toBN(18))) + .toString() token.setProvider(web3.currentProvider) return token.new(amount, { from: creator }) @@ -31,7 +33,9 @@ const createTokenOMGContract = async (web3: any, creator: string) => { const createTokenRDNContract = async (web3: any, creator: string) => { const token = contract(TokenRDN) const { toBN } = web3.utils - const amount = toBN(50000).mul(toBN(10).pow(toBN(18))).toString() + const amount = toBN(50000) + .mul(toBN(10).pow(toBN(18))) + .toString() token.setProvider(web3.currentProvider) return token.new(amount, { from: creator }) diff --git a/yarn.lock b/yarn.lock index 26b34c81..7c295498 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1294,12 +1294,6 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.2.tgz#63985d3d8b02530e0869962f4da09142ee8e200e" integrity sha512-n/VQ4mbfr81aqkx/XmVicOLjviMuy02eenSdJY33SVA7S2J42EU0P1H0mOogfYedb3wXA0d/LVtBrgTSm04WEA== -"@gnosis.pm/mock-contract@github:gnosis/mock-contract#sol_0_5_0": - version "2.0.2" - resolved "https://codeload.github.com/gnosis/mock-contract/tar.gz/2ec1266eeef1baf7514cdb65b3a3a1aef224f3f2" - dependencies: - ethereumjs-abi "^0.6.5" - "@gnosis.pm/safe-contracts@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-contracts/-/safe-contracts-1.0.0.tgz#2b562b1e23a0da1047a9f38ef71a70f811e75dd9" @@ -6860,7 +6854,7 @@ ethereumjs-abi@0.6.5: bn.js "^4.10.0" ethereumjs-util "^4.3.0" -ethereumjs-abi@^0.6.5, ethereumjs-abi@^0.6.7, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": +ethereumjs-abi@^0.6.7, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": version "0.6.7" resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb" dependencies: From 3496b0e73801770498302451d84ce85ace994c14 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 13 Jun 2019 13:47:00 +0400 Subject: [PATCH 06/71] pr fixes wip: remove compiled contracts, dep bump, TODO: fix CSS loader --- build/contracts/DevDependenciesGetter.json | 148 - build/contracts/GnosisMath.json | 32360 ------------------- build/contracts/GnosisStandardToken.json | 5638 ---- build/contracts/Migrations.json | 1379 - build/contracts/Proxied.json | 983 - build/contracts/Proxy.json | 1006 - build/contracts/StandardTokenData.json | 5419 ---- build/contracts/Token.json | 1865 -- build/contracts/TokenOMG.json | 1008 - build/contracts/TokenRDN.json | 1008 - yarn.lock | 8 +- 11 files changed, 4 insertions(+), 50818 deletions(-) delete mode 100644 build/contracts/DevDependenciesGetter.json delete mode 100644 build/contracts/GnosisMath.json delete mode 100644 build/contracts/GnosisStandardToken.json delete mode 100644 build/contracts/Migrations.json delete mode 100644 build/contracts/Proxied.json delete mode 100644 build/contracts/Proxy.json delete mode 100644 build/contracts/StandardTokenData.json delete mode 100644 build/contracts/Token.json delete mode 100644 build/contracts/TokenOMG.json delete mode 100644 build/contracts/TokenRDN.json diff --git a/build/contracts/DevDependenciesGetter.json b/build/contracts/DevDependenciesGetter.json deleted file mode 100644 index f4996baa..00000000 --- a/build/contracts/DevDependenciesGetter.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "contractName": "DevDependenciesGetter", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/mmv/work/safe-react/contracts/DevDependencies.sol\":\"DevDependenciesGetter\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"/home/mmv/work/safe-react/contracts/DevDependencies.sol\":{\"keccak256\":\"0xc649617f3c51e58509bdd0910726bd84a52f232b6aaf5790ac72f6e84ccb1b58\",\"urls\":[\"bzzr://57b15b2fd6a6a15523665a1f369e8b395a5649504f807114fedff42cf1b430b3\"]},\"/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol\":{\"keccak256\":\"0x099d05859e51af8b24539b47e0d181a17409d51063263f8a8d53280818c69d4d\",\"urls\":[\"bzzr://4eb926d078f8111367c3a180e7eb99f36528b95c871e1004c626f1cb5487f5dc\"]},\"/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol\":{\"keccak256\":\"0xbd1fc040f6b4f7b68bb7e6b745d02c571d7baf992c5a3a34d57392f624d7043c\",\"urls\":[\"bzzr://fdd020e4fe5f62e961acccce8733276ad3aca6dbe7ccff3f860476774cf6bdab\"]},\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":{\"keccak256\":\"0xdec5028208406e811c449a04e2932f7efeae629388cb6124550b8b048a645556\",\"urls\":[\"bzzr://f3d13a708f543b3ce72745cab321e6daf25d935fd12ba55a4152f1113eb6d5e4\"]},\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]},\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", - "bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3fe6080604052600080fdfea165627a7a723058205e4f8760788b4c49e4643557d735f7312e842b538cebaa480b66c5e3577d34cb0029", - "deployedBytecode": "0x6080604052600080fdfea165627a7a723058205e4f8760788b4c49e4643557d735f7312e842b538cebaa480b66c5e3577d34cb0029", - "sourceMap": "116:33:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;116:33:0;;;;;;;", - "deployedSourceMap": "116:33:0:-;;;;;", - "source": "pragma solidity ^0.5.2;\n\nimport \"../src/test/contracts/TokenOMG.sol\";\nimport \"../src/test/contracts/TokenRDN.sol\";\n\ncontract DevDependenciesGetter {}", - "sourcePath": "/home/mmv/work/safe-react/contracts/DevDependencies.sol", - "ast": { - "absolutePath": "/home/mmv/work/safe-react/contracts/DevDependencies.sol", - "exportedSymbols": { - "DevDependenciesGetter": [ - 4 - ] - }, - "id": 5, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:0" - }, - { - "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol", - "file": "../src/test/contracts/TokenOMG.sol", - "id": 2, - "nodeType": "ImportDirective", - "scope": 5, - "sourceUnit": 90, - "src": "25:44:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol", - "file": "../src/test/contracts/TokenRDN.sol", - "id": 3, - "nodeType": "ImportDirective", - "scope": 5, - "sourceUnit": 118, - "src": "70:44:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 4, - "linearizedBaseContracts": [ - 4 - ], - "name": "DevDependenciesGetter", - "nodeType": "ContractDefinition", - "nodes": [], - "scope": 5, - "src": "116:33:0" - } - ], - "src": "0:149:0" - }, - "legacyAST": { - "absolutePath": "/home/mmv/work/safe-react/contracts/DevDependencies.sol", - "exportedSymbols": { - "DevDependenciesGetter": [ - 4 - ] - }, - "id": 5, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:0" - }, - { - "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol", - "file": "../src/test/contracts/TokenOMG.sol", - "id": 2, - "nodeType": "ImportDirective", - "scope": 5, - "sourceUnit": 90, - "src": "25:44:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol", - "file": "../src/test/contracts/TokenRDN.sol", - "id": 3, - "nodeType": "ImportDirective", - "scope": 5, - "sourceUnit": 118, - "src": "70:44:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 4, - "linearizedBaseContracts": [ - 4 - ], - "name": "DevDependenciesGetter", - "nodeType": "ContractDefinition", - "nodes": [], - "scope": 5, - "src": "116:33:0" - } - ], - "src": "0:149:0" - }, - "compiler": { - "name": "solc", - "version": "0.5.8+commit.23d335f2.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.0.10", - "updatedAt": "2019-06-03T08:59:02.077Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/GnosisMath.json b/build/contracts/GnosisMath.json deleted file mode 100644 index f02e538d..00000000 --- a/build/contracts/GnosisMath.json +++ /dev/null @@ -1,32360 +0,0 @@ -{ - "contractName": "GnosisMath", - "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": "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": "nums", - "type": "int256[]" - } - ], - "name": "max", - "outputs": [ - { - "name": "maxNum", - "type": "int256" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"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\":\"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\":\"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 - Stefan George - \",\"methods\":{\"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)\"},\"max(int256[])\":{\"details\":\"Returns maximum of an array\",\"params\":{\"nums\":\"Numbers to look through\"},\"return\":\"Maximum number\"}},\"title\":\"Math library - Allows calculation of logarithmic and exponential functions\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/Math.sol\":\"GnosisMath\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]}},\"version\":1}", - "bytecode": "0x6107c7610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806345b8bafc1161006557806345b8bafc146100cb578063c2ee3a08146100e8578063ccc13814146100f0578063e46751e31461019357610087565b8063027806771461008c57806324902e24146100a657806324d4e90a146100ae575b600080fd5b6100946101b0565b60408051918252519081900360200190f35b6100946101bc565b610094600480360360208110156100c457600080fd5b50356101c9565b610094600480360360208110156100e157600080fd5b5035610433565b6100946104a2565b6100946004803603602081101561010657600080fd5b81019060208101813564010000000081111561012157600080fd5b82018360208201111561013357600080fd5b8035906020019184602083028401116401000000008311171561015557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506104aa945050505050565b610094600480360360208110156101a957600080fd5b503561050b565b67b17217f7d1cf79ac81565b680171547652b82fe17781565b60008082116101d757600080fd5b60006101e283610433565b90506000808212156101fc578160000384901b9050610201565b5082811c5b6000600160401b8201600160401b808403028161021a57fe5b059050806000600160401b828181800205028161023357fe5b0590506003810582019150600160401b83600160401b8584028161025357fe5b05028161025c57fe5b0590506005810582019150600160401b83600160401b8584028161027c57fe5b05028161028557fe5b0590506007810582019150600160401b83600160401b858402816102a557fe5b0502816102ae57fe5b0590506009810582019150600160401b83600160401b858402816102ce57fe5b0502816102d757fe5b059050600b810582019150600160401b83600160401b858402816102f757fe5b05028161030057fe5b059050600d810582019150600160401b83600160401b8584028161032057fe5b05028161032957fe5b059050600f810582019150600160401b83600160401b8584028161034957fe5b05028161035257fe5b0590506011810582019150600160401b83600160401b8584028161037257fe5b05028161037b57fe5b0590506013810582019150600160401b83600160401b8584028161039b57fe5b0502816103a457fe5b0590506015810582019150600160401b83600160401b858402816103c457fe5b0502816103cd57fe5b0590506017810582019150600160401b83600160401b858402816103ed57fe5b0502816103f657fe5b05905060198105919091019060028202680171547652b82fe17770010000000000000000000000000000000087020501955050505050505b919050565b603f1960c1608160011d5b8183600101121561049b576000811280156104625750600160401b8160000385901b105b8061047e57506000811215801561047e5750600160401b84821c105b1561048b5780915061048f565b8092505b5080820160011d61043e565b5050919050565b600160401b81565b6000808251116104b957600080fd5b50600160ff1b60005b825181101561050557818382815181106104d857fe5b602002602001015113156104fd578281815181106104f257fe5b602002602001015191505b6001016104c2565b50919050565b600068851591f9dd5b9b40d782131561052357600080fd5b682c5c85fdf473de6af21982121561053d5750600061042e565b67b17217f7d1cf79ac600160401b83020591506000806000841261056d575050600160401b808305908307610593565b6001600160401b8505039150600160401b846000038161058957fe5b07600160401b0390505b80600160401b8067b17217f7d1cf79ab83020401600160401b828402049150600160401b673d7f7bff058b1d5083020401600160401b828402049150600160401b670e35846b82505fc583020401600160401b828402049150600160401b670276556df749cee583020401600160401b828402049150600160401b665761ff9e299cc483020401600160401b828402049150600160401b660a184897c363c383020401600160401b828402049150600160401b65ffe5fe2c458683020401600160401b828402049150600160401b65162c0223a5c883020401600160401b828402049150600160401b6501b5253d395e83020401600160401b828402049150600160401b641e4cf5158b83020401600160401b828402049150600160401b6401e8cac73583020401600160401b828402049150600160401b631c3bd65083020401600160401b828402049150600160401b630181619383020401600160401b828402049150600160401b6213149683020401600160401b828402049150600160401b61e1b783020401600160401b828402049150600160401b6109c7830204016000841261077e576000846101000382600082121561074e57fe5b901c11156107645760001994505050505061042e565b8381600082121561077157fe5b901b94505050505061042e565b8360000381600082121561078e57fe5b901c94505050505061042e56fea165627a7a72305820d26dc8b24dd7c68e2f89fece45705ad86fdf64f8fd1558a361fec835e4ab8bfa0029", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806345b8bafc1161006557806345b8bafc146100cb578063c2ee3a08146100e8578063ccc13814146100f0578063e46751e31461019357610087565b8063027806771461008c57806324902e24146100a657806324d4e90a146100ae575b600080fd5b6100946101b0565b60408051918252519081900360200190f35b6100946101bc565b610094600480360360208110156100c457600080fd5b50356101c9565b610094600480360360208110156100e157600080fd5b5035610433565b6100946104a2565b6100946004803603602081101561010657600080fd5b81019060208101813564010000000081111561012157600080fd5b82018360208201111561013357600080fd5b8035906020019184602083028401116401000000008311171561015557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506104aa945050505050565b610094600480360360208110156101a957600080fd5b503561050b565b67b17217f7d1cf79ac81565b680171547652b82fe17781565b60008082116101d757600080fd5b60006101e283610433565b90506000808212156101fc578160000384901b9050610201565b5082811c5b6000600160401b8201600160401b808403028161021a57fe5b059050806000600160401b828181800205028161023357fe5b0590506003810582019150600160401b83600160401b8584028161025357fe5b05028161025c57fe5b0590506005810582019150600160401b83600160401b8584028161027c57fe5b05028161028557fe5b0590506007810582019150600160401b83600160401b858402816102a557fe5b0502816102ae57fe5b0590506009810582019150600160401b83600160401b858402816102ce57fe5b0502816102d757fe5b059050600b810582019150600160401b83600160401b858402816102f757fe5b05028161030057fe5b059050600d810582019150600160401b83600160401b8584028161032057fe5b05028161032957fe5b059050600f810582019150600160401b83600160401b8584028161034957fe5b05028161035257fe5b0590506011810582019150600160401b83600160401b8584028161037257fe5b05028161037b57fe5b0590506013810582019150600160401b83600160401b8584028161039b57fe5b0502816103a457fe5b0590506015810582019150600160401b83600160401b858402816103c457fe5b0502816103cd57fe5b0590506017810582019150600160401b83600160401b858402816103ed57fe5b0502816103f657fe5b05905060198105919091019060028202680171547652b82fe17770010000000000000000000000000000000087020501955050505050505b919050565b603f1960c1608160011d5b8183600101121561049b576000811280156104625750600160401b8160000385901b105b8061047e57506000811215801561047e5750600160401b84821c105b1561048b5780915061048f565b8092505b5080820160011d61043e565b5050919050565b600160401b81565b6000808251116104b957600080fd5b50600160ff1b60005b825181101561050557818382815181106104d857fe5b602002602001015113156104fd578281815181106104f257fe5b602002602001015191505b6001016104c2565b50919050565b600068851591f9dd5b9b40d782131561052357600080fd5b682c5c85fdf473de6af21982121561053d5750600061042e565b67b17217f7d1cf79ac600160401b83020591506000806000841261056d575050600160401b808305908307610593565b6001600160401b8505039150600160401b846000038161058957fe5b07600160401b0390505b80600160401b8067b17217f7d1cf79ab83020401600160401b828402049150600160401b673d7f7bff058b1d5083020401600160401b828402049150600160401b670e35846b82505fc583020401600160401b828402049150600160401b670276556df749cee583020401600160401b828402049150600160401b665761ff9e299cc483020401600160401b828402049150600160401b660a184897c363c383020401600160401b828402049150600160401b65ffe5fe2c458683020401600160401b828402049150600160401b65162c0223a5c883020401600160401b828402049150600160401b6501b5253d395e83020401600160401b828402049150600160401b641e4cf5158b83020401600160401b828402049150600160401b6401e8cac73583020401600160401b828402049150600160401b631c3bd65083020401600160401b828402049150600160401b630181619383020401600160401b828402049150600160401b6213149683020401600160401b828402049150600160401b61e1b783020401600160401b828402049150600160401b6109c7830204016000841261077e576000846101000382600082121561074e57fe5b901c11156107645760001994505050505061042e565b8381600082121561077157fe5b901b94505050505061042e565b8360000381600082121561078e57fe5b901c94505050505061042e56fea165627a7a72305820d26dc8b24dd7c68e2f89fece45705ad86fdf64f8fd1558a361fec835e4ab8bfa0029", - "sourceMap": "200:9220:5:-;;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": "200:9220:5:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;356:45;;;:::i;:::-;;;;;;;;;;;;;;;;407:49;;;:::i;3474:1779::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3474:1779:5;;:::i;5367:429::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5367:429:5;;:::i;304:46::-;;;:::i;5918:221::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5918:221:5;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;5918:221:5;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5918:221:5;;;;;;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;5918:221:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;5918:221:5;;-1:-1:-1;5918:221:5;;-1:-1:-1;;;;;5918:221:5:i;610:2761::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;610:2761:5;;:::i;356:45::-;383:18;356:45;:::o;407:49::-;437:19;407:49;:::o;3474:1779::-;3515:3;3542:1;3538;:5;3530:14;;;;;;3598:9;3610:12;3620:1;3610:9;:12::i;:::-;3598:24;;3632:5;3659:1;3651:5;:9;3647:81;;;3681:5;3680:6;;3670:1;:17;;3662:26;;3647:81;;;-1:-1:-1;3711:16:5;;;3647:81;3942:8;-1:-1:-1;;;3982:1:5;:12;-1:-1:-1;;;331:19:5;3954:1;:12;3953:25;:42;;;;;;;-1:-1:-1;3953:42:5;4005:11;-1:-1:-1;;;3953:42:5;331:19;4047:11;;;:22;:29;:40;;;;;;;-1:-1:-1;4118:1:5;4047:40;4108:11;4097:22;;;;-1:-1:-1;;;4167:4:5;-1:-1:-1;;;4149:4:5;4139:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4213:1:5;4139:43;4203:11;4192:22;;;;-1:-1:-1;;;4262:4:5;-1:-1:-1;;;4244:4:5;4234:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4308:1:5;4234:43;4298:11;4287:22;;;;-1:-1:-1;;;4357:4:5;-1:-1:-1;;;4339:4:5;4329:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4403:1:5;4329:43;4393:11;4382:22;;;;-1:-1:-1;;;4452:4:5;-1:-1:-1;;;4434:4:5;4424:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4498:2:5;4424:43;4488:12;4477:23;;;;-1:-1:-1;;;4548:4:5;-1:-1:-1;;;4530:4:5;4520:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4594:2:5;4520:43;4584:12;4573:23;;;;-1:-1:-1;;;4644:4:5;-1:-1:-1;;;4626:4:5;4616:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4690:2:5;4616:43;4680:12;4669:23;;;;-1:-1:-1;;;4740:4:5;-1:-1:-1;;;4722:4:5;4712:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4786:2:5;4712:43;4776:12;4765:23;;;;-1:-1:-1;;;4836:4:5;-1:-1:-1;;;4818:4:5;4808:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4882:2:5;4808:43;4872:12;4861:23;;;;-1:-1:-1;;;4932:4:5;-1:-1:-1;;;4914:4:5;4904:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;4978:2:5;4904:43;4968:12;4957:23;;;;-1:-1:-1;;;5028:4:5;-1:-1:-1;;;5010:4:5;5000:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;5074:2:5;5000:43;5064:12;5053:23;;;;-1:-1:-1;;;5124:4:5;-1:-1:-1;;;5106:4:5;5096:7;:14;:25;;;;;;:32;:43;;;;;;;-1:-1:-1;5170:2:5;5096:43;5160:12;5149:23;;;;;5235:1;:11;;437:19;5189:29;;;:43;:57;5182:64;;;;;;;3474:1779;;;;:::o;5367:429::-;-1:-1:-1;;5460:3:5;5577:7;5589:1;5576:14;5600:190;5618:2;5608;5613:1;5608:6;5607:13;5600:190;;;5646:1;5640:3;:7;:32;;;;;-1:-1:-1;;;5662:3:5;5661:4;;5651:1;:15;;:21;5640:32;:68;;;;5683:1;5676:3;:8;;:32;;;;-1:-1:-1;;;;5688:14:5;;;:20;5676:32;5636:109;;;5715:3;5710:8;;5636:109;;;5742:3;5737:8;;5636:109;-1:-1:-1;5766:7:5;;;5778:1;5765:14;5600:190;;;5367:429;;;;;:::o;304:46::-;-1:-1:-1;;;304:46:5;:::o;5918:221::-;5971:10;6015:1;6001:4;:11;:15;5993:24;;;;;;-1:-1:-1;;;;6060:6:5;6055:77;6076:4;:11;6072:1;:15;6055:77;;;6108:6;6098:4;6103:1;6098:7;;;;;;;;;;;;;;:16;6094:38;;;6125:4;6130:1;6125:7;;;;;;;;;;;;;;6116:16;;6094:38;6089:3;;6055:77;;;;5918:221;;;:::o;610:2761::-;651:4;799:22;794:1;:27;;786:36;;;;;;-1:-1:-1;;946:1:5;:26;942:40;;;-1:-1:-1;981:1:5;974:8;;942:40;383:18;-1:-1:-1;;;1036:12:5;;:23;1032:27;;1195:9;1214:6;1239:1;1234;:6;1230:191;;-1:-1:-1;;;;;1264:12:5;;;;1299;;1230:191;;;1366:1;-1:-1:-1;;;1351:1:5;:12;:16;1343:24;;-1:-1:-1;;;1397:1:5;1396:2;;:13;;;;;;-1:-1:-1;;;1385:25:5;1381:29;;1230:191;1968:1;-1:-1:-1;;;331:19:5;2016:18;:25;;:31;2006:41;-1:-1:-1;;;2064:8:5;;;:14;;-1:-1:-1;;;;2098:18:5;:25;;:31;2088:41;-1:-1:-1;;;2146:8:5;;;:14;;-1:-1:-1;;;;2180:17:5;:24;;:30;2170:40;-1:-1:-1;;;2227:8:5;;;:14;;-1:-1:-1;;;;2261:17:5;:24;;:30;2251:40;-1:-1:-1;;;2308:8:5;;;:14;;-1:-1:-1;;;;2342:16:5;:23;;:29;2332:39;-1:-1:-1;;;2388:8:5;;;:14;;-1:-1:-1;;;;2422:15:5;:22;;:28;2412:38;-1:-1:-1;;;2467:8:5;;;:14;;-1:-1:-1;;;;2501:14:5;:21;;:27;2491:37;-1:-1:-1;;;2545:8:5;;;:14;;-1:-1:-1;;;;2579:14:5;:21;;:27;2569:37;-1:-1:-1;;;2623:8:5;;;:14;;-1:-1:-1;;;;2657:13:5;:20;;:26;2647:36;-1:-1:-1;;;2700:8:5;;;:14;;-1:-1:-1;;;;2734:12:5;:19;;:25;2724:35;-1:-1:-1;;;2776:8:5;;;:14;;-1:-1:-1;;;;2810:11:5;:18;;:24;2800:34;-1:-1:-1;;;2851:8:5;;;:14;;-1:-1:-1;;;;2885:10:5;:17;;:23;2875:33;-1:-1:-1;;;2925:8:5;;;:14;;-1:-1:-1;;;;2959:9:5;:16;;:22;2949:32;-1:-1:-1;;;2998:8:5;;;:14;;-1:-1:-1;;;;3032:8:5;:15;;:21;3022:31;-1:-1:-1;;;3070:8:5;;;:14;;-1:-1:-1;;;;3104:6:5;:13;;:19;3094:29;-1:-1:-1;;;3140:8:5;;;:14;;-1:-1:-1;;;;3174:5:5;:12;;:18;3164:28;3215:1;3206:10;;3202:162;;3262:1;3253:5;3247:3;:11;3236:6;:23;;;;;;;;;;:27;3232:54;;;-1:-1:-1;;3265:21:5;;;;;;;;3232:54;3317:5;3307:6;:15;;;;;;;;;;3300:22;;;;;;;;3202:162;3358:5;3357:6;;3346;:18;;;;;;;;;;3339:25;;;;;;;", - "source": "pragma solidity ^0.5.2;\n\n/// @title Math library - Allows calculation of logarithmic and exponential functions\n/// @author Alan Lu - \n/// @author Stefan George - \nlibrary GnosisMath {\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) public pure returns (uint) {\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) return 0;\n // Transform so that e^x -> 2^x\n x = x * int(ONE) / int(LN2);\n // 2^x = 2^whole(x) * 2^frac(x)\n // ^^^^^^^^^^ is a bit shift\n // so Taylor expand on z = frac(x)\n int shift;\n uint z;\n if (x >= 0) {\n shift = x / int(ONE);\n z = uint(x % int(ONE));\n } else {\n shift = x / int(ONE) - 1;\n z = ONE - uint(-x % int(ONE));\n }\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 // >>> ONE = 0x10000000000000000\n // >>> print('\\n'.join(hex(int(mp.log(2)**i / mp.factorial(i) * ONE)) for i in range(1, 7)))\n // 0xb17217f7d1cf79ab\n // 0x3d7f7bff058b1d50\n // 0xe35846b82505fc5\n // 0x276556df749cee5\n // 0x5761ff9e299cc4\n // 0xa184897c363c3\n uint zpow = z;\n uint result = ONE;\n result += 0xb17217f7d1cf79ab * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x3d7f7bff058b1d50 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0xe35846b82505fc5 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x276556df749cee5 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x5761ff9e299cc4 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0xa184897c363c3 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0xffe5fe2c4586 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x162c0223a5c8 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x1b5253d395e * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x1e4cf5158b * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x1e8cac735 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x1c3bd650 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x1816193 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x131496 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0xe1b7 * zpow / ONE;\n zpow = zpow * z / ONE;\n result += 0x9c7 * zpow / ONE;\n if (shift >= 0) {\n if (result >> (256 - shift) > 0) return (2 ** 256 - 1);\n return result << shift;\n } else return result >> (-shift);\n }\n\n /// @dev Returns natural logarithm value of given x\n /// @param x x\n /// @return ln(x)\n function ln(uint x) public pure returns (int) {\n require(x > 0);\n // binary search for floor(log2(x))\n int ilog2 = floorLog2(x);\n int z;\n if (ilog2 < 0) z = int(x << uint(-ilog2));\n else z = int(x >> uint(ilog2));\n // z = x * 2^-⌊log₂x⌋\n // so 1 <= z < 2\n // and ln z = ln x - ⌊log₂x⌋/log₂e\n // so just compute ln z using artanh series\n // and calculate ln x from that\n int term = (z - int(ONE)) * int(ONE) / (z + int(ONE));\n int halflnz = term;\n int termpow = term * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 3;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 5;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 7;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 9;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 11;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 13;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 15;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 17;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 19;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 21;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 23;\n termpow = termpow * term / int(ONE) * term / int(ONE);\n halflnz += termpow / 25;\n return (ilog2 * int(ONE)) * int(ONE) / int(LOG2_E) + 2 * halflnz;\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) public pure returns (int lo) {\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) hi = mid;\n else 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) public pure returns (int maxNum) {\n require(nums.length > 0);\n maxNum = -2 ** 255;\n for (uint i = 0; i < nums.length; i++) if (nums[i] > maxNum) maxNum = nums[i];\n }\n\n /// @dev Returns whether an add operation causes an overflow\n /// @param a First addend\n /// @param b Second addend\n /// @return Did no overflow occur?\n function safeToAdd(uint a, uint b) internal pure returns (bool) {\n return a + b >= a;\n }\n\n /// @dev Returns whether a subtraction operation causes an underflow\n /// @param a Minuend\n /// @param b Subtrahend\n /// @return Did no underflow occur?\n function safeToSub(uint a, uint b) internal pure returns (bool) {\n return a >= b;\n }\n\n /// @dev Returns whether a multiply operation causes an overflow\n /// @param a First factor\n /// @param b Second factor\n /// @return Did no overflow occur?\n function safeToMul(uint a, uint b) internal pure returns (bool) {\n return b == 0 || a * b / b == a;\n }\n\n /// @dev Returns sum if no overflow occurred\n /// @param a First addend\n /// @param b Second addend\n /// @return Sum\n function add(uint a, uint b) internal pure returns (uint) {\n require(safeToAdd(a, b));\n return a + b;\n }\n\n /// @dev Returns difference if no overflow occurred\n /// @param a Minuend\n /// @param b Subtrahend\n /// @return Difference\n function sub(uint a, uint b) internal pure returns (uint) {\n require(safeToSub(a, b));\n return a - b;\n }\n\n /// @dev Returns product if no overflow occurred\n /// @param a First factor\n /// @param b Second factor\n /// @return Product\n function mul(uint a, uint b) internal pure returns (uint) {\n require(safeToMul(a, b));\n return a * b;\n }\n\n /// @dev Returns whether an add operation causes an overflow\n /// @param a First addend\n /// @param b Second addend\n /// @return Did no overflow occur?\n function safeToAdd(int a, int b) internal pure returns (bool) {\n return (b >= 0 && a + b >= a) || (b < 0 && a + b < a);\n }\n\n /// @dev Returns whether a subtraction operation causes an underflow\n /// @param a Minuend\n /// @param b Subtrahend\n /// @return Did no underflow occur?\n function safeToSub(int a, int b) internal pure returns (bool) {\n return (b >= 0 && a - b <= a) || (b < 0 && a - b > a);\n }\n\n /// @dev Returns whether a multiply operation causes an overflow\n /// @param a First factor\n /// @param b Second factor\n /// @return Did no overflow occur?\n function safeToMul(int a, int b) internal pure returns (bool) {\n return (b == 0) || (a * b / b == a);\n }\n\n /// @dev Returns sum if no overflow occurred\n /// @param a First addend\n /// @param b Second addend\n /// @return Sum\n function add(int a, int b) internal pure returns (int) {\n require(safeToAdd(a, b));\n return a + b;\n }\n\n /// @dev Returns difference if no overflow occurred\n /// @param a Minuend\n /// @param b Subtrahend\n /// @return Difference\n function sub(int a, int b) internal pure returns (int) {\n require(safeToSub(a, b));\n return a - b;\n }\n\n /// @dev Returns product if no overflow occurred\n /// @param a First factor\n /// @param b Second factor\n /// @return Product\n function mul(int a, int b) internal pure returns (int) {\n require(safeToMul(a, b));\n return a * b;\n }\n}\n", - "sourcePath": "@gnosis.pm/util-contracts/contracts/Math.sol", - "ast": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", - "exportedSymbols": { - "GnosisMath": [ - 1458 - ] - }, - "id": 1459, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 331, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title Math library - Allows calculation of logarithmic and exponential functions\n @author Alan Lu - \n @author Stefan George - ", - "fullyImplemented": true, - "id": 1458, - "linearizedBaseContracts": [ - 1458 - ], - "name": "GnosisMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 334, - "name": "ONE", - "nodeType": "VariableDeclaration", - "scope": 1458, - "src": "304:46:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 332, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "304:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30783130303030303030303030303030303030", - "id": 333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "331:19:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18446744073709551616_by_1", - "typeString": "int_const 18446744073709551616" - }, - "value": "0x10000000000000000" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 337, - "name": "LN2", - "nodeType": "VariableDeclaration", - "scope": 1458, - "src": "356:45:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 335, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "356:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "307862313732313766376431636637396163", - "id": 336, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "383:18:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_12786308645202655660_by_1", - "typeString": "int_const 12786308645202655660" - }, - "value": "0xb17217f7d1cf79ac" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 340, - "name": "LOG2_E", - "nodeType": "VariableDeclaration", - "scope": 1458, - "src": "407:49:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 338, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "407:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30783137313534373635326238326665313737", - "id": 339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "437:19:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_26613026195688644983_by_1", - "typeString": "int_const 26613026195688644983" - }, - "value": "0x171547652b82fe177" - }, - "visibility": "public" - }, - { - "body": { - "id": 712, - "nodeType": "Block", - "src": "657:2714:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 348, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "794:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32343534393731323539383738393039383836363739", - "id": 349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "799:22:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2454971259878909886679_by_1", - "typeString": "int_const 2454971259878909886679" - }, - "value": "2454971259878909886679" - }, - "src": "794:27:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 347, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "786:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "786:36:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 352, - "nodeType": "ExpressionStatement", - "src": "786:36:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 353, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "946:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 355, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "950:22:5", - "subExpression": { - "argumentTypes": null, - "hexValue": "383138333233373533323932393639393632323237", - "id": 354, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "951:21:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_818323753292969962227_by_1", - "typeString": "int_const 818323753292969962227" - }, - "value": "818323753292969962227" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_818323753292969962227_by_1", - "typeString": "int_const -818323753292969962227" - } - }, - "src": "946:26:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 359, - "nodeType": "IfStatement", - "src": "942:40:5", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 357, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "981:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 346, - "id": 358, - "nodeType": "Return", - "src": "974:8:5" - } - }, - { - "expression": { - "argumentTypes": null, - "id": 370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 360, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1032:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 361, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1036:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 363, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1044:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 362, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1040:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1040:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1036:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 367, - "name": "LN2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 337, - "src": "1055:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1051:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 368, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1051:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1036:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1032:27:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 371, - "nodeType": "ExpressionStatement", - "src": "1032:27:5" - }, - { - "assignments": [ - 373 - ], - "declarations": [ - { - "constant": false, - "id": 373, - "name": "shift", - "nodeType": "VariableDeclaration", - "scope": 712, - "src": "1195:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 372, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "1195:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 374, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "1195:9:5" - }, - { - "assignments": [ - 376 - ], - "declarations": [ - { - "constant": false, - "id": 376, - "name": "z", - "nodeType": "VariableDeclaration", - "scope": 712, - "src": "1214:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 375, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1214:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 377, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "1214:6:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 378, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1234:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 379, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1239:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1234:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 423, - "nodeType": "Block", - "src": "1329:92:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 400, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "1343:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 401, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1351:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 403, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1359:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 402, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1355:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 404, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1355:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1351:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 406, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1366:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "1351:16:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1343:24:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 409, - "nodeType": "ExpressionStatement", - "src": "1343:24:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 410, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "1381:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 411, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1385:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1396:2:5", - "subExpression": { - "argumentTypes": null, - "id": 413, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1397:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 416, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1405:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 415, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1401:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 417, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1401:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1396:13:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 412, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1391:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1391:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1385:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1381:29:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 422, - "nodeType": "ExpressionStatement", - "src": "1381:29:5" - } - ] - }, - "id": 424, - "nodeType": "IfStatement", - "src": "1230:191:5", - "trueBody": { - "id": 399, - "nodeType": "Block", - "src": "1242:81:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 381, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "1256:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 382, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1264:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 384, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1272:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 383, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1268:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 385, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1268:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1264:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1256:20:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 388, - "nodeType": "ExpressionStatement", - "src": "1256:20:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 389, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "1290:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 391, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1299:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 393, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1307:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 392, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1303:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1303:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1299:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1294:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1294:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1290:22:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 398, - "nodeType": "ExpressionStatement", - "src": "1290:22:5" - } - ] - } - }, - { - "assignments": [ - 426 - ], - "declarations": [ - { - "constant": false, - "id": 426, - "name": "zpow", - "nodeType": "VariableDeclaration", - "scope": 712, - "src": "1956:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 425, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1956:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 428, - "initialValue": { - "argumentTypes": null, - "id": 427, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "1968:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1956:13:5" - }, - { - "assignments": [ - 430 - ], - "declarations": [ - { - "constant": false, - "id": 430, - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 712, - "src": "1979:11:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 429, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1979:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 432, - "initialValue": { - "argumentTypes": null, - "id": 431, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1993:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1979:17:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 439, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 433, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2006:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 436, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307862313732313766376431636637396162", - "id": 434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2016:18:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_12786308645202655659_by_1", - "typeString": "int_const 12786308645202655659" - }, - "value": "0xb17217f7d1cf79ab" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 435, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2037:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2016:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 437, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2044:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2016:31:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2006:41:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 440, - "nodeType": "ExpressionStatement", - "src": "2006:41:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 441, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2057:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 442, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2064:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 443, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2071:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2064:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 445, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2075:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2064:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2057:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 448, - "nodeType": "ExpressionStatement", - "src": "2057:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 455, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 449, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2088:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307833643766376266663035386231643530", - "id": 450, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2098:18:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4431396893595737424_by_1", - "typeString": "int_const 4431396893595737424" - }, - "value": "0x3d7f7bff058b1d50" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 451, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2119:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2098:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 453, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2126:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2098:31:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2088:41:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 456, - "nodeType": "ExpressionStatement", - "src": "2088:41:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 457, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2139:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 462, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 458, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2146:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 459, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2153:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2146:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 461, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2157:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2146:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2139:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 464, - "nodeType": "ExpressionStatement", - "src": "2139:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 465, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2170:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078653335383436623832353035666335", - "id": 466, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2180:17:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1023870087579328453_by_1", - "typeString": "int_const 1023870087579328453" - }, - "value": "0xe35846b82505fc5" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 467, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2200:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2180:24:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 469, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2207:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2180:30:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2170:40:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 472, - "nodeType": "ExpressionStatement", - "src": "2170:40:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 479, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 473, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2220:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 474, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2227:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 475, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2234:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2227:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 477, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2238:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2227:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2220:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 480, - "nodeType": "ExpressionStatement", - "src": "2220:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 481, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2251:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078323736353536646637343963656535", - "id": 482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2261:17:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_177423166116318949_by_1", - "typeString": "int_const 177423166116318949" - }, - "value": "0x276556df749cee5" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 483, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2281:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2261:24:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 485, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2288:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2261:30:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2251:40:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 488, - "nodeType": "ExpressionStatement", - "src": "2251:40:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 489, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2301:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 490, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2308:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 491, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2315:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2308:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 493, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2319:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2308:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2301:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 496, - "nodeType": "ExpressionStatement", - "src": "2301:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 497, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2332:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "30783537363166663965323939636334", - "id": 498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2342:16:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24596073471909060_by_1", - "typeString": "int_const 24596073471909060" - }, - "value": "0x5761ff9e299cc4" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 499, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2361:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2342:23:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 501, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2368:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2342:29:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2332:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 504, - "nodeType": "ExpressionStatement", - "src": "2332:39:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 505, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2381:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 506, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2388:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 507, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2395:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2388:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 509, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2399:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2388:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2381:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 512, - "nodeType": "ExpressionStatement", - "src": "2381:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 513, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2412:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307861313834383937633336336333", - "id": 514, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2422:15:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2841449829983171_by_1", - "typeString": "int_const 2841449829983171" - }, - "value": "0xa184897c363c3" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 515, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2440:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2422:22:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 517, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2447:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2422:28:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2412:38:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 520, - "nodeType": "ExpressionStatement", - "src": "2412:38:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 521, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2460:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 522, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2467:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 523, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2474:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2467:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 525, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2478:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2467:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2460:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 528, - "nodeType": "ExpressionStatement", - "src": "2460:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 529, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2491:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078666665356665326334353836", - "id": 530, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2501:14:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_281363276907910_by_1", - "typeString": "int_const 281363276907910" - }, - "value": "0xffe5fe2c4586" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 531, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2518:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2501:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 533, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2525:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2501:27:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2491:37:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 536, - "nodeType": "ExpressionStatement", - "src": "2491:37:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 537, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2538:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 538, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2545:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 539, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2552:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2545:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 541, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2556:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2545:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2538:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 544, - "nodeType": "ExpressionStatement", - "src": "2538:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 551, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 545, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2569:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078313632633032323361356338", - "id": 546, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2579:14:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24378270262728_by_1", - "typeString": "int_const 24378270262728" - }, - "value": "0x162c0223a5c8" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 547, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2596:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2579:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 549, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2603:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2579:27:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2569:37:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 552, - "nodeType": "ExpressionStatement", - "src": "2569:37:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 553, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2616:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 554, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2623:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 555, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2630:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2623:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 557, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2634:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2623:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2616:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 560, - "nodeType": "ExpressionStatement", - "src": "2616:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 561, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2647:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "30783162353235336433393565", - "id": 562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2657:13:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1877525477726_by_1", - "typeString": "int_const 1877525477726" - }, - "value": "0x1b5253d395e" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 563, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2673:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2657:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 565, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2680:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2657:26:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2647:36:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 568, - "nodeType": "ExpressionStatement", - "src": "2647:36:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 569, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2693:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 574, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 570, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2700:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 571, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2707:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2700:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 573, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2711:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2700:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2693:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 576, - "nodeType": "ExpressionStatement", - "src": "2693:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 577, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2724:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307831653463663531353862", - "id": 578, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2734:12:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_130140149131_by_1", - "typeString": "int_const 130140149131" - }, - "value": "0x1e4cf5158b" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 579, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2749:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2734:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 581, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2756:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2734:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2724:35:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 584, - "nodeType": "ExpressionStatement", - "src": "2724:35:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 585, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2769:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 586, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2776:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 587, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2783:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2776:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 589, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2787:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2776:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2769:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 592, - "nodeType": "ExpressionStatement", - "src": "2769:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 593, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2800:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078316538636163373335", - "id": 594, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2810:11:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_8200570677_by_1", - "typeString": "int_const 8200570677" - }, - "value": "0x1e8cac735" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 595, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2824:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2810:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 597, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2831:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2810:24:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2800:34:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 600, - "nodeType": "ExpressionStatement", - "src": "2800:34:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 601, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2844:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 602, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2851:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 603, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2858:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2851:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 605, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2862:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2851:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2844:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 608, - "nodeType": "ExpressionStatement", - "src": "2844:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 609, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2875:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "30783163336264363530", - "id": 610, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2885:10:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_473683536_by_1", - "typeString": "int_const 473683536" - }, - "value": "0x1c3bd650" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 611, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2898:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2885:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 613, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2905:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2885:23:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2875:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 616, - "nodeType": "ExpressionStatement", - "src": "2875:33:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 617, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2918:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 618, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2925:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 619, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2932:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2925:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 621, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2936:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2925:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2918:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 624, - "nodeType": "ExpressionStatement", - "src": "2918:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 631, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 625, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2949:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307831383136313933", - "id": 626, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2959:9:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_25256339_by_1", - "typeString": "int_const 25256339" - }, - "value": "0x1816193" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 627, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2971:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2959:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 629, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2978:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2959:22:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2949:32:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 632, - "nodeType": "ExpressionStatement", - "src": "2949:32:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 633, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2991:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 638, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 634, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2998:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 635, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "3005:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2998:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 637, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3009:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2998:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2991:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 640, - "nodeType": "ExpressionStatement", - "src": "2991:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 641, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3022:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078313331343936", - "id": 642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3032:8:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1250454_by_1", - "typeString": "int_const 1250454" - }, - "value": "0x131496" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 643, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3043:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3032:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 645, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3050:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3032:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3022:31:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 648, - "nodeType": "ExpressionStatement", - "src": "3022:31:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 649, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3063:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 650, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3070:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 651, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "3077:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3070:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 653, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3081:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3070:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3063:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 656, - "nodeType": "ExpressionStatement", - "src": "3063:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 657, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3094:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307865316237", - "id": 658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3104:6:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_57783_by_1", - "typeString": "int_const 57783" - }, - "value": "0xe1b7" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 659, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3113:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3104:13:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 661, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3120:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3104:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3094:29:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 664, - "nodeType": "ExpressionStatement", - "src": "3094:29:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 665, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3133:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 666, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3140:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 667, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "3147:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3140:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 669, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3151:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3140:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3133:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 672, - "nodeType": "ExpressionStatement", - "src": "3133:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 673, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3164:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078396337", - "id": 674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3174:5:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2503_by_1", - "typeString": "int_const 2503" - }, - "value": "0x9c7" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 675, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3182:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3174:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 677, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3189:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3174:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3164:28:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 680, - "nodeType": "ExpressionStatement", - "src": "3164:28:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 681, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "3206:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3215:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3206:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 709, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 705, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3346:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "3357:6:5", - "subExpression": { - "argumentTypes": null, - "id": 706, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "3358:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 708, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3356:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3346:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 346, - "id": 710, - "nodeType": "Return", - "src": "3339:25:5" - }, - "id": 711, - "nodeType": "IfStatement", - "src": "3202:162:5", - "trueBody": { - "id": 704, - "nodeType": "Block", - "src": "3218:115:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 684, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3236:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "323536", - "id": 685, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3247:3:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_256_by_1", - "typeString": "int_const 256" - }, - "value": "256" - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 686, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "3253:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3247:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 688, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3246:13:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3236:23:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 690, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3262:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3236:27:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 699, - "nodeType": "IfStatement", - "src": "3232:54:5", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9935" - }, - "id": 696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9936" - }, - "id": 694, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 692, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3273:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "323536", - "id": 693, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3278:3:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_256_by_1", - "typeString": "int_const 256" - }, - "value": "256" - }, - "src": "3273:8:5", - "typeDescriptions": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9936" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 695, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3284:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3273:12:5", - "typeDescriptions": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9935" - } - } - ], - "id": 697, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3272:14:5", - "typeDescriptions": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9935" - } - }, - "functionReturnParameters": 346, - "id": 698, - "nodeType": "Return", - "src": "3265:21:5" - } - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 700, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3307:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 701, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "3317:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3307:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 346, - "id": 703, - "nodeType": "Return", - "src": "3300:22:5" - } - ] - } - } - ] - }, - "documentation": "@dev Returns natural exponential function value of given x\n @param x x\n @return e**x", - "id": 713, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exp", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 343, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 342, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 713, - "src": "623:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 341, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "623:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "622:7:5" - }, - "returnParameters": { - "id": 346, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 345, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 713, - "src": "651:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 344, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "651:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "650:6:5" - }, - "scope": 1458, - "src": "610:2761:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1067, - "nodeType": "Block", - "src": "3520:1733:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 721, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "3538:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 722, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3542:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3538:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 720, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "3530:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 724, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3530:14:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 725, - "nodeType": "ExpressionStatement", - "src": "3530:14:5" - }, - { - "assignments": [ - 727 - ], - "declarations": [ - { - "constant": false, - "id": 727, - "name": "ilog2", - "nodeType": "VariableDeclaration", - "scope": 1067, - "src": "3598:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 726, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "3598:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 731, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 729, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "3620:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 728, - "name": "floorLog2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1144, - "src": "3610:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_int256_$", - "typeString": "function (uint256) pure returns (int256)" - } - }, - "id": 730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3610:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3598:24:5" - }, - { - "assignments": [ - 733 - ], - "declarations": [ - { - "constant": false, - "id": 733, - "name": "z", - "nodeType": "VariableDeclaration", - "scope": 1067, - "src": "3632:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 732, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "3632:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 734, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "3632:5:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 735, - "name": "ilog2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 727, - "src": "3651:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 736, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3659:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3651:9:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 749, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 733, - "src": "3703:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 751, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "3711:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 753, - "name": "ilog2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 727, - "src": "3721:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 752, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3716:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3716:11:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3711:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 750, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3707:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 756, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3707:21:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3703:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 758, - "nodeType": "ExpressionStatement", - "src": "3703:25:5" - }, - "id": 759, - "nodeType": "IfStatement", - "src": "3647:81:5", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 738, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 733, - "src": "3662:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 740, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "3670:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "3680:6:5", - "subExpression": { - "argumentTypes": null, - "id": 742, - "name": "ilog2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 727, - "src": "3681:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 741, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3675:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3675:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3670:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 739, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3666:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3666:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3662:26:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 748, - "nodeType": "ExpressionStatement", - "src": "3662:26:5" - } - }, - { - "assignments": [ - 761 - ], - "declarations": [ - { - "constant": false, - "id": 761, - "name": "term", - "nodeType": "VariableDeclaration", - "scope": 1067, - "src": "3942:8:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 760, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "3942:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 779, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 778, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 762, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 733, - "src": "3954:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 764, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3962:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 763, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3958:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 765, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3958:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3954:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 767, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3953:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 769, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3974:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3970:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 770, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3970:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3953:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 772, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 733, - "src": "3982:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 774, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3990:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 773, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3986:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 775, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3986:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3982:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 777, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3981:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3953:42:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3942:53:5" - }, - { - "assignments": [ - 781 - ], - "declarations": [ - { - "constant": false, - "id": 781, - "name": "halflnz", - "nodeType": "VariableDeclaration", - "scope": 1067, - "src": "4005:11:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 780, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "4005:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 783, - "initialValue": { - "argumentTypes": null, - "id": 782, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4019:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4005:18:5" - }, - { - "assignments": [ - 785 - ], - "declarations": [ - { - "constant": false, - "id": 785, - "name": "termpow", - "nodeType": "VariableDeclaration", - "scope": 1067, - "src": "4033:11:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 784, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "4033:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 799, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 786, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4047:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 787, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4054:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4047:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 790, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4065:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4061:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4061:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4047:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 793, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4072:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4047:29:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 796, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4083:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4079:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 797, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4079:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4047:40:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4033:54:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 800, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4097:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 801, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4108:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 802, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4118:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "4108:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4097:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 805, - "nodeType": "ExpressionStatement", - "src": "4097:22:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 806, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4129:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 815, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 813, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 807, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4139:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 808, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4149:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4139:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 811, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4160:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 810, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4156:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 812, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4156:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4139:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 814, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4167:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4139:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 817, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4178:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 816, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4174:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 818, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4174:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4139:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4129:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 821, - "nodeType": "ExpressionStatement", - "src": "4129:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 822, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4192:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 823, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4203:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 824, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4213:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "4203:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4192:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 827, - "nodeType": "ExpressionStatement", - "src": "4192:22:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 842, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 828, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4224:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 835, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 829, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4234:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 830, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4244:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4234:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 833, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4255:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 832, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4251:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4251:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4234:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 836, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4262:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4234:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 839, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4273:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 838, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4269:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 840, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4269:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4234:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4224:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 843, - "nodeType": "ExpressionStatement", - "src": "4224:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 844, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4287:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 845, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4298:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "37", - "id": 846, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4308:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_7_by_1", - "typeString": "int_const 7" - }, - "value": "7" - }, - "src": "4298:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4287:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 849, - "nodeType": "ExpressionStatement", - "src": "4287:22:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 850, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4319:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 857, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 851, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4329:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 852, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4339:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4329:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 855, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4350:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4346:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 856, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4346:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4329:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 858, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4357:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4329:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 861, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4368:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 860, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4364:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 862, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4364:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4329:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4319:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 865, - "nodeType": "ExpressionStatement", - "src": "4319:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 866, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4382:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 867, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4393:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 868, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4403:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "4393:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4382:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 871, - "nodeType": "ExpressionStatement", - "src": "4382:22:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 872, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4414:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 885, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 873, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4424:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 874, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4434:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4424:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 877, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4445:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 876, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4441:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4441:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4424:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 880, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4452:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4424:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 883, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4463:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4459:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 884, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4459:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4424:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4414:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 887, - "nodeType": "ExpressionStatement", - "src": "4414:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 892, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 888, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4477:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 889, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4488:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3131", - "id": 890, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4498:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_11_by_1", - "typeString": "int_const 11" - }, - "value": "11" - }, - "src": "4488:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4477:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 893, - "nodeType": "ExpressionStatement", - "src": "4477:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 894, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4510:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 903, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 895, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4520:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 896, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4530:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4520:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 899, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4541:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 898, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4537:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 900, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4537:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4520:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 902, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4548:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4520:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 905, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4559:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 904, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4555:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 906, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4555:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4520:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4510:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 909, - "nodeType": "ExpressionStatement", - "src": "4510:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 910, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4573:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 911, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4584:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3133", - "id": 912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4594:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_13_by_1", - "typeString": "int_const 13" - }, - "value": "13" - }, - "src": "4584:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4573:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 915, - "nodeType": "ExpressionStatement", - "src": "4573:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 930, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 916, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4606:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 917, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4616:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 918, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4626:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4616:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 921, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4637:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 920, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4633:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 922, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4633:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4616:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 924, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4644:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4616:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 927, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4655:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 926, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4651:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 928, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4651:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4616:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4606:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 931, - "nodeType": "ExpressionStatement", - "src": "4606:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 932, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4669:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 933, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4680:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 934, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4690:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "src": "4680:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4669:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 937, - "nodeType": "ExpressionStatement", - "src": "4669:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 938, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4702:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 939, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4712:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 940, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4722:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4712:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 943, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4733:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4729:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4729:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4712:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 946, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4740:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4712:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 949, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4751:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4747:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 950, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4747:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4712:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4702:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 953, - "nodeType": "ExpressionStatement", - "src": "4702:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 954, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4765:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 955, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4776:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3137", - "id": 956, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4786:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17_by_1", - "typeString": "int_const 17" - }, - "value": "17" - }, - "src": "4776:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4765:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 959, - "nodeType": "ExpressionStatement", - "src": "4765:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 960, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4798:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 973, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 961, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4808:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 962, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4818:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4808:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 965, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4829:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4825:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 966, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4825:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4808:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 968, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4836:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4808:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 971, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4847:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 970, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4843:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 972, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4843:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4808:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4798:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 975, - "nodeType": "ExpressionStatement", - "src": "4798:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 976, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4861:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 979, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 977, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4872:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3139", - "id": 978, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4882:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_19_by_1", - "typeString": "int_const 19" - }, - "value": "19" - }, - "src": "4872:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4861:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 981, - "nodeType": "ExpressionStatement", - "src": "4861:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 982, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4894:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 983, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4904:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 984, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4914:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4904:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 987, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4925:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 986, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4921:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 988, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4921:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4904:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 990, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4932:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4904:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 993, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4943:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 992, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4939:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4939:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4904:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4894:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 997, - "nodeType": "ExpressionStatement", - "src": "4894:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 998, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4957:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 999, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4968:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3231", - "id": 1000, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4978:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_21_by_1", - "typeString": "int_const 21" - }, - "value": "21" - }, - "src": "4968:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4957:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1003, - "nodeType": "ExpressionStatement", - "src": "4957:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1004, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4990:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1005, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "5000:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1006, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "5010:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5000:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1009, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5021:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1008, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5017:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1010, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5017:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5000:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1012, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "5028:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5000:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1015, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5039:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1014, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5035:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1016, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5035:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5000:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4990:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1019, - "nodeType": "ExpressionStatement", - "src": "4990:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1020, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "5053:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1021, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "5064:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3233", - "id": 1022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5074:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_23_by_1", - "typeString": "int_const 23" - }, - "value": "23" - }, - "src": "5064:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5053:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1025, - "nodeType": "ExpressionStatement", - "src": "5053:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1026, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "5086:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1039, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1027, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "5096:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1028, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "5106:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5096:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1031, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5117:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5113:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5113:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5096:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1034, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "5124:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5096:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1037, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5135:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1036, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5131:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1038, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5131:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5096:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5086:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1041, - "nodeType": "ExpressionStatement", - "src": "5086:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1042, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "5149:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1045, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1043, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "5160:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3235", - "id": 1044, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5170:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_25_by_1", - "typeString": "int_const 25" - }, - "value": "25" - }, - "src": "5160:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5149:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1047, - "nodeType": "ExpressionStatement", - "src": "5149:23:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1048, - "name": "ilog2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 727, - "src": "5190:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1050, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5202:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1049, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5198:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1051, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5198:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5190:16:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 1053, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5189:18:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1055, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5214:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1054, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5210:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1056, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5210:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5189:29:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1059, - "name": "LOG2_E", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 340, - "src": "5225:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1058, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5221:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5221:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5189:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1062, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5235:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1063, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "5239:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5235:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5189:57:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "functionReturnParameters": 719, - "id": 1066, - "nodeType": "Return", - "src": "5182:64:5" - } - ] - }, - "documentation": "@dev Returns natural logarithm value of given x\n @param x x\n @return ln(x)", - "id": 1068, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "ln", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 716, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 715, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 1068, - "src": "3486:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 714, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3486:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3485:8:5" - }, - "returnParameters": { - "id": 719, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 718, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1068, - "src": "3515:3:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 717, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "3515:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3514:5:5" - }, - "scope": 1458, - "src": "3474:1779:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1143, - "nodeType": "Block", - "src": "5423:373:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1075, - "name": "lo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1073, - "src": "5433:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1077, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "5438:3:5", - "subExpression": { - "argumentTypes": null, - "hexValue": "3634", - "id": 1076, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5439:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_64_by_1", - "typeString": "int_const 64" - }, - "value": "64" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_64_by_1", - "typeString": "int_const -64" - } - }, - "src": "5433:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1079, - "nodeType": "ExpressionStatement", - "src": "5433:8:5" - }, - { - "assignments": [ - 1081 - ], - "declarations": [ - { - "constant": false, - "id": 1081, - "name": "hi", - "nodeType": "VariableDeclaration", - "scope": 1143, - "src": "5451:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1080, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "5451:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1083, - "initialValue": { - "argumentTypes": null, - "hexValue": "313933", - "id": 1082, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5460:3:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_193_by_1", - "typeString": "int_const 193" - }, - "value": "193" - }, - "nodeType": "VariableDeclarationStatement", - "src": "5451:12:5" - }, - { - "assignments": [ - 1085 - ], - "declarations": [ - { - "constant": false, - "id": 1085, - "name": "mid", - "nodeType": "VariableDeclaration", - "scope": 1143, - "src": "5566:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1084, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "5566:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1092, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1086, - "name": "hi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1081, - "src": "5577:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1087, - "name": "lo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1073, - "src": "5582:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5577:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 1089, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5576:9:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 1090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5589:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5576:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5566:24:5" - }, - { - "body": { - "id": 1141, - "nodeType": "Block", - "src": "5622:168:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1099, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5640:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1100, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5646:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5640:7:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1102, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1070, - "src": "5651:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "5661:4:5", - "subExpression": { - "argumentTypes": null, - "id": 1104, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5662:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 1103, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5656:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 1106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5656:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5651:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1108, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5669:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5651:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5640:32:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1111, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5676:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1112, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5683:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5676:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1114, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1070, - "src": "5688:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1116, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5698:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 1115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5693:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 1117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5693:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5688:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1119, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5705:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5688:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5676:32:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5640:68:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "id": 1129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1127, - "name": "lo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1073, - "src": "5737:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1128, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5742:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5737:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1130, - "nodeType": "ExpressionStatement", - "src": "5737:8:5" - }, - "id": 1131, - "nodeType": "IfStatement", - "src": "5636:109:5", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 1125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1123, - "name": "hi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1081, - "src": "5710:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1124, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5715:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5710:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1126, - "nodeType": "ExpressionStatement", - "src": "5710:8:5" - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1132, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5759:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1133, - "name": "hi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1081, - "src": "5766:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1134, - "name": "lo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1073, - "src": "5771:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5766:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 1136, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5765:9:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 1137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5778:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5765:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5759:20:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1140, - "nodeType": "ExpressionStatement", - "src": "5759:20:5" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1093, - "name": "lo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1073, - "src": "5608:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 1094, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5613:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5608:6:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 1096, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5607:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1097, - "name": "hi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1081, - "src": "5618:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5607:13:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1142, - "nodeType": "WhileStatement", - "src": "5600:190:5" - } - ] - }, - "documentation": "@dev Returns base 2 logarithm value of given x\n @param x x\n @return logarithmic value", - "id": 1144, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "floorLog2", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1071, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1070, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 1144, - "src": "5386:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1069, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5386:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5385:8:5" - }, - "returnParameters": { - "id": 1074, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1073, - "name": "lo", - "nodeType": "VariableDeclaration", - "scope": 1144, - "src": "5415:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1072, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "5415:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5414:8:5" - }, - "scope": 1458, - "src": "5367:429:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1190, - "nodeType": "Block", - "src": "5983:156:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1153, - "name": "nums", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6001:4:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - "id": 1154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6001:11:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1155, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6015:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6001:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1152, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "5993:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5993:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1158, - "nodeType": "ExpressionStatement", - "src": "5993:24:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1159, - "name": "maxNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "6027:6:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_minus_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const -578...(70 digits omitted)...9968" - }, - "id": 1163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1161, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "6036:2:5", - "subExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6037:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_2_by_1", - "typeString": "int_const -2" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "323535", - "id": 1162, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6042:3:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_255_by_1", - "typeString": "int_const 255" - }, - "value": "255" - }, - "src": "6036:9:5", - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const -578...(70 digits omitted)...9968" - } - }, - "src": "6027:18:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1165, - "nodeType": "ExpressionStatement", - "src": "6027:18:5" - }, - { - "body": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1177, - "name": "nums", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6098:4:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - "id": 1179, - "indexExpression": { - "argumentTypes": null, - "id": 1178, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1167, - "src": "6103:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6098:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 1180, - "name": "maxNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "6108:6:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "6098:16:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1188, - "nodeType": "IfStatement", - "src": "6094:38:5", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 1186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1182, - "name": "maxNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "6116:6:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1183, - "name": "nums", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6125:4:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - "id": 1185, - "indexExpression": { - "argumentTypes": null, - "id": 1184, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1167, - "src": "6130:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6125:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "6116:16:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1187, - "nodeType": "ExpressionStatement", - "src": "6116:16:5" - } - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1170, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1167, - "src": "6072:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1171, - "name": "nums", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6076:4:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - "id": 1172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6076:11:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6072:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1189, - "initializationExpression": { - "assignments": [ - 1167 - ], - "declarations": [ - { - "constant": false, - "id": 1167, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1189, - "src": "6060:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1166, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6060:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1169, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1168, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6069:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6060:10:5" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6089:3:5", - "subExpression": { - "argumentTypes": null, - "id": 1174, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1167, - "src": "6089:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1176, - "nodeType": "ExpressionStatement", - "src": "6089:3:5" - }, - "nodeType": "ForStatement", - "src": "6055:77:5" - } - ] - }, - "documentation": "@dev Returns maximum of an array\n @param nums Numbers to look through\n @return Maximum number", - "id": 1191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1148, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1147, - "name": "nums", - "nodeType": "VariableDeclaration", - "scope": 1191, - "src": "5931:17:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[]" - }, - "typeName": { - "baseType": { - "id": 1145, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "5931:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1146, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5931:5:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", - "typeString": "int256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5930:19:5" - }, - "returnParameters": { - "id": 1151, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1150, - "name": "maxNum", - "nodeType": "VariableDeclaration", - "scope": 1191, - "src": "5971:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1149, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "5971:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5970:12:5" - }, - "scope": 1458, - "src": "5918:221:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1206, - "nodeType": "Block", - "src": "6374:34:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1200, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1193, - "src": "6391:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1201, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1195, - "src": "6395:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6391:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1203, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1193, - "src": "6400:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6391:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1199, - "id": 1205, - "nodeType": "Return", - "src": "6384:17:5" - } - ] - }, - "documentation": "@dev Returns whether an add operation causes an overflow\n @param a First addend\n @param b Second addend\n @return Did no overflow occur?", - "id": 1207, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToAdd", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1193, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1207, - "src": "6329:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1192, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6329:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1195, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1207, - "src": "6337:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1194, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6337:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6328:16:5" - }, - "returnParameters": { - "id": 1199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1198, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1207, - "src": "6368:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1197, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6368:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6367:6:5" - }, - "scope": 1458, - "src": "6310:98:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1220, - "nodeType": "Block", - "src": "6644:30:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1216, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1209, - "src": "6661:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1217, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1211, - "src": "6666:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6661:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1215, - "id": 1219, - "nodeType": "Return", - "src": "6654:13:5" - } - ] - }, - "documentation": "@dev Returns whether a subtraction operation causes an underflow\n @param a Minuend\n @param b Subtrahend\n @return Did no underflow occur?", - "id": 1221, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToSub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1212, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1209, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1221, - "src": "6599:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1208, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6599:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1211, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1221, - "src": "6607:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1210, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6607:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6598:16:5" - }, - "returnParameters": { - "id": 1215, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1214, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1221, - "src": "6638:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1213, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6638:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6637:6:5" - }, - "scope": 1458, - "src": "6580:94:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1242, - "nodeType": "Block", - "src": "6913:48:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1230, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1225, - "src": "6930:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1231, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6935:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6930:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1233, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1223, - "src": "6940:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1234, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1225, - "src": "6944:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6940:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 1236, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1225, - "src": "6948:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6940:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1238, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1223, - "src": "6953:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6940:14:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6930:24:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1229, - "id": 1241, - "nodeType": "Return", - "src": "6923:31:5" - } - ] - }, - "documentation": "@dev Returns whether a multiply operation causes an overflow\n @param a First factor\n @param b Second factor\n @return Did no overflow occur?", - "id": 1243, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToMul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1226, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1223, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1243, - "src": "6868:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1222, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6868:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1225, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1243, - "src": "6876:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1224, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6876:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6867:16:5" - }, - "returnParameters": { - "id": 1229, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1228, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1243, - "src": "6907:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1227, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6907:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6906:6:5" - }, - "scope": 1458, - "src": "6849:112:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1263, - "nodeType": "Block", - "src": "7155:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1254, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1245, - "src": "7183:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1255, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1247, - "src": "7186:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1253, - "name": "safeToAdd", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1207, - 1338 - ], - "referencedDeclaration": 1207, - "src": "7173:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 1256, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7173:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1252, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "7165:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7165:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1258, - "nodeType": "ExpressionStatement", - "src": "7165:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1259, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1245, - "src": "7206:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1260, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1247, - "src": "7210:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7206:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1251, - "id": 1262, - "nodeType": "Return", - "src": "7199:12:5" - } - ] - }, - "documentation": "@dev Returns sum if no overflow occurred\n @param a First addend\n @param b Second addend\n @return Sum", - "id": 1264, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1248, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1245, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1264, - "src": "7110:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1244, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7110:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1247, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1264, - "src": "7118:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1246, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7118:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7109:16:5" - }, - "returnParameters": { - "id": 1251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1250, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1264, - "src": "7149:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1249, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7149:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7148:6:5" - }, - "scope": 1458, - "src": "7097:121:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1284, - "nodeType": "Block", - "src": "7418:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1275, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1266, - "src": "7446:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1276, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "7449:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1274, - "name": "safeToSub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1221, - 1370 - ], - "referencedDeclaration": 1221, - "src": "7436:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 1277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7436:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1273, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "7428:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7428:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1279, - "nodeType": "ExpressionStatement", - "src": "7428:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1280, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1266, - "src": "7469:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1281, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "7473:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7469:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1272, - "id": 1283, - "nodeType": "Return", - "src": "7462:12:5" - } - ] - }, - "documentation": "@dev Returns difference if no overflow occurred\n @param a Minuend\n @param b Subtrahend\n @return Difference", - "id": 1285, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1266, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1285, - "src": "7373:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1265, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7373:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1268, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1285, - "src": "7381:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1267, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7381:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7372:16:5" - }, - "returnParameters": { - "id": 1272, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1271, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1285, - "src": "7412:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1270, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7412:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7411:6:5" - }, - "scope": 1458, - "src": "7360:121:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1305, - "nodeType": "Block", - "src": "7683:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1296, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1287, - "src": "7711:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1297, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1289, - "src": "7714:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1295, - "name": "safeToMul", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1243, - 1394 - ], - "referencedDeclaration": 1243, - "src": "7701:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 1298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7701:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1294, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "7693:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7693:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1300, - "nodeType": "ExpressionStatement", - "src": "7693:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1301, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1287, - "src": "7734:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1302, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1289, - "src": "7738:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7734:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1293, - "id": 1304, - "nodeType": "Return", - "src": "7727:12:5" - } - ] - }, - "documentation": "@dev Returns product if no overflow occurred\n @param a First factor\n @param b Second factor\n @return Product", - "id": 1306, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1290, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1287, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7638:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1286, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7638:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1289, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7646:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1288, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7646:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7637:16:5" - }, - "returnParameters": { - "id": 1293, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1292, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7677:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1291, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7677:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7676:6:5" - }, - "scope": 1458, - "src": "7625:121:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1337, - "nodeType": "Block", - "src": "7979:70:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1315, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1310, - "src": "7997:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1316, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8002:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7997:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1318, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "8007:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1319, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1310, - "src": "8011:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8007:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1321, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "8016:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8007:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7997:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1324, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "7996:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1325, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1310, - "src": "8023:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8027:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8023:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1328, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "8032:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1329, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1310, - "src": "8036:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8032:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1331, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "8040:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8032:9:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8023:18:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1334, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "8022:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7996:46:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1314, - "id": 1336, - "nodeType": "Return", - "src": "7989:53:5" - } - ] - }, - "documentation": "@dev Returns whether an add operation causes an overflow\n @param a First addend\n @param b Second addend\n @return Did no overflow occur?", - "id": 1338, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToAdd", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1311, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1308, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1338, - "src": "7936:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1307, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "7936:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1310, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1338, - "src": "7943:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1309, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "7943:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7935:14:5" - }, - "returnParameters": { - "id": 1314, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1313, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1338, - "src": "7973:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1312, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7973:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7972:6:5" - }, - "scope": 1458, - "src": "7917:132:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1369, - "nodeType": "Block", - "src": "8283:70:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1342, - "src": "8301:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8306:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8301:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1350, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1340, - "src": "8311:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1351, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1342, - "src": "8315:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8311:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 1353, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1340, - "src": "8320:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8311:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8301:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1356, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "8300:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1357, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1342, - "src": "8327:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1358, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8331:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8327:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1340, - "src": "8336:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1342, - "src": "8340:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8336:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 1363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1340, - "src": "8344:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8336:9:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8327:18:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1366, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "8326:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8300:46:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1346, - "id": 1368, - "nodeType": "Return", - "src": "8293:53:5" - } - ] - }, - "documentation": "@dev Returns whether a subtraction operation causes an underflow\n @param a Minuend\n @param b Subtrahend\n @return Did no underflow occur?", - "id": 1370, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToSub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1343, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1340, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1370, - "src": "8240:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1339, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8240:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1342, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1370, - "src": "8247:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1341, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8247:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8239:14:5" - }, - "returnParameters": { - "id": 1346, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1345, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1370, - "src": "8277:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1344, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8277:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8276:6:5" - }, - "scope": 1458, - "src": "8221:132:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1393, - "nodeType": "Block", - "src": "8590:52:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1379, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1374, - "src": "8608:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8613:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8608:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1382, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "8607:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1383, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1372, - "src": "8620:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1384, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1374, - "src": "8624:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8620:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 1386, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1374, - "src": "8628:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8620:9:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1388, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1372, - "src": "8633:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8620:14:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1390, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "8619:16:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8607:28:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1378, - "id": 1392, - "nodeType": "Return", - "src": "8600:35:5" - } - ] - }, - "documentation": "@dev Returns whether a multiply operation causes an overflow\n @param a First factor\n @param b Second factor\n @return Did no overflow occur?", - "id": 1394, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToMul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1375, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1372, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1394, - "src": "8547:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1371, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8547:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1374, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1394, - "src": "8554:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1373, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8554:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8546:14:5" - }, - "returnParameters": { - "id": 1378, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1377, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1394, - "src": "8584:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1376, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8584:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8583:6:5" - }, - "scope": 1458, - "src": "8528:114:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1414, - "nodeType": "Block", - "src": "8833:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1405, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1396, - "src": "8861:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - { - "argumentTypes": null, - "id": 1406, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1398, - "src": "8864:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 1404, - "name": "safeToAdd", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1207, - 1338 - ], - "referencedDeclaration": 1338, - "src": "8851:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", - "typeString": "function (int256,int256) pure returns (bool)" - } - }, - "id": 1407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8851:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1403, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "8843:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8843:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1409, - "nodeType": "ExpressionStatement", - "src": "8843:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1410, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1396, - "src": "8884:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1411, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1398, - "src": "8888:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8884:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "functionReturnParameters": 1402, - "id": 1413, - "nodeType": "Return", - "src": "8877:12:5" - } - ] - }, - "documentation": "@dev Returns sum if no overflow occurred\n @param a First addend\n @param b Second addend\n @return Sum", - "id": 1415, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1399, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1396, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1415, - "src": "8791:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1395, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8791:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1398, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1415, - "src": "8798:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1397, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8798:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8790:14:5" - }, - "returnParameters": { - "id": 1402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1401, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1415, - "src": "8828:3:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1400, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8828:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8827:5:5" - }, - "scope": 1458, - "src": "8778:118:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1435, - "nodeType": "Block", - "src": "9093:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1426, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1417, - "src": "9121:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - { - "argumentTypes": null, - "id": 1427, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "9124:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 1425, - "name": "safeToSub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1221, - 1370 - ], - "referencedDeclaration": 1370, - "src": "9111:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", - "typeString": "function (int256,int256) pure returns (bool)" - } - }, - "id": 1428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9111:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1424, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "9103:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9103:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1430, - "nodeType": "ExpressionStatement", - "src": "9103:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1431, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1417, - "src": "9144:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1432, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "9148:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "9144:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "functionReturnParameters": 1423, - "id": 1434, - "nodeType": "Return", - "src": "9137:12:5" - } - ] - }, - "documentation": "@dev Returns difference if no overflow occurred\n @param a Minuend\n @param b Subtrahend\n @return Difference", - "id": 1436, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1420, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1417, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1436, - "src": "9051:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1416, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9051:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1419, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1436, - "src": "9058:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1418, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9058:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9050:14:5" - }, - "returnParameters": { - "id": 1423, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1422, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1436, - "src": "9088:3:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1421, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9088:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9087:5:5" - }, - "scope": 1458, - "src": "9038:118:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1456, - "nodeType": "Block", - "src": "9355:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1447, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1438, - "src": "9383:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - { - "argumentTypes": null, - "id": 1448, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1440, - "src": "9386:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 1446, - "name": "safeToMul", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1243, - 1394 - ], - "referencedDeclaration": 1394, - "src": "9373:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", - "typeString": "function (int256,int256) pure returns (bool)" - } - }, - "id": 1449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9373:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1445, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "9365:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9365:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1451, - "nodeType": "ExpressionStatement", - "src": "9365:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1452, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1438, - "src": "9406:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1453, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1440, - "src": "9410:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "9406:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "functionReturnParameters": 1444, - "id": 1455, - "nodeType": "Return", - "src": "9399:12:5" - } - ] - }, - "documentation": "@dev Returns product if no overflow occurred\n @param a First factor\n @param b Second factor\n @return Product", - "id": 1457, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1438, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1457, - "src": "9313:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1437, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9313:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1440, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1457, - "src": "9320:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1439, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9320:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9312:14:5" - }, - "returnParameters": { - "id": 1444, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1443, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1457, - "src": "9350:3:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1442, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9350:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9349:5:5" - }, - "scope": 1458, - "src": "9300:118:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1459, - "src": "200:9220:5" - } - ], - "src": "0:9421:5" - }, - "legacyAST": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", - "exportedSymbols": { - "GnosisMath": [ - 1458 - ] - }, - "id": 1459, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 331, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title Math library - Allows calculation of logarithmic and exponential functions\n @author Alan Lu - \n @author Stefan George - ", - "fullyImplemented": true, - "id": 1458, - "linearizedBaseContracts": [ - 1458 - ], - "name": "GnosisMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 334, - "name": "ONE", - "nodeType": "VariableDeclaration", - "scope": 1458, - "src": "304:46:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 332, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "304:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30783130303030303030303030303030303030", - "id": 333, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "331:19:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18446744073709551616_by_1", - "typeString": "int_const 18446744073709551616" - }, - "value": "0x10000000000000000" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 337, - "name": "LN2", - "nodeType": "VariableDeclaration", - "scope": 1458, - "src": "356:45:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 335, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "356:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "307862313732313766376431636637396163", - "id": 336, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "383:18:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_12786308645202655660_by_1", - "typeString": "int_const 12786308645202655660" - }, - "value": "0xb17217f7d1cf79ac" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 340, - "name": "LOG2_E", - "nodeType": "VariableDeclaration", - "scope": 1458, - "src": "407:49:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 338, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "407:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "30783137313534373635326238326665313737", - "id": 339, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "437:19:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_26613026195688644983_by_1", - "typeString": "int_const 26613026195688644983" - }, - "value": "0x171547652b82fe177" - }, - "visibility": "public" - }, - { - "body": { - "id": 712, - "nodeType": "Block", - "src": "657:2714:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 350, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 348, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "794:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "32343534393731323539383738393039383836363739", - "id": 349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "799:22:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2454971259878909886679_by_1", - "typeString": "int_const 2454971259878909886679" - }, - "value": "2454971259878909886679" - }, - "src": "794:27:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 347, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "786:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "786:36:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 352, - "nodeType": "ExpressionStatement", - "src": "786:36:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 353, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "946:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 355, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "950:22:5", - "subExpression": { - "argumentTypes": null, - "hexValue": "383138333233373533323932393639393632323237", - "id": 354, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "951:21:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_818323753292969962227_by_1", - "typeString": "int_const 818323753292969962227" - }, - "value": "818323753292969962227" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_818323753292969962227_by_1", - "typeString": "int_const -818323753292969962227" - } - }, - "src": "946:26:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 359, - "nodeType": "IfStatement", - "src": "942:40:5", - "trueBody": { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 357, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "981:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 346, - "id": 358, - "nodeType": "Return", - "src": "974:8:5" - } - }, - { - "expression": { - "argumentTypes": null, - "id": 370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 360, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1032:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 361, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1036:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 363, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1044:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 362, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1040:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1040:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1036:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 367, - "name": "LN2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 337, - "src": "1055:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1051:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 368, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1051:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1036:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1032:27:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 371, - "nodeType": "ExpressionStatement", - "src": "1032:27:5" - }, - { - "assignments": [ - 373 - ], - "declarations": [ - { - "constant": false, - "id": 373, - "name": "shift", - "nodeType": "VariableDeclaration", - "scope": 712, - "src": "1195:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 372, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "1195:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 374, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "1195:9:5" - }, - { - "assignments": [ - 376 - ], - "declarations": [ - { - "constant": false, - "id": 376, - "name": "z", - "nodeType": "VariableDeclaration", - "scope": 712, - "src": "1214:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 375, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1214:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 377, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "1214:6:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 380, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 378, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1234:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 379, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1239:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1234:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 423, - "nodeType": "Block", - "src": "1329:92:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 400, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "1343:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 401, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1351:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 403, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1359:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 402, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1355:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 404, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1355:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1351:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 406, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1366:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "1351:16:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1343:24:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 409, - "nodeType": "ExpressionStatement", - "src": "1343:24:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 410, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "1381:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 411, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1385:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1396:2:5", - "subExpression": { - "argumentTypes": null, - "id": 413, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1397:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 416, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1405:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 415, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1401:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 417, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1401:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1396:13:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 412, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1391:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1391:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1385:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1381:29:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 422, - "nodeType": "ExpressionStatement", - "src": "1381:29:5" - } - ] - }, - "id": 424, - "nodeType": "IfStatement", - "src": "1230:191:5", - "trueBody": { - "id": 399, - "nodeType": "Block", - "src": "1242:81:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 381, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "1256:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 382, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1264:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 384, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1272:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 383, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1268:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 385, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1268:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1264:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1256:20:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 388, - "nodeType": "ExpressionStatement", - "src": "1256:20:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 397, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 389, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "1290:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 391, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "1299:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 393, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1307:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 392, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1303:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 394, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1303:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "1299:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1294:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1294:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1290:22:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 398, - "nodeType": "ExpressionStatement", - "src": "1290:22:5" - } - ] - } - }, - { - "assignments": [ - 426 - ], - "declarations": [ - { - "constant": false, - "id": 426, - "name": "zpow", - "nodeType": "VariableDeclaration", - "scope": 712, - "src": "1956:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 425, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1956:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 428, - "initialValue": { - "argumentTypes": null, - "id": 427, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "1968:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1956:13:5" - }, - { - "assignments": [ - 430 - ], - "declarations": [ - { - "constant": false, - "id": 430, - "name": "result", - "nodeType": "VariableDeclaration", - "scope": 712, - "src": "1979:11:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 429, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1979:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 432, - "initialValue": { - "argumentTypes": null, - "id": 431, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "1993:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1979:17:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 439, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 433, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2006:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 438, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 436, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307862313732313766376431636637396162", - "id": 434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2016:18:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_12786308645202655659_by_1", - "typeString": "int_const 12786308645202655659" - }, - "value": "0xb17217f7d1cf79ab" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 435, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2037:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2016:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 437, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2044:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2016:31:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2006:41:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 440, - "nodeType": "ExpressionStatement", - "src": "2006:41:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 441, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2057:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 446, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 444, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 442, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2064:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 443, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2071:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2064:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 445, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2075:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2064:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2057:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 448, - "nodeType": "ExpressionStatement", - "src": "2057:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 455, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 449, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2088:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 452, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307833643766376266663035386231643530", - "id": 450, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2098:18:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_4431396893595737424_by_1", - "typeString": "int_const 4431396893595737424" - }, - "value": "0x3d7f7bff058b1d50" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 451, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2119:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2098:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 453, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2126:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2098:31:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2088:41:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 456, - "nodeType": "ExpressionStatement", - "src": "2088:41:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 457, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2139:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 462, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 458, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2146:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 459, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2153:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2146:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 461, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2157:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2146:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2139:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 464, - "nodeType": "ExpressionStatement", - "src": "2139:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 465, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2170:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078653335383436623832353035666335", - "id": 466, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2180:17:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1023870087579328453_by_1", - "typeString": "int_const 1023870087579328453" - }, - "value": "0xe35846b82505fc5" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 467, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2200:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2180:24:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 469, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2207:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2180:30:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2170:40:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 472, - "nodeType": "ExpressionStatement", - "src": "2170:40:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 479, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 473, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2220:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 474, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2227:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 475, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2234:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2227:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 477, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2238:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2227:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2220:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 480, - "nodeType": "ExpressionStatement", - "src": "2220:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 481, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2251:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 484, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078323736353536646637343963656535", - "id": 482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2261:17:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_177423166116318949_by_1", - "typeString": "int_const 177423166116318949" - }, - "value": "0x276556df749cee5" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 483, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2281:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2261:24:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 485, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2288:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2261:30:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2251:40:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 488, - "nodeType": "ExpressionStatement", - "src": "2251:40:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 489, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2301:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 490, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2308:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 491, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2315:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2308:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 493, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2319:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2308:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2301:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 496, - "nodeType": "ExpressionStatement", - "src": "2301:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 497, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2332:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 500, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "30783537363166663965323939636334", - "id": 498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2342:16:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24596073471909060_by_1", - "typeString": "int_const 24596073471909060" - }, - "value": "0x5761ff9e299cc4" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 499, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2361:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2342:23:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 501, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2368:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2342:29:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2332:39:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 504, - "nodeType": "ExpressionStatement", - "src": "2332:39:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 511, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 505, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2381:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 510, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 506, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2388:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 507, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2395:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2388:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 509, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2399:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2388:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2381:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 512, - "nodeType": "ExpressionStatement", - "src": "2381:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 519, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 513, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2412:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307861313834383937633336336333", - "id": 514, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2422:15:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2841449829983171_by_1", - "typeString": "int_const 2841449829983171" - }, - "value": "0xa184897c363c3" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 515, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2440:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2422:22:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 517, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2447:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2422:28:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2412:38:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 520, - "nodeType": "ExpressionStatement", - "src": "2412:38:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 521, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2460:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 522, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2467:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 523, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2474:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2467:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 525, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2478:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2467:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2460:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 528, - "nodeType": "ExpressionStatement", - "src": "2460:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 529, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2491:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078666665356665326334353836", - "id": 530, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2501:14:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_281363276907910_by_1", - "typeString": "int_const 281363276907910" - }, - "value": "0xffe5fe2c4586" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 531, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2518:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2501:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 533, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2525:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2501:27:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2491:37:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 536, - "nodeType": "ExpressionStatement", - "src": "2491:37:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 537, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2538:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 538, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2545:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 539, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2552:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2545:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 541, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2556:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2545:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2538:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 544, - "nodeType": "ExpressionStatement", - "src": "2538:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 551, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 545, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2569:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078313632633032323361356338", - "id": 546, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2579:14:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_24378270262728_by_1", - "typeString": "int_const 24378270262728" - }, - "value": "0x162c0223a5c8" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 547, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2596:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2579:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 549, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2603:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2579:27:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2569:37:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 552, - "nodeType": "ExpressionStatement", - "src": "2569:37:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 553, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2616:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 554, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2623:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 555, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2630:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2623:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 557, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2634:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2623:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2616:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 560, - "nodeType": "ExpressionStatement", - "src": "2616:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 561, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2647:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "30783162353235336433393565", - "id": 562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2657:13:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1877525477726_by_1", - "typeString": "int_const 1877525477726" - }, - "value": "0x1b5253d395e" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 563, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2673:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2657:20:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 565, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2680:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2657:26:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2647:36:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 568, - "nodeType": "ExpressionStatement", - "src": "2647:36:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 569, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2693:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 574, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 570, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2700:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 571, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2707:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2700:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 573, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2711:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2700:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2693:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 576, - "nodeType": "ExpressionStatement", - "src": "2693:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 577, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2724:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307831653463663531353862", - "id": 578, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2734:12:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_130140149131_by_1", - "typeString": "int_const 130140149131" - }, - "value": "0x1e4cf5158b" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 579, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2749:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2734:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 581, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2756:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2734:25:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2724:35:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 584, - "nodeType": "ExpressionStatement", - "src": "2724:35:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 585, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2769:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 586, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2776:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 587, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2783:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2776:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 589, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2787:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2776:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2769:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 592, - "nodeType": "ExpressionStatement", - "src": "2769:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 593, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2800:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078316538636163373335", - "id": 594, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2810:11:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_8200570677_by_1", - "typeString": "int_const 8200570677" - }, - "value": "0x1e8cac735" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 595, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2824:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2810:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 597, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2831:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2810:24:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2800:34:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 600, - "nodeType": "ExpressionStatement", - "src": "2800:34:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 607, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 601, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2844:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 602, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2851:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 603, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2858:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2851:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 605, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2862:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2851:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2844:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 608, - "nodeType": "ExpressionStatement", - "src": "2844:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 609, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2875:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "30783163336264363530", - "id": 610, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2885:10:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_473683536_by_1", - "typeString": "int_const 473683536" - }, - "value": "0x1c3bd650" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 611, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2898:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2885:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 613, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2905:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2885:23:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2875:33:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 616, - "nodeType": "ExpressionStatement", - "src": "2875:33:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 617, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2918:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 618, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2925:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 619, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "2932:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2925:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 621, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2936:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2925:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2918:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 624, - "nodeType": "ExpressionStatement", - "src": "2918:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 631, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 625, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "2949:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307831383136313933", - "id": 626, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2959:9:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_25256339_by_1", - "typeString": "int_const 25256339" - }, - "value": "0x1816193" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 627, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2971:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2959:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 629, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "2978:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2959:22:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2949:32:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 632, - "nodeType": "ExpressionStatement", - "src": "2949:32:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 639, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 633, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2991:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 638, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 634, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "2998:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 635, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "3005:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2998:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 637, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3009:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2998:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2991:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 640, - "nodeType": "ExpressionStatement", - "src": "2991:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 641, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3022:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078313331343936", - "id": 642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3032:8:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1250454_by_1", - "typeString": "int_const 1250454" - }, - "value": "0x131496" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 643, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3043:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3032:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 645, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3050:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3032:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3022:31:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 648, - "nodeType": "ExpressionStatement", - "src": "3022:31:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 649, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3063:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 652, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 650, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3070:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 651, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "3077:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3070:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 653, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3081:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3070:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3063:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 656, - "nodeType": "ExpressionStatement", - "src": "3063:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 657, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3094:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 662, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "307865316237", - "id": 658, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3104:6:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_57783_by_1", - "typeString": "int_const 57783" - }, - "value": "0xe1b7" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 659, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3113:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3104:13:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 661, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3120:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3104:19:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3094:29:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 664, - "nodeType": "ExpressionStatement", - "src": "3094:29:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 671, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 665, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3133:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 670, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 666, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3140:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 667, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "3147:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3140:8:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 669, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3151:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3140:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3133:21:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 672, - "nodeType": "ExpressionStatement", - "src": "3133:21:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 679, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 673, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3164:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3078396337", - "id": 674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3174:5:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2503_by_1", - "typeString": "int_const 2503" - }, - "value": "0x9c7" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 675, - "name": "zpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 426, - "src": "3182:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3174:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 677, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3189:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3174:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3164:28:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 680, - "nodeType": "ExpressionStatement", - "src": "3164:28:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 681, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "3206:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 682, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3215:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3206:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 709, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 705, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3346:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "3357:6:5", - "subExpression": { - "argumentTypes": null, - "id": 706, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "3358:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 708, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3356:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3346:18:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 346, - "id": 710, - "nodeType": "Return", - "src": "3339:25:5" - }, - "id": 711, - "nodeType": "IfStatement", - "src": "3202:162:5", - "trueBody": { - "id": 704, - "nodeType": "Block", - "src": "3218:115:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 684, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3236:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "323536", - "id": 685, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3247:3:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_256_by_1", - "typeString": "int_const 256" - }, - "value": "256" - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 686, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "3253:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3247:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 688, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3246:13:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3236:23:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 690, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3262:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3236:27:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 699, - "nodeType": "IfStatement", - "src": "3232:54:5", - "trueBody": { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9935" - }, - "id": 696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9936" - }, - "id": 694, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 692, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3273:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "323536", - "id": 693, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3278:3:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_256_by_1", - "typeString": "int_const 256" - }, - "value": "256" - }, - "src": "3273:8:5", - "typeDescriptions": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639936_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9936" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 695, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3284:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3273:12:5", - "typeDescriptions": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9935" - } - } - ], - "id": 697, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3272:14:5", - "typeDescriptions": { - "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129639935_by_1", - "typeString": "int_const 1157...(70 digits omitted)...9935" - } - }, - "functionReturnParameters": 346, - "id": 698, - "nodeType": "Return", - "src": "3265:21:5" - } - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 700, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 430, - "src": "3307:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "id": 701, - "name": "shift", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 373, - "src": "3317:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3307:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 346, - "id": 703, - "nodeType": "Return", - "src": "3300:22:5" - } - ] - } - } - ] - }, - "documentation": "@dev Returns natural exponential function value of given x\n @param x x\n @return e**x", - "id": 713, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "exp", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 343, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 342, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 713, - "src": "623:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 341, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "623:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "622:7:5" - }, - "returnParameters": { - "id": 346, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 345, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 713, - "src": "651:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 344, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "651:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "650:6:5" - }, - "scope": 1458, - "src": "610:2761:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1067, - "nodeType": "Block", - "src": "3520:1733:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 723, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 721, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "3538:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 722, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3542:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3538:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 720, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "3530:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 724, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3530:14:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 725, - "nodeType": "ExpressionStatement", - "src": "3530:14:5" - }, - { - "assignments": [ - 727 - ], - "declarations": [ - { - "constant": false, - "id": 727, - "name": "ilog2", - "nodeType": "VariableDeclaration", - "scope": 1067, - "src": "3598:9:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 726, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "3598:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 731, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 729, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "3620:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 728, - "name": "floorLog2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1144, - "src": "3610:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_int256_$", - "typeString": "function (uint256) pure returns (int256)" - } - }, - "id": 730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3610:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3598:24:5" - }, - { - "assignments": [ - 733 - ], - "declarations": [ - { - "constant": false, - "id": 733, - "name": "z", - "nodeType": "VariableDeclaration", - "scope": 1067, - "src": "3632:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 732, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "3632:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 734, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "3632:5:5" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 735, - "name": "ilog2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 727, - "src": "3651:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 736, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3659:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3651:9:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 749, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 733, - "src": "3703:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 751, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "3711:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 753, - "name": "ilog2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 727, - "src": "3721:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 752, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3716:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 754, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3716:11:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3711:16:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 750, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3707:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 756, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3707:21:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3703:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 758, - "nodeType": "ExpressionStatement", - "src": "3703:25:5" - }, - "id": 759, - "nodeType": "IfStatement", - "src": "3647:81:5", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 738, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 733, - "src": "3662:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 740, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 715, - "src": "3670:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "3680:6:5", - "subExpression": { - "argumentTypes": null, - "id": 742, - "name": "ilog2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 727, - "src": "3681:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 741, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3675:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3675:12:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3670:17:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 739, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3666:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3666:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3662:26:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 748, - "nodeType": "ExpressionStatement", - "src": "3662:26:5" - } - }, - { - "assignments": [ - 761 - ], - "declarations": [ - { - "constant": false, - "id": 761, - "name": "term", - "nodeType": "VariableDeclaration", - "scope": 1067, - "src": "3942:8:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 760, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "3942:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 779, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 778, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 762, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 733, - "src": "3954:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 764, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3962:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 763, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3958:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 765, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3958:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3954:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 767, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3953:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 769, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3974:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3970:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 770, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3970:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3953:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 776, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 772, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 733, - "src": "3982:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 774, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "3990:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 773, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3986:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 775, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3986:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3982:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 777, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3981:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "3953:42:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3942:53:5" - }, - { - "assignments": [ - 781 - ], - "declarations": [ - { - "constant": false, - "id": 781, - "name": "halflnz", - "nodeType": "VariableDeclaration", - "scope": 1067, - "src": "4005:11:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 780, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "4005:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 783, - "initialValue": { - "argumentTypes": null, - "id": 782, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4019:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4005:18:5" - }, - { - "assignments": [ - 785 - ], - "declarations": [ - { - "constant": false, - "id": 785, - "name": "termpow", - "nodeType": "VariableDeclaration", - "scope": 1067, - "src": "4033:11:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 784, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "4033:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 799, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 794, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 786, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4047:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 787, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4054:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4047:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 790, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4065:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 789, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4061:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4061:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4047:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 793, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4072:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4047:29:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 796, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4083:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 795, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4079:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 797, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4079:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4047:40:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4033:54:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 800, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4097:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 801, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4108:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "33", - "id": 802, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4118:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "src": "4108:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4097:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 805, - "nodeType": "ExpressionStatement", - "src": "4097:22:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 806, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4129:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 819, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 815, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 813, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 807, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4139:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 808, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4149:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4139:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 811, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4160:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 810, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4156:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 812, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4156:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4139:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 814, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4167:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4139:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 817, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4178:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 816, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4174:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 818, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4174:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4139:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4129:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 821, - "nodeType": "ExpressionStatement", - "src": "4129:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 822, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4192:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 823, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4203:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "35", - "id": 824, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4213:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "src": "4203:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4192:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 827, - "nodeType": "ExpressionStatement", - "src": "4192:22:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 842, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 828, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4224:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 835, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 829, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4234:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 830, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4244:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4234:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 833, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4255:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 832, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4251:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 834, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4251:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4234:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 836, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4262:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4234:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 839, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4273:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 838, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4269:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 840, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4269:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4234:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4224:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 843, - "nodeType": "ExpressionStatement", - "src": "4224:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 844, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4287:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 845, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4298:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "37", - "id": 846, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4308:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_7_by_1", - "typeString": "int_const 7" - }, - "value": "7" - }, - "src": "4298:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4287:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 849, - "nodeType": "ExpressionStatement", - "src": "4287:22:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 850, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4319:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 857, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 851, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4329:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 852, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4339:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4329:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 855, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4350:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 854, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4346:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 856, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4346:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4329:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 858, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4357:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4329:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 861, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4368:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 860, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4364:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 862, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4364:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4329:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4319:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 865, - "nodeType": "ExpressionStatement", - "src": "4319:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 870, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 866, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4382:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 867, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4393:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "39", - "id": 868, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4403:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_9_by_1", - "typeString": "int_const 9" - }, - "value": "9" - }, - "src": "4393:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4382:22:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 871, - "nodeType": "ExpressionStatement", - "src": "4382:22:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 872, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4414:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 885, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 873, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4424:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 874, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4434:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4424:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 877, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4445:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 876, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4441:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4441:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4424:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 880, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4452:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4424:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 883, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4463:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4459:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 884, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4459:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4424:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4414:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 887, - "nodeType": "ExpressionStatement", - "src": "4414:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 892, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 888, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4477:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 889, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4488:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3131", - "id": 890, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4498:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_11_by_1", - "typeString": "int_const 11" - }, - "value": "11" - }, - "src": "4488:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4477:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 893, - "nodeType": "ExpressionStatement", - "src": "4477:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 894, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4510:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 903, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 895, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4520:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 896, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4530:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4520:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 899, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4541:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 898, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4537:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 900, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4537:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4520:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 902, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4548:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4520:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 905, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4559:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 904, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4555:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 906, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4555:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4520:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4510:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 909, - "nodeType": "ExpressionStatement", - "src": "4510:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 914, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 910, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4573:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 911, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4584:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3133", - "id": 912, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4594:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_13_by_1", - "typeString": "int_const 13" - }, - "value": "13" - }, - "src": "4584:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4573:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 915, - "nodeType": "ExpressionStatement", - "src": "4573:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 930, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 916, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4606:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 923, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 917, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4616:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 918, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4626:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4616:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 921, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4637:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 920, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4633:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 922, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4633:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4616:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 924, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4644:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4616:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 927, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4655:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 926, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4651:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 928, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4651:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4616:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4606:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 931, - "nodeType": "ExpressionStatement", - "src": "4606:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 932, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4669:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 933, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4680:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3135", - "id": 934, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4690:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_15_by_1", - "typeString": "int_const 15" - }, - "value": "15" - }, - "src": "4680:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4669:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 937, - "nodeType": "ExpressionStatement", - "src": "4669:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 938, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4702:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 939, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4712:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 940, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4722:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4712:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 943, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4733:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 942, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4729:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 944, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4729:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4712:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 946, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4740:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4712:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 949, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4751:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4747:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 950, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4747:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4712:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4702:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 953, - "nodeType": "ExpressionStatement", - "src": "4702:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 954, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4765:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 955, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4776:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3137", - "id": 956, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4786:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_17_by_1", - "typeString": "int_const 17" - }, - "value": "17" - }, - "src": "4776:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4765:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 959, - "nodeType": "ExpressionStatement", - "src": "4765:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 974, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 960, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4798:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 973, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 961, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4808:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 962, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4818:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4808:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 965, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4829:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4825:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 966, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4825:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4808:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 968, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4836:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4808:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 971, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4847:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 970, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4843:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 972, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4843:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4808:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4798:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 975, - "nodeType": "ExpressionStatement", - "src": "4798:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 976, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4861:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 979, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 977, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4872:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3139", - "id": 978, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4882:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_19_by_1", - "typeString": "int_const 19" - }, - "value": "19" - }, - "src": "4872:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4861:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 981, - "nodeType": "ExpressionStatement", - "src": "4861:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 982, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4894:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 991, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 983, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4904:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 984, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4914:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4904:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 987, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4925:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 986, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4921:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 988, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4921:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4904:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 990, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "4932:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4904:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 993, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "4943:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 992, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4939:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 994, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4939:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4904:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4894:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 997, - "nodeType": "ExpressionStatement", - "src": "4894:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 998, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "4957:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 999, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4968:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3231", - "id": 1000, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4978:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_21_by_1", - "typeString": "int_const 21" - }, - "value": "21" - }, - "src": "4968:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4957:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1003, - "nodeType": "ExpressionStatement", - "src": "4957:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1004, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "4990:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1013, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1007, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1005, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "5000:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1006, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "5010:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5000:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1009, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5021:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1008, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5017:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1010, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5017:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5000:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1012, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "5028:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5000:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1015, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5039:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1014, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5035:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1016, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5035:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5000:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "4990:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1019, - "nodeType": "ExpressionStatement", - "src": "4990:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1024, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1020, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "5053:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1021, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "5064:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3233", - "id": 1022, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5074:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_23_by_1", - "typeString": "int_const 23" - }, - "value": "23" - }, - "src": "5064:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5053:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1025, - "nodeType": "ExpressionStatement", - "src": "5053:23:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1026, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "5086:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1039, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1035, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1027, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "5096:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1028, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "5106:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5096:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1031, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5117:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5113:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1032, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5113:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5096:25:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1034, - "name": "term", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "5124:4:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5096:32:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1037, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5135:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1036, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5131:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1038, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5131:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5096:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5086:53:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1041, - "nodeType": "ExpressionStatement", - "src": "5086:53:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1042, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "5149:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1045, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1043, - "name": "termpow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 785, - "src": "5160:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3235", - "id": 1044, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5170:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_25_by_1", - "typeString": "int_const 25" - }, - "value": "25" - }, - "src": "5160:12:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5149:23:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1047, - "nodeType": "ExpressionStatement", - "src": "5149:23:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1065, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1048, - "name": "ilog2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 727, - "src": "5190:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1050, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5202:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1049, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5198:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1051, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5198:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5190:16:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 1053, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5189:18:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1055, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5214:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1054, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5210:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1056, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5210:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5189:29:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1059, - "name": "LOG2_E", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 340, - "src": "5225:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1058, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5221:3:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int256_$", - "typeString": "type(int256)" - }, - "typeName": "int" - }, - "id": 1060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5221:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5189:43:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1064, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1062, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5235:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1063, - "name": "halflnz", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "5239:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5235:11:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5189:57:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "functionReturnParameters": 719, - "id": 1066, - "nodeType": "Return", - "src": "5182:64:5" - } - ] - }, - "documentation": "@dev Returns natural logarithm value of given x\n @param x x\n @return ln(x)", - "id": 1068, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "ln", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 716, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 715, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 1068, - "src": "3486:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 714, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3486:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3485:8:5" - }, - "returnParameters": { - "id": 719, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 718, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1068, - "src": "3515:3:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 717, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "3515:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3514:5:5" - }, - "scope": 1458, - "src": "3474:1779:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1143, - "nodeType": "Block", - "src": "5423:373:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1075, - "name": "lo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1073, - "src": "5433:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1077, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "5438:3:5", - "subExpression": { - "argumentTypes": null, - "hexValue": "3634", - "id": 1076, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5439:2:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_64_by_1", - "typeString": "int_const 64" - }, - "value": "64" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_64_by_1", - "typeString": "int_const -64" - } - }, - "src": "5433:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1079, - "nodeType": "ExpressionStatement", - "src": "5433:8:5" - }, - { - "assignments": [ - 1081 - ], - "declarations": [ - { - "constant": false, - "id": 1081, - "name": "hi", - "nodeType": "VariableDeclaration", - "scope": 1143, - "src": "5451:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1080, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "5451:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1083, - "initialValue": { - "argumentTypes": null, - "hexValue": "313933", - "id": 1082, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5460:3:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_193_by_1", - "typeString": "int_const 193" - }, - "value": "193" - }, - "nodeType": "VariableDeclarationStatement", - "src": "5451:12:5" - }, - { - "assignments": [ - 1085 - ], - "declarations": [ - { - "constant": false, - "id": 1085, - "name": "mid", - "nodeType": "VariableDeclaration", - "scope": 1143, - "src": "5566:7:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1084, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "5566:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1092, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1088, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1086, - "name": "hi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1081, - "src": "5577:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1087, - "name": "lo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1073, - "src": "5582:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5577:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 1089, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5576:9:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 1090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5589:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5576:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5566:24:5" - }, - { - "body": { - "id": 1141, - "nodeType": "Block", - "src": "5622:168:5", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1099, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5640:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1100, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5646:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5640:7:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1102, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1070, - "src": "5651:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "5661:4:5", - "subExpression": { - "argumentTypes": null, - "id": 1104, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5662:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 1103, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5656:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 1106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5656:10:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5651:15:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1108, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5669:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5651:21:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5640:32:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1111, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5676:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1112, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5683:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5676:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1120, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1114, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1070, - "src": "5688:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1116, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5698:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 1115, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5693:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 1117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5693:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5688:14:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1119, - "name": "ONE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 334, - "src": "5705:3:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5688:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5676:32:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "5640:68:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "expression": { - "argumentTypes": null, - "id": 1129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1127, - "name": "lo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1073, - "src": "5737:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1128, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5742:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5737:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1130, - "nodeType": "ExpressionStatement", - "src": "5737:8:5" - }, - "id": 1131, - "nodeType": "IfStatement", - "src": "5636:109:5", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 1125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1123, - "name": "hi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1081, - "src": "5710:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1124, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5715:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5710:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1126, - "nodeType": "ExpressionStatement", - "src": "5710:8:5" - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1132, - "name": "mid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5759:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1135, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1133, - "name": "hi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1081, - "src": "5766:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1134, - "name": "lo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1073, - "src": "5771:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5766:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 1136, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5765:9:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 1137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5778:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5765:14:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5759:20:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1140, - "nodeType": "ExpressionStatement", - "src": "5759:20:5" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1095, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1093, - "name": "lo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1073, - "src": "5608:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 1094, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5613:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5608:6:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "id": 1096, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5607:8:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1097, - "name": "hi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1081, - "src": "5618:2:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "5607:13:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1142, - "nodeType": "WhileStatement", - "src": "5600:190:5" - } - ] - }, - "documentation": "@dev Returns base 2 logarithm value of given x\n @param x x\n @return logarithmic value", - "id": 1144, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "floorLog2", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1071, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1070, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 1144, - "src": "5386:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1069, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5386:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5385:8:5" - }, - "returnParameters": { - "id": 1074, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1073, - "name": "lo", - "nodeType": "VariableDeclaration", - "scope": 1144, - "src": "5415:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1072, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "5415:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5414:8:5" - }, - "scope": 1458, - "src": "5367:429:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1190, - "nodeType": "Block", - "src": "5983:156:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1153, - "name": "nums", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6001:4:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - "id": 1154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6001:11:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1155, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6015:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6001:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1152, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "5993:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5993:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1158, - "nodeType": "ExpressionStatement", - "src": "5993:24:5" - }, - { - "expression": { - "argumentTypes": null, - "id": 1164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1159, - "name": "maxNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "6027:6:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_minus_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const -578...(70 digits omitted)...9968" - }, - "id": 1163, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1161, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "6036:2:5", - "subExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6037:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_2_by_1", - "typeString": "int_const -2" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "323535", - "id": 1162, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6042:3:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_255_by_1", - "typeString": "int_const 255" - }, - "value": "255" - }, - "src": "6036:9:5", - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const -578...(70 digits omitted)...9968" - } - }, - "src": "6027:18:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1165, - "nodeType": "ExpressionStatement", - "src": "6027:18:5" - }, - { - "body": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1177, - "name": "nums", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6098:4:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - "id": 1179, - "indexExpression": { - "argumentTypes": null, - "id": 1178, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1167, - "src": "6103:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6098:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 1180, - "name": "maxNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "6108:6:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "6098:16:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1188, - "nodeType": "IfStatement", - "src": "6094:38:5", - "trueBody": { - "expression": { - "argumentTypes": null, - "id": 1186, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1182, - "name": "maxNum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1150, - "src": "6116:6:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1183, - "name": "nums", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6125:4:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - "id": 1185, - "indexExpression": { - "argumentTypes": null, - "id": 1184, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1167, - "src": "6130:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6125:7:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "6116:16:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1187, - "nodeType": "ExpressionStatement", - "src": "6116:16:5" - } - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1170, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1167, - "src": "6072:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1171, - "name": "nums", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6076:4:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[] memory" - } - }, - "id": 1172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6076:11:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6072:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1189, - "initializationExpression": { - "assignments": [ - 1167 - ], - "declarations": [ - { - "constant": false, - "id": 1167, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1189, - "src": "6060:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1166, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6060:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1169, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1168, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6069:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6060:10:5" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6089:3:5", - "subExpression": { - "argumentTypes": null, - "id": 1174, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1167, - "src": "6089:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1176, - "nodeType": "ExpressionStatement", - "src": "6089:3:5" - }, - "nodeType": "ForStatement", - "src": "6055:77:5" - } - ] - }, - "documentation": "@dev Returns maximum of an array\n @param nums Numbers to look through\n @return Maximum number", - "id": 1191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "max", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1148, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1147, - "name": "nums", - "nodeType": "VariableDeclaration", - "scope": 1191, - "src": "5931:17:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr", - "typeString": "int256[]" - }, - "typeName": { - "baseType": { - "id": 1145, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "5931:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "id": 1146, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5931:5:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr", - "typeString": "int256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5930:19:5" - }, - "returnParameters": { - "id": 1151, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1150, - "name": "maxNum", - "nodeType": "VariableDeclaration", - "scope": 1191, - "src": "5971:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1149, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "5971:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5970:12:5" - }, - "scope": 1458, - "src": "5918:221:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1206, - "nodeType": "Block", - "src": "6374:34:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1200, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1193, - "src": "6391:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1201, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1195, - "src": "6395:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6391:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1203, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1193, - "src": "6400:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6391:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1199, - "id": 1205, - "nodeType": "Return", - "src": "6384:17:5" - } - ] - }, - "documentation": "@dev Returns whether an add operation causes an overflow\n @param a First addend\n @param b Second addend\n @return Did no overflow occur?", - "id": 1207, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToAdd", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1193, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1207, - "src": "6329:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1192, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6329:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1195, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1207, - "src": "6337:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1194, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6337:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6328:16:5" - }, - "returnParameters": { - "id": 1199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1198, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1207, - "src": "6368:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1197, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6368:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6367:6:5" - }, - "scope": 1458, - "src": "6310:98:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1220, - "nodeType": "Block", - "src": "6644:30:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1216, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1209, - "src": "6661:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1217, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1211, - "src": "6666:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6661:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1215, - "id": 1219, - "nodeType": "Return", - "src": "6654:13:5" - } - ] - }, - "documentation": "@dev Returns whether a subtraction operation causes an underflow\n @param a Minuend\n @param b Subtrahend\n @return Did no underflow occur?", - "id": 1221, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToSub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1212, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1209, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1221, - "src": "6599:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1208, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6599:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1211, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1221, - "src": "6607:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1210, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6607:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6598:16:5" - }, - "returnParameters": { - "id": 1215, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1214, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1221, - "src": "6638:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1213, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6638:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6637:6:5" - }, - "scope": 1458, - "src": "6580:94:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1242, - "nodeType": "Block", - "src": "6913:48:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1230, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1225, - "src": "6930:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1231, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6935:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6930:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1233, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1223, - "src": "6940:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1234, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1225, - "src": "6944:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6940:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 1236, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1225, - "src": "6948:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6940:9:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1238, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1223, - "src": "6953:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6940:14:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "6930:24:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1229, - "id": 1241, - "nodeType": "Return", - "src": "6923:31:5" - } - ] - }, - "documentation": "@dev Returns whether a multiply operation causes an overflow\n @param a First factor\n @param b Second factor\n @return Did no overflow occur?", - "id": 1243, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToMul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1226, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1223, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1243, - "src": "6868:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1222, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6868:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1225, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1243, - "src": "6876:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1224, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6876:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6867:16:5" - }, - "returnParameters": { - "id": 1229, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1228, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1243, - "src": "6907:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1227, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "6907:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6906:6:5" - }, - "scope": 1458, - "src": "6849:112:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1263, - "nodeType": "Block", - "src": "7155:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1254, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1245, - "src": "7183:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1255, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1247, - "src": "7186:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1253, - "name": "safeToAdd", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1207, - 1338 - ], - "referencedDeclaration": 1207, - "src": "7173:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 1256, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7173:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1252, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "7165:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7165:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1258, - "nodeType": "ExpressionStatement", - "src": "7165:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1259, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1245, - "src": "7206:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1260, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1247, - "src": "7210:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7206:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1251, - "id": 1262, - "nodeType": "Return", - "src": "7199:12:5" - } - ] - }, - "documentation": "@dev Returns sum if no overflow occurred\n @param a First addend\n @param b Second addend\n @return Sum", - "id": 1264, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1248, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1245, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1264, - "src": "7110:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1244, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7110:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1247, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1264, - "src": "7118:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1246, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7118:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7109:16:5" - }, - "returnParameters": { - "id": 1251, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1250, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1264, - "src": "7149:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1249, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7149:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7148:6:5" - }, - "scope": 1458, - "src": "7097:121:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1284, - "nodeType": "Block", - "src": "7418:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1275, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1266, - "src": "7446:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1276, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "7449:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1274, - "name": "safeToSub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1221, - 1370 - ], - "referencedDeclaration": 1221, - "src": "7436:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 1277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7436:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1273, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "7428:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7428:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1279, - "nodeType": "ExpressionStatement", - "src": "7428:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1280, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1266, - "src": "7469:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1281, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "7473:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7469:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1272, - "id": 1283, - "nodeType": "Return", - "src": "7462:12:5" - } - ] - }, - "documentation": "@dev Returns difference if no overflow occurred\n @param a Minuend\n @param b Subtrahend\n @return Difference", - "id": 1285, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1266, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1285, - "src": "7373:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1265, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7373:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1268, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1285, - "src": "7381:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1267, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7381:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7372:16:5" - }, - "returnParameters": { - "id": 1272, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1271, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1285, - "src": "7412:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1270, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7412:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7411:6:5" - }, - "scope": 1458, - "src": "7360:121:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1305, - "nodeType": "Block", - "src": "7683:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1296, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1287, - "src": "7711:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1297, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1289, - "src": "7714:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1295, - "name": "safeToMul", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1243, - 1394 - ], - "referencedDeclaration": 1243, - "src": "7701:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 1298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7701:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1294, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "7693:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7693:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1300, - "nodeType": "ExpressionStatement", - "src": "7693:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1301, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1287, - "src": "7734:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1302, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1289, - "src": "7738:1:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7734:5:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1293, - "id": 1304, - "nodeType": "Return", - "src": "7727:12:5" - } - ] - }, - "documentation": "@dev Returns product if no overflow occurred\n @param a First factor\n @param b Second factor\n @return Product", - "id": 1306, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1290, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1287, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7638:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1286, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7638:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1289, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7646:6:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1288, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7646:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7637:16:5" - }, - "returnParameters": { - "id": 1293, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1292, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7677:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1291, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7677:4:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7676:6:5" - }, - "scope": 1458, - "src": "7625:121:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1337, - "nodeType": "Block", - "src": "7979:70:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1323, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1315, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1310, - "src": "7997:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1316, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8002:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7997:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1320, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1318, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "8007:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1319, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1310, - "src": "8011:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8007:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 1321, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "8016:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8007:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7997:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1324, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "7996:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1325, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1310, - "src": "8023:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8027:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8023:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1332, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1328, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "8032:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1329, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1310, - "src": "8036:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8032:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1331, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "8040:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8032:9:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8023:18:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1334, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "8022:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7996:46:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1314, - "id": 1336, - "nodeType": "Return", - "src": "7989:53:5" - } - ] - }, - "documentation": "@dev Returns whether an add operation causes an overflow\n @param a First addend\n @param b Second addend\n @return Did no overflow occur?", - "id": 1338, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToAdd", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1311, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1308, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1338, - "src": "7936:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1307, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "7936:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1310, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1338, - "src": "7943:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1309, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "7943:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7935:14:5" - }, - "returnParameters": { - "id": 1314, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1313, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1338, - "src": "7973:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1312, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7973:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7972:6:5" - }, - "scope": 1458, - "src": "7917:132:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1369, - "nodeType": "Block", - "src": "8283:70:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1347, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1342, - "src": "8301:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8306:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8301:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1354, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1350, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1340, - "src": "8311:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1351, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1342, - "src": "8315:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8311:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 1353, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1340, - "src": "8320:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8311:10:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8301:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1356, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "8300:22:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1357, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1342, - "src": "8327:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1358, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8331:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8327:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1364, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1360, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1340, - "src": "8336:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1361, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1342, - "src": "8340:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8336:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 1363, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1340, - "src": "8344:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8336:9:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8327:18:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1366, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "8326:20:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8300:46:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1346, - "id": 1368, - "nodeType": "Return", - "src": "8293:53:5" - } - ] - }, - "documentation": "@dev Returns whether a subtraction operation causes an underflow\n @param a Minuend\n @param b Subtrahend\n @return Did no underflow occur?", - "id": 1370, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToSub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1343, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1340, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1370, - "src": "8240:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1339, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8240:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1342, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1370, - "src": "8247:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1341, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8247:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8239:14:5" - }, - "returnParameters": { - "id": 1346, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1345, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1370, - "src": "8277:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1344, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8277:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8276:6:5" - }, - "scope": 1458, - "src": "8221:132:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1393, - "nodeType": "Block", - "src": "8590:52:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 1391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1379, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1374, - "src": "8608:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8613:1:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8608:6:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1382, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "8607:8:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1383, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1372, - "src": "8620:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1384, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1374, - "src": "8624:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8620:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 1386, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1374, - "src": "8628:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8620:9:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1388, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1372, - "src": "8633:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8620:14:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 1390, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "8619:16:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8607:28:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1378, - "id": 1392, - "nodeType": "Return", - "src": "8600:35:5" - } - ] - }, - "documentation": "@dev Returns whether a multiply operation causes an overflow\n @param a First factor\n @param b Second factor\n @return Did no overflow occur?", - "id": 1394, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "safeToMul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1375, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1372, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1394, - "src": "8547:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1371, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8547:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1374, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1394, - "src": "8554:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1373, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8554:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8546:14:5" - }, - "returnParameters": { - "id": 1378, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1377, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1394, - "src": "8584:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1376, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8584:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8583:6:5" - }, - "scope": 1458, - "src": "8528:114:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1414, - "nodeType": "Block", - "src": "8833:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1405, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1396, - "src": "8861:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - { - "argumentTypes": null, - "id": 1406, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1398, - "src": "8864:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 1404, - "name": "safeToAdd", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1207, - 1338 - ], - "referencedDeclaration": 1338, - "src": "8851:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", - "typeString": "function (int256,int256) pure returns (bool)" - } - }, - "id": 1407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8851:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1403, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "8843:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8843:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1409, - "nodeType": "ExpressionStatement", - "src": "8843:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1410, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1396, - "src": "8884:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 1411, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1398, - "src": "8888:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "8884:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "functionReturnParameters": 1402, - "id": 1413, - "nodeType": "Return", - "src": "8877:12:5" - } - ] - }, - "documentation": "@dev Returns sum if no overflow occurred\n @param a First addend\n @param b Second addend\n @return Sum", - "id": 1415, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1399, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1396, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1415, - "src": "8791:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1395, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8791:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1398, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1415, - "src": "8798:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1397, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8798:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8790:14:5" - }, - "returnParameters": { - "id": 1402, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1401, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1415, - "src": "8828:3:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1400, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "8828:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8827:5:5" - }, - "scope": 1458, - "src": "8778:118:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1435, - "nodeType": "Block", - "src": "9093:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1426, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1417, - "src": "9121:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - { - "argumentTypes": null, - "id": 1427, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "9124:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 1425, - "name": "safeToSub", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1221, - 1370 - ], - "referencedDeclaration": 1370, - "src": "9111:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", - "typeString": "function (int256,int256) pure returns (bool)" - } - }, - "id": 1428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9111:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1424, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "9103:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9103:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1430, - "nodeType": "ExpressionStatement", - "src": "9103:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1431, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1417, - "src": "9144:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 1432, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "9148:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "9144:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "functionReturnParameters": 1423, - "id": 1434, - "nodeType": "Return", - "src": "9137:12:5" - } - ] - }, - "documentation": "@dev Returns difference if no overflow occurred\n @param a Minuend\n @param b Subtrahend\n @return Difference", - "id": 1436, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1420, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1417, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1436, - "src": "9051:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1416, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9051:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1419, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1436, - "src": "9058:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1418, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9058:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9050:14:5" - }, - "returnParameters": { - "id": 1423, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1422, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1436, - "src": "9088:3:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1421, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9088:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9087:5:5" - }, - "scope": 1458, - "src": "9038:118:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1456, - "nodeType": "Block", - "src": "9355:63:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1447, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1438, - "src": "9383:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - { - "argumentTypes": null, - "id": 1448, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1440, - "src": "9386:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - ], - "id": 1446, - "name": "safeToMul", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1243, - 1394 - ], - "referencedDeclaration": 1394, - "src": "9373:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_bool_$", - "typeString": "function (int256,int256) pure returns (bool)" - } - }, - "id": 1449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9373:15:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 1445, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1581, - "src": "9365:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 1450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9365:24:5", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1451, - "nodeType": "ExpressionStatement", - "src": "9365:24:5" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 1454, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1452, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1438, - "src": "9406:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 1453, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1440, - "src": "9410:1:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "9406:5:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "functionReturnParameters": 1444, - "id": 1455, - "nodeType": "Return", - "src": "9399:12:5" - } - ] - }, - "documentation": "@dev Returns product if no overflow occurred\n @param a First factor\n @param b Second factor\n @return Product", - "id": 1457, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1438, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 1457, - "src": "9313:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1437, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9313:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1440, - "name": "b", - "nodeType": "VariableDeclaration", - "scope": 1457, - "src": "9320:5:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1439, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9320:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9312:14:5" - }, - "returnParameters": { - "id": 1444, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1443, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1457, - "src": "9350:3:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 1442, - "name": "int", - "nodeType": "ElementaryTypeName", - "src": "9350:3:5", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9349:5:5" - }, - "scope": 1458, - "src": "9300:118:5", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 1459, - "src": "200:9220:5" - } - ], - "src": "0:9421:5" - }, - "compiler": { - "name": "solc", - "version": "0.5.8+commit.23d335f2.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.0.10", - "updatedAt": "2019-06-03T08:59:02.114Z", - "devdoc": { - "author": "Alan Lu - Stefan George - ", - "methods": { - "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)" - }, - "max(int256[])": { - "details": "Returns maximum of an array", - "params": { - "nums": "Numbers to look through" - }, - "return": "Maximum number" - } - }, - "title": "Math library - Allows calculation of logarithmic and exponential functions" - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/GnosisStandardToken.json b/build/contracts/GnosisStandardToken.json deleted file mode 100644 index e5331808..00000000 --- a/build/contracts/GnosisStandardToken.json +++ /dev/null @@ -1,5638 +0,0 @@ -{ - "contractName": "GnosisStandardToken", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "from", - "type": "address" - }, - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns number of allowed tokens for given address\",\"params\":{\"owner\":\"Address of token owner\",\"spender\":\"Address of token spender\"},\"return\":\"Remaining allowance for spender\"},\"approve(address,uint256)\":{\"details\":\"Sets approved amount of tokens for spender. Returns success\",\"params\":{\"spender\":\"Address of allowed account\",\"value\":\"Number of approved tokens\"},\"return\":\"Was approval successful?\"},\"balanceOf(address)\":{\"details\":\"Returns number of tokens owned by given address\",\"params\":{\"owner\":\"Address of token owner\"},\"return\":\"Balance of owner\"},\"totalSupply()\":{\"details\":\"Returns total supply of tokens\",\"return\":\"Total supply\"},\"transfer(address,uint256)\":{\"details\":\"Transfers sender's tokens to a given address. Returns success\",\"params\":{\"to\":\"Address of token receiver\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Allows allowed third party to transfer tokens from one address to another. Returns success\",\"params\":{\"from\":\"Address from where tokens are withdrawn\",\"to\":\"Address to where tokens are sent\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"}},\"title\":\"Standard token contract with overflow protection\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":\"GnosisStandardToken\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":{\"keccak256\":\"0xdec5028208406e811c449a04e2932f7efeae629388cb6124550b8b048a645556\",\"urls\":[\"bzzr://f3d13a708f543b3ce72745cab321e6daf25d935fd12ba55a4152f1113eb6d5e4\"]},\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]},\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5061046a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c806370a082311161005057806370a0823114610107578063a9059cbb1461012d578063dd62ed3e1461015957610072565b8063095ea7b31461007757806318160ddd146100b757806323b872dd146100d1575b600080fd5b6100a36004803603604081101561008d57600080fd5b506001600160a01b038135169060200135610187565b604080519115158252519081900360200190f35b6100bf6101ee565b60408051918252519081900360200190f35b6100a3600480360360608110156100e757600080fd5b506001600160a01b038135811691602081013590911690604001356101f4565b6100bf6004803603602081101561011d57600080fd5b50356001600160a01b0316610321565b6100a36004803603604081101561014357600080fd5b506001600160a01b03813516906020013561033c565b6100bf6004803603604081101561016f57600080fd5b506001600160a01b0381358116916020013516610407565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461021d908363ffffffff61043216565b158061025a57506001600160a01b0384166000908152600160209081526040808320338452909152902054610258908363ffffffff61043216565b155b8061028b57506001600160a01b038316600090815260208190526040902054610289908363ffffffff61043716565b155b156102985750600061031a565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b6001600160a01b031660009081526020819052604090205490565b3360009081526020819052604081205461035c908363ffffffff61043216565b158061038e57506001600160a01b03831660009081526020819052604090205461038c908363ffffffff61043716565b155b1561039b575060006101e8565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a72305820ff1365cba5e4da22531e778b7eb65ead37c9fffc75a05077592ef24d319a85850029", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100725760003560e01c806370a082311161005057806370a0823114610107578063a9059cbb1461012d578063dd62ed3e1461015957610072565b8063095ea7b31461007757806318160ddd146100b757806323b872dd146100d1575b600080fd5b6100a36004803603604081101561008d57600080fd5b506001600160a01b038135169060200135610187565b604080519115158252519081900360200190f35b6100bf6101ee565b60408051918252519081900360200190f35b6100a3600480360360608110156100e757600080fd5b506001600160a01b038135811691602081013590911690604001356101f4565b6100bf6004803603602081101561011d57600080fd5b50356001600160a01b0316610321565b6100a36004803603604081101561014357600080fd5b506001600160a01b03813516906020013561033c565b6100bf6004803603604081101561016f57600080fd5b506001600160a01b0381358116916020013516610407565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461021d908363ffffffff61043216565b158061025a57506001600160a01b0384166000908152600160209081526040808320338452909152902054610258908363ffffffff61043216565b155b8061028b57506001600160a01b038316600090815260208190526040902054610289908363ffffffff61043716565b155b156102985750600061031a565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b6001600160a01b031660009081526020819052604090205490565b3360009081526020819052604081205461035c908363ffffffff61043216565b158061038e57506001600160a01b03831660009081526020819052604090205461038c908363ffffffff61043716565b155b1561039b575060006101e8565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a72305820ff1365cba5e4da22531e778b7eb65ead37c9fffc75a05077592ef24d319a85850029", - "sourceMap": "443:2599:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;443:2599:4;;;;;;;", - "deployedSourceMap": "443:2599:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;443:2599:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2098:196;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2098:196:4;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2955:85;;;:::i;:::-;;;;;;;;;;;;;;;;1430:451;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1430:451:4;;;;;;;;;;;;;;;;;:::i;2776:100::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2776:100:4;-1:-1:-1;;;;;2776:100:4;;:::i;785:333::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;785:333:4;;;;;;;;:::i;2504:128::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2504:128:4;;;;;;;;;;:::i;2098:196::-;2187:10;2160:4;2176:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;2176:31:4;;;;;;;;;;;:39;;;2230:36;;;;;;;2160:4;;2176:31;;2187:10;;2230:36;;;;;;;;-1:-1:-1;2283:4:4;2098:196;;;;;:::o;2955:85::-;3022:11;;2955:85;:::o;1430:451::-;-1:-1:-1;;;;;1527:14:4;;1506:4;1527:14;;;;;;;;;;;:31;;1552:5;1527:31;:24;:31;:::i;:::-;1526:32;:104;;;-1:-1:-1;;;;;;1563:16:4;;;;;;:10;:16;;;;;;;;1580:10;1563:28;;;;;;;;:67;;1615:5;1563:67;:38;:67;:::i;:::-;1562:68;1526:104;:138;;;-1:-1:-1;;;;;;1635:12:4;;:8;:12;;;;;;;;;;;:29;;1658:5;1635:29;:22;:29;:::i;:::-;1634:30;1526:138;1522:181;;;-1:-1:-1;1687:5:4;1680:12;;1522:181;-1:-1:-1;;;;;1712:14:4;;;:8;:14;;;;;;;;;;;:23;;;;;;;-1:-1:-1;1745:16:4;;;;;1762:10;1745:28;;;;;;;:37;;;;;;;1792:12;;;;;;;;;;;;;:21;;;;;;1828:25;;;;;;;1792:12;;1828:25;;;;;;;;;;;-1:-1:-1;1870:4:4;1430:451;;;;;;:::o;2776:100::-;-1:-1:-1;;;;;2854:15:4;2831:4;2854:15;;;;;;;;;;;;2776:100::o;785:333::-;873:10;843:4;864:20;;;;;;;;;;;:37;;895:5;864:37;:30;:37;:::i;:::-;863:38;:72;;;-1:-1:-1;;;;;;906:12:4;;:8;:12;;;;;;;;;;;:29;;929:5;906:29;:22;:29;:::i;:::-;905:30;863:72;859:115;;;-1:-1:-1;958:5:4;951:12;;859:115;993:10;984:8;:20;;;;;;;;;;;:29;;;;;;;-1:-1:-1;;;;;1023:12:4;;;;;;;;;:21;;;;;;1059:31;;;;;;;1023:12;;993:10;1059:31;;;;;;;;;;;-1:-1:-1;1107:4:4;785:333;;;;:::o;2504:128::-;-1:-1:-1;;;;;2599:17:4;;;2576:4;2599:17;;;:10;:17;;;;;;;;:26;;;;;;;;;;;;;2504:128::o;6580:94:5:-;-1:-1:-1;6661:6:5;;6580:94::o;6310:98::-;6391:5;;-1:-1:-1;6391:10:5;;6310:98::o", - "source": "pragma solidity ^0.5.2;\nimport \"./Token.sol\";\nimport \"./Math.sol\";\nimport \"./Proxy.sol\";\n\n/**\n * Deprecated: Use Open Zeppeling one instead\n */\ncontract StandardTokenData {\n /*\n * Storage\n */\n mapping(address => uint) balances;\n mapping(address => mapping(address => uint)) allowances;\n uint totalTokens;\n}\n\n/**\n * Deprecated: Use Open Zeppeling one instead\n */\n/// @title Standard token contract with overflow protection\ncontract GnosisStandardToken is Token, StandardTokenData {\n using GnosisMath for *;\n\n /*\n * Public functions\n */\n /// @dev Transfers sender's tokens to a given address. Returns success\n /// @param to Address of token receiver\n /// @param value Number of tokens to transfer\n /// @return Was transfer successful?\n function transfer(address to, uint value) public returns (bool) {\n if (!balances[msg.sender].safeToSub(value) || !balances[to].safeToAdd(value)) {\n return false;\n }\n\n balances[msg.sender] -= value;\n balances[to] += value;\n emit Transfer(msg.sender, to, value);\n return true;\n }\n\n /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success\n /// @param from Address from where tokens are withdrawn\n /// @param to Address to where tokens are sent\n /// @param value Number of tokens to transfer\n /// @return Was transfer successful?\n function transferFrom(address from, address to, uint value) public returns (bool) {\n if (!balances[from].safeToSub(value) || !allowances[from][msg.sender].safeToSub(\n value\n ) || !balances[to].safeToAdd(value)) {\n return false;\n }\n balances[from] -= value;\n allowances[from][msg.sender] -= value;\n balances[to] += value;\n emit Transfer(from, to, value);\n return true;\n }\n\n /// @dev Sets approved amount of tokens for spender. Returns success\n /// @param spender Address of allowed account\n /// @param value Number of approved tokens\n /// @return Was approval successful?\n function approve(address spender, uint value) public returns (bool) {\n allowances[msg.sender][spender] = value;\n emit Approval(msg.sender, spender, value);\n return true;\n }\n\n /// @dev Returns number of allowed tokens for given address\n /// @param owner Address of token owner\n /// @param spender Address of token spender\n /// @return Remaining allowance for spender\n function allowance(address owner, address spender) public view returns (uint) {\n return allowances[owner][spender];\n }\n\n /// @dev Returns number of tokens owned by given address\n /// @param owner Address of token owner\n /// @return Balance of owner\n function balanceOf(address owner) public view returns (uint) {\n return balances[owner];\n }\n\n /// @dev Returns total supply of tokens\n /// @return Total supply\n function totalSupply() public view returns (uint) {\n return totalTokens;\n }\n}\n", - "sourcePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "ast": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "exportedSymbols": { - "GnosisStandardToken": [ - 329 - ], - "StandardTokenData": [ - 135 - ] - }, - "id": 330, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 119, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:4" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", - "file": "./Token.sol", - "id": 120, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1564, - "src": "24:21:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", - "file": "./Math.sol", - "id": 121, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1459, - "src": "46:20:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", - "file": "./Proxy.sol", - "id": 122, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1495, - "src": "67:21:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "Deprecated: Use Open Zeppeling one instead", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": [ - 135 - ], - "name": "StandardTokenData", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 126, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "208:33:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 125, - "keyType": { - "id": 123, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "216:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "208:24:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 124, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "227:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "name": "allowances", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "247:55:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 131, - "keyType": { - "id": 127, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "255:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "247:44:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 130, - "keyType": { - "id": 128, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "274:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "266:24:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 129, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "285:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 134, - "name": "totalTokens", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "308:16:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 133, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "308:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "scope": 330, - "src": "144:183:4" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 136, - "name": "Token", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1563, - "src": "475:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Token_$1563", - "typeString": "contract Token" - } - }, - "id": 137, - "nodeType": "InheritanceSpecifier", - "src": "475:5:4" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 138, - "name": "StandardTokenData", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 135, - "src": "482:17:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_StandardTokenData_$135", - "typeString": "contract StandardTokenData" - } - }, - "id": 139, - "nodeType": "InheritanceSpecifier", - "src": "482:17:4" - } - ], - "contractDependencies": [ - 135, - 1563 - ], - "contractKind": "contract", - "documentation": "@title Standard token contract with overflow protection", - "fullyImplemented": true, - "id": 329, - "linearizedBaseContracts": [ - 329, - 135, - 1563 - ], - "name": "GnosisStandardToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 141, - "libraryName": { - "contractScope": null, - "id": 140, - "name": "GnosisMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1458, - "src": "512:10:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GnosisMath_$1458", - "typeString": "library GnosisMath" - } - }, - "nodeType": "UsingForDirective", - "src": "506:23:4", - "typeName": null - }, - { - "body": { - "id": 192, - "nodeType": "Block", - "src": "849:269:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "863:38:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 155, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "895:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 150, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "864:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 153, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 151, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "873:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "873:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "864:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "864:30:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "864:37:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "905:30:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 162, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "929:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 158, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "906:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 160, - "indexExpression": { - "argumentTypes": null, - "id": 159, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "915:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "906:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToAdd", - "nodeType": "MemberAccess", - "referencedDeclaration": 1207, - "src": "906:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "906:29:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "863:72:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 169, - "nodeType": "IfStatement", - "src": "859:115:4", - "trueBody": { - "id": 168, - "nodeType": "Block", - "src": "937:37:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "958:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 149, - "id": 167, - "nodeType": "Return", - "src": "951:12:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 170, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "984:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 173, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 171, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "993:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "993:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "984:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 174, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1008:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "984:29:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 176, - "nodeType": "ExpressionStatement", - "src": "984:29:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 177, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1023:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 179, - "indexExpression": { - "argumentTypes": null, - "id": 178, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "1032:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1023:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 180, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1039:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1023:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 182, - "nodeType": "ExpressionStatement", - "src": "1023:21:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 184, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1068:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1068:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 186, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "1080:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 187, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1084:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 183, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1504, - "src": "1059:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1059:31:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 189, - "nodeType": "EmitStatement", - "src": "1054:36:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 190, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1107:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 149, - "id": 191, - "nodeType": "Return", - "src": "1100:11:4" - } - ] - }, - "documentation": "@dev Transfers sender's tokens to a given address. Returns success\n @param to Address of token receiver\n @param value Number of tokens to transfer\n @return Was transfer successful?", - "id": 193, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 146, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 143, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "803:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "803:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 145, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "815:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 144, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "815:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "802:24:4" - }, - "returnParameters": { - "id": 149, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 148, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "843:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 147, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "843:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "842:6:4" - }, - "scope": 329, - "src": "785:333:4", - "stateMutability": "nonpayable", - "superFunction": 1521, - "visibility": "public" - }, - { - "body": { - "id": 263, - "nodeType": "Block", - "src": "1512:369:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1526:32:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 208, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1552:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 204, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1527:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 206, - "indexExpression": { - "argumentTypes": null, - "id": 205, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1536:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1527:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "1527:24:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1527:31:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1562:68:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 218, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1615:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 211, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1563:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 213, - "indexExpression": { - "argumentTypes": null, - "id": 212, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1574:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1563:16:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 216, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 214, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1580:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1580:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1563:28:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "1563:38:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1563:67:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1526:104:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1634:30:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 226, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1658:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 222, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1635:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 224, - "indexExpression": { - "argumentTypes": null, - "id": 223, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1644:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1635:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToAdd", - "nodeType": "MemberAccess", - "referencedDeclaration": 1207, - "src": "1635:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1635:29:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1526:138:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 233, - "nodeType": "IfStatement", - "src": "1522:181:4", - "trueBody": { - "id": 232, - "nodeType": "Block", - "src": "1666:37:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1687:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 203, - "id": 231, - "nodeType": "Return", - "src": "1680:12:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 234, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1712:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 236, - "indexExpression": { - "argumentTypes": null, - "id": 235, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1721:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1712:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 237, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1730:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1712:23:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 239, - "nodeType": "ExpressionStatement", - "src": "1712:23:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 240, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1745:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 244, - "indexExpression": { - "argumentTypes": null, - "id": 241, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1756:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1745:16:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 245, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 242, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1762:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1762:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1745:28:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 246, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1777:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1745:37:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 248, - "nodeType": "ExpressionStatement", - "src": "1745:37:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 249, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1792:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 251, - "indexExpression": { - "argumentTypes": null, - "id": 250, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1801:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1792:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 252, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1808:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1792:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 254, - "nodeType": "ExpressionStatement", - "src": "1792:21:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 256, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1837:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 257, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1843:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 258, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1847:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 255, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1504, - "src": "1828:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1828:25:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 260, - "nodeType": "EmitStatement", - "src": "1823:30:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1870:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 203, - "id": 262, - "nodeType": "Return", - "src": "1863:11:4" - } - ] - }, - "documentation": "@dev Allows allowed third party to transfer tokens from one address to another. Returns success\n @param from Address from where tokens are withdrawn\n @param to Address to where tokens are sent\n @param value Number of tokens to transfer\n @return Was transfer successful?", - "id": 264, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 195, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1452:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 194, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1452:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 197, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1466:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 196, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1466:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 199, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1478:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 198, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1478:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1451:38:4" - }, - "returnParameters": { - "id": 203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 202, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1506:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 201, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1506:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1505:6:4" - }, - "scope": 329, - "src": "1430:451:4", - "stateMutability": "nonpayable", - "superFunction": 1532, - "visibility": "public" - }, - { - "body": { - "id": 291, - "nodeType": "Block", - "src": "2166:128:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 273, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "2176:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 277, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 274, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2187:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2187:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2176:22:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 278, - "indexExpression": { - "argumentTypes": null, - "id": 276, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "2199:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2176:31:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 279, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "2210:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2176:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 281, - "nodeType": "ExpressionStatement", - "src": "2176:39:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 283, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2239:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2239:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 285, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "2251:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 286, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "2260:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 282, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1512, - "src": "2230:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2230:36:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 288, - "nodeType": "EmitStatement", - "src": "2225:41:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 289, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2283:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 272, - "id": 290, - "nodeType": "Return", - "src": "2276:11:4" - } - ] - }, - "documentation": "@dev Sets approved amount of tokens for spender. Returns success\n @param spender Address of allowed account\n @param value Number of approved tokens\n @return Was approval successful?", - "id": 292, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 266, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2115:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 265, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2115:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 268, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2132:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 267, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2132:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2114:29:4" - }, - "returnParameters": { - "id": 272, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 271, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2160:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 270, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2160:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2159:6:4" - }, - "scope": 329, - "src": "2098:196:4", - "stateMutability": "nonpayable", - "superFunction": 1541, - "visibility": "public" - }, - { - "body": { - "id": 307, - "nodeType": "Block", - "src": "2582:50:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 301, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "2599:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 303, - "indexExpression": { - "argumentTypes": null, - "id": 302, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 294, - "src": "2610:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2599:17:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 305, - "indexExpression": { - "argumentTypes": null, - "id": 304, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 296, - "src": "2617:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2599:26:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 300, - "id": 306, - "nodeType": "Return", - "src": "2592:33:4" - } - ] - }, - "documentation": "@dev Returns number of allowed tokens for given address\n @param owner Address of token owner\n @param spender Address of token spender\n @return Remaining allowance for spender", - "id": 308, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 294, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2523:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 293, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2523:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 296, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2538:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 295, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2538:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2522:32:4" - }, - "returnParameters": { - "id": 300, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 299, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2576:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 298, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2576:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2575:6:4" - }, - "scope": 329, - "src": "2504:128:4", - "stateMutability": "view", - "superFunction": 1557, - "visibility": "public" - }, - { - "body": { - "id": 319, - "nodeType": "Block", - "src": "2837:39:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 315, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "2854:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 317, - "indexExpression": { - "argumentTypes": null, - "id": 316, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 310, - "src": "2863:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2854:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 314, - "id": 318, - "nodeType": "Return", - "src": "2847:22:4" - } - ] - }, - "documentation": "@dev Returns number of tokens owned by given address\n @param owner Address of token owner\n @return Balance of owner", - "id": 320, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 311, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 310, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 320, - "src": "2795:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 309, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2795:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2794:15:4" - }, - "returnParameters": { - "id": 314, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 313, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 320, - "src": "2831:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 312, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2831:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2830:6:4" - }, - "scope": 329, - "src": "2776:100:4", - "stateMutability": "view", - "superFunction": 1548, - "visibility": "public" - }, - { - "body": { - "id": 327, - "nodeType": "Block", - "src": "3005:35:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 325, - "name": "totalTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 134, - "src": "3022:11:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 324, - "id": 326, - "nodeType": "Return", - "src": "3015:18:4" - } - ] - }, - "documentation": "@dev Returns total supply of tokens\n @return Total supply", - "id": 328, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 321, - "nodeType": "ParameterList", - "parameters": [], - "src": "2975:2:4" - }, - "returnParameters": { - "id": 324, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 323, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 328, - "src": "2999:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 322, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2999:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2998:6:4" - }, - "scope": 329, - "src": "2955:85:4", - "stateMutability": "view", - "superFunction": 1562, - "visibility": "public" - } - ], - "scope": 330, - "src": "443:2599:4" - } - ], - "src": "0:3043:4" - }, - "legacyAST": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "exportedSymbols": { - "GnosisStandardToken": [ - 329 - ], - "StandardTokenData": [ - 135 - ] - }, - "id": 330, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 119, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:4" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", - "file": "./Token.sol", - "id": 120, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1564, - "src": "24:21:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", - "file": "./Math.sol", - "id": 121, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1459, - "src": "46:20:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", - "file": "./Proxy.sol", - "id": 122, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1495, - "src": "67:21:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "Deprecated: Use Open Zeppeling one instead", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": [ - 135 - ], - "name": "StandardTokenData", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 126, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "208:33:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 125, - "keyType": { - "id": 123, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "216:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "208:24:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 124, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "227:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "name": "allowances", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "247:55:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 131, - "keyType": { - "id": 127, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "255:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "247:44:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 130, - "keyType": { - "id": 128, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "274:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "266:24:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 129, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "285:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 134, - "name": "totalTokens", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "308:16:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 133, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "308:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "scope": 330, - "src": "144:183:4" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 136, - "name": "Token", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1563, - "src": "475:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Token_$1563", - "typeString": "contract Token" - } - }, - "id": 137, - "nodeType": "InheritanceSpecifier", - "src": "475:5:4" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 138, - "name": "StandardTokenData", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 135, - "src": "482:17:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_StandardTokenData_$135", - "typeString": "contract StandardTokenData" - } - }, - "id": 139, - "nodeType": "InheritanceSpecifier", - "src": "482:17:4" - } - ], - "contractDependencies": [ - 135, - 1563 - ], - "contractKind": "contract", - "documentation": "@title Standard token contract with overflow protection", - "fullyImplemented": true, - "id": 329, - "linearizedBaseContracts": [ - 329, - 135, - 1563 - ], - "name": "GnosisStandardToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 141, - "libraryName": { - "contractScope": null, - "id": 140, - "name": "GnosisMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1458, - "src": "512:10:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GnosisMath_$1458", - "typeString": "library GnosisMath" - } - }, - "nodeType": "UsingForDirective", - "src": "506:23:4", - "typeName": null - }, - { - "body": { - "id": 192, - "nodeType": "Block", - "src": "849:269:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "863:38:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 155, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "895:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 150, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "864:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 153, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 151, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "873:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "873:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "864:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "864:30:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "864:37:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "905:30:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 162, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "929:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 158, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "906:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 160, - "indexExpression": { - "argumentTypes": null, - "id": 159, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "915:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "906:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToAdd", - "nodeType": "MemberAccess", - "referencedDeclaration": 1207, - "src": "906:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "906:29:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "863:72:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 169, - "nodeType": "IfStatement", - "src": "859:115:4", - "trueBody": { - "id": 168, - "nodeType": "Block", - "src": "937:37:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "958:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 149, - "id": 167, - "nodeType": "Return", - "src": "951:12:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 170, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "984:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 173, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 171, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "993:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "993:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "984:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 174, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1008:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "984:29:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 176, - "nodeType": "ExpressionStatement", - "src": "984:29:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 177, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1023:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 179, - "indexExpression": { - "argumentTypes": null, - "id": 178, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "1032:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1023:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 180, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1039:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1023:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 182, - "nodeType": "ExpressionStatement", - "src": "1023:21:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 184, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1068:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1068:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 186, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "1080:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 187, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1084:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 183, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1504, - "src": "1059:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1059:31:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 189, - "nodeType": "EmitStatement", - "src": "1054:36:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 190, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1107:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 149, - "id": 191, - "nodeType": "Return", - "src": "1100:11:4" - } - ] - }, - "documentation": "@dev Transfers sender's tokens to a given address. Returns success\n @param to Address of token receiver\n @param value Number of tokens to transfer\n @return Was transfer successful?", - "id": 193, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 146, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 143, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "803:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "803:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 145, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "815:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 144, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "815:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "802:24:4" - }, - "returnParameters": { - "id": 149, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 148, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "843:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 147, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "843:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "842:6:4" - }, - "scope": 329, - "src": "785:333:4", - "stateMutability": "nonpayable", - "superFunction": 1521, - "visibility": "public" - }, - { - "body": { - "id": 263, - "nodeType": "Block", - "src": "1512:369:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1526:32:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 208, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1552:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 204, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1527:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 206, - "indexExpression": { - "argumentTypes": null, - "id": 205, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1536:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1527:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "1527:24:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1527:31:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1562:68:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 218, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1615:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 211, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1563:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 213, - "indexExpression": { - "argumentTypes": null, - "id": 212, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1574:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1563:16:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 216, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 214, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1580:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1580:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1563:28:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "1563:38:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1563:67:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1526:104:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1634:30:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 226, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1658:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 222, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1635:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 224, - "indexExpression": { - "argumentTypes": null, - "id": 223, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1644:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1635:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToAdd", - "nodeType": "MemberAccess", - "referencedDeclaration": 1207, - "src": "1635:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1635:29:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1526:138:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 233, - "nodeType": "IfStatement", - "src": "1522:181:4", - "trueBody": { - "id": 232, - "nodeType": "Block", - "src": "1666:37:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1687:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 203, - "id": 231, - "nodeType": "Return", - "src": "1680:12:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 234, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1712:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 236, - "indexExpression": { - "argumentTypes": null, - "id": 235, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1721:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1712:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 237, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1730:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1712:23:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 239, - "nodeType": "ExpressionStatement", - "src": "1712:23:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 240, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1745:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 244, - "indexExpression": { - "argumentTypes": null, - "id": 241, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1756:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1745:16:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 245, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 242, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1762:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1762:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1745:28:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 246, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1777:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1745:37:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 248, - "nodeType": "ExpressionStatement", - "src": "1745:37:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 249, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1792:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 251, - "indexExpression": { - "argumentTypes": null, - "id": 250, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1801:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1792:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 252, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1808:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1792:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 254, - "nodeType": "ExpressionStatement", - "src": "1792:21:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 256, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1837:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 257, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1843:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 258, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1847:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 255, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1504, - "src": "1828:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1828:25:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 260, - "nodeType": "EmitStatement", - "src": "1823:30:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1870:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 203, - "id": 262, - "nodeType": "Return", - "src": "1863:11:4" - } - ] - }, - "documentation": "@dev Allows allowed third party to transfer tokens from one address to another. Returns success\n @param from Address from where tokens are withdrawn\n @param to Address to where tokens are sent\n @param value Number of tokens to transfer\n @return Was transfer successful?", - "id": 264, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 195, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1452:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 194, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1452:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 197, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1466:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 196, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1466:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 199, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1478:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 198, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1478:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1451:38:4" - }, - "returnParameters": { - "id": 203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 202, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1506:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 201, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1506:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1505:6:4" - }, - "scope": 329, - "src": "1430:451:4", - "stateMutability": "nonpayable", - "superFunction": 1532, - "visibility": "public" - }, - { - "body": { - "id": 291, - "nodeType": "Block", - "src": "2166:128:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 273, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "2176:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 277, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 274, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2187:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2187:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2176:22:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 278, - "indexExpression": { - "argumentTypes": null, - "id": 276, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "2199:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2176:31:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 279, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "2210:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2176:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 281, - "nodeType": "ExpressionStatement", - "src": "2176:39:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 283, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2239:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2239:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 285, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "2251:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 286, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "2260:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 282, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1512, - "src": "2230:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2230:36:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 288, - "nodeType": "EmitStatement", - "src": "2225:41:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 289, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2283:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 272, - "id": 290, - "nodeType": "Return", - "src": "2276:11:4" - } - ] - }, - "documentation": "@dev Sets approved amount of tokens for spender. Returns success\n @param spender Address of allowed account\n @param value Number of approved tokens\n @return Was approval successful?", - "id": 292, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 266, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2115:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 265, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2115:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 268, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2132:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 267, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2132:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2114:29:4" - }, - "returnParameters": { - "id": 272, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 271, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2160:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 270, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2160:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2159:6:4" - }, - "scope": 329, - "src": "2098:196:4", - "stateMutability": "nonpayable", - "superFunction": 1541, - "visibility": "public" - }, - { - "body": { - "id": 307, - "nodeType": "Block", - "src": "2582:50:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 301, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "2599:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 303, - "indexExpression": { - "argumentTypes": null, - "id": 302, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 294, - "src": "2610:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2599:17:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 305, - "indexExpression": { - "argumentTypes": null, - "id": 304, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 296, - "src": "2617:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2599:26:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 300, - "id": 306, - "nodeType": "Return", - "src": "2592:33:4" - } - ] - }, - "documentation": "@dev Returns number of allowed tokens for given address\n @param owner Address of token owner\n @param spender Address of token spender\n @return Remaining allowance for spender", - "id": 308, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 294, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2523:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 293, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2523:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 296, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2538:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 295, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2538:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2522:32:4" - }, - "returnParameters": { - "id": 300, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 299, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2576:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 298, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2576:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2575:6:4" - }, - "scope": 329, - "src": "2504:128:4", - "stateMutability": "view", - "superFunction": 1557, - "visibility": "public" - }, - { - "body": { - "id": 319, - "nodeType": "Block", - "src": "2837:39:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 315, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "2854:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 317, - "indexExpression": { - "argumentTypes": null, - "id": 316, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 310, - "src": "2863:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2854:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 314, - "id": 318, - "nodeType": "Return", - "src": "2847:22:4" - } - ] - }, - "documentation": "@dev Returns number of tokens owned by given address\n @param owner Address of token owner\n @return Balance of owner", - "id": 320, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 311, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 310, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 320, - "src": "2795:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 309, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2795:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2794:15:4" - }, - "returnParameters": { - "id": 314, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 313, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 320, - "src": "2831:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 312, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2831:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2830:6:4" - }, - "scope": 329, - "src": "2776:100:4", - "stateMutability": "view", - "superFunction": 1548, - "visibility": "public" - }, - { - "body": { - "id": 327, - "nodeType": "Block", - "src": "3005:35:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 325, - "name": "totalTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 134, - "src": "3022:11:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 324, - "id": 326, - "nodeType": "Return", - "src": "3015:18:4" - } - ] - }, - "documentation": "@dev Returns total supply of tokens\n @return Total supply", - "id": 328, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 321, - "nodeType": "ParameterList", - "parameters": [], - "src": "2975:2:4" - }, - "returnParameters": { - "id": 324, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 323, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 328, - "src": "2999:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 322, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2999:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2998:6:4" - }, - "scope": 329, - "src": "2955:85:4", - "stateMutability": "view", - "superFunction": 1562, - "visibility": "public" - } - ], - "scope": 330, - "src": "443:2599:4" - } - ], - "src": "0:3043:4" - }, - "compiler": { - "name": "solc", - "version": "0.5.8+commit.23d335f2.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.0.10", - "updatedAt": "2019-06-03T08:59:02.084Z", - "devdoc": { - "methods": { - "allowance(address,address)": { - "details": "Returns number of allowed tokens for given address", - "params": { - "owner": "Address of token owner", - "spender": "Address of token spender" - }, - "return": "Remaining allowance for spender" - }, - "approve(address,uint256)": { - "details": "Sets approved amount of tokens for spender. Returns success", - "params": { - "spender": "Address of allowed account", - "value": "Number of approved tokens" - }, - "return": "Was approval successful?" - }, - "balanceOf(address)": { - "details": "Returns number of tokens owned by given address", - "params": { - "owner": "Address of token owner" - }, - "return": "Balance of owner" - }, - "totalSupply()": { - "details": "Returns total supply of tokens", - "return": "Total supply" - }, - "transfer(address,uint256)": { - "details": "Transfers sender's tokens to a given address. Returns success", - "params": { - "to": "Address of token receiver", - "value": "Number of tokens to transfer" - }, - "return": "Was transfer successful?" - }, - "transferFrom(address,address,uint256)": { - "details": "Allows allowed third party to transfer tokens from one address to another. Returns success", - "params": { - "from": "Address from where tokens are withdrawn", - "to": "Address to where tokens are sent", - "value": "Number of tokens to transfer" - }, - "return": "Was transfer successful?" - } - }, - "title": "Standard token contract with overflow protection" - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json deleted file mode 100644 index 6a0e60ac..00000000 --- a/build/contracts/Migrations.json +++ /dev/null @@ -1,1379 +0,0 @@ -{ - "contractName": "Migrations", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "last_completed_migration", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "constant": false, - "inputs": [ - { - "name": "completed", - "type": "uint256" - } - ], - "name": "setCompleted", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "new_address", - "type": "address" - } - ], - "name": "upgrade", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"new_address\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/mmv/work/safe-react/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"/home/mmv/work/safe-react/contracts/Migrations.sol\":{\"keccak256\":\"0x30af91a38d74f2c905faadbc4efd95a911625ffef0f13675a3501060e646705c\",\"urls\":[\"bzzr://b8dd34982b6c50cf2f1927c0b23967ab5b77ca4a0a7a8068fd79a86a968fb3ab\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101aa806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea165627a7a72305820d6f9d332fd4035368bdb390fc28d3f94281609485f5e5638d949f78492c92eb70029", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea165627a7a72305820d6f9d332fd4035368bdb390fc28d3f94281609485f5e5638d949f78492c92eb70029", - "sourceMap": "25:481:1:-;;;177:51;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;205:5:1;:18;;-1:-1:-1;;;;;;205:18:1;213:10;205:18;;;25:481;;;;;;", - "deployedSourceMap": "25:481:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:481:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;339:165;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;339:165:1;-1:-1:-1;;;;;339:165:1;;:::i;:::-;;73:36;;;:::i;:::-;;;;;;;;;;;;;;;;49:20;;;:::i;:::-;;;;-1:-1:-1;;;;;49:20:1;;;;;;;;;;;;;;232:103;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;232:103:1;;:::i;339:165::-;160:5;;-1:-1:-1;;;;;160:5:1;146:10;:19;142:26;;;401:19;434:11;401:45;;452:8;-1:-1:-1;;;;;452:21:1;;474:24;;452:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;452:47:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;452:47:1;;;;167:1;142:26;339:165;:::o;73:36::-;;;;:::o;49:20::-;;;-1:-1:-1;;;;;49:20:1;;:::o;232:103::-;160:5;;-1:-1:-1;;;;;160:5:1;146:10;:19;142:26;;;294:24;:36;232:103::o", - "source": "pragma solidity ^0.5.2;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n constructor () public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}", - "sourcePath": "/home/mmv/work/safe-react/contracts/Migrations.sol", - "ast": { - "absolutePath": "/home/mmv/work/safe-react/contracts/Migrations.sol", - "exportedSymbols": { - "Migrations": [ - 61 - ] - }, - "id": 62, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 61, - "linearizedBaseContracts": [ - 61 - ], - "name": "Migrations", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 8, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "49:20:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "49:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10, - "name": "last_completed_migration", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "73:36:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "73:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 18, - "nodeType": "Block", - "src": "136:37:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "146:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "146:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 14, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "160:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "146:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 17, - "nodeType": "IfStatement", - "src": "142:26:1", - "trueBody": { - "id": 16, - "nodeType": "PlaceholderStatement", - "src": "167:1:1" - } - } - ] - }, - "documentation": null, - "id": 19, - "name": "restricted", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 11, - "nodeType": "ParameterList", - "parameters": [], - "src": "133:2:1" - }, - "src": "114:59:1", - "visibility": "internal" - }, - { - "body": { - "id": 27, - "nodeType": "Block", - "src": "199:29:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 22, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "205:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 23, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "213:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "213:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "205:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 26, - "nodeType": "ExpressionStatement", - "src": "205:18:1" - } - ] - }, - "documentation": null, - "id": 28, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 20, - "nodeType": "ParameterList", - "parameters": [], - "src": "189:2:1" - }, - "returnParameters": { - "id": 21, - "nodeType": "ParameterList", - "parameters": [], - "src": "199:0:1" - }, - "scope": 61, - "src": "177:51:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 39, - "nodeType": "Block", - "src": "288:47:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 37, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 35, - "name": "last_completed_migration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "294:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 36, - "name": "completed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 30, - "src": "321:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "294:36:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 38, - "nodeType": "ExpressionStatement", - "src": "294:36:1" - } - ] - }, - "documentation": null, - "id": 40, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 33, - "modifierName": { - "argumentTypes": null, - "id": 32, - "name": "restricted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "277:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "277:10:1" - } - ], - "name": "setCompleted", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 31, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 30, - "name": "completed", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "254:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 29, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "254:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "253:16:1" - }, - "returnParameters": { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "288:0:1" - }, - "scope": 61, - "src": "232:103:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 59, - "nodeType": "Block", - "src": "395:109:1", - "statements": [ - { - "assignments": [ - 48 - ], - "declarations": [ - { - "constant": false, - "id": 48, - "name": "upgraded", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "401:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$61", - "typeString": "contract Migrations" - }, - "typeName": { - "contractScope": null, - "id": 47, - "name": "Migrations", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 61, - "src": "401:10:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$61", - "typeString": "contract Migrations" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 52, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 50, - "name": "new_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "434:11:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 49, - "name": "Migrations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "423:10:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Migrations_$61_$", - "typeString": "type(contract Migrations)" - } - }, - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "423:23:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$61", - "typeString": "contract Migrations" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "401:45:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 56, - "name": "last_completed_migration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "474:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 53, - "name": "upgraded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "452:8:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$61", - "typeString": "contract Migrations" - } - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setCompleted", - "nodeType": "MemberAccess", - "referencedDeclaration": 40, - "src": "452:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256) external" - } - }, - "id": 57, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "452:47:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 58, - "nodeType": "ExpressionStatement", - "src": "452:47:1" - } - ] - }, - "documentation": null, - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 45, - "modifierName": { - "argumentTypes": null, - "id": 44, - "name": "restricted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "384:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "384:10:1" - } - ], - "name": "upgrade", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 43, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 42, - "name": "new_address", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "356:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "356:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "355:21:1" - }, - "returnParameters": { - "id": 46, - "nodeType": "ParameterList", - "parameters": [], - "src": "395:0:1" - }, - "scope": 61, - "src": "339:165:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 62, - "src": "25:481:1" - } - ], - "src": "0:506:1" - }, - "legacyAST": { - "absolutePath": "/home/mmv/work/safe-react/contracts/Migrations.sol", - "exportedSymbols": { - "Migrations": [ - 61 - ] - }, - "id": 62, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 61, - "linearizedBaseContracts": [ - 61 - ], - "name": "Migrations", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 8, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "49:20:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 7, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "49:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 10, - "name": "last_completed_migration", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "73:36:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "73:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 18, - "nodeType": "Block", - "src": "136:37:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 12, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "146:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "146:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 14, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "160:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "146:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 17, - "nodeType": "IfStatement", - "src": "142:26:1", - "trueBody": { - "id": 16, - "nodeType": "PlaceholderStatement", - "src": "167:1:1" - } - } - ] - }, - "documentation": null, - "id": 19, - "name": "restricted", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 11, - "nodeType": "ParameterList", - "parameters": [], - "src": "133:2:1" - }, - "src": "114:59:1", - "visibility": "internal" - }, - { - "body": { - "id": 27, - "nodeType": "Block", - "src": "199:29:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 22, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "205:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 23, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "213:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "213:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "205:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 26, - "nodeType": "ExpressionStatement", - "src": "205:18:1" - } - ] - }, - "documentation": null, - "id": 28, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 20, - "nodeType": "ParameterList", - "parameters": [], - "src": "189:2:1" - }, - "returnParameters": { - "id": 21, - "nodeType": "ParameterList", - "parameters": [], - "src": "199:0:1" - }, - "scope": 61, - "src": "177:51:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 39, - "nodeType": "Block", - "src": "288:47:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 37, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 35, - "name": "last_completed_migration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "294:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 36, - "name": "completed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 30, - "src": "321:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "294:36:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 38, - "nodeType": "ExpressionStatement", - "src": "294:36:1" - } - ] - }, - "documentation": null, - "id": 40, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 33, - "modifierName": { - "argumentTypes": null, - "id": 32, - "name": "restricted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "277:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "277:10:1" - } - ], - "name": "setCompleted", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 31, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 30, - "name": "completed", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "254:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 29, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "254:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "253:16:1" - }, - "returnParameters": { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "288:0:1" - }, - "scope": 61, - "src": "232:103:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 59, - "nodeType": "Block", - "src": "395:109:1", - "statements": [ - { - "assignments": [ - 48 - ], - "declarations": [ - { - "constant": false, - "id": 48, - "name": "upgraded", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "401:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$61", - "typeString": "contract Migrations" - }, - "typeName": { - "contractScope": null, - "id": 47, - "name": "Migrations", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 61, - "src": "401:10:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$61", - "typeString": "contract Migrations" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 52, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 50, - "name": "new_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "434:11:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 49, - "name": "Migrations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "423:10:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Migrations_$61_$", - "typeString": "type(contract Migrations)" - } - }, - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "423:23:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$61", - "typeString": "contract Migrations" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "401:45:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 56, - "name": "last_completed_migration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "474:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 53, - "name": "upgraded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "452:8:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$61", - "typeString": "contract Migrations" - } - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setCompleted", - "nodeType": "MemberAccess", - "referencedDeclaration": 40, - "src": "452:21:1", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256) external" - } - }, - "id": 57, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "452:47:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 58, - "nodeType": "ExpressionStatement", - "src": "452:47:1" - } - ] - }, - "documentation": null, - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 45, - "modifierName": { - "argumentTypes": null, - "id": 44, - "name": "restricted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "384:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "384:10:1" - } - ], - "name": "upgrade", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 43, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 42, - "name": "new_address", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "356:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "356:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "355:21:1" - }, - "returnParameters": { - "id": 46, - "nodeType": "ParameterList", - "parameters": [], - "src": "395:0:1" - }, - "scope": 61, - "src": "339:165:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 62, - "src": "25:481:1" - } - ], - "src": "0:506:1" - }, - "compiler": { - "name": "solc", - "version": "0.5.8+commit.23d335f2.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.0.10", - "updatedAt": "2019-06-03T08:59:02.080Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/Proxied.json b/build/contracts/Proxied.json deleted file mode 100644 index 016f4379..00000000 --- a/build/contracts/Proxied.json +++ /dev/null @@ -1,983 +0,0 @@ -{ - "contractName": "Proxied", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "masterCopy", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"masterCopy\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Alan Lu - \",\"methods\":{},\"title\":\"Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":\"Proxied\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]}},\"version\":1}", - "bytecode": "0x6080604052348015600f57600080fd5b5060a48061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063a619486e14602d575b600080fd5b6033605c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff168156fea165627a7a7230582030927156db8f845fed095b245b70d15291cf8c9a8cdd88be16cdf598edc721190029", - "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063a619486e14602d575b600080fd5b6033605c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff168156fea165627a7a7230582030927156db8f845fed095b245b70d15291cf8c9a8cdd88be16cdf598edc721190029", - "sourceMap": "173:51:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;173:51:6;;;;;;;", - "deployedSourceMap": "173:51:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;173:51:6;;;;;;;;;;;;;;;;;;;196:25;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "pragma solidity ^0.5.2;\n\n/// @title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n/// @author Alan Lu - \ncontract Proxied {\n address public masterCopy;\n}\n\n/// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - \ncontract Proxy is Proxied {\n /// @dev Constructor function sets address of master copy contract.\n /// @param _masterCopy Master copy address.\n constructor(address _masterCopy) public {\n require(_masterCopy != address(0), \"The master copy is required\");\n masterCopy = _masterCopy;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n function() external payable {\n address _masterCopy = masterCopy;\n assembly {\n calldatacopy(0, 0, calldatasize)\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize, 0, 0)\n returndatacopy(0, 0, returndatasize)\n switch success\n case 0 {\n revert(0, returndatasize)\n }\n default {\n return(0, returndatasize)\n }\n }\n }\n}\n", - "sourcePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", - "ast": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", - "exportedSymbols": { - "Proxied": [ - 1463 - ], - "Proxy": [ - 1494 - ] - }, - "id": 1495, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1460, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ", - "fullyImplemented": true, - "id": 1463, - "linearizedBaseContracts": [ - 1463 - ], - "name": "Proxied", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 1462, - "name": "masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1463, - "src": "196:25:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1461, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "196:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 1495, - "src": "173:51:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1464, - "name": "Proxied", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1463, - "src": "408:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Proxied_$1463", - "typeString": "contract Proxied" - } - }, - "id": 1465, - "nodeType": "InheritanceSpecifier", - "src": "408:7:6" - } - ], - "contractDependencies": [ - 1463 - ], - "contractKind": "contract", - "documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ", - "fullyImplemented": true, - "id": 1494, - "linearizedBaseContracts": [ - 1494, - 1463 - ], - "name": "Proxy", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1483, - "nodeType": "Block", - "src": "582:116:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1471, - "name": "_masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1467, - "src": "600:11:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "623:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "615:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "615:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "600:25:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "546865206d617374657220636f7079206973207265717569726564", - "id": 1476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "627:29:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", - "typeString": "literal_string \"The master copy is required\"" - }, - "value": "The master copy is required" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", - "typeString": "literal_string \"The master copy is required\"" - } - ], - "id": 1470, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1582, - "src": "592:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "592:65:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1478, - "nodeType": "ExpressionStatement", - "src": "592:65:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 1481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1479, - "name": "masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1462, - "src": "667:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1480, - "name": "_masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1467, - "src": "680:11:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "667:24:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1482, - "nodeType": "ExpressionStatement", - "src": "667:24:6" - } - ] - }, - "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.", - "id": 1484, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1468, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1467, - "name": "_masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1484, - "src": "554:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1466, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "554:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "553:21:6" - }, - "returnParameters": { - "id": 1469, - "nodeType": "ParameterList", - "parameters": [], - "src": "582:0:6" - }, - "scope": 1494, - "src": "542:156:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1492, - "nodeType": "Block", - "src": "827:462:6", - "statements": [ - { - "assignments": [ - 1488 - ], - "declarations": [ - { - "constant": false, - "id": 1488, - "name": "_masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1492, - "src": "837:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1487, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "837:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1490, - "initialValue": { - "argumentTypes": null, - "id": 1489, - "name": "masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1462, - "src": "859:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "837:32:6" - }, - { - "externalReferences": [ - { - "_masterCopy": { - "declaration": 1488, - "isOffset": false, - "isSlot": false, - "src": "983:11:6", - "valueSize": 1 - } - } - ], - "id": 1491, - "nodeType": "InlineAssembly", - "operations": "{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}", - "src": "879:404:6" - } - ] - }, - "documentation": "@dev Fallback function forwards all transactions and returns all received return data.", - "id": 1493, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1485, - "nodeType": "ParameterList", - "parameters": [], - "src": "807:2:6" - }, - "returnParameters": { - "id": 1486, - "nodeType": "ParameterList", - "parameters": [], - "src": "827:0:6" - }, - "scope": 1494, - "src": "799:490:6", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 1495, - "src": "390:901:6" - } - ], - "src": "0:1292:6" - }, - "legacyAST": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", - "exportedSymbols": { - "Proxied": [ - 1463 - ], - "Proxy": [ - 1494 - ] - }, - "id": 1495, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1460, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ", - "fullyImplemented": true, - "id": 1463, - "linearizedBaseContracts": [ - 1463 - ], - "name": "Proxied", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 1462, - "name": "masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1463, - "src": "196:25:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1461, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "196:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 1495, - "src": "173:51:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1464, - "name": "Proxied", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1463, - "src": "408:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Proxied_$1463", - "typeString": "contract Proxied" - } - }, - "id": 1465, - "nodeType": "InheritanceSpecifier", - "src": "408:7:6" - } - ], - "contractDependencies": [ - 1463 - ], - "contractKind": "contract", - "documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ", - "fullyImplemented": true, - "id": 1494, - "linearizedBaseContracts": [ - 1494, - 1463 - ], - "name": "Proxy", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1483, - "nodeType": "Block", - "src": "582:116:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1471, - "name": "_masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1467, - "src": "600:11:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "623:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "615:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "615:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "600:25:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "546865206d617374657220636f7079206973207265717569726564", - "id": 1476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "627:29:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", - "typeString": "literal_string \"The master copy is required\"" - }, - "value": "The master copy is required" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", - "typeString": "literal_string \"The master copy is required\"" - } - ], - "id": 1470, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1582, - "src": "592:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "592:65:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1478, - "nodeType": "ExpressionStatement", - "src": "592:65:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 1481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1479, - "name": "masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1462, - "src": "667:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1480, - "name": "_masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1467, - "src": "680:11:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "667:24:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1482, - "nodeType": "ExpressionStatement", - "src": "667:24:6" - } - ] - }, - "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.", - "id": 1484, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1468, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1467, - "name": "_masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1484, - "src": "554:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1466, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "554:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "553:21:6" - }, - "returnParameters": { - "id": 1469, - "nodeType": "ParameterList", - "parameters": [], - "src": "582:0:6" - }, - "scope": 1494, - "src": "542:156:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1492, - "nodeType": "Block", - "src": "827:462:6", - "statements": [ - { - "assignments": [ - 1488 - ], - "declarations": [ - { - "constant": false, - "id": 1488, - "name": "_masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1492, - "src": "837:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1487, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "837:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1490, - "initialValue": { - "argumentTypes": null, - "id": 1489, - "name": "masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1462, - "src": "859:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "837:32:6" - }, - { - "externalReferences": [ - { - "_masterCopy": { - "declaration": 1488, - "isOffset": false, - "isSlot": false, - "src": "983:11:6", - "valueSize": 1 - } - } - ], - "id": 1491, - "nodeType": "InlineAssembly", - "operations": "{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}", - "src": "879:404:6" - } - ] - }, - "documentation": "@dev Fallback function forwards all transactions and returns all received return data.", - "id": 1493, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1485, - "nodeType": "ParameterList", - "parameters": [], - "src": "807:2:6" - }, - "returnParameters": { - "id": 1486, - "nodeType": "ParameterList", - "parameters": [], - "src": "827:0:6" - }, - "scope": 1494, - "src": "799:490:6", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 1495, - "src": "390:901:6" - } - ], - "src": "0:1292:6" - }, - "compiler": { - "name": "solc", - "version": "0.5.8+commit.23d335f2.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.0.10", - "updatedAt": "2019-06-03T08:59:02.136Z", - "devdoc": { - "author": "Alan Lu - ", - "methods": {}, - "title": "Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy." - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/Proxy.json b/build/contracts/Proxy.json deleted file mode 100644 index 5a25d765..00000000 --- a/build/contracts/Proxy.json +++ /dev/null @@ -1,1006 +0,0 @@ -{ - "contractName": "Proxy", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "masterCopy", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "_masterCopy", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"masterCopy\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_masterCopy\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"author\":\"Stefan George - \",\"methods\":{\"constructor\":{\"details\":\"Constructor function sets address of master copy contract.\",\"params\":{\"_masterCopy\":\"Master copy address.\"}}},\"title\":\"Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":\"Proxy\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b5060405160208061018c8339810180604052602081101561003057600080fd5b50516001600160a01b0381166100a757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f546865206d617374657220636f70792069732072657175697265640000000000604482015290519081900360640190fd5b600080546001600160a01b039092166001600160a01b031990921691909117905560b6806100d66000396000f3fe608060405260043610601c5760003560e01c8063a619486e14604d575b600080546001600160a01b03169036908037600080368184600019f43d6000803e8080156048573d6000f35b3d6000fd5b348015605857600080fd5b50605f607b565b604080516001600160a01b039092168252519081900360200190f35b6000546001600160a01b03168156fea165627a7a723058207564d0999e7fbceb6e7089ae4db9530766f45130c894d942ebc14b3cee4d18de0029", - "deployedBytecode": "0x608060405260043610601c5760003560e01c8063a619486e14604d575b600080546001600160a01b03169036908037600080368184600019f43d6000803e8080156048573d6000f35b3d6000fd5b348015605857600080fd5b50605f607b565b604080516001600160a01b039092168252519081900360200190f35b6000546001600160a01b03168156fea165627a7a723058207564d0999e7fbceb6e7089ae4db9530766f45130c894d942ebc14b3cee4d18de0029", - "sourceMap": "390:901:6:-;;;542:156;8:9:-1;5:2;;;30:1;27;20:12;5:2;542:156:6;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;542:156:6;-1:-1:-1;;;;;600:25:6;;592:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;667:10;:24;;-1:-1:-1;;;;;667:24:6;;;-1:-1:-1;;;;;;667:24:6;;;;;;;;;390:901;;;;;;", - "deployedSourceMap": "390:901:6:-;;;;;;;;;;;;;;;;;;837:19;859:10;;-1:-1:-1;;;;;859:10:6;;921:12;;837:19;902:32;1016:1;;999:12;1016:1;983:11;-1:-1:-1;;962:56:6;1052:14;1049:1;1046;1031:36;1087:7;1111:72;;;;1240:14;1237:1;1230:25;1111:72;1150:14;1147:1;1140:25;196;;8:9:-1;5:2;;;30:1;27;20:12;5:2;196:25:6;;;:::i;:::-;;;;-1:-1:-1;;;;;196:25:6;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;196:25:6;;:::o", - "source": "pragma solidity ^0.5.2;\n\n/// @title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n/// @author Alan Lu - \ncontract Proxied {\n address public masterCopy;\n}\n\n/// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - \ncontract Proxy is Proxied {\n /// @dev Constructor function sets address of master copy contract.\n /// @param _masterCopy Master copy address.\n constructor(address _masterCopy) public {\n require(_masterCopy != address(0), \"The master copy is required\");\n masterCopy = _masterCopy;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n function() external payable {\n address _masterCopy = masterCopy;\n assembly {\n calldatacopy(0, 0, calldatasize)\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize, 0, 0)\n returndatacopy(0, 0, returndatasize)\n switch success\n case 0 {\n revert(0, returndatasize)\n }\n default {\n return(0, returndatasize)\n }\n }\n }\n}\n", - "sourcePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", - "ast": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", - "exportedSymbols": { - "Proxied": [ - 1463 - ], - "Proxy": [ - 1494 - ] - }, - "id": 1495, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1460, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ", - "fullyImplemented": true, - "id": 1463, - "linearizedBaseContracts": [ - 1463 - ], - "name": "Proxied", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 1462, - "name": "masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1463, - "src": "196:25:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1461, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "196:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 1495, - "src": "173:51:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1464, - "name": "Proxied", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1463, - "src": "408:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Proxied_$1463", - "typeString": "contract Proxied" - } - }, - "id": 1465, - "nodeType": "InheritanceSpecifier", - "src": "408:7:6" - } - ], - "contractDependencies": [ - 1463 - ], - "contractKind": "contract", - "documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ", - "fullyImplemented": true, - "id": 1494, - "linearizedBaseContracts": [ - 1494, - 1463 - ], - "name": "Proxy", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1483, - "nodeType": "Block", - "src": "582:116:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1471, - "name": "_masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1467, - "src": "600:11:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "623:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "615:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "615:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "600:25:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "546865206d617374657220636f7079206973207265717569726564", - "id": 1476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "627:29:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", - "typeString": "literal_string \"The master copy is required\"" - }, - "value": "The master copy is required" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", - "typeString": "literal_string \"The master copy is required\"" - } - ], - "id": 1470, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1582, - "src": "592:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "592:65:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1478, - "nodeType": "ExpressionStatement", - "src": "592:65:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 1481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1479, - "name": "masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1462, - "src": "667:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1480, - "name": "_masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1467, - "src": "680:11:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "667:24:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1482, - "nodeType": "ExpressionStatement", - "src": "667:24:6" - } - ] - }, - "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.", - "id": 1484, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1468, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1467, - "name": "_masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1484, - "src": "554:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1466, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "554:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "553:21:6" - }, - "returnParameters": { - "id": 1469, - "nodeType": "ParameterList", - "parameters": [], - "src": "582:0:6" - }, - "scope": 1494, - "src": "542:156:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1492, - "nodeType": "Block", - "src": "827:462:6", - "statements": [ - { - "assignments": [ - 1488 - ], - "declarations": [ - { - "constant": false, - "id": 1488, - "name": "_masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1492, - "src": "837:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1487, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "837:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1490, - "initialValue": { - "argumentTypes": null, - "id": 1489, - "name": "masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1462, - "src": "859:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "837:32:6" - }, - { - "externalReferences": [ - { - "_masterCopy": { - "declaration": 1488, - "isOffset": false, - "isSlot": false, - "src": "983:11:6", - "valueSize": 1 - } - } - ], - "id": 1491, - "nodeType": "InlineAssembly", - "operations": "{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}", - "src": "879:404:6" - } - ] - }, - "documentation": "@dev Fallback function forwards all transactions and returns all received return data.", - "id": 1493, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1485, - "nodeType": "ParameterList", - "parameters": [], - "src": "807:2:6" - }, - "returnParameters": { - "id": 1486, - "nodeType": "ParameterList", - "parameters": [], - "src": "827:0:6" - }, - "scope": 1494, - "src": "799:490:6", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 1495, - "src": "390:901:6" - } - ], - "src": "0:1292:6" - }, - "legacyAST": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", - "exportedSymbols": { - "Proxied": [ - 1463 - ], - "Proxy": [ - 1494 - ] - }, - "id": 1495, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1460, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "@title Proxied - indicates that a contract will be proxied. Also defines storage requirements for Proxy.\n @author Alan Lu - ", - "fullyImplemented": true, - "id": 1463, - "linearizedBaseContracts": [ - 1463 - ], - "name": "Proxied", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 1462, - "name": "masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1463, - "src": "196:25:6", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1461, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "196:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - } - ], - "scope": 1495, - "src": "173:51:6" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 1464, - "name": "Proxied", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1463, - "src": "408:7:6", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Proxied_$1463", - "typeString": "contract Proxied" - } - }, - "id": 1465, - "nodeType": "InheritanceSpecifier", - "src": "408:7:6" - } - ], - "contractDependencies": [ - 1463 - ], - "contractKind": "contract", - "documentation": "@title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n @author Stefan George - ", - "fullyImplemented": true, - "id": 1494, - "linearizedBaseContracts": [ - 1494, - 1463 - ], - "name": "Proxy", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 1483, - "nodeType": "Block", - "src": "582:116:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1471, - "name": "_masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1467, - "src": "600:11:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 1473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "623:1:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 1472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "615:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 1474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "615:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "600:25:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "546865206d617374657220636f7079206973207265717569726564", - "id": 1476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "627:29:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", - "typeString": "literal_string \"The master copy is required\"" - }, - "value": "The master copy is required" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2e9921edd8141a51172691d5d51dd1cbeb601d8d4953527c9d36e0bffd20fed9", - "typeString": "literal_string \"The master copy is required\"" - } - ], - "id": 1470, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1581, - 1582 - ], - "referencedDeclaration": 1582, - "src": "592:7:6", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "592:65:6", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1478, - "nodeType": "ExpressionStatement", - "src": "592:65:6" - }, - { - "expression": { - "argumentTypes": null, - "id": 1481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1479, - "name": "masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1462, - "src": "667:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1480, - "name": "_masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1467, - "src": "680:11:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "667:24:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1482, - "nodeType": "ExpressionStatement", - "src": "667:24:6" - } - ] - }, - "documentation": "@dev Constructor function sets address of master copy contract.\n @param _masterCopy Master copy address.", - "id": 1484, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1468, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1467, - "name": "_masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1484, - "src": "554:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1466, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "554:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "553:21:6" - }, - "returnParameters": { - "id": 1469, - "nodeType": "ParameterList", - "parameters": [], - "src": "582:0:6" - }, - "scope": 1494, - "src": "542:156:6", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1492, - "nodeType": "Block", - "src": "827:462:6", - "statements": [ - { - "assignments": [ - 1488 - ], - "declarations": [ - { - "constant": false, - "id": 1488, - "name": "_masterCopy", - "nodeType": "VariableDeclaration", - "scope": 1492, - "src": "837:19:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1487, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "837:7:6", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1490, - "initialValue": { - "argumentTypes": null, - "id": 1489, - "name": "masterCopy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1462, - "src": "859:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "837:32:6" - }, - { - "externalReferences": [ - { - "_masterCopy": { - "declaration": 1488, - "isOffset": false, - "isSlot": false, - "src": "983:11:6", - "valueSize": 1 - } - } - ], - "id": 1491, - "nodeType": "InlineAssembly", - "operations": "{\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(not(0), _masterCopy, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch success\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n}", - "src": "879:404:6" - } - ] - }, - "documentation": "@dev Fallback function forwards all transactions and returns all received return data.", - "id": 1493, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1485, - "nodeType": "ParameterList", - "parameters": [], - "src": "807:2:6" - }, - "returnParameters": { - "id": 1486, - "nodeType": "ParameterList", - "parameters": [], - "src": "827:0:6" - }, - "scope": 1494, - "src": "799:490:6", - "stateMutability": "payable", - "superFunction": null, - "visibility": "external" - } - ], - "scope": 1495, - "src": "390:901:6" - } - ], - "src": "0:1292:6" - }, - "compiler": { - "name": "solc", - "version": "0.5.8+commit.23d335f2.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.0.10", - "updatedAt": "2019-06-03T08:59:02.137Z", - "devdoc": { - "author": "Stefan George - ", - "methods": { - "constructor": { - "details": "Constructor function sets address of master copy contract.", - "params": { - "_masterCopy": "Master copy address." - } - } - }, - "title": "Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract." - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/StandardTokenData.json b/build/contracts/StandardTokenData.json deleted file mode 100644 index 64d7314a..00000000 --- a/build/contracts/StandardTokenData.json +++ /dev/null @@ -1,5419 +0,0 @@ -{ - "contractName": "StandardTokenData", - "abi": [], - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{},\"notice\":\"Deprecated: Use Open Zeppeling one instead\"}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":\"StandardTokenData\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":{\"keccak256\":\"0xdec5028208406e811c449a04e2932f7efeae629388cb6124550b8b048a645556\",\"urls\":[\"bzzr://f3d13a708f543b3ce72745cab321e6daf25d935fd12ba55a4152f1113eb6d5e4\"]},\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]},\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", - "bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3fe6080604052600080fdfea165627a7a72305820a0bd439ac45825ff45fb43e1f564b9f7838fc05cc32bfb75f1cfe35bd13d88370029", - "deployedBytecode": "0x6080604052600080fdfea165627a7a72305820a0bd439ac45825ff45fb43e1f564b9f7838fc05cc32bfb75f1cfe35bd13d88370029", - "sourceMap": "144:183:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;144:183:4;;;;;;;", - "deployedSourceMap": "144:183:4:-;;;;;", - "source": "pragma solidity ^0.5.2;\nimport \"./Token.sol\";\nimport \"./Math.sol\";\nimport \"./Proxy.sol\";\n\n/**\n * Deprecated: Use Open Zeppeling one instead\n */\ncontract StandardTokenData {\n /*\n * Storage\n */\n mapping(address => uint) balances;\n mapping(address => mapping(address => uint)) allowances;\n uint totalTokens;\n}\n\n/**\n * Deprecated: Use Open Zeppeling one instead\n */\n/// @title Standard token contract with overflow protection\ncontract GnosisStandardToken is Token, StandardTokenData {\n using GnosisMath for *;\n\n /*\n * Public functions\n */\n /// @dev Transfers sender's tokens to a given address. Returns success\n /// @param to Address of token receiver\n /// @param value Number of tokens to transfer\n /// @return Was transfer successful?\n function transfer(address to, uint value) public returns (bool) {\n if (!balances[msg.sender].safeToSub(value) || !balances[to].safeToAdd(value)) {\n return false;\n }\n\n balances[msg.sender] -= value;\n balances[to] += value;\n emit Transfer(msg.sender, to, value);\n return true;\n }\n\n /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success\n /// @param from Address from where tokens are withdrawn\n /// @param to Address to where tokens are sent\n /// @param value Number of tokens to transfer\n /// @return Was transfer successful?\n function transferFrom(address from, address to, uint value) public returns (bool) {\n if (!balances[from].safeToSub(value) || !allowances[from][msg.sender].safeToSub(\n value\n ) || !balances[to].safeToAdd(value)) {\n return false;\n }\n balances[from] -= value;\n allowances[from][msg.sender] -= value;\n balances[to] += value;\n emit Transfer(from, to, value);\n return true;\n }\n\n /// @dev Sets approved amount of tokens for spender. Returns success\n /// @param spender Address of allowed account\n /// @param value Number of approved tokens\n /// @return Was approval successful?\n function approve(address spender, uint value) public returns (bool) {\n allowances[msg.sender][spender] = value;\n emit Approval(msg.sender, spender, value);\n return true;\n }\n\n /// @dev Returns number of allowed tokens for given address\n /// @param owner Address of token owner\n /// @param spender Address of token spender\n /// @return Remaining allowance for spender\n function allowance(address owner, address spender) public view returns (uint) {\n return allowances[owner][spender];\n }\n\n /// @dev Returns number of tokens owned by given address\n /// @param owner Address of token owner\n /// @return Balance of owner\n function balanceOf(address owner) public view returns (uint) {\n return balances[owner];\n }\n\n /// @dev Returns total supply of tokens\n /// @return Total supply\n function totalSupply() public view returns (uint) {\n return totalTokens;\n }\n}\n", - "sourcePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "ast": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "exportedSymbols": { - "GnosisStandardToken": [ - 329 - ], - "StandardTokenData": [ - 135 - ] - }, - "id": 330, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 119, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:4" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", - "file": "./Token.sol", - "id": 120, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1564, - "src": "24:21:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", - "file": "./Math.sol", - "id": 121, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1459, - "src": "46:20:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", - "file": "./Proxy.sol", - "id": 122, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1495, - "src": "67:21:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "Deprecated: Use Open Zeppeling one instead", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": [ - 135 - ], - "name": "StandardTokenData", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 126, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "208:33:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 125, - "keyType": { - "id": 123, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "216:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "208:24:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 124, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "227:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "name": "allowances", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "247:55:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 131, - "keyType": { - "id": 127, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "255:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "247:44:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 130, - "keyType": { - "id": 128, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "274:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "266:24:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 129, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "285:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 134, - "name": "totalTokens", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "308:16:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 133, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "308:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "scope": 330, - "src": "144:183:4" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 136, - "name": "Token", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1563, - "src": "475:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Token_$1563", - "typeString": "contract Token" - } - }, - "id": 137, - "nodeType": "InheritanceSpecifier", - "src": "475:5:4" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 138, - "name": "StandardTokenData", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 135, - "src": "482:17:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_StandardTokenData_$135", - "typeString": "contract StandardTokenData" - } - }, - "id": 139, - "nodeType": "InheritanceSpecifier", - "src": "482:17:4" - } - ], - "contractDependencies": [ - 135, - 1563 - ], - "contractKind": "contract", - "documentation": "@title Standard token contract with overflow protection", - "fullyImplemented": true, - "id": 329, - "linearizedBaseContracts": [ - 329, - 135, - 1563 - ], - "name": "GnosisStandardToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 141, - "libraryName": { - "contractScope": null, - "id": 140, - "name": "GnosisMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1458, - "src": "512:10:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GnosisMath_$1458", - "typeString": "library GnosisMath" - } - }, - "nodeType": "UsingForDirective", - "src": "506:23:4", - "typeName": null - }, - { - "body": { - "id": 192, - "nodeType": "Block", - "src": "849:269:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "863:38:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 155, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "895:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 150, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "864:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 153, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 151, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "873:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "873:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "864:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "864:30:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "864:37:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "905:30:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 162, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "929:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 158, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "906:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 160, - "indexExpression": { - "argumentTypes": null, - "id": 159, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "915:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "906:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToAdd", - "nodeType": "MemberAccess", - "referencedDeclaration": 1207, - "src": "906:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "906:29:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "863:72:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 169, - "nodeType": "IfStatement", - "src": "859:115:4", - "trueBody": { - "id": 168, - "nodeType": "Block", - "src": "937:37:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "958:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 149, - "id": 167, - "nodeType": "Return", - "src": "951:12:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 170, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "984:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 173, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 171, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "993:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "993:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "984:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 174, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1008:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "984:29:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 176, - "nodeType": "ExpressionStatement", - "src": "984:29:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 177, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1023:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 179, - "indexExpression": { - "argumentTypes": null, - "id": 178, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "1032:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1023:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 180, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1039:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1023:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 182, - "nodeType": "ExpressionStatement", - "src": "1023:21:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 184, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1068:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1068:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 186, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "1080:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 187, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1084:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 183, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1504, - "src": "1059:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1059:31:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 189, - "nodeType": "EmitStatement", - "src": "1054:36:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 190, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1107:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 149, - "id": 191, - "nodeType": "Return", - "src": "1100:11:4" - } - ] - }, - "documentation": "@dev Transfers sender's tokens to a given address. Returns success\n @param to Address of token receiver\n @param value Number of tokens to transfer\n @return Was transfer successful?", - "id": 193, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 146, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 143, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "803:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "803:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 145, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "815:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 144, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "815:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "802:24:4" - }, - "returnParameters": { - "id": 149, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 148, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "843:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 147, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "843:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "842:6:4" - }, - "scope": 329, - "src": "785:333:4", - "stateMutability": "nonpayable", - "superFunction": 1521, - "visibility": "public" - }, - { - "body": { - "id": 263, - "nodeType": "Block", - "src": "1512:369:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1526:32:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 208, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1552:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 204, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1527:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 206, - "indexExpression": { - "argumentTypes": null, - "id": 205, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1536:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1527:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "1527:24:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1527:31:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1562:68:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 218, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1615:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 211, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1563:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 213, - "indexExpression": { - "argumentTypes": null, - "id": 212, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1574:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1563:16:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 216, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 214, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1580:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1580:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1563:28:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "1563:38:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1563:67:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1526:104:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1634:30:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 226, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1658:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 222, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1635:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 224, - "indexExpression": { - "argumentTypes": null, - "id": 223, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1644:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1635:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToAdd", - "nodeType": "MemberAccess", - "referencedDeclaration": 1207, - "src": "1635:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1635:29:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1526:138:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 233, - "nodeType": "IfStatement", - "src": "1522:181:4", - "trueBody": { - "id": 232, - "nodeType": "Block", - "src": "1666:37:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1687:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 203, - "id": 231, - "nodeType": "Return", - "src": "1680:12:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 234, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1712:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 236, - "indexExpression": { - "argumentTypes": null, - "id": 235, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1721:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1712:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 237, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1730:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1712:23:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 239, - "nodeType": "ExpressionStatement", - "src": "1712:23:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 240, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1745:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 244, - "indexExpression": { - "argumentTypes": null, - "id": 241, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1756:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1745:16:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 245, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 242, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1762:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1762:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1745:28:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 246, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1777:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1745:37:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 248, - "nodeType": "ExpressionStatement", - "src": "1745:37:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 249, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1792:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 251, - "indexExpression": { - "argumentTypes": null, - "id": 250, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1801:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1792:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 252, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1808:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1792:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 254, - "nodeType": "ExpressionStatement", - "src": "1792:21:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 256, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1837:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 257, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1843:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 258, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1847:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 255, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1504, - "src": "1828:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1828:25:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 260, - "nodeType": "EmitStatement", - "src": "1823:30:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1870:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 203, - "id": 262, - "nodeType": "Return", - "src": "1863:11:4" - } - ] - }, - "documentation": "@dev Allows allowed third party to transfer tokens from one address to another. Returns success\n @param from Address from where tokens are withdrawn\n @param to Address to where tokens are sent\n @param value Number of tokens to transfer\n @return Was transfer successful?", - "id": 264, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 195, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1452:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 194, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1452:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 197, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1466:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 196, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1466:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 199, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1478:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 198, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1478:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1451:38:4" - }, - "returnParameters": { - "id": 203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 202, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1506:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 201, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1506:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1505:6:4" - }, - "scope": 329, - "src": "1430:451:4", - "stateMutability": "nonpayable", - "superFunction": 1532, - "visibility": "public" - }, - { - "body": { - "id": 291, - "nodeType": "Block", - "src": "2166:128:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 273, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "2176:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 277, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 274, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2187:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2187:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2176:22:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 278, - "indexExpression": { - "argumentTypes": null, - "id": 276, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "2199:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2176:31:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 279, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "2210:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2176:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 281, - "nodeType": "ExpressionStatement", - "src": "2176:39:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 283, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2239:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2239:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 285, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "2251:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 286, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "2260:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 282, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1512, - "src": "2230:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2230:36:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 288, - "nodeType": "EmitStatement", - "src": "2225:41:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 289, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2283:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 272, - "id": 290, - "nodeType": "Return", - "src": "2276:11:4" - } - ] - }, - "documentation": "@dev Sets approved amount of tokens for spender. Returns success\n @param spender Address of allowed account\n @param value Number of approved tokens\n @return Was approval successful?", - "id": 292, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 266, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2115:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 265, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2115:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 268, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2132:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 267, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2132:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2114:29:4" - }, - "returnParameters": { - "id": 272, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 271, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2160:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 270, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2160:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2159:6:4" - }, - "scope": 329, - "src": "2098:196:4", - "stateMutability": "nonpayable", - "superFunction": 1541, - "visibility": "public" - }, - { - "body": { - "id": 307, - "nodeType": "Block", - "src": "2582:50:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 301, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "2599:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 303, - "indexExpression": { - "argumentTypes": null, - "id": 302, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 294, - "src": "2610:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2599:17:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 305, - "indexExpression": { - "argumentTypes": null, - "id": 304, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 296, - "src": "2617:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2599:26:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 300, - "id": 306, - "nodeType": "Return", - "src": "2592:33:4" - } - ] - }, - "documentation": "@dev Returns number of allowed tokens for given address\n @param owner Address of token owner\n @param spender Address of token spender\n @return Remaining allowance for spender", - "id": 308, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 294, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2523:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 293, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2523:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 296, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2538:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 295, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2538:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2522:32:4" - }, - "returnParameters": { - "id": 300, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 299, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2576:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 298, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2576:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2575:6:4" - }, - "scope": 329, - "src": "2504:128:4", - "stateMutability": "view", - "superFunction": 1557, - "visibility": "public" - }, - { - "body": { - "id": 319, - "nodeType": "Block", - "src": "2837:39:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 315, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "2854:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 317, - "indexExpression": { - "argumentTypes": null, - "id": 316, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 310, - "src": "2863:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2854:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 314, - "id": 318, - "nodeType": "Return", - "src": "2847:22:4" - } - ] - }, - "documentation": "@dev Returns number of tokens owned by given address\n @param owner Address of token owner\n @return Balance of owner", - "id": 320, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 311, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 310, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 320, - "src": "2795:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 309, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2795:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2794:15:4" - }, - "returnParameters": { - "id": 314, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 313, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 320, - "src": "2831:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 312, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2831:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2830:6:4" - }, - "scope": 329, - "src": "2776:100:4", - "stateMutability": "view", - "superFunction": 1548, - "visibility": "public" - }, - { - "body": { - "id": 327, - "nodeType": "Block", - "src": "3005:35:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 325, - "name": "totalTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 134, - "src": "3022:11:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 324, - "id": 326, - "nodeType": "Return", - "src": "3015:18:4" - } - ] - }, - "documentation": "@dev Returns total supply of tokens\n @return Total supply", - "id": 328, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 321, - "nodeType": "ParameterList", - "parameters": [], - "src": "2975:2:4" - }, - "returnParameters": { - "id": 324, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 323, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 328, - "src": "2999:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 322, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2999:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2998:6:4" - }, - "scope": 329, - "src": "2955:85:4", - "stateMutability": "view", - "superFunction": 1562, - "visibility": "public" - } - ], - "scope": 330, - "src": "443:2599:4" - } - ], - "src": "0:3043:4" - }, - "legacyAST": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "exportedSymbols": { - "GnosisStandardToken": [ - 329 - ], - "StandardTokenData": [ - 135 - ] - }, - "id": 330, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 119, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:4" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", - "file": "./Token.sol", - "id": 120, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1564, - "src": "24:21:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Math.sol", - "file": "./Math.sol", - "id": 121, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1459, - "src": "46:20:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol", - "file": "./Proxy.sol", - "id": 122, - "nodeType": "ImportDirective", - "scope": 330, - "sourceUnit": 1495, - "src": "67:21:4", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "Deprecated: Use Open Zeppeling one instead", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": [ - 135 - ], - "name": "StandardTokenData", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 126, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "208:33:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 125, - "keyType": { - "id": 123, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "216:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "208:24:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 124, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "227:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "name": "allowances", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "247:55:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 131, - "keyType": { - "id": 127, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "255:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "247:44:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 130, - "keyType": { - "id": 128, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "274:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "266:24:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 129, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "285:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 134, - "name": "totalTokens", - "nodeType": "VariableDeclaration", - "scope": 135, - "src": "308:16:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 133, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "308:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "scope": 330, - "src": "144:183:4" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 136, - "name": "Token", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1563, - "src": "475:5:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Token_$1563", - "typeString": "contract Token" - } - }, - "id": 137, - "nodeType": "InheritanceSpecifier", - "src": "475:5:4" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 138, - "name": "StandardTokenData", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 135, - "src": "482:17:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_StandardTokenData_$135", - "typeString": "contract StandardTokenData" - } - }, - "id": 139, - "nodeType": "InheritanceSpecifier", - "src": "482:17:4" - } - ], - "contractDependencies": [ - 135, - 1563 - ], - "contractKind": "contract", - "documentation": "@title Standard token contract with overflow protection", - "fullyImplemented": true, - "id": 329, - "linearizedBaseContracts": [ - 329, - 135, - 1563 - ], - "name": "GnosisStandardToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 141, - "libraryName": { - "contractScope": null, - "id": 140, - "name": "GnosisMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1458, - "src": "512:10:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GnosisMath_$1458", - "typeString": "library GnosisMath" - } - }, - "nodeType": "UsingForDirective", - "src": "506:23:4", - "typeName": null - }, - { - "body": { - "id": 192, - "nodeType": "Block", - "src": "849:269:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "863:38:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 155, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "895:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 150, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "864:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 153, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 151, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "873:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 152, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "873:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "864:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "864:30:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "864:37:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 164, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "905:30:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 162, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "929:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 158, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "906:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 160, - "indexExpression": { - "argumentTypes": null, - "id": 159, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "915:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "906:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToAdd", - "nodeType": "MemberAccess", - "referencedDeclaration": 1207, - "src": "906:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 163, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "906:29:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "863:72:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 169, - "nodeType": "IfStatement", - "src": "859:115:4", - "trueBody": { - "id": 168, - "nodeType": "Block", - "src": "937:37:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "958:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 149, - "id": 167, - "nodeType": "Return", - "src": "951:12:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 170, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "984:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 173, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 171, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "993:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 172, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "993:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "984:20:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 174, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1008:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "984:29:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 176, - "nodeType": "ExpressionStatement", - "src": "984:29:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 181, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 177, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1023:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 179, - "indexExpression": { - "argumentTypes": null, - "id": 178, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "1032:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1023:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 180, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1039:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1023:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 182, - "nodeType": "ExpressionStatement", - "src": "1023:21:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 184, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1068:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 185, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1068:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 186, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 143, - "src": "1080:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 187, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 145, - "src": "1084:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 183, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1504, - "src": "1059:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1059:31:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 189, - "nodeType": "EmitStatement", - "src": "1054:36:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 190, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1107:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 149, - "id": 191, - "nodeType": "Return", - "src": "1100:11:4" - } - ] - }, - "documentation": "@dev Transfers sender's tokens to a given address. Returns success\n @param to Address of token receiver\n @param value Number of tokens to transfer\n @return Was transfer successful?", - "id": 193, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 146, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 143, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "803:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 142, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "803:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 145, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "815:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 144, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "815:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "802:24:4" - }, - "returnParameters": { - "id": 149, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 148, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 193, - "src": "843:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 147, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "843:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "842:6:4" - }, - "scope": 329, - "src": "785:333:4", - "stateMutability": "nonpayable", - "superFunction": 1521, - "visibility": "public" - }, - { - "body": { - "id": 263, - "nodeType": "Block", - "src": "1512:369:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 229, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1526:32:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 208, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1552:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 204, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1527:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 206, - "indexExpression": { - "argumentTypes": null, - "id": 205, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1536:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1527:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "1527:24:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1527:31:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 220, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1562:68:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 218, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1615:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 211, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1563:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 213, - "indexExpression": { - "argumentTypes": null, - "id": 212, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1574:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1563:16:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 216, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 214, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1580:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1580:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1563:28:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToSub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1221, - "src": "1563:38:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1563:67:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1526:104:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "id": 228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1634:30:4", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 226, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1658:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 222, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1635:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 224, - "indexExpression": { - "argumentTypes": null, - "id": 223, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1644:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1635:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "safeToAdd", - "nodeType": "MemberAccess", - "referencedDeclaration": 1207, - "src": "1635:22:4", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (bool)" - } - }, - "id": 227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1635:29:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1526:138:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 233, - "nodeType": "IfStatement", - "src": "1522:181:4", - "trueBody": { - "id": 232, - "nodeType": "Block", - "src": "1666:37:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1687:5:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 203, - "id": 231, - "nodeType": "Return", - "src": "1680:12:4" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 234, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1712:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 236, - "indexExpression": { - "argumentTypes": null, - "id": 235, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1721:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1712:14:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 237, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1730:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1712:23:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 239, - "nodeType": "ExpressionStatement", - "src": "1712:23:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 240, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1745:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 244, - "indexExpression": { - "argumentTypes": null, - "id": 241, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1756:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1745:16:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 245, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 242, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "1762:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1762:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1745:28:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 246, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1777:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1745:37:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 248, - "nodeType": "ExpressionStatement", - "src": "1745:37:4" - }, - { - "expression": { - "argumentTypes": null, - "id": 253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 249, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1792:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 251, - "indexExpression": { - "argumentTypes": null, - "id": 250, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1801:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1792:12:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 252, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1808:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1792:21:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 254, - "nodeType": "ExpressionStatement", - "src": "1792:21:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 256, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 195, - "src": "1837:4:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 257, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 197, - "src": "1843:2:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 258, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 199, - "src": "1847:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 255, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1504, - "src": "1828:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1828:25:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 260, - "nodeType": "EmitStatement", - "src": "1823:30:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 261, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1870:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 203, - "id": 262, - "nodeType": "Return", - "src": "1863:11:4" - } - ] - }, - "documentation": "@dev Allows allowed third party to transfer tokens from one address to another. Returns success\n @param from Address from where tokens are withdrawn\n @param to Address to where tokens are sent\n @param value Number of tokens to transfer\n @return Was transfer successful?", - "id": 264, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 200, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 195, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1452:12:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 194, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1452:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 197, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1466:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 196, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1466:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 199, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1478:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 198, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1478:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1451:38:4" - }, - "returnParameters": { - "id": 203, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 202, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 264, - "src": "1506:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 201, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1506:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1505:6:4" - }, - "scope": 329, - "src": "1430:451:4", - "stateMutability": "nonpayable", - "superFunction": 1532, - "visibility": "public" - }, - { - "body": { - "id": 291, - "nodeType": "Block", - "src": "2166:128:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 273, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "2176:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 277, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 274, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2187:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2187:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2176:22:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 278, - "indexExpression": { - "argumentTypes": null, - "id": 276, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "2199:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2176:31:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 279, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "2210:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2176:39:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 281, - "nodeType": "ExpressionStatement", - "src": "2176:39:4" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 283, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "2239:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2239:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 285, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 266, - "src": "2251:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 286, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 268, - "src": "2260:5:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 282, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1512, - "src": "2230:8:4", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2230:36:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 288, - "nodeType": "EmitStatement", - "src": "2225:41:4" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 289, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2283:4:4", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 272, - "id": 290, - "nodeType": "Return", - "src": "2276:11:4" - } - ] - }, - "documentation": "@dev Sets approved amount of tokens for spender. Returns success\n @param spender Address of allowed account\n @param value Number of approved tokens\n @return Was approval successful?", - "id": 292, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 269, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 266, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2115:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 265, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2115:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 268, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2132:10:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 267, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2132:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2114:29:4" - }, - "returnParameters": { - "id": 272, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 271, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 292, - "src": "2160:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 270, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2160:4:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2159:6:4" - }, - "scope": 329, - "src": "2098:196:4", - "stateMutability": "nonpayable", - "superFunction": 1541, - "visibility": "public" - }, - { - "body": { - "id": 307, - "nodeType": "Block", - "src": "2582:50:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 301, - "name": "allowances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "2599:10:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 303, - "indexExpression": { - "argumentTypes": null, - "id": 302, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 294, - "src": "2610:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2599:17:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 305, - "indexExpression": { - "argumentTypes": null, - "id": 304, - "name": "spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 296, - "src": "2617:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2599:26:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 300, - "id": 306, - "nodeType": "Return", - "src": "2592:33:4" - } - ] - }, - "documentation": "@dev Returns number of allowed tokens for given address\n @param owner Address of token owner\n @param spender Address of token spender\n @return Remaining allowance for spender", - "id": 308, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 294, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2523:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 293, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2523:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 296, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2538:15:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 295, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2538:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2522:32:4" - }, - "returnParameters": { - "id": 300, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 299, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 308, - "src": "2576:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 298, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2576:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2575:6:4" - }, - "scope": 329, - "src": "2504:128:4", - "stateMutability": "view", - "superFunction": 1557, - "visibility": "public" - }, - { - "body": { - "id": 319, - "nodeType": "Block", - "src": "2837:39:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 315, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "2854:8:4", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 317, - "indexExpression": { - "argumentTypes": null, - "id": 316, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 310, - "src": "2863:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2854:15:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 314, - "id": 318, - "nodeType": "Return", - "src": "2847:22:4" - } - ] - }, - "documentation": "@dev Returns number of tokens owned by given address\n @param owner Address of token owner\n @return Balance of owner", - "id": 320, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 311, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 310, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 320, - "src": "2795:13:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 309, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2795:7:4", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2794:15:4" - }, - "returnParameters": { - "id": 314, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 313, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 320, - "src": "2831:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 312, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2831:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2830:6:4" - }, - "scope": 329, - "src": "2776:100:4", - "stateMutability": "view", - "superFunction": 1548, - "visibility": "public" - }, - { - "body": { - "id": 327, - "nodeType": "Block", - "src": "3005:35:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 325, - "name": "totalTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 134, - "src": "3022:11:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 324, - "id": 326, - "nodeType": "Return", - "src": "3015:18:4" - } - ] - }, - "documentation": "@dev Returns total supply of tokens\n @return Total supply", - "id": 328, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 321, - "nodeType": "ParameterList", - "parameters": [], - "src": "2975:2:4" - }, - "returnParameters": { - "id": 324, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 323, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 328, - "src": "2999:4:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 322, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2999:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2998:6:4" - }, - "scope": 329, - "src": "2955:85:4", - "stateMutability": "view", - "superFunction": 1562, - "visibility": "public" - } - ], - "scope": 330, - "src": "443:2599:4" - } - ], - "src": "0:3043:4" - }, - "compiler": { - "name": "solc", - "version": "0.5.8+commit.23d335f2.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.0.10", - "updatedAt": "2019-06-03T08:59:02.087Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {}, - "notice": "Deprecated: Use Open Zeppeling one instead" - } -} \ No newline at end of file diff --git a/build/contracts/Token.json b/build/contracts/Token.json deleted file mode 100644 index b6934a6b..00000000 --- a/build/contracts/Token.json +++ /dev/null @@ -1,1865 +0,0 @@ -{ - "contractName": "Token", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "from", - "type": "address" - }, - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{},\"title\":\"Abstract token contract - Functions to be implemented by token contracts\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/Token.sol\":\"Token\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "/// Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md\npragma solidity ^0.5.2;\n\n/// @title Abstract token contract - Functions to be implemented by token contracts\ncontract Token {\n /*\n * Events\n */\n event Transfer(address indexed from, address indexed to, uint value);\n event Approval(address indexed owner, address indexed spender, uint value);\n\n /*\n * Public functions\n */\n function transfer(address to, uint value) public returns (bool);\n function transferFrom(address from, address to, uint value) public returns (bool);\n function approve(address spender, uint value) public returns (bool);\n function balanceOf(address owner) public view returns (uint);\n function allowance(address owner, address spender) public view returns (uint);\n function totalSupply() public view returns (uint);\n}\n", - "sourcePath": "@gnosis.pm/util-contracts/contracts/Token.sol", - "ast": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", - "exportedSymbols": { - "Token": [ - 1563 - ] - }, - "id": 1564, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1496, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "113:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "@title Abstract token contract - Functions to be implemented by token contracts", - "fullyImplemented": false, - "id": 1563, - "linearizedBaseContracts": [ - 1563 - ], - "name": "Token", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 1504, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 1503, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1498, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1504, - "src": "288:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1497, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "288:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1500, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1504, - "src": "310:18:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1499, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "310:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1502, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1504, - "src": "330:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1501, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "330:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "287:54:7" - }, - "src": "273:69:7" - }, - { - "anonymous": false, - "documentation": null, - "id": 1512, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1511, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1506, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1512, - "src": "362:21:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1505, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "362:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1508, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1512, - "src": "385:23:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1507, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "385:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1510, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1512, - "src": "410:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1509, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "410:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "361:60:7" - }, - "src": "347:75:7" - }, - { - "body": null, - "documentation": null, - "id": 1521, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1517, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1514, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "486:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1513, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "486:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1516, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "498:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1515, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "498:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "485:24:7" - }, - "returnParameters": { - "id": 1520, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1519, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "526:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1518, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "526:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "525:6:7" - }, - "scope": 1563, - "src": "468:64:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 1532, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1528, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1523, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1532, - "src": "559:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1522, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "559:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1525, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1532, - "src": "573:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1524, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "573:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1527, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1532, - "src": "585:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1526, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "585:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "558:38:7" - }, - "returnParameters": { - "id": 1531, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1530, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1532, - "src": "613:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1529, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "613:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "612:6:7" - }, - "scope": 1563, - "src": "537:82:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 1541, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1537, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1534, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1541, - "src": "641:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1533, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "641:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1536, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1541, - "src": "658:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1535, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "658:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "640:29:7" - }, - "returnParameters": { - "id": 1540, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1539, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1541, - "src": "686:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1538, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "686:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "685:6:7" - }, - "scope": 1563, - "src": "624:68:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 1548, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1544, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1543, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1548, - "src": "716:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1542, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "716:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "715:15:7" - }, - "returnParameters": { - "id": 1547, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1546, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1548, - "src": "752:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1545, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "752:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "751:6:7" - }, - "scope": 1563, - "src": "697:61:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 1557, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1553, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1550, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1557, - "src": "782:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1549, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "782:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1552, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1557, - "src": "797:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1551, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "797:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "781:32:7" - }, - "returnParameters": { - "id": 1556, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1555, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1557, - "src": "835:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1554, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "835:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "834:6:7" - }, - "scope": 1563, - "src": "763:78:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 1562, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1558, - "nodeType": "ParameterList", - "parameters": [], - "src": "866:2:7" - }, - "returnParameters": { - "id": 1561, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1560, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1562, - "src": "890:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1559, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "890:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "889:6:7" - }, - "scope": 1563, - "src": "846:50:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 1564, - "src": "222:676:7" - } - ], - "src": "113:786:7" - }, - "legacyAST": { - "absolutePath": "@gnosis.pm/util-contracts/contracts/Token.sol", - "exportedSymbols": { - "Token": [ - 1563 - ] - }, - "id": 1564, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1496, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "113:23:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "@title Abstract token contract - Functions to be implemented by token contracts", - "fullyImplemented": false, - "id": 1563, - "linearizedBaseContracts": [ - 1563 - ], - "name": "Token", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 1504, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 1503, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1498, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1504, - "src": "288:20:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1497, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "288:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1500, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1504, - "src": "310:18:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1499, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "310:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1502, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1504, - "src": "330:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1501, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "330:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "287:54:7" - }, - "src": "273:69:7" - }, - { - "anonymous": false, - "documentation": null, - "id": 1512, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 1511, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1506, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1512, - "src": "362:21:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1505, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "362:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1508, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1512, - "src": "385:23:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1507, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "385:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1510, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1512, - "src": "410:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1509, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "410:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "361:60:7" - }, - "src": "347:75:7" - }, - { - "body": null, - "documentation": null, - "id": 1521, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1517, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1514, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "486:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1513, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "486:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1516, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "498:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1515, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "498:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "485:24:7" - }, - "returnParameters": { - "id": 1520, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1519, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "526:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1518, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "526:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "525:6:7" - }, - "scope": 1563, - "src": "468:64:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 1532, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1528, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1523, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1532, - "src": "559:12:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1522, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "559:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1525, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1532, - "src": "573:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1524, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "573:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1527, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1532, - "src": "585:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1526, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "585:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "558:38:7" - }, - "returnParameters": { - "id": 1531, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1530, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1532, - "src": "613:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1529, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "613:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "612:6:7" - }, - "scope": 1563, - "src": "537:82:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 1541, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1537, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1534, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1541, - "src": "641:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1533, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "641:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1536, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1541, - "src": "658:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1535, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "658:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "640:29:7" - }, - "returnParameters": { - "id": 1540, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1539, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1541, - "src": "686:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1538, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "686:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "685:6:7" - }, - "scope": 1563, - "src": "624:68:7", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 1548, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1544, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1543, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1548, - "src": "716:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1542, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "716:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "715:15:7" - }, - "returnParameters": { - "id": 1547, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1546, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1548, - "src": "752:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1545, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "752:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "751:6:7" - }, - "scope": 1563, - "src": "697:61:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 1557, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1553, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1550, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1557, - "src": "782:13:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1549, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "782:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1552, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 1557, - "src": "797:15:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1551, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "797:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "781:32:7" - }, - "returnParameters": { - "id": 1556, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1555, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1557, - "src": "835:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1554, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "835:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "834:6:7" - }, - "scope": 1563, - "src": "763:78:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 1562, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1558, - "nodeType": "ParameterList", - "parameters": [], - "src": "866:2:7" - }, - "returnParameters": { - "id": 1561, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1560, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1562, - "src": "890:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1559, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "890:4:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "889:6:7" - }, - "scope": 1563, - "src": "846:50:7", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 1564, - "src": "222:676:7" - } - ], - "src": "113:786:7" - }, - "compiler": { - "name": "solc", - "version": "0.5.8+commit.23d335f2.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.0.10", - "updatedAt": "2019-06-03T08:59:02.139Z", - "devdoc": { - "methods": {}, - "title": "Abstract token contract - Functions to be implemented by token contracts" - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/TokenOMG.json b/build/contracts/TokenOMG.json deleted file mode 100644 index c07180d9..00000000 --- a/build/contracts/TokenOMG.json +++ /dev/null @@ -1,1008 +0,0 @@ -{ - "contractName": "TokenOMG", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "from", - "type": "address" - }, - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "amount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns number of allowed tokens for given address\",\"params\":{\"owner\":\"Address of token owner\",\"spender\":\"Address of token spender\"},\"return\":\"Remaining allowance for spender\"},\"approve(address,uint256)\":{\"details\":\"Sets approved amount of tokens for spender. Returns success\",\"params\":{\"spender\":\"Address of allowed account\",\"value\":\"Number of approved tokens\"},\"return\":\"Was approval successful?\"},\"balanceOf(address)\":{\"details\":\"Returns number of tokens owned by given address\",\"params\":{\"owner\":\"Address of token owner\"},\"return\":\"Balance of owner\"},\"totalSupply()\":{\"details\":\"Returns total supply of tokens\",\"return\":\"Total supply\"},\"transfer(address,uint256)\":{\"details\":\"Transfers sender's tokens to a given address. Returns success\",\"params\":{\"to\":\"Address of token receiver\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Allows allowed third party to transfer tokens from one address to another. Returns success\",\"params\":{\"from\":\"Address from where tokens are withdrawn\",\"to\":\"Address to where tokens are sent\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol\":\"TokenOMG\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol\":{\"keccak256\":\"0x099d05859e51af8b24539b47e0d181a17409d51063263f8a8d53280818c69d4d\",\"urls\":[\"bzzr://4eb926d078f8111367c3a180e7eb99f36528b95c871e1004c626f1cb5487f5dc\"]},\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":{\"keccak256\":\"0xdec5028208406e811c449a04e2932f7efeae629388cb6124550b8b048a645556\",\"urls\":[\"bzzr://f3d13a708f543b3ce72745cab321e6daf25d935fd12ba55a4152f1113eb6d5e4\"]},\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]},\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516020806105f68339810180604052602081101561003057600080fd5b5051336000908152602081905260409020556105a5806100516000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b038135169060200135610284565b604080519115158252519081900360200190f35b61015d6102eb565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356102f1565b6101ad61041e565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b0316610423565b6100a061043e565b6101416004803603604081101561020757600080fd5b506001600160a01b038135169060200135610477565b61015d6004803603604081101561023357600080fd5b506001600160a01b0381358116916020013516610542565b6040518060400160405280600d81526020017f4f6d697365676f20546f6b656e0000000000000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461031a908363ffffffff61056d16565b158061035757506001600160a01b0384166000908152600160209081526040808320338452909152902054610355908363ffffffff61056d16565b155b8061038857506001600160a01b038316600090815260208190526040902054610386908363ffffffff61057216565b155b1561039557506000610417565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b601281565b6001600160a01b031660009081526020819052604090205490565b6040518060400160405280600381526020017f4f4d47000000000000000000000000000000000000000000000000000000000081525081565b33600090815260208190526040812054610497908363ffffffff61056d16565b15806104c957506001600160a01b0383166000908152602081905260409020546104c7908363ffffffff61057216565b155b156104d6575060006102e5565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a72305820ea99ba72da2f296e4973ee11e32209d4295c58c79dd30789d835af32ba70401c0029", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b038135169060200135610284565b604080519115158252519081900360200190f35b61015d6102eb565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356102f1565b6101ad61041e565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b0316610423565b6100a061043e565b6101416004803603604081101561020757600080fd5b506001600160a01b038135169060200135610477565b61015d6004803603604081101561023357600080fd5b506001600160a01b0381358116916020013516610542565b6040518060400160405280600d81526020017f4f6d697365676f20546f6b656e0000000000000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461031a908363ffffffff61056d16565b158061035757506001600160a01b0384166000908152600160209081526040808320338452909152902054610355908363ffffffff61056d16565b155b8061038857506001600160a01b038316600090815260208190526040902054610386908363ffffffff61057216565b155b1561039557506000610417565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b601281565b6001600160a01b031660009081526020819052604090205490565b6040518060400160405280600381526020017f4f4d47000000000000000000000000000000000000000000000000000000000081525081565b33600090815260208190526040812054610497908363ffffffff61056d16565b15806104c957506001600160a01b0383166000908152602081905260409020546104c7908363ffffffff61057216565b155b156104d6575060006102e5565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a72305820ea99ba72da2f296e4973ee11e32209d4295c58c79dd30789d835af32ba70401c0029", - "sourceMap": "96:264:2:-;;;271:87;8:9:-1;5:2;;;30:1;27;20:12;5:2;271:87:2;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;271:87:2;333:10;324:8;:20;;;271:87;324:20;;;;;;:29;96:264;;;;;;", - "deployedSourceMap": "96:264:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;96:264:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;182:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;182:45:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2098:196:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2098:196:4;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2955:85;;;:::i;:::-;;;;;;;;;;;;;;;;1430:451;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1430:451:4;;;;;;;;;;;;;;;;;:::i;231:35:2:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2776:100:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2776:100:4;-1:-1:-1;;;;;2776:100:4;;:::i;141:37:2:-;;;:::i;785:333:4:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;785:333:4;;;;;;;;:::i;2504:128::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2504:128:4;;;;;;;;;;:::i;182:45:2:-;;;;;;;;;;;;;;;;;;;:::o;2098:196:4:-;2187:10;2160:4;2176:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;2176:31:4;;;;;;;;;;;:39;;;2230:36;;;;;;;2160:4;;2176:31;;2187:10;;2230:36;;;;;;;;-1:-1:-1;2283:4:4;2098:196;;;;;:::o;2955:85::-;3022:11;;2955:85;:::o;1430:451::-;-1:-1:-1;;;;;1527:14:4;;1506:4;1527:14;;;;;;;;;;;:31;;1552:5;1527:31;:24;:31;:::i;:::-;1526:32;:104;;;-1:-1:-1;;;;;;1563:16:4;;;;;;:10;:16;;;;;;;;1580:10;1563:28;;;;;;;;:67;;1615:5;1563:67;:38;:67;:::i;:::-;1562:68;1526:104;:138;;;-1:-1:-1;;;;;;1635:12:4;;:8;:12;;;;;;;;;;;:29;;1658:5;1635:29;:22;:29;:::i;:::-;1634:30;1526:138;1522:181;;;-1:-1:-1;1687:5:4;1680:12;;1522:181;-1:-1:-1;;;;;1712:14:4;;;:8;:14;;;;;;;;;;;:23;;;;;;;-1:-1:-1;1745:16:4;;;;;1762:10;1745:28;;;;;;;:37;;;;;;;1792:12;;;;;;;;;;;;;:21;;;;;;1828:25;;;;;;;1792:12;;1828:25;;;;;;;;;;;-1:-1:-1;1870:4:4;1430:451;;;;;;:::o;231:35:2:-;264:2;231:35;:::o;2776:100:4:-;-1:-1:-1;;;;;2854:15:4;2831:4;2854:15;;;;;;;;;;;;2776:100::o;141:37:2:-;;;;;;;;;;;;;;;;;;;:::o;785:333:4:-;873:10;843:4;864:20;;;;;;;;;;;:37;;895:5;864:37;:30;:37;:::i;:::-;863:38;:72;;;-1:-1:-1;;;;;;906:12:4;;:8;:12;;;;;;;;;;;:29;;929:5;906:29;:22;:29;:::i;:::-;905:30;863:72;859:115;;;-1:-1:-1;958:5:4;951:12;;859:115;993:10;984:8;:20;;;;;;;;;;;:29;;;;;;;-1:-1:-1;;;;;1023:12:4;;;;;;;;;:21;;;;;;1059:31;;;;;;;1023:12;;993:10;1059:31;;;;;;;;;;;-1:-1:-1;1107:4:4;785:333;;;;:::o;2504:128::-;-1:-1:-1;;;;;2599:17:4;;;2576:4;2599:17;;;:10;:17;;;;;;;;:26;;;;;;;;;;;;;2504:128::o;6580:94:5:-;-1:-1:-1;6661:6:5;;6580:94::o;6310:98::-;6391:5;;-1:-1:-1;6391:10:5;;6310:98::o", - "source": "pragma solidity ^0.5.2;\n\nimport \"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\";\n\ncontract TokenOMG is GnosisStandardToken {\n string public constant symbol = \"OMG\";\n string public constant name = \"Omisego Token\";\n uint8 public constant decimals = 18;\n\n constructor(\n uint amount\n )\n public \n {\n balances[msg.sender] = amount;\n }\n}", - "sourcePath": "/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol", - "ast": { - "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol", - "exportedSymbols": { - "TokenOMG": [ - 89 - ] - }, - "id": 90, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 63, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:2" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "file": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "id": 64, - "nodeType": "ImportDirective", - "scope": 90, - "sourceUnit": 330, - "src": "25:69:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 65, - "name": "GnosisStandardToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 329, - "src": "117:19:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GnosisStandardToken_$329", - "typeString": "contract GnosisStandardToken" - } - }, - "id": 66, - "nodeType": "InheritanceSpecifier", - "src": "117:19:2" - } - ], - "contractDependencies": [ - 135, - 329, - 1563 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 89, - "linearizedBaseContracts": [ - 89, - 329, - 135, - 1563 - ], - "name": "TokenOMG", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 69, - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 89, - "src": "141:37:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 67, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "141:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "4f4d47", - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "173:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eadf11d2ba45e7887d539b397ca436e3789fd0fce1853a6c2638148b7ed570cc", - "typeString": "literal_string \"OMG\"" - }, - "value": "OMG" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 72, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 89, - "src": "182:45:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 70, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "182:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "4f6d697365676f20546f6b656e", - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "212:15:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9c1ed8398d5ab339d23f88c4164d2f24b2812ff95a2ca7508663550dba017422", - "typeString": "literal_string \"Omisego Token\"" - }, - "value": "Omisego Token" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 75, - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 89, - "src": "231:35:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 73, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "231:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3138", - "id": 74, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "264:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "visibility": "public" - }, - { - "body": { - "id": 87, - "nodeType": "Block", - "src": "318:40:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 85, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 80, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "324:8:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 83, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 81, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "333:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 82, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "333:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "324:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 84, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 77, - "src": "347:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "324:29:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 86, - "nodeType": "ExpressionStatement", - "src": "324:29:2" - } - ] - }, - "documentation": null, - "id": 88, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 78, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 77, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 88, - "src": "288:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 76, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "288:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "282:21:2" - }, - "returnParameters": { - "id": 79, - "nodeType": "ParameterList", - "parameters": [], - "src": "318:0:2" - }, - "scope": 89, - "src": "271:87:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 90, - "src": "96:264:2" - } - ], - "src": "0:360:2" - }, - "legacyAST": { - "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenOMG.sol", - "exportedSymbols": { - "TokenOMG": [ - 89 - ] - }, - "id": 90, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 63, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:2" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "file": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "id": 64, - "nodeType": "ImportDirective", - "scope": 90, - "sourceUnit": 330, - "src": "25:69:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 65, - "name": "GnosisStandardToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 329, - "src": "117:19:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GnosisStandardToken_$329", - "typeString": "contract GnosisStandardToken" - } - }, - "id": 66, - "nodeType": "InheritanceSpecifier", - "src": "117:19:2" - } - ], - "contractDependencies": [ - 135, - 329, - 1563 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 89, - "linearizedBaseContracts": [ - 89, - 329, - 135, - 1563 - ], - "name": "TokenOMG", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 69, - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 89, - "src": "141:37:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 67, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "141:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "4f4d47", - "id": 68, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "173:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_eadf11d2ba45e7887d539b397ca436e3789fd0fce1853a6c2638148b7ed570cc", - "typeString": "literal_string \"OMG\"" - }, - "value": "OMG" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 72, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 89, - "src": "182:45:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 70, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "182:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "4f6d697365676f20546f6b656e", - "id": 71, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "212:15:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9c1ed8398d5ab339d23f88c4164d2f24b2812ff95a2ca7508663550dba017422", - "typeString": "literal_string \"Omisego Token\"" - }, - "value": "Omisego Token" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 75, - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 89, - "src": "231:35:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 73, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "231:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3138", - "id": 74, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "264:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "visibility": "public" - }, - { - "body": { - "id": 87, - "nodeType": "Block", - "src": "318:40:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 85, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 80, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "324:8:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 83, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 81, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "333:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 82, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "333:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "324:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 84, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 77, - "src": "347:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "324:29:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 86, - "nodeType": "ExpressionStatement", - "src": "324:29:2" - } - ] - }, - "documentation": null, - "id": 88, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 78, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 77, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 88, - "src": "288:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 76, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "288:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "282:21:2" - }, - "returnParameters": { - "id": 79, - "nodeType": "ParameterList", - "parameters": [], - "src": "318:0:2" - }, - "scope": 89, - "src": "271:87:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 90, - "src": "96:264:2" - } - ], - "src": "0:360:2" - }, - "compiler": { - "name": "solc", - "version": "0.5.8+commit.23d335f2.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.0.10", - "updatedAt": "2019-06-03T08:59:02.081Z", - "devdoc": { - "methods": { - "allowance(address,address)": { - "details": "Returns number of allowed tokens for given address", - "params": { - "owner": "Address of token owner", - "spender": "Address of token spender" - }, - "return": "Remaining allowance for spender" - }, - "approve(address,uint256)": { - "details": "Sets approved amount of tokens for spender. Returns success", - "params": { - "spender": "Address of allowed account", - "value": "Number of approved tokens" - }, - "return": "Was approval successful?" - }, - "balanceOf(address)": { - "details": "Returns number of tokens owned by given address", - "params": { - "owner": "Address of token owner" - }, - "return": "Balance of owner" - }, - "totalSupply()": { - "details": "Returns total supply of tokens", - "return": "Total supply" - }, - "transfer(address,uint256)": { - "details": "Transfers sender's tokens to a given address. Returns success", - "params": { - "to": "Address of token receiver", - "value": "Number of tokens to transfer" - }, - "return": "Was transfer successful?" - }, - "transferFrom(address,address,uint256)": { - "details": "Allows allowed third party to transfer tokens from one address to another. Returns success", - "params": { - "from": "Address from where tokens are withdrawn", - "to": "Address to where tokens are sent", - "value": "Number of tokens to transfer" - }, - "return": "Was transfer successful?" - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/build/contracts/TokenRDN.json b/build/contracts/TokenRDN.json deleted file mode 100644 index c3fdf189..00000000 --- a/build/contracts/TokenRDN.json +++ /dev/null @@ -1,1008 +0,0 @@ -{ - "contractName": "TokenRDN", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "from", - "type": "address" - }, - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "amount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns number of allowed tokens for given address\",\"params\":{\"owner\":\"Address of token owner\",\"spender\":\"Address of token spender\"},\"return\":\"Remaining allowance for spender\"},\"approve(address,uint256)\":{\"details\":\"Sets approved amount of tokens for spender. Returns success\",\"params\":{\"spender\":\"Address of allowed account\",\"value\":\"Number of approved tokens\"},\"return\":\"Was approval successful?\"},\"balanceOf(address)\":{\"details\":\"Returns number of tokens owned by given address\",\"params\":{\"owner\":\"Address of token owner\"},\"return\":\"Balance of owner\"},\"totalSupply()\":{\"details\":\"Returns total supply of tokens\",\"return\":\"Total supply\"},\"transfer(address,uint256)\":{\"details\":\"Transfers sender's tokens to a given address. Returns success\",\"params\":{\"to\":\"Address of token receiver\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Allows allowed third party to transfer tokens from one address to another. Returns success\",\"params\":{\"from\":\"Address from where tokens are withdrawn\",\"to\":\"Address to where tokens are sent\",\"value\":\"Number of tokens to transfer\"},\"return\":\"Was transfer successful?\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol\":\"TokenRDN\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol\":{\"keccak256\":\"0xbd1fc040f6b4f7b68bb7e6b745d02c571d7baf992c5a3a34d57392f624d7043c\",\"urls\":[\"bzzr://fdd020e4fe5f62e961acccce8733276ad3aca6dbe7ccff3f860476774cf6bdab\"]},\"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\":{\"keccak256\":\"0xdec5028208406e811c449a04e2932f7efeae629388cb6124550b8b048a645556\",\"urls\":[\"bzzr://f3d13a708f543b3ce72745cab321e6daf25d935fd12ba55a4152f1113eb6d5e4\"]},\"@gnosis.pm/util-contracts/contracts/Math.sol\":{\"keccak256\":\"0x857768cd0d460e33778dcde29e997b539640bbf37ea23832213b2e5039147ea5\",\"urls\":[\"bzzr://628f7e63a0d6a092aad389b70cc55d6d9c10cd9753f3644d5ea9dc75a3314a8e\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0x2ff8795110cceafcab1010f157a4dd33e46378bb88fbdc3c313a6f0d62e3444f\",\"urls\":[\"bzzr://66d77feaf648ca17dd620f3e27463b4b6e6031fec7ccd64dfffc4c30bd57b467\"]},\"@gnosis.pm/util-contracts/contracts/Token.sol\":{\"keccak256\":\"0x364778f634c900ed83553e17ef1284bd33fa68a738e668f664b4a0fa675bb586\",\"urls\":[\"bzzr://cb31caaf3364dbf5d688adb10de074284845b142c26d23a47b09ee510dd4a432\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516020806105f68339810180604052602081101561003057600080fd5b5051336000908152602081905260409020556105a5806100516000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b038135169060200135610284565b604080519115158252519081900360200190f35b61015d6102eb565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356102f1565b6101ad61041e565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b0316610423565b6100a061043e565b6101416004803603604081101561020757600080fd5b506001600160a01b038135169060200135610477565b61015d6004803603604081101561023357600080fd5b506001600160a01b0381358116916020013516610542565b6040518060400160405280600c81526020017f52616964656e20546f6b656e000000000000000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461031a908363ffffffff61056d16565b158061035757506001600160a01b0384166000908152600160209081526040808320338452909152902054610355908363ffffffff61056d16565b155b8061038857506001600160a01b038316600090815260208190526040902054610386908363ffffffff61057216565b155b1561039557506000610417565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b601281565b6001600160a01b031660009081526020819052604090205490565b6040518060400160405280600381526020017f52444e000000000000000000000000000000000000000000000000000000000081525081565b33600090815260208190526040812054610497908363ffffffff61056d16565b15806104c957506001600160a01b0383166000908152602081905260409020546104c7908363ffffffff61057216565b155b156104d6575060006102e5565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a7230582028ab4b3689cc43a4746f3e3ca9561bfb18236aa987616532108a03ab4faf0ccf0029", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b038135169060200135610284565b604080519115158252519081900360200190f35b61015d6102eb565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356102f1565b6101ad61041e565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b0316610423565b6100a061043e565b6101416004803603604081101561020757600080fd5b506001600160a01b038135169060200135610477565b61015d6004803603604081101561023357600080fd5b506001600160a01b0381358116916020013516610542565b6040518060400160405280600c81526020017f52616964656e20546f6b656e000000000000000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60025490565b6001600160a01b03831660009081526020819052604081205461031a908363ffffffff61056d16565b158061035757506001600160a01b0384166000908152600160209081526040808320338452909152902054610355908363ffffffff61056d16565b155b8061038857506001600160a01b038316600090815260208190526040902054610386908363ffffffff61057216565b155b1561039557506000610417565b6001600160a01b038085166000818152602081815260408083208054889003905560018252808320338452825280832080548890039055938716808352828252918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060015b9392505050565b601281565b6001600160a01b031660009081526020819052604090205490565b6040518060400160405280600381526020017f52444e000000000000000000000000000000000000000000000000000000000081525081565b33600090815260208190526040812054610497908363ffffffff61056d16565b15806104c957506001600160a01b0383166000908152602081905260409020546104c7908363ffffffff61057216565b155b156104d6575060006102e5565b33600081815260208181526040808320805487900390556001600160a01b03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b111590565b810110159056fea165627a7a7230582028ab4b3689cc43a4746f3e3ca9561bfb18236aa987616532108a03ab4faf0ccf0029", - "sourceMap": "96:263:3:-;;;270:87;8:9:-1;5:2;;;30:1;27;20:12;5:2;270:87:3;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;270:87:3;332:10;323:8;:20;;;270:87;323:20;;;;;;:29;96:263;;;;;;", - "deployedSourceMap": "96:263:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;96:263:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;182:44;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;182:44:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2098:196:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2098:196:4;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2955:85;;;:::i;:::-;;;;;;;;;;;;;;;;1430:451;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1430:451:4;;;;;;;;;;;;;;;;;:::i;230:35:3:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2776:100:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2776:100:4;-1:-1:-1;;;;;2776:100:4;;:::i;141:37:3:-;;;:::i;785:333:4:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;785:333:4;;;;;;;;:::i;2504:128::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2504:128:4;;;;;;;;;;:::i;182:44:3:-;;;;;;;;;;;;;;;;;;;:::o;2098:196:4:-;2187:10;2160:4;2176:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;2176:31:4;;;;;;;;;;;:39;;;2230:36;;;;;;;2160:4;;2176:31;;2187:10;;2230:36;;;;;;;;-1:-1:-1;2283:4:4;2098:196;;;;;:::o;2955:85::-;3022:11;;2955:85;:::o;1430:451::-;-1:-1:-1;;;;;1527:14:4;;1506:4;1527:14;;;;;;;;;;;:31;;1552:5;1527:31;:24;:31;:::i;:::-;1526:32;:104;;;-1:-1:-1;;;;;;1563:16:4;;;;;;:10;:16;;;;;;;;1580:10;1563:28;;;;;;;;:67;;1615:5;1563:67;:38;:67;:::i;:::-;1562:68;1526:104;:138;;;-1:-1:-1;;;;;;1635:12:4;;:8;:12;;;;;;;;;;;:29;;1658:5;1635:29;:22;:29;:::i;:::-;1634:30;1526:138;1522:181;;;-1:-1:-1;1687:5:4;1680:12;;1522:181;-1:-1:-1;;;;;1712:14:4;;;:8;:14;;;;;;;;;;;:23;;;;;;;-1:-1:-1;1745:16:4;;;;;1762:10;1745:28;;;;;;;:37;;;;;;;1792:12;;;;;;;;;;;;;:21;;;;;;1828:25;;;;;;;1792:12;;1828:25;;;;;;;;;;;-1:-1:-1;1870:4:4;1430:451;;;;;;:::o;230:35:3:-;263:2;230:35;:::o;2776:100:4:-;-1:-1:-1;;;;;2854:15:4;2831:4;2854:15;;;;;;;;;;;;2776:100::o;141:37:3:-;;;;;;;;;;;;;;;;;;;:::o;785:333:4:-;873:10;843:4;864:20;;;;;;;;;;;:37;;895:5;864:37;:30;:37;:::i;:::-;863:38;:72;;;-1:-1:-1;;;;;;906:12:4;;:8;:12;;;;;;;;;;;:29;;929:5;906:29;:22;:29;:::i;:::-;905:30;863:72;859:115;;;-1:-1:-1;958:5:4;951:12;;859:115;993:10;984:8;:20;;;;;;;;;;;:29;;;;;;;-1:-1:-1;;;;;1023:12:4;;;;;;;;;:21;;;;;;1059:31;;;;;;;1023:12;;993:10;1059:31;;;;;;;;;;;-1:-1:-1;1107:4:4;785:333;;;;:::o;2504:128::-;-1:-1:-1;;;;;2599:17:4;;;2576:4;2599:17;;;:10;:17;;;;;;;;:26;;;;;;;;;;;;;2504:128::o;6580:94:5:-;-1:-1:-1;6661:6:5;;6580:94::o;6310:98::-;6391:5;;-1:-1:-1;6391:10:5;;6310:98::o", - "source": "pragma solidity ^0.5.2;\n\nimport \"@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol\";\n\ncontract TokenRDN is GnosisStandardToken {\n string public constant symbol = \"RDN\";\n string public constant name = \"Raiden Token\";\n uint8 public constant decimals = 18;\n\n constructor(\n uint amount\n )\n public \n {\n balances[msg.sender] = amount;\n }\n}", - "sourcePath": "/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol", - "ast": { - "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol", - "exportedSymbols": { - "TokenRDN": [ - 117 - ] - }, - "id": 118, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 91, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:3" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "file": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "id": 92, - "nodeType": "ImportDirective", - "scope": 118, - "sourceUnit": 330, - "src": "25:69:3", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 93, - "name": "GnosisStandardToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 329, - "src": "117:19:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GnosisStandardToken_$329", - "typeString": "contract GnosisStandardToken" - } - }, - "id": 94, - "nodeType": "InheritanceSpecifier", - "src": "117:19:3" - } - ], - "contractDependencies": [ - 135, - 329, - 1563 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 117, - "linearizedBaseContracts": [ - 117, - 329, - 135, - 1563 - ], - "name": "TokenRDN", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 97, - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "141:37:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 95, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "141:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "52444e", - "id": 96, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "173:5:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_78fa6b4b551b6488425a20e7b1764448d63f2b0cd5642c0dbeb50fcde3d40080", - "typeString": "literal_string \"RDN\"" - }, - "value": "RDN" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 100, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "182:44:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 98, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "182:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "52616964656e20546f6b656e", - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "212:14:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e7a4da2ac183bb65f42dae55d7958c5737070ead828f6f5c64f3c4d0d5b334e3", - "typeString": "literal_string \"Raiden Token\"" - }, - "value": "Raiden Token" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 103, - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "230:35:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 101, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "230:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3138", - "id": 102, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "263:2:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "visibility": "public" - }, - { - "body": { - "id": 115, - "nodeType": "Block", - "src": "317:40:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 108, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "323:8:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 111, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 109, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "332:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "332:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "323:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 112, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 105, - "src": "346:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "323:29:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 114, - "nodeType": "ExpressionStatement", - "src": "323:29:3" - } - ] - }, - "documentation": null, - "id": 116, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 106, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 105, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 116, - "src": "287:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 104, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "287:4:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "281:21:3" - }, - "returnParameters": { - "id": 107, - "nodeType": "ParameterList", - "parameters": [], - "src": "317:0:3" - }, - "scope": 117, - "src": "270:87:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 118, - "src": "96:263:3" - } - ], - "src": "0:359:3" - }, - "legacyAST": { - "absolutePath": "/home/mmv/work/safe-react/src/test/contracts/TokenRDN.sol", - "exportedSymbols": { - "TokenRDN": [ - 117 - ] - }, - "id": 118, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 91, - "literals": [ - "solidity", - "^", - "0.5", - ".2" - ], - "nodeType": "PragmaDirective", - "src": "0:23:3" - }, - { - "absolutePath": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "file": "@gnosis.pm/util-contracts/contracts/GnosisStandardToken.sol", - "id": 92, - "nodeType": "ImportDirective", - "scope": 118, - "sourceUnit": 330, - "src": "25:69:3", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 93, - "name": "GnosisStandardToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 329, - "src": "117:19:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GnosisStandardToken_$329", - "typeString": "contract GnosisStandardToken" - } - }, - "id": 94, - "nodeType": "InheritanceSpecifier", - "src": "117:19:3" - } - ], - "contractDependencies": [ - 135, - 329, - 1563 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 117, - "linearizedBaseContracts": [ - 117, - 329, - 135, - 1563 - ], - "name": "TokenRDN", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 97, - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "141:37:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 95, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "141:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "52444e", - "id": 96, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "173:5:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_78fa6b4b551b6488425a20e7b1764448d63f2b0cd5642c0dbeb50fcde3d40080", - "typeString": "literal_string \"RDN\"" - }, - "value": "RDN" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 100, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "182:44:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 98, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "182:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "52616964656e20546f6b656e", - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "212:14:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e7a4da2ac183bb65f42dae55d7958c5737070ead828f6f5c64f3c4d0d5b334e3", - "typeString": "literal_string \"Raiden Token\"" - }, - "value": "Raiden Token" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 103, - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "230:35:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 101, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "230:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "3138", - "id": 102, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "263:2:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_18_by_1", - "typeString": "int_const 18" - }, - "value": "18" - }, - "visibility": "public" - }, - { - "body": { - "id": 115, - "nodeType": "Block", - "src": "317:40:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 108, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "323:8:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 111, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 109, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1578, - "src": "332:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "332:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "323:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 112, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 105, - "src": "346:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "323:29:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 114, - "nodeType": "ExpressionStatement", - "src": "323:29:3" - } - ] - }, - "documentation": null, - "id": 116, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 106, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 105, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 116, - "src": "287:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 104, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "287:4:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "281:21:3" - }, - "returnParameters": { - "id": 107, - "nodeType": "ParameterList", - "parameters": [], - "src": "317:0:3" - }, - "scope": 117, - "src": "270:87:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 118, - "src": "96:263:3" - } - ], - "src": "0:359:3" - }, - "compiler": { - "name": "solc", - "version": "0.5.8+commit.23d335f2.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.0.10", - "updatedAt": "2019-06-03T08:59:02.082Z", - "devdoc": { - "methods": { - "allowance(address,address)": { - "details": "Returns number of allowed tokens for given address", - "params": { - "owner": "Address of token owner", - "spender": "Address of token spender" - }, - "return": "Remaining allowance for spender" - }, - "approve(address,uint256)": { - "details": "Sets approved amount of tokens for spender. Returns success", - "params": { - "spender": "Address of allowed account", - "value": "Number of approved tokens" - }, - "return": "Was approval successful?" - }, - "balanceOf(address)": { - "details": "Returns number of tokens owned by given address", - "params": { - "owner": "Address of token owner" - }, - "return": "Balance of owner" - }, - "totalSupply()": { - "details": "Returns total supply of tokens", - "return": "Total supply" - }, - "transfer(address,uint256)": { - "details": "Transfers sender's tokens to a given address. Returns success", - "params": { - "to": "Address of token receiver", - "value": "Number of tokens to transfer" - }, - "return": "Was transfer successful?" - }, - "transferFrom(address,address,uint256)": { - "details": "Allows allowed third party to transfer tokens from one address to another. Returns success", - "params": { - "from": "Address from where tokens are withdrawn", - "to": "Address to where tokens are sent", - "value": "Number of tokens to transfer" - }, - "return": "Was transfer successful?" - } - } - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 7c295498..9948b8b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16050,10 +16050,10 @@ truffle-error@^0.0.3: resolved "https://registry.yarnpkg.com/truffle-error/-/truffle-error-0.0.3.tgz#4bf55242e14deee1c7194932709182deff2c97ca" integrity sha1-S/VSQuFN7uHHGUkycJGC3v8sl8o= -truffle-error@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/truffle-error/-/truffle-error-0.0.5.tgz#6b5740c9f3aac74f47b85d654fff7fe2c1fc5e0e" - integrity sha512-JpzPLMPSCE0vaZ3vH5NO5u42GpMj/Y1SRBkQ6b69PSw3xMSH1umApN32cEcg1nnh8q5FNYc5FnKu0m4tiBffyQ== +truffle-error@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/truffle-error/-/truffle-error-0.0.4.tgz#c3ff027570c26ae1f20db78637902497857f898f" + integrity sha512-hER0TNR4alBIhUp7SNrZRRiZtM/MBx+xBdM9qXP0tC3YASFmhNAxPuOyB8JDHFRNbDx12K7nvaqmyYGsI5c8BQ== truffle-expect@^0.0.9: version "0.0.9" From 7c41a564fc66ae5b222286ce395a320fe3e0273c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 14 Jun 2019 17:05:30 +0200 Subject: [PATCH 07/71] Add update Safe name action --- src/routes/safe/components/Settings/actions.js | 10 ++++++++++ src/routes/safe/store/actions/updateSafeName.js | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/routes/safe/components/Settings/actions.js create mode 100644 src/routes/safe/store/actions/updateSafeName.js diff --git a/src/routes/safe/components/Settings/actions.js b/src/routes/safe/components/Settings/actions.js new file mode 100644 index 00000000..0f1aae07 --- /dev/null +++ b/src/routes/safe/components/Settings/actions.js @@ -0,0 +1,10 @@ +// @flow +import updateSafeName from '~/routes/safe/store/actions/updateSafeName' + +export type Actions = { + updateSafeName: Function, +} + +export default { + updateSafeName, +} diff --git a/src/routes/safe/store/actions/updateSafeName.js b/src/routes/safe/store/actions/updateSafeName.js new file mode 100644 index 00000000..131201f3 --- /dev/null +++ b/src/routes/safe/store/actions/updateSafeName.js @@ -0,0 +1,10 @@ +// @flow +import type { Dispatch as ReduxDispatch } from 'redux' +import { type GlobalState } from '~/store' +import updateSafe from './updateSafe' + +const updateSafeName = (safeAddress: string, safeName: string) => async (dispatch: ReduxDispatch) => { + dispatch(updateSafe({ address: safeAddress, name: safeName })) +} + +export default updateSafeName From f6b2bb098e3f2dbefe1555c49fe547f3fa8ffe12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 14 Jun 2019 17:51:09 +0200 Subject: [PATCH 08/71] Add update Safe name component --- src/routes/safe/components/Layout.jsx | 3 +- .../Settings/UpdateSafeName/index.jsx | 88 +++++++++++++------ src/routes/safe/components/Settings/index.jsx | 30 ++++++- 3 files changed, 89 insertions(+), 32 deletions(-) diff --git a/src/routes/safe/components/Layout.jsx b/src/routes/safe/components/Layout.jsx index ee6cfc94..3df55380 100644 --- a/src/routes/safe/components/Layout.jsx +++ b/src/routes/safe/components/Layout.jsx @@ -90,7 +90,7 @@ class Layout extends React.Component { render() { const { - safe, provider, network, classes, granted, tokens, activeTokens, createTransaction, + safe, provider, network, classes, granted, tokens, activeTokens, createTransaction, updateSafeName, } = this.props const { tabIndex } = this.state @@ -151,6 +151,7 @@ class Layout extends React.Component { threshold={safe.threshold} owners={safe.owners} createTransaction={createTransaction} + updateSafeName={updateSafeName} /> )} diff --git a/src/routes/safe/components/Settings/UpdateSafeName/index.jsx b/src/routes/safe/components/Settings/UpdateSafeName/index.jsx index 24980f6b..f0ebeeb3 100644 --- a/src/routes/safe/components/Settings/UpdateSafeName/index.jsx +++ b/src/routes/safe/components/Settings/UpdateSafeName/index.jsx @@ -1,10 +1,17 @@ // @flow -import * as React from 'react' +import React, { useState } from 'react' import { withStyles } from '@material-ui/core/styles' import Block from '~/components/layout/Block' import Col from '~/components/layout/Col' +import Field from '~/components/forms/Field' +import { + composeValidators, required, minMaxLength, +} from '~/components/forms/validator' +import TextField from '~/components/forms/TextField' +import GnoForm from '~/components/forms/GnoForm' import Row from '~/components/layout/Row' import Paragraph from '~/components/layout/Paragraph' +import Hairline from '~/components/layout/Hairline' import Button from '~/components/layout/Button' import { sm, boldFont } from '~/theme/variables' import { styles } from './style' @@ -21,36 +28,63 @@ const saveButtonStyle = { type Props = { classes: Object, + safeAddress: string, + safeName: string, + updateSafe: Funtion } -class UpdateSafeName extends React.Component { - render() { - const { classes } = this.props +const UpdateSafeName = (props: Props) => { + const { + classes, + safeAddress, + safeName, + updateSafeName, + } = props - return ( - - - - Details - - - - - - - - - ) + const handleSubmit = (values) => { + updateSafeName(safeAddress, values.safeName) } + + return ( + + + {() => ( + + + + Modify Safe name + + + + + + + + + + + + + )} + + + ) } export default withStyles(styles)(UpdateSafeName) diff --git a/src/routes/safe/components/Settings/index.jsx b/src/routes/safe/components/Settings/index.jsx index 46583a51..4ee1a4dd 100644 --- a/src/routes/safe/components/Settings/index.jsx +++ b/src/routes/safe/components/Settings/index.jsx @@ -2,6 +2,7 @@ import * as React from 'react' import cn from 'classnames' import { List } from 'immutable' +import { connect } from 'react-redux' import { withStyles } from '@material-ui/core/styles' import Block from '~/components/layout/Block' import Col from '~/components/layout/Col' @@ -11,6 +12,8 @@ import Paragraph from '~/components/layout/Paragraph' import Hairline from '~/components/layout/Hairline' import type { Owner } from '~/routes/safe/store/models/owner' import ThresholdSettings from './ThresholdSettings' +import UpdateSafeName from './UpdateSafeName' +import actions, { type Actions } from './actions' import { styles } from './style' type State = { @@ -18,7 +21,7 @@ type State = { menuOptionIndex: number, } -type Props = { +type Props = Actions & { classes: Object, granted: boolean, etherScanLink: string, @@ -52,7 +55,15 @@ class Settings extends React.Component { render() { const { showRemoveSafe, menuOptionIndex } = this.state const { - classes, granted, etherScanLink, safeAddress, safeName, owners, threshold, createTransaction, + classes, + granted, + etherScanLink, + safeAddress, + safeName, + owners, + threshold, + createTransaction, + updateSafeName, } = this.props return ( @@ -113,7 +124,13 @@ class Settings extends React.Component { - {menuOptionIndex === 1 &&

To be done

} + {menuOptionIndex === 1 && ( + + )} {granted && menuOptionIndex === 2 &&

To be done

} {granted && menuOptionIndex === 3 && ( { } } -export default withStyles(styles)(Settings) +const settingsComponent = withStyles(styles)(Settings) + +export default connect( + undefined, + actions, +)(settingsComponent) From 104609b66e12b475915c32bf4947bf6a946e3220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 14 Jun 2019 18:03:52 +0200 Subject: [PATCH 09/71] Add and fix styles --- .../open/assets => assets/icons}/trash.svg | 0 .../open/components/SafeOwnersForm/index.jsx | 3 +-- .../safe/components/Balances/Tokens/index.jsx | 2 +- .../components/Settings/RemoveSafeModal/index.jsx | 4 ++-- .../components/Settings/UpdateSafeName/index.jsx | 2 +- .../components/Settings/UpdateSafeName/style.js | 15 ++++++++++++++- src/routes/safe/components/Settings/index.jsx | 4 +++- 7 files changed, 22 insertions(+), 8 deletions(-) rename src/{routes/open/assets => assets/icons}/trash.svg (100%) diff --git a/src/routes/open/assets/trash.svg b/src/assets/icons/trash.svg similarity index 100% rename from src/routes/open/assets/trash.svg rename to src/assets/icons/trash.svg diff --git a/src/routes/open/components/SafeOwnersForm/index.jsx b/src/routes/open/components/SafeOwnersForm/index.jsx index 8d3a6911..a76d156f 100644 --- a/src/routes/open/components/SafeOwnersForm/index.jsx +++ b/src/routes/open/components/SafeOwnersForm/index.jsx @@ -23,8 +23,7 @@ import OpenPaper from '~/components/Stepper/OpenPaper' import { getAccountsFrom } from '~/routes/open/utils/safeDataExtractor' import Hairline from '~/components/layout/Hairline' import { md, lg, sm } from '~/theme/variables' - -const trash = require('../../assets/trash.svg') +import trash from '~/assets/icons/trash.svg' type Props = { classes: Object, diff --git a/src/routes/safe/components/Balances/Tokens/index.jsx b/src/routes/safe/components/Balances/Tokens/index.jsx index 1bfae351..b5ac8569 100644 --- a/src/routes/safe/components/Balances/Tokens/index.jsx +++ b/src/routes/safe/components/Balances/Tokens/index.jsx @@ -42,7 +42,7 @@ const Tokens = (props: Props) => { return ( - + Manage Tokens diff --git a/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx b/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx index 60e9eb15..324d0078 100644 --- a/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx +++ b/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx @@ -51,7 +51,7 @@ const RemoveSafeComponent = ({ open={isOpen} > - + Remove Safe @@ -66,7 +66,7 @@ const RemoveSafeComponent = ({ - + {safeName} diff --git a/src/routes/safe/components/Settings/UpdateSafeName/index.jsx b/src/routes/safe/components/Settings/UpdateSafeName/index.jsx index f0ebeeb3..370745d8 100644 --- a/src/routes/safe/components/Settings/UpdateSafeName/index.jsx +++ b/src/routes/safe/components/Settings/UpdateSafeName/index.jsx @@ -51,7 +51,7 @@ const UpdateSafeName = (props: Props) => { {() => ( - + Modify Safe name diff --git a/src/routes/safe/components/Settings/UpdateSafeName/style.js b/src/routes/safe/components/Settings/UpdateSafeName/style.js index 3980c700..07d439f2 100644 --- a/src/routes/safe/components/Settings/UpdateSafeName/style.js +++ b/src/routes/safe/components/Settings/UpdateSafeName/style.js @@ -1,4 +1,17 @@ // @flow import { lg, border } from '~/theme/variables' -export const styles = () => ({}) +export const styles = () => ({ + title: { + padding: `${lg} 0 20px`, + fontSize: '16px', + }, + formContainer: { + padding: '0 20px', + minHeight: '369px', + }, + root: { + display: 'flex', + maxWidth: '460px', + }, +}) diff --git a/src/routes/safe/components/Settings/index.jsx b/src/routes/safe/components/Settings/index.jsx index 4ee1a4dd..e2a18781 100644 --- a/src/routes/safe/components/Settings/index.jsx +++ b/src/routes/safe/components/Settings/index.jsx @@ -70,7 +70,9 @@ class Settings extends React.Component { - Settings + + Settings + From 25919d43610dbfbf6c6eaf93c0c9e97ed92a6517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 14 Jun 2019 18:33:48 +0200 Subject: [PATCH 10/71] Fix bug loading the name of a Safe --- .../safe/components/Settings/RemoveSafeModal/index.jsx | 5 +++-- src/routes/safe/container/index.jsx | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx b/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx index 324d0078..f59cdd2c 100644 --- a/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx +++ b/src/routes/safe/components/Settings/RemoveSafeModal/index.jsx @@ -51,7 +51,7 @@ const RemoveSafeComponent = ({ open={isOpen} > - + Remove Safe @@ -84,7 +84,8 @@ const RemoveSafeComponent = ({ Removing a Safe only removes it from your interface. - It does not delete the Safe. + It does not delete the Safe +. You can always add it back using the Safe's address. diff --git a/src/routes/safe/container/index.jsx b/src/routes/safe/container/index.jsx index cf6c8378..af7d0a4e 100644 --- a/src/routes/safe/container/index.jsx +++ b/src/routes/safe/container/index.jsx @@ -29,8 +29,9 @@ class SafeView extends React.Component { componentDidUpdate(prevProps) { const { activeTokens } = this.props + const oldActiveTokensSize = prevProps.activeTokens.size - if (activeTokens.size > prevProps.activeTokens.size) { + if (oldActiveTokensSize > 0 && activeTokens.size > oldActiveTokensSize) { this.checkForUpdates() } } From f2ef593a06c8d726d4cc28d8fa5f8e3f3c841ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 14 Jun 2019 18:37:38 +0200 Subject: [PATCH 11/71] Update dependencies --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9948b8b3..7c295498 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16050,10 +16050,10 @@ truffle-error@^0.0.3: resolved "https://registry.yarnpkg.com/truffle-error/-/truffle-error-0.0.3.tgz#4bf55242e14deee1c7194932709182deff2c97ca" integrity sha1-S/VSQuFN7uHHGUkycJGC3v8sl8o= -truffle-error@^0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/truffle-error/-/truffle-error-0.0.4.tgz#c3ff027570c26ae1f20db78637902497857f898f" - integrity sha512-hER0TNR4alBIhUp7SNrZRRiZtM/MBx+xBdM9qXP0tC3YASFmhNAxPuOyB8JDHFRNbDx12K7nvaqmyYGsI5c8BQ== +truffle-error@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/truffle-error/-/truffle-error-0.0.5.tgz#6b5740c9f3aac74f47b85d654fff7fe2c1fc5e0e" + integrity sha512-JpzPLMPSCE0vaZ3vH5NO5u42GpMj/Y1SRBkQ6b69PSw3xMSH1umApN32cEcg1nnh8q5FNYc5FnKu0m4tiBffyQ== truffle-expect@^0.0.9: version "0.0.9" From be319aa76cd7ab6821f43c68b3a9f4b17e4f3028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 23 May 2019 10:48:25 +0200 Subject: [PATCH 12/71] Add manage owners list --- src/routes/safe/components/Layout.jsx | 4 +- .../Settings/ManageOwners/index.jsx | 139 ++++++++++++++++++ .../components/Settings/ManageOwners/style.js | 56 +++++++ src/routes/safe/components/Settings/index.jsx | 21 ++- 4 files changed, 216 insertions(+), 4 deletions(-) create mode 100644 src/routes/safe/components/Settings/ManageOwners/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/style.js diff --git a/src/routes/safe/components/Layout.jsx b/src/routes/safe/components/Layout.jsx index 3df55380..572bc36f 100644 --- a/src/routes/safe/components/Layout.jsx +++ b/src/routes/safe/components/Layout.jsx @@ -90,7 +90,7 @@ class Layout extends React.Component { render() { const { - safe, provider, network, classes, granted, tokens, activeTokens, createTransaction, updateSafeName, + safe, provider, network, classes, granted, tokens, activeTokens, createTransaction, userAddress, updateSafeName, } = this.props const { tabIndex } = this.state @@ -150,6 +150,8 @@ class Layout extends React.Component { etherScanLink={etherScanLink} threshold={safe.threshold} owners={safe.owners} + network={network} + userAddress={userAddress} createTransaction={createTransaction} updateSafeName={updateSafeName} /> diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx new file mode 100644 index 00000000..5cf27683 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -0,0 +1,139 @@ +// @flow +import React from 'react' +import classNames from 'classnames' +import { withStyles } from '@material-ui/core/styles' +import Identicon from '~/components/Identicon' +import Block from '~/components/layout/Block' +import Col from '~/components/layout/Col' +import Field from '~/components/forms/Field' +import { + composeValidators, required, minMaxLength, +} from '~/components/forms/validator' +import TextField from '~/components/forms/TextField' +import Row from '~/components/layout/Row' +import Paragraph from '~/components/layout/Paragraph' +import Hairline from '~/components/layout/Hairline' +import Button from '~/components/layout/Button' +import AddOwnerModal from './AddOwnerModal' +import { sm, boldFont } from '~/theme/variables' +import { styles } from './style' + +const controlsStyle = { + backgroundColor: 'white', + padding: sm, +} + +const addOwnerButtonStyle = { + marginRight: sm, + fontWeight: boldFont, +} + +type Props = { + classes: Object, + safeAddress: string, + safeName: string, + owners: List, + network: string, + userAddress: string, + createTransaction: Function, +} + +type Action = 'AddOwner' + +class ManageOwners extends React.Component { + state = { + showAddOwner: false, + } + + onShow = (action: Action) => () => { + this.setState(() => ({ [`show${action}`]: true })) + } + + onHide = (action: Action) => () => { + this.setState(() => ({ [`show${action}`]: false })) + } + + render() { + const { + classes, + safeAddress, + safeName, + owners, + threshold, + network, + userAddress, + createTransaction, + } = this.props + const { showAddOwner } = this.state + + return ( + + + + Manage Safe Owners + + + NAME + ADDRESS + + + + {owners.map(owner => ( + + + + + {owner.get('name')} + + + + + + + + + + + + {owner.get('address')} + + + + + + + + ))} + + + + + + + + + + + ) + } +} + +export default withStyles(styles)(ManageOwners) diff --git a/src/routes/safe/components/Settings/ManageOwners/style.js b/src/routes/safe/components/Settings/ManageOwners/style.js new file mode 100644 index 00000000..1d674731 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/style.js @@ -0,0 +1,56 @@ +// @flow +import { + sm, xs, lg, border, +} from '~/theme/variables' + +export const styles = () => ({ + title: { + padding: `${lg} 20px`, + fontSize: '16px', + }, + formContainer: { + minHeight: '369px', + }, + header: { + padding: `${sm} ${lg}`, + }, + owners: { + padding: lg, + }, + name: { + textOverflow: 'ellipsis', + overflow: 'hidden', + }, + userName: { + whiteSpace: 'nowrap', + }, + owner: { + padding: sm, + paddingLeft: lg, + alignItems: 'center', + }, + user: { + justifyContent: 'left', + }, + open: { + paddingLeft: sm, + width: 'auto', + '&:hover': { + cursor: 'pointer', + }, + }, + container: { + marginTop: xs, + alignItems: 'center', + }, + address: { + paddingLeft: '6px', + }, + open: { + paddingLeft: sm, + width: 'auto', + '&:hover': { + cursor: 'pointer', + }, + }, +}) diff --git a/src/routes/safe/components/Settings/index.jsx b/src/routes/safe/components/Settings/index.jsx index e2a18781..66991158 100644 --- a/src/routes/safe/components/Settings/index.jsx +++ b/src/routes/safe/components/Settings/index.jsx @@ -13,6 +13,7 @@ import Hairline from '~/components/layout/Hairline' import type { Owner } from '~/routes/safe/store/models/owner' import ThresholdSettings from './ThresholdSettings' import UpdateSafeName from './UpdateSafeName' +import ManageOwners from './ManageOwners' import actions, { type Actions } from './actions' import { styles } from './style' @@ -29,7 +30,9 @@ type Props = Actions & { safeName: string, owners: List, threshold: number, + network: string, createTransaction: Function, + updateSafeName: Function, } type Action = 'RemoveSafe' @@ -60,8 +63,10 @@ class Settings extends React.Component { etherScanLink, safeAddress, safeName, - owners, threshold, + owners, + network, + userAddress, createTransaction, updateSafeName, } = this.props @@ -103,7 +108,7 @@ class Settings extends React.Component { className={cn(classes.menuOption, menuOptionIndex === 2 && classes.active)} onClick={this.handleChange(2)} > - Owners + Owners ({owners.size}) { updateSafeName={updateSafeName} /> )} - {granted && menuOptionIndex === 2 &&

To be done

} + {granted && menuOptionIndex === 2 && ( + + )} {granted && menuOptionIndex === 3 && ( Date: Thu, 23 May 2019 11:38:21 +0200 Subject: [PATCH 13/71] Add new owner data --- .../AddOwnerModal/screens/OwnerForm/index.jsx | 119 ++++++++++++++++++ .../AddOwnerModal/screens/OwnerForm/style.js | 32 +++++ 2 files changed, 151 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/style.js diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx new file mode 100644 index 00000000..d33817be --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx @@ -0,0 +1,119 @@ +// @flow +import React from 'react' +import { withStyles } from '@material-ui/core/styles' +import Close from '@material-ui/icons/Close' +import IconButton from '@material-ui/core/IconButton' +import Paragraph from '~/components/layout/Paragraph' +import Row from '~/components/layout/Row' +import GnoForm from '~/components/forms/GnoForm' +import Col from '~/components/layout/Col' +import Button from '~/components/layout/Button' +import Block from '~/components/layout/Block' +import Hairline from '~/components/layout/Hairline' +import Field from '~/components/forms/Field' +import TextField from '~/components/forms/TextField' +import { + composeValidators, + required, + mustBeEthereumAddress, + minMaxLength, + noErrorsOn, +} from '~/components/forms/validator' +import { styles } from './style' + +type Props = { + onClose: () => void, + classes: Object, + safeAddress: string, + safeName: string, + onSubmit: Function, +} + +const OwnerForm = ({ + classes, + onClose, + safeAddress, + safeName, + onSubmit, +}: Props) => { + const handleSubmit = (values) => { + console.log(values) + onSubmit(values) + } + + return ( + + + + Add new owner + + 1 of 3 + + + + + + + {(...args) => { + const formState = args[2] + + return ( + + + + + Add a new owner to the active Safe + + + + + + + + + + + + + + + + + + + + ) + }} + + + ) +} + +export default withStyles(styles)(OwnerForm) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/style.js b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/style.js new file mode 100644 index 00000000..3a5123bd --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/style.js @@ -0,0 +1,32 @@ +// @flow +import { lg, md, sm } from '~/theme/variables' + +export const styles = () => ({ + heading: { + padding: `${sm} ${lg}`, + justifyContent: 'flex-start', + boxSizing: 'border-box', + maxHeight: '75px', + }, + annotation: { + letterSpacing: '-1px', + color: '#a2a8ba', + marginRight: 'auto', + marginLeft: '20px', + }, + manage: { + fontSize: '24px', + }, + closeIcon: { + height: '35px', + width: '35px', + }, + formContainer: { + padding: `${md} ${lg}`, + minHeight: '340px', + }, + buttonRow: { + height: '84px', + justifyContent: 'center', + }, +}) From a2eeabe3f2434a542ab352cb2ef35adbade950bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 23 May 2019 17:57:09 +0200 Subject: [PATCH 14/71] Add new owner and threshold data --- .../screens/ThresholdForm/index.jsx | 141 ++++++++++++++++++ .../screens/ThresholdForm/style.js | 45 ++++++ 2 files changed, 186 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/style.js diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx new file mode 100644 index 00000000..e0f23234 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx @@ -0,0 +1,141 @@ +// @flow +import React from 'react' +import { List } from 'immutable' +import { withStyles } from '@material-ui/core/styles' +import Close from '@material-ui/icons/Close' +import IconButton from '@material-ui/core/IconButton' +import SelectField from '~/components/forms/SelectField' +import MenuItem from '@material-ui/core/MenuItem' +import Paragraph from '~/components/layout/Paragraph' +import Row from '~/components/layout/Row' +import GnoForm from '~/components/forms/GnoForm' +import Col from '~/components/layout/Col' +import Button from '~/components/layout/Button' +import Block from '~/components/layout/Block' +import Hairline from '~/components/layout/Hairline' +import Field from '~/components/forms/Field' +import TextField from '~/components/forms/TextField' +import type { Owner } from '~/routes/safe/store/models/owner' +import { + composeValidators, + required, + minValue, + maxValue, + mustBeInteger, +} from '~/components/forms/validator' +import { styles } from './style' + +type Props = { + onClose: () => void, + classes: Object, + safeAddress: string, + safeName: string, + owners: List, + threshold: number, + onClickBack: Function, + onSubmit: Function, +} + +const ThresholdForm = ({ + classes, + onClose, + safeAddress, + safeName, + owners, + threshold, + onClickBack, + onSubmit, +}: Props) => { + const handleSubmit = (values) => { + onSubmit(values) + } + + return ( + + + + Add new owner + + 2 of 3 + + + + + + + {(...args) => { + const formState = args[2] + + return ( + + + + + Set the required owner confirmations: + + + + + Any transaction over any daily limit requires the confirmation of: + + + + + ( + + + {[...Array(Number(owners.size + 1))].map((x, index) => ( + + {index + 1} + + ))} + + {props.meta.error && props.meta.touched && ( + + {props.meta.error} + + )} + + )} + validate={composeValidators(required, mustBeInteger, minValue(1), maxValue(owners.size + 1))} + data-testid="threshold-select-input" + /> + + + + out of + {' '} + {owners.size + 1} + {' '} + owner(s) + + + + + + + + + + + ) + }} + + + ) +} + +export default withStyles(styles)(ThresholdForm) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/style.js b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/style.js new file mode 100644 index 00000000..dfd2de15 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/style.js @@ -0,0 +1,45 @@ +// @flow +import { lg, md, sm } from '~/theme/variables' + +export const styles = () => ({ + heading: { + padding: `${sm} ${lg}`, + justifyContent: 'flex-start', + boxSizing: 'border-box', + maxHeight: '75px', + }, + annotation: { + letterSpacing: '-1px', + color: '#a2a8ba', + marginRight: 'auto', + marginLeft: '20px', + }, + manage: { + fontSize: '24px', + }, + closeIcon: { + height: '35px', + width: '35px', + }, + headingText: { + fontSize: '16px', + }, + formContainer: { + padding: `${md} ${lg}`, + minHeight: '340px', + }, + ownersText: { + marginLeft: sm, + }, + buttonRow: { + height: '84px', + justifyContent: 'center', + }, + inputRow: { + position: 'relative', + }, + errorText: { + position: 'absolute', + bottom: '-25px', + }, +}) From e12e23f83581c372de8b531cc425974ae4881a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 23 May 2019 18:18:36 +0200 Subject: [PATCH 15/71] Add new owner review --- .../AddOwnerModal/screens/Review/index.jsx | 176 ++++++++++++++++++ .../AddOwnerModal/screens/Review/style.js | 78 ++++++++ 2 files changed, 254 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/style.js diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx new file mode 100644 index 00000000..376051bb --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx @@ -0,0 +1,176 @@ +// @flow +import React from 'react' +import { List } from 'immutable' +import classNames from 'classnames' +import { withStyles } from '@material-ui/core/styles' +import OpenInNew from '@material-ui/icons/OpenInNew' +import Close from '@material-ui/icons/Close' +import IconButton from '@material-ui/core/IconButton' +import Identicon from '~/components/Identicon' +import Link from '~/components/layout/Link' +import Paragraph from '~/components/layout/Paragraph' +import Row from '~/components/layout/Row' +import GnoForm from '~/components/forms/GnoForm' +import Col from '~/components/layout/Col' +import Button from '~/components/layout/Button' +import Block from '~/components/layout/Block' +import Hairline from '~/components/layout/Hairline' +import Field from '~/components/forms/Field' +import TextField from '~/components/forms/TextField' +import type { Owner } from '~/routes/safe/store/models/owner' +import { getEtherScanLink } from '~/logic/wallets/getWeb3' +import { secondary } from '~/theme/variables' +import { styles } from './style' + +const openIconStyle = { + height: '16px', + color: secondary, +} + +type Props = { + onClose: () => void, + classes: Object, + safeName: string, + owners: List, + network: string, + values: Object, + onClickBack: Function, + onSubmit: Function, +} + +const ReviewAddOwner = ({ + classes, + onClose, + safeName, + owners, + network, + values, + onClickBack, + onSubmit, +}: Props) => { + const handleSubmit = () => { + onSubmit() + } + return ( + + + + Add new owner + + 3 of 3 + + + + + + + + + + + + Details + + + + + Safe name + + + {safeName} + + + + + Any transaction requires the confirmation of: + + + {values.threshold} out of {owners.size + 1} owner(s) + + + + + + + + {owners.size + 1} Safe owners + + + + {owners.map(owner => ( + + + + + + + + + {owner.get('name')} + + + + {owner.get('address')} + + + + + + + + + + + ))} + + + ADDING NEW OWNER ↓ + + + + + + + + + + + {values.ownerName} + + + + {values.ownerAddress} + + + + + + + + + + + + + + + + + + + ) +} + +export default withStyles(styles)(ReviewAddOwner) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/style.js b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/style.js new file mode 100644 index 00000000..5213f8c9 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/style.js @@ -0,0 +1,78 @@ +// @flow +import { + lg, md, sm, border, background, +} from '~/theme/variables' + +export const styles = () => ({ + root: { + height: '372px', + }, + heading: { + padding: `${sm} ${lg}`, + justifyContent: 'flex-start', + boxSizing: 'border-box', + maxHeight: '75px', + }, + annotation: { + letterSpacing: '-1px', + color: '#a2a8ba', + marginRight: 'auto', + marginLeft: '20px', + }, + manage: { + fontSize: '24px', + }, + closeIcon: { + height: '35px', + width: '35px', + }, + info: { + backgroundColor: background, + padding: sm, + justifyContent: 'center', + textAlign: 'center', + flexDirection: 'column', + }, + buttonRow: { + height: '84px', + justifyContent: 'center', + }, + details: { + padding: lg, + borderRight: `solid 1px ${border}`, + height: '100%', + }, + owners: { + overflow: 'auto', + height: '100%', + }, + ownersTitle: { + padding: lg, + }, + owner: { + padding: sm, + alignItems: 'center', + }, + name: { + textOverflow: 'ellipsis', + overflow: 'hidden', + }, + userName: { + whiteSpace: 'nowrap', + }, + newOwner: { + padding: sm, + alignItems: 'center', + backgroundColor: '#fff3e2', + }, + user: { + justifyContent: 'left', + }, + open: { + paddingLeft: sm, + width: 'auto', + '&:hover': { + cursor: 'pointer', + }, + }, +}) From 7804c091623f734c370b6e7fc2055ac7d61419cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 24 May 2019 10:28:31 +0200 Subject: [PATCH 16/71] Add new owner modal window --- .../ManageOwners/AddOwnerModal/index.jsx | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx new file mode 100644 index 00000000..bdaf56ec --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx @@ -0,0 +1,146 @@ +// @flow +import React, { useState, useEffect } from 'react' +import { List } from 'immutable' +import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' +import Modal from '~/components/Modal' +import { type Safe } from '~/routes/safe/store/models/safe' +import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' +import { setOwners } from '~/logic/safe/utils' +import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' +import OwnerForm from './screens/OwnerForm' +import ThresholdForm from './screens/ThresholdForm' +import ReviewAddOwner from './screens/Review' +import { withStyles } from '@material-ui/core/styles' + +const styles = () => ({ + biggerModalWindow: { + width: '775px', + minHeight: '500px', + position: 'static', + }, +}) + +type Props = { + onClose: () => void, + classes: Object, + isOpen: boolean, + safeAddress: string, + safeName: string, + owners: List, + threshold: number, + network: string, + userAddress: string, + createTransaction: Function, +} +type ActiveScreen = 'selectOwner' | 'selectThreshold' | 'reviewAddOwner' + +const AddOwner = ({ + onClose, + isOpen, + classes, + safeAddress, + safeName, + owners, + threshold, + network, + userAddress, + createTransaction, +}: Props) => { + const [activeScreen, setActiveScreen] = useState('selectOwner') + const [values, setValues] = useState({}) + + useEffect( + () => () => { + setActiveScreen('selectOwner') + setValues({}) + }, + [isOpen], + ) + + const onClickBack = () => { + if (activeScreen === 'reviewAddOwner') { + setActiveScreen('selectThreshold') + } else if (activeScreen === 'selectThreshold') { + setActiveScreen('selectOwner') + } + } + + const ownerSubmited = (newValues: Object) => { + values.ownerName = newValues.ownerName + values.ownerAddress = newValues.ownerAddress + setValues(values) + setActiveScreen('selectThreshold') + } + + const thresholdSubmited = (newValues: Object) => { + values.threshold = newValues.threshold + setValues(values) + setActiveScreen('reviewAddOwner') + } + + return ( + + + {({ openSnackbar }) => { + const onAddOwner = async () => { + onClose() + const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) + const txData = gnosisSafe.contract.methods.addOwnerWithThreshold(values.ownerAddress, values.threshold).encodeABI() + + const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) + if (txHash) { + setOwners(safeAddress, owners.push(makeOwner({ name: values.ownerName, address: values.ownerAddress }))) + } + } + + return ( + + + {activeScreen === 'selectOwner' && ( + + )} + {activeScreen === 'selectThreshold' && ( + + )} + {activeScreen === 'reviewAddOwner' && ( + + )} + + + ) + }} + + + ) +} + +export default withStyles(styles)(AddOwner) From 2004d38893d0b33249f029b66d62c8a491e2725d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 24 May 2019 12:00:27 +0200 Subject: [PATCH 17/71] Codestyle fixes --- .../AddOwnerModal/screens/OwnerForm/index.jsx | 1 - src/test/safe.dom.transactions.test.js | 12 +++--------- src/test/utils/DOMNavigation/tokens.js | 5 ++++- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx index d33817be..f08b49f9 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx @@ -37,7 +37,6 @@ const OwnerForm = ({ onSubmit, }: Props) => { const handleSubmit = (values) => { - console.log(values) onSubmit(values) } diff --git a/src/test/safe.dom.transactions.test.js b/src/test/safe.dom.transactions.test.js index ba93243c..cf6474da 100644 --- a/src/test/safe.dom.transactions.test.js +++ b/src/test/safe.dom.transactions.test.js @@ -3,15 +3,9 @@ // TBD describe('DOM > Feature > SAFE MULTISIG Transactions', () => { - it.only('mines correctly all multisig txs in a 1 owner & 1 threshold safe', async () => { + it.only('mines correctly all multisig txs in a 1 owner & 1 threshold safe', async () => {}) - }) + it.only('mines withdraw process correctly all multisig txs in a 2 owner & 2 threshold safe', async () => {}) - it.only('mines withdraw process correctly all multisig txs in a 2 owner & 2 threshold safe', async () => { - - }) - - it.only('approves and executes pending transactions', async () => { - - }) + it.only('approves and executes pending transactions', async () => {}) }) diff --git a/src/test/utils/DOMNavigation/tokens.js b/src/test/utils/DOMNavigation/tokens.js index 7ed1a422..698933fd 100644 --- a/src/test/utils/DOMNavigation/tokens.js +++ b/src/test/utils/DOMNavigation/tokens.js @@ -1,7 +1,10 @@ // @flow import { fireEvent } from '@testing-library/react' import { MANAGE_TOKENS_BUTTON_TEST_ID } from '~/routes/safe/components/Balances' -import { ADD_CUSTOM_TOKEN_BUTTON_TEST_ID, TOGGLE_TOKEN_TEST_ID } from '~/routes/safe/components/Balances/Tokens/screens/TokenList' +import { + ADD_CUSTOM_TOKEN_BUTTON_TEST_ID, + TOGGLE_TOKEN_TEST_ID, +} from '~/routes/safe/components/Balances/Tokens/screens/TokenList' import { MANAGE_TOKENS_MODAL_CLOSE_BUTTON_TEST_ID } from '~/routes/safe/components/Balances/Tokens' export const clickOnManageTokens = (dom: any): void => { From 7d40428f5b95e77e00db8a481592a0493cc3a1f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 24 May 2019 17:02:16 +0200 Subject: [PATCH 18/71] Remove modules option in Safe settings --- src/routes/safe/components/Settings/index.jsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/routes/safe/components/Settings/index.jsx b/src/routes/safe/components/Settings/index.jsx index 66991158..eaa6a9cf 100644 --- a/src/routes/safe/components/Settings/index.jsx +++ b/src/routes/safe/components/Settings/index.jsx @@ -118,13 +118,6 @@ class Settings extends React.Component { Required confirmations - - Modules - - )} @@ -157,7 +150,6 @@ class Settings extends React.Component { safeAddress={safeAddress} /> )} - {granted && menuOptionIndex === 4 &&

To be done

} From ca729f1707d7aad97ad10488a139d1bace6be039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 24 May 2019 20:34:23 +0200 Subject: [PATCH 19/71] Remove old implementation of add owner to a Safe --- .../AddOwner/AddOwnerForm/index.jsx | 70 ------------ .../safe/components/AddOwner/Review/index.jsx | 48 -------- .../safe/components/AddOwner/actions.js | 12 -- src/routes/safe/components/AddOwner/index.jsx | 105 ------------------ .../safe/components/AddOwner/selector.js | 11 -- 5 files changed, 246 deletions(-) delete mode 100644 src/routes/safe/components/AddOwner/AddOwnerForm/index.jsx delete mode 100644 src/routes/safe/components/AddOwner/Review/index.jsx delete mode 100644 src/routes/safe/components/AddOwner/actions.js delete mode 100644 src/routes/safe/components/AddOwner/index.jsx delete mode 100644 src/routes/safe/components/AddOwner/selector.js diff --git a/src/routes/safe/components/AddOwner/AddOwnerForm/index.jsx b/src/routes/safe/components/AddOwner/AddOwnerForm/index.jsx deleted file mode 100644 index b756f2d3..00000000 --- a/src/routes/safe/components/AddOwner/AddOwnerForm/index.jsx +++ /dev/null @@ -1,70 +0,0 @@ -// @flow -import * as React from 'react' -import Field from '~/components/forms/Field' -import OpenPaper from '~/components/Stepper/OpenPaper' -import TextField from '~/components/forms/TextField' -import Checkbox from '~/components/forms/Checkbox' -import { - composeValidators, required, mustBeEthereumAddress, uniqueAddress, -} from '~/components/forms/validator' -import Block from '~/components/layout/Block' -import Heading from '~/components/layout/Heading' - -export const CONFIRMATIONS_ERROR = 'Number of confirmations can not be higher than the number of owners' - -export const NAME_PARAM = 'name' -export const OWNER_ADDRESS_PARAM = 'ownerAddress' -export const INCREASE_PARAM = 'increase' - -export const safeFieldsValidation = (values: Object) => { - const errors = {} - - if (Number.parseInt(values.owners, 10) < Number.parseInt(values.confirmations, 10)) { - errors.confirmations = CONFIRMATIONS_ERROR - } - - return errors -} - -type Props = { - numOwners: number, - threshold: number, - addresses: string[], -} - -const AddOwnerForm = ({ addresses, numOwners, threshold }: Props) => (controls: React.Node) => ( - - - Add Owner - - - {`Actual number of owners: ${numOwners}, with threshold: ${threshold}`} - - - - - - - - - - Increase threshold? - - -) - -export default AddOwnerForm diff --git a/src/routes/safe/components/AddOwner/Review/index.jsx b/src/routes/safe/components/AddOwner/Review/index.jsx deleted file mode 100644 index 4ce516ad..00000000 --- a/src/routes/safe/components/AddOwner/Review/index.jsx +++ /dev/null @@ -1,48 +0,0 @@ -// @flow -import * as React from 'react' -import CircularProgress from '@material-ui/core/CircularProgress' -import OpenPaper from '~/components/Stepper/OpenPaper' -import Block from '~/components/layout/Block' -import Bold from '~/components/layout/Bold' -import Heading from '~/components/layout/Heading' -import Paragraph from '~/components/layout/Paragraph' -import { NAME_PARAM, OWNER_ADDRESS_PARAM, INCREASE_PARAM } from '~/routes/safe/components/AddOwner/AddOwnerForm' - -type FormProps = { - values: Object, - submitting: boolean, -} - -const spinnerStyle = { - minHeight: '50px', -} - -const Review = () => (controls: React.Node, { values, submitting }: FormProps) => { - const text = values[INCREASE_PARAM] - ? 'This operation will increase the threshold of the safe' - : 'This operation will not modify the threshold of the safe' - - return ( - - Review the Add Owner operation - - Owner Name: - {' '} - {values[NAME_PARAM]} - - - Owner Address: - {' '} - {values[OWNER_ADDRESS_PARAM]} - - - {text} - - - { submitting && } - - - ) -} - -export default Review diff --git a/src/routes/safe/components/AddOwner/actions.js b/src/routes/safe/components/AddOwner/actions.js deleted file mode 100644 index 32f51f38..00000000 --- a/src/routes/safe/components/AddOwner/actions.js +++ /dev/null @@ -1,12 +0,0 @@ -// @flow -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' - -type FetchTransactions = typeof fetchTransactions - -export type Actions = { - fetchTransactions: FetchTransactions, -} - -export default { - fetchTransactions, -} diff --git a/src/routes/safe/components/AddOwner/index.jsx b/src/routes/safe/components/AddOwner/index.jsx deleted file mode 100644 index 920f056e..00000000 --- a/src/routes/safe/components/AddOwner/index.jsx +++ /dev/null @@ -1,105 +0,0 @@ -// @flow -import * as React from 'react' -import { List } from 'immutable' -import Stepper from '~/components/Stepper' -import { connect } from 'react-redux' -import { type Safe } from '~/routes/safe/store/models/safe' -import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' -import { setOwners } from '~/logic/safe/utils' -import { createTransaction } from '~/logic/safe/safeFrontendOperations' -import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' -import AddOwnerForm, { NAME_PARAM, OWNER_ADDRESS_PARAM, INCREASE_PARAM } from './AddOwnerForm' -import Review from './Review' -import selector, { type SelectorProps } from './selector' -import actions, { type Actions } from './actions' - -const getSteps = () => ['Fill Owner Form', 'Review Add order operation'] - -type Props = SelectorProps & - Actions & { - safe: Safe, - threshold: number, - } - -type State = { - done: boolean, -} - -export const ADD_OWNER_RESET_BUTTON_TEXT = 'RESET' - -const getOwnerAddressesFrom = (owners: List) => { - if (!owners) { - return [] - } - - return owners.map((owner: Owner) => owner.get('address')) -} - -export const addOwner = async (values: Object, safe: Safe, threshold: number, executor: string) => { - const safeAddress = safe.get('address') - const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) - const nonce = await gnosisSafe.nonce() - - const newThreshold = values[INCREASE_PARAM] ? threshold + 1 : threshold - const newOwnerAddress = values[OWNER_ADDRESS_PARAM] - const newOwnerName = values[NAME_PARAM] - - const data = gnosisSafe.contract.methods.addOwnerWithThreshold(newOwnerAddress, newThreshold).encodeABI() - await createTransaction(safe, `Add Owner ${newOwnerName}`, safeAddress, '0', nonce, executor, data) - setOwners(safeAddress, safe.get('owners').push(makeOwner({ name: newOwnerName, address: newOwnerAddress }))) -} - -class AddOwner extends React.Component { - state = { - done: false, - } - - onAddOwner = async (values: Object) => { - try { - const { - safe, threshold, userAddress, fetchTransactions, - } = this.props - await addOwner(values, safe, threshold, userAddress) - fetchTransactions(safe.get('address')) - this.setState({ done: true }) - } catch (error) { - this.setState({ done: false }) - // eslint-disable-next-line - console.log('Error while adding owner ' + error) - } - } - - onReset = () => { - this.setState({ done: false }) - } - - render() { - const { safe } = this.props - const { done } = this.state - const steps = getSteps() - const finishedButton = - const addresses = getOwnerAddressesFrom(safe.get('owners')) - - return ( - - - - {AddOwnerForm} - - {Review} - - - ) - } -} - -export default connect( - selector, - actions, -)(AddOwner) diff --git a/src/routes/safe/components/AddOwner/selector.js b/src/routes/safe/components/AddOwner/selector.js deleted file mode 100644 index cefe3460..00000000 --- a/src/routes/safe/components/AddOwner/selector.js +++ /dev/null @@ -1,11 +0,0 @@ -// @flow -import { createStructuredSelector } from 'reselect' -import { userAccountSelector } from '~/logic/wallets/store/selectors' - -export type SelectorProps = { - userAddress: userAccountSelector, -} - -export default createStructuredSelector({ - userAddress: userAccountSelector, -}) From a21dc1cf6222d2bb0fe246bb8b7adadbce96153f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 24 May 2019 21:14:58 +0200 Subject: [PATCH 20/71] Add table to Safe owner list --- src/components/Table/index.jsx | 10 ++- .../OwnerAddressTableCell/index.jsx | 21 +++++ .../Settings/ManageOwners/dataFetcher.js | 55 +++++++++++++ .../Settings/ManageOwners/index.jsx | 82 +++++++++++-------- .../components/Settings/ManageOwners/style.js | 7 +- 5 files changed, 133 insertions(+), 42 deletions(-) create mode 100644 src/routes/safe/components/Settings/ManageOwners/OwnerAddressTableCell/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/dataFetcher.js diff --git a/src/components/Table/index.jsx b/src/components/Table/index.jsx index 0cb2219d..33ff0ac6 100644 --- a/src/components/Table/index.jsx +++ b/src/components/Table/index.jsx @@ -21,6 +21,7 @@ type Props = { children: Function, size: number, defaultFixed?: boolean, + noBorder: boolean, } type State = { @@ -30,6 +31,7 @@ type State = { orderProp: boolean, rowsPerPage: number, fixed?: boolean, + noBorder: boolean, } const styles = { @@ -99,7 +101,7 @@ class GnoTable extends React.Component, State> { render() { const { - data, label, columns, classes, children, size, defaultOrderBy, defaultFixed, + data, label, columns, classes, children, size, defaultOrderBy, defaultFixed, noBorder, } = this.props const { order, orderBy, page, orderProp, rowsPerPage, fixed, @@ -117,7 +119,7 @@ class GnoTable extends React.Component, State> { const paginationClasses = { selectRoot: classes.selectRoot, - root: classes.paginationRoot, + root: !noBorder && classes.paginationRoot, input: classes.white, } @@ -132,13 +134,13 @@ class GnoTable extends React.Component, State> { return ( {!isEmpty && ( - +
{children(sortedData)}
)} {isEmpty && ( - + )} diff --git a/src/routes/safe/components/Settings/ManageOwners/OwnerAddressTableCell/index.jsx b/src/routes/safe/components/Settings/ManageOwners/OwnerAddressTableCell/index.jsx new file mode 100644 index 00000000..5b7b8c9c --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/OwnerAddressTableCell/index.jsx @@ -0,0 +1,21 @@ +// @flow +import * as React from 'react' +import Block from '~/components/layout/Block' +import Paragraph from '~/components/layout/Paragraph' +import Identicon from '~/components/Identicon' + +type Props = { + address: string, +} + +const OwnerAddressTableCell = (props: Props) => { + const { address } = props + return ( + + + {address} + + ) +} + +export default OwnerAddressTableCell diff --git a/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js b/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js new file mode 100644 index 00000000..520b43ea --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js @@ -0,0 +1,55 @@ +// @flow +import { List } from 'immutable' +import type { Owner } from '~/routes/safe/store/models/owner' +import { type SortRow } from '~/components/Table/sorting' +import { type Column } from '~/components/Table/TableHead' + +export const OWNERS_TABLE_NAME_ID = 'name' +export const OWNERS_TABLE_ADDRESS_ID = 'address' +export const OWNERS_TABLE_ACTIONS_ID = 'actions' + +type OwnerData = { + name: string, + address: string, +} + +export type OwnerRow = SortRow + +export const getOwnerData = (owners: List): List => { + const rows = owners.map((owner: Owner) => ({ + [OWNERS_TABLE_NAME_ID]: owner.get('name'), + [OWNERS_TABLE_ADDRESS_ID]: owner.get('address'), + })) + + return rows +} + +export const generateColumns = () => { + const nameColumn: Column = { + id: OWNERS_TABLE_NAME_ID, + order: false, + disablePadding: false, + label: 'Name', + width: 150, + align: 'left', + } + + const addressColumn: Column = { + id: OWNERS_TABLE_ADDRESS_ID, + order: false, + disablePadding: false, + label: 'Address', + width: 350, + align: 'left', + } + + const actionsColumn: Column = { + id: OWNERS_TABLE_ACTIONS_ID, + order: false, + disablePadding: false, + label: '', + custom: true, + } + + return List([nameColumn, addressColumn, actionsColumn]) +} diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 5cf27683..cfb1d919 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -1,6 +1,7 @@ // @flow import React from 'react' import classNames from 'classnames' +import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' import Identicon from '~/components/Identicon' import Block from '~/components/layout/Block' @@ -9,12 +10,19 @@ import Field from '~/components/forms/Field' import { composeValidators, required, minMaxLength, } from '~/components/forms/validator' +import Table from '~/components/Table' +import { type Column, cellWidth } from '~/components/Table/TableHead' +import TableRow from '@material-ui/core/TableRow' +import TableCell from '@material-ui/core/TableCell' import TextField from '~/components/forms/TextField' import Row from '~/components/layout/Row' import Paragraph from '~/components/layout/Paragraph' import Hairline from '~/components/layout/Hairline' import Button from '~/components/layout/Button' import AddOwnerModal from './AddOwnerModal' +import OwnerAddressTableCell from './OwnerAddressTableCell' +import type { Owner } from '~/routes/safe/store/models/owner' +import { getOwnerData, generateColumns, OWNERS_TABLE_ADDRESS_ID, type OwnerRow, } from './dataFetcher' import { sm, boldFont } from '~/theme/variables' import { styles } from './style' @@ -38,7 +46,7 @@ type Props = { createTransaction: Function, } -type Action = 'AddOwner' +type Action = 'AddOwner' | 'EditOwner' | 'ReplaceOwner' | 'RemoveOwner' class ManageOwners extends React.Component { state = { @@ -66,45 +74,53 @@ class ManageOwners extends React.Component { } = this.props const { showAddOwner } = this.state + const columns = generateColumns() + const ownerData = getOwnerData(owners) + return ( Manage Safe Owners - - NAME - ADDRESS - - - - {owners.map(owner => ( - - - - - {owner.get('name')} - - - - - - - - - - - - {owner.get('address')} - - - - - - - + + + {(sortedData: Array) => sortedData.map((row: any, index: number) => ( + + {columns.map((column: Column) => ( + + {column.id === OWNERS_TABLE_ADDRESS_ID ? : row[column.id]} + + ))} + + + + + + + + ))} - +
diff --git a/src/routes/safe/components/Settings/ManageOwners/style.js b/src/routes/safe/components/Settings/ManageOwners/style.js index 1d674731..6d69124f 100644 --- a/src/routes/safe/components/Settings/ManageOwners/style.js +++ b/src/routes/safe/components/Settings/ManageOwners/style.js @@ -1,6 +1,6 @@ // @flow import { - sm, xs, lg, border, + sm, xs, md, lg, border, } from '~/theme/variables' export const styles = () => ({ @@ -11,9 +11,6 @@ export const styles = () => ({ formContainer: { minHeight: '369px', }, - header: { - padding: `${sm} ${lg}`, - }, owners: { padding: lg, }, @@ -25,7 +22,7 @@ export const styles = () => ({ whiteSpace: 'nowrap', }, owner: { - padding: sm, + padding: md, paddingLeft: lg, alignItems: 'center', }, From 44dfa74baafadaaefab19b69c81b75958bda29f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 27 May 2019 12:22:15 +0200 Subject: [PATCH 21/71] Fix styles in owners table --- .../Settings/ManageOwners/dataFetcher.js | 3 ++ .../Settings/ManageOwners/index.jsx | 4 +- .../components/Settings/ManageOwners/style.js | 46 +++++-------------- 3 files changed, 17 insertions(+), 36 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js b/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js index 520b43ea..5d5d2111 100644 --- a/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js +++ b/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js @@ -31,6 +31,7 @@ export const generateColumns = () => { disablePadding: false, label: 'Name', width: 150, + custom: false, align: 'left', } @@ -40,6 +41,7 @@ export const generateColumns = () => { disablePadding: false, label: 'Address', width: 350, + custom: false, align: 'left', } @@ -48,6 +50,7 @@ export const generateColumns = () => { order: false, disablePadding: false, label: '', + align: 'right', custom: true, } diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index cfb1d919..cbf8ca68 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -22,7 +22,9 @@ import Button from '~/components/layout/Button' import AddOwnerModal from './AddOwnerModal' import OwnerAddressTableCell from './OwnerAddressTableCell' import type { Owner } from '~/routes/safe/store/models/owner' -import { getOwnerData, generateColumns, OWNERS_TABLE_ADDRESS_ID, type OwnerRow, } from './dataFetcher' +import { + getOwnerData, generateColumns, OWNERS_TABLE_ADDRESS_ID, type OwnerRow, +} from './dataFetcher' import { sm, boldFont } from '~/theme/variables' import { styles } from './style' diff --git a/src/routes/safe/components/Settings/ManageOwners/style.js b/src/routes/safe/components/Settings/ManageOwners/style.js index 6d69124f..9b02b06e 100644 --- a/src/routes/safe/components/Settings/ManageOwners/style.js +++ b/src/routes/safe/components/Settings/ManageOwners/style.js @@ -11,43 +11,19 @@ export const styles = () => ({ formContainer: { minHeight: '369px', }, - owners: { - padding: lg, - }, - name: { - textOverflow: 'ellipsis', - overflow: 'hidden', - }, - userName: { - whiteSpace: 'nowrap', - }, - owner: { - padding: md, - paddingLeft: lg, - alignItems: 'center', - }, - user: { - justifyContent: 'left', - }, - open: { - paddingLeft: sm, - width: 'auto', + hide: { '&:hover': { - cursor: 'pointer', + backgroundColor: '#fff3e2', + }, + '&:hover $actions': { + visibility: 'initial', + }, + '&:focus $actions': { + visibility: 'initial', }, }, - container: { - marginTop: xs, - alignItems: 'center', - }, - address: { - paddingLeft: '6px', - }, - open: { - paddingLeft: sm, - width: 'auto', - '&:hover': { - cursor: 'pointer', - }, + actions: { + justifyContent: 'flex-end', + visibility: 'hidden', }, }) From f619905b11bd68d50be7050e41375e96aa589dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 27 May 2019 12:54:59 +0200 Subject: [PATCH 22/71] Add owner settings assets --- .../Settings/ManageOwners/assets/icons/rename-owner.svg | 3 +++ .../Settings/ManageOwners/assets/icons/replace-owner.svg | 3 +++ src/routes/safe/components/Settings/assets/icons/bin.svg | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/assets/icons/rename-owner.svg create mode 100644 src/routes/safe/components/Settings/ManageOwners/assets/icons/replace-owner.svg create mode 100644 src/routes/safe/components/Settings/assets/icons/bin.svg diff --git a/src/routes/safe/components/Settings/ManageOwners/assets/icons/rename-owner.svg b/src/routes/safe/components/Settings/ManageOwners/assets/icons/rename-owner.svg new file mode 100644 index 00000000..b5b1c3b4 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/assets/icons/rename-owner.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/routes/safe/components/Settings/ManageOwners/assets/icons/replace-owner.svg b/src/routes/safe/components/Settings/ManageOwners/assets/icons/replace-owner.svg new file mode 100644 index 00000000..1fd14cd9 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/assets/icons/replace-owner.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/routes/safe/components/Settings/assets/icons/bin.svg b/src/routes/safe/components/Settings/assets/icons/bin.svg new file mode 100644 index 00000000..f8fe7071 --- /dev/null +++ b/src/routes/safe/components/Settings/assets/icons/bin.svg @@ -0,0 +1,3 @@ + + + From fcbb02e56f0dc663c51c6600c1ddeec0fa88d609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 27 May 2019 14:46:31 +0200 Subject: [PATCH 23/71] Refactor add owner modal window --- .../ManageOwners/AddOwnerModal/index.jsx | 18 ++++++------------ .../AddOwnerModal/screens/OwnerForm/index.jsx | 4 ---- .../AddOwnerModal/screens/Review/index.jsx | 6 +++--- .../AddOwnerModal/screens/Review/style.js | 2 +- .../screens/ThresholdForm/index.jsx | 6 +----- 5 files changed, 11 insertions(+), 25 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx index bdaf56ec..7a72c8e0 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx @@ -65,14 +65,14 @@ const AddOwner = ({ } } - const ownerSubmited = (newValues: Object) => { + const ownerSubmitted = (newValues: Object) => { values.ownerName = newValues.ownerName values.ownerAddress = newValues.ownerAddress setValues(values) setActiveScreen('selectThreshold') } - const thresholdSubmited = (newValues: Object) => { + const thresholdSubmitted = (newValues: Object) => { values.threshold = newValues.threshold setValues(values) setActiveScreen('reviewAddOwner') @@ -95,8 +95,8 @@ const AddOwner = ({ return ( )} {activeScreen === 'selectThreshold' && ( )} {activeScreen === 'reviewAddOwner' && ( diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx index f08b49f9..513bce33 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx @@ -24,16 +24,12 @@ import { styles } from './style' type Props = { onClose: () => void, classes: Object, - safeAddress: string, - safeName: string, onSubmit: Function, } const OwnerForm = ({ classes, onClose, - safeAddress, - safeName, onSubmit, }: Props) => { const handleSubmit = (values) => { diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx index 376051bb..b9252b0a 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx @@ -93,7 +93,7 @@ const ReviewAddOwner = ({ - {owners.size + 1} Safe owners + {owners.size + 1} Safe owner(s) @@ -128,7 +128,7 @@ const ReviewAddOwner = ({ - + @@ -166,7 +166,7 @@ const ReviewAddOwner = ({ color="primary" data-testid="review-tx-btn" > - Next + Submit
diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/style.js b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/style.js index 5213f8c9..129b4a62 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/style.js +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/style.js @@ -60,7 +60,7 @@ export const styles = () => ({ userName: { whiteSpace: 'nowrap', }, - newOwner: { + selectedOwner: { padding: sm, alignItems: 'center', backgroundColor: '#fff3e2', diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx index e0f23234..6a6c3f5a 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx @@ -28,8 +28,6 @@ import { styles } from './style' type Props = { onClose: () => void, classes: Object, - safeAddress: string, - safeName: string, owners: List, threshold: number, onClickBack: Function, @@ -39,8 +37,6 @@ type Props = { const ThresholdForm = ({ classes, onClose, - safeAddress, - safeName, owners, threshold, onClickBack, @@ -127,7 +123,7 @@ const ThresholdForm = ({ color="primary" data-testid="review-tx-btn" > - Next + Review
From 20d038ebfac5cdfae3407adec8171abbe91072d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 27 May 2019 14:59:04 +0200 Subject: [PATCH 24/71] Improve Safe settings styles --- src/components/Footer/index.scss | 1 + .../Settings/ManageOwners/dataFetcher.js | 2 - .../Settings/ManageOwners/index.jsx | 49 +++++++++++-------- .../components/Settings/ManageOwners/style.js | 11 +++++ src/routes/safe/components/Settings/index.jsx | 8 ++- src/routes/safe/components/Settings/style.js | 10 ++++ 6 files changed, 56 insertions(+), 25 deletions(-) diff --git a/src/components/Footer/index.scss b/src/components/Footer/index.scss index 91887ad4..0f3b3eba 100644 --- a/src/components/Footer/index.scss +++ b/src/components/Footer/index.scss @@ -7,6 +7,7 @@ align-items: center; border: solid 0.5px $border; background-color: white; + margin-top: 50px; } @media only screen and (max-width: $(screenXs)px) { diff --git a/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js b/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js index 5d5d2111..f66e4489 100644 --- a/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js +++ b/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js @@ -40,7 +40,6 @@ export const generateColumns = () => { order: false, disablePadding: false, label: 'Address', - width: 350, custom: false, align: 'left', } @@ -50,7 +49,6 @@ export const generateColumns = () => { order: false, disablePadding: false, label: '', - align: 'right', custom: true, } diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index cbf8ca68..19b4fa96 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -27,6 +27,9 @@ import { } from './dataFetcher' import { sm, boldFont } from '~/theme/variables' import { styles } from './style' +import ReplaceOwnerIcon from './assets/icons/replace-owner.svg' +import RenameOwnerIcon from './assets/icons/rename-owner.svg' +import RemoveOwnerIcon from '../assets/icons/bin.svg' const controlsStyle = { backgroundColor: 'white', @@ -52,15 +55,26 @@ type Action = 'AddOwner' | 'EditOwner' | 'ReplaceOwner' | 'RemoveOwner' class ManageOwners extends React.Component { state = { + selectedOwnerAddress: undefined, + selectedOwnerName: undefined, showAddOwner: false, + showRemoveOwner: false, } - onShow = (action: Action) => () => { - this.setState(() => ({ [`show${action}`]: true })) + onShow = (action: Action, row?: Object) => () => { + this.setState({ + [`show${action}`]: true, + selectedOwnerAddress: row && row.address, + selectedOwnerName: row && row.name, + }) } onHide = (action: Action) => () => { - this.setState(() => ({ [`show${action}`]: false })) + this.setState({ + [`show${action}`]: false, + selectedOwnerAddress: undefined, + selectedOwnerName: undefined, + }) } render() { @@ -74,9 +88,15 @@ class ManageOwners extends React.Component { userAddress, createTransaction, } = this.props - const { showAddOwner } = this.state + const { + showAddOwner, + showRemoveOwner, + selectedOwnerName, + selectedOwnerAddress + } = this.state const columns = generateColumns() + const autoColumns = columns.filter(c => !c.custom) const ownerData = getOwnerData(owners) return ( @@ -85,7 +105,6 @@ class ManageOwners extends React.Component { Manage Safe Owners - { > {(sortedData: Array) => sortedData.map((row: any, index: number) => ( - {columns.map((column: Column) => ( + {autoColumns.map((column: Column) => ( {column.id === OWNERS_TABLE_ADDRESS_ID ? : row[column.id]} ))} - - - + + + diff --git a/src/routes/safe/components/Settings/ManageOwners/style.js b/src/routes/safe/components/Settings/ManageOwners/style.js index 9b02b06e..32a6c455 100644 --- a/src/routes/safe/components/Settings/ManageOwners/style.js +++ b/src/routes/safe/components/Settings/ManageOwners/style.js @@ -26,4 +26,15 @@ export const styles = () => ({ justifyContent: 'flex-end', visibility: 'hidden', }, + editOwnerIcon: { + cursor: 'pointer', + }, + replaceOwnerIcon: { + marginLeft: lg, + cursor: 'pointer', + }, + removeOwnerIcon: { + marginLeft: lg, + cursor: 'pointer', + }, }) diff --git a/src/routes/safe/components/Settings/index.jsx b/src/routes/safe/components/Settings/index.jsx index eaa6a9cf..ecd84df0 100644 --- a/src/routes/safe/components/Settings/index.jsx +++ b/src/routes/safe/components/Settings/index.jsx @@ -16,6 +16,7 @@ import UpdateSafeName from './UpdateSafeName' import ManageOwners from './ManageOwners' import actions, { type Actions } from './actions' import { styles } from './style' +import RemoveSafeIcon from './assets/icons/bin.svg' type State = { showRemoveSafe: boolean, @@ -80,8 +81,11 @@ class Settings extends React.Component { - - Remove Safe + + + Remove Safe + + ({ cursor: 'pointer', }, }, + removeSafeText: { + height: '16px', + lineHeight: '16px', + paddingRight: sm, + float: 'left', + }, + removeSafeIcon: { + height: '16px', + cursor: 'pointer', + }, }) From ff0a13bf764c6cb45840e321aca7d3df747143c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 27 May 2019 16:35:44 +0200 Subject: [PATCH 25/71] Create remove owner modal window --- .../ManageOwners/RemoveOwnerModal/index.jsx | 114 ++++++++++++++++++ .../Settings/ManageOwners/index.jsx | 14 +++ 2 files changed, 128 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx new file mode 100644 index 00000000..8d049f51 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx @@ -0,0 +1,114 @@ +// @flow +import React, { useState, useEffect } from 'react' +import { List } from 'immutable' +import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' +import Modal from '~/components/Modal' +import { type Safe } from '~/routes/safe/store/models/safe' +import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' +import { setOwners } from '~/logic/safe/utils' +import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' +import CheckOwner from './screens/CheckOwner' +import { withStyles } from '@material-ui/core/styles' + +const styles = () => ({ + biggerModalWindow: { + width: '775px', + minHeight: '500px', + position: 'static', + }, +}) + +type Props = { + onClose: () => void, + classes: Object, + isOpen: boolean, + safeAddress: string, + safeName: string, + ownerAddress: string, + ownerName: string, + owners: List, + threshold: number, + network: string, + userAddress: string, + createTransaction: Function, +} +type ActiveScreen = 'checkOwner' | 'selectThreshold' | 'reviewRemoveOwner' + +const RemoveOwner = ({ + onClose, + isOpen, + classes, + safeAddress, + safeName, + ownerAddress, + ownerName, + owners, + threshold, + network, + userAddress, + createTransaction, +}: Props) => { + const [activeScreen, setActiveScreen] = useState('checkOwner') + const [values, setValues] = useState({}) + + useEffect( + () => () => { + setActiveScreen('checkOwner') + setValues({}) + }, + [isOpen], + ) + + const onClickBack = () => { + if (activeScreen === 'reviewRemoveOwner') { + setActiveScreen('selectThreshold') + } else if (activeScreen === 'selectThreshold') { + setActiveScreen('checkOwner') + } + } + + const ownerSubmitted = (newValues: Object) => { + setActiveScreen('selectThreshold') + } + + const thresholdSubmitted = (newValues: Object) => { + values.threshold = newValues.threshold + setValues(values) + setActiveScreen('reviewRemoveOwner') + } + + return ( + + + {({ openSnackbar }) => { + const onRemoveOwner = async () => { + } + + return ( + + + {activeScreen === 'checkOwner' && ( + + )} + + + ) + }} + + + ) +} + +export default withStyles(styles)(RemoveOwner) diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 19b4fa96..3b07c3b7 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -20,6 +20,7 @@ import Paragraph from '~/components/layout/Paragraph' import Hairline from '~/components/layout/Hairline' import Button from '~/components/layout/Button' import AddOwnerModal from './AddOwnerModal' +import RemoveOwnerModal from './RemoveOwnerModal' import OwnerAddressTableCell from './OwnerAddressTableCell' import type { Owner } from '~/routes/safe/store/models/owner' import { @@ -156,6 +157,19 @@ class ManageOwners extends React.Component { userAddress={userAddress} createTransaction={createTransaction} /> + ) } From 077fe9c61092fcfb75bf56d490ec202b0f769ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 28 May 2019 09:32:33 +0200 Subject: [PATCH 26/71] Add check owner in modal window --- .../screens/CheckOwner/index.jsx | 125 ++++++++++++++++++ .../screens/CheckOwner/style.js | 47 +++++++ 2 files changed, 172 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/style.js diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx new file mode 100644 index 00000000..75d514d1 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx @@ -0,0 +1,125 @@ +// @flow +import React from 'react' +import classNames from 'classnames/bind' +import { withStyles } from '@material-ui/core/styles' +import Close from '@material-ui/icons/Close' +import IconButton from '@material-ui/core/IconButton' +import Paragraph from '~/components/layout/Paragraph' +import Row from '~/components/layout/Row' +import GnoForm from '~/components/forms/GnoForm' +import Col from '~/components/layout/Col' +import Button from '~/components/layout/Button' +import Block from '~/components/layout/Block' +import Hairline from '~/components/layout/Hairline' +import Field from '~/components/forms/Field' +import TextField from '~/components/forms/TextField' +import Link from '~/components/layout/Link' +import Identicon from '~/components/Identicon' +import OpenInNew from '@material-ui/icons/OpenInNew' +import { getEtherScanLink } from '~/logic/wallets/getWeb3' +import { + composeValidators, + required, + mustBeEthereumAddress, + minMaxLength, + noErrorsOn, +} from '~/components/forms/validator' +import { styles } from './style' +import { secondary } from '~/theme/variables' + +const openIconStyle = { + height: '16px', + color: secondary, +} + +type Props = { + onClose: () => void, + classes: Object, + ownerAddress: string, + ownerName: string, + network: string, + onSubmit: Function, +} + +const CheckOwner = ({ + classes, + onClose, + ownerAddress, + ownerName, + network, + onSubmit, +}: Props) => { + const handleSubmit = (values) => { + onSubmit(values) + } + + return ( + + + + Remove owner + + 1 of 3 + + + + + + + {(...args) => { + const formState = args[2] + + return ( + + + + + Review the owner you want to remove from the active Safe: + + + + + + + + + + {ownerName} + + + + {ownerAddress} + + + + + + + + + + + + + + + + ) + }} + + + ) +} + +export default withStyles(styles)(CheckOwner) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/style.js b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/style.js new file mode 100644 index 00000000..bc854481 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/style.js @@ -0,0 +1,47 @@ +// @flow +import { + lg, md, sm, background, +} from '~/theme/variables' + +export const styles = () => ({ + heading: { + padding: `${sm} ${lg}`, + justifyContent: 'flex-start', + boxSizing: 'border-box', + maxHeight: '75px', + }, + annotation: { + letterSpacing: '-1px', + color: '#a2a8ba', + marginRight: 'auto', + marginLeft: '20px', + }, + manage: { + fontSize: '24px', + }, + closeIcon: { + height: '35px', + width: '35px', + }, + formContainer: { + padding: `${md} ${lg}`, + minHeight: '340px', + }, + buttonRow: { + height: '84px', + justifyContent: 'center', + }, + name: { + textOverflow: 'ellipsis', + overflow: 'hidden', + }, + userName: { + whiteSpace: 'nowrap', + }, + owner: { + alignItems: 'center', + }, + user: { + justifyContent: 'left', + }, +}) From 58499cb8c5d2a8df6408d7597fef1a562fde43d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 28 May 2019 10:05:17 +0200 Subject: [PATCH 27/71] Add threshold form in remove owner modal --- .../ManageOwners/AddOwnerModal/index.jsx | 27 +++- .../ManageOwners/RemoveOwnerModal/index.jsx | 43 +++++- .../screens/ThresholdForm/index.jsx | 139 ++++++++++++++++++ .../screens/ThresholdForm/style.js | 45 ++++++ .../Settings/ManageOwners/index.jsx | 2 +- 5 files changed, 248 insertions(+), 8 deletions(-) create mode 100644 src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/style.js diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx index 7a72c8e0..4a0af47d 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx @@ -34,6 +34,22 @@ type Props = { } type ActiveScreen = 'selectOwner' | 'selectThreshold' | 'reviewAddOwner' +export const sendAddOwner = async ( + values: Object, + safeAddress: string, + owners: List, + openSnackbar: Fuction, + createTransaction: Function, +) => { + const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) + const txData = gnosisSafe.contract.methods.addOwnerWithThreshold(values.ownerAddress, values.threshold).encodeABI() + + const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) + if (txHash) { + setOwners(safeAddress, owners.push(makeOwner({ name: values.ownerName, address: values.ownerAddress }))) + } +} + const AddOwner = ({ onClose, isOpen, @@ -84,12 +100,11 @@ const AddOwner = ({ {({ openSnackbar }) => { const onAddOwner = async () => { onClose() - const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) - const txData = gnosisSafe.contract.methods.addOwnerWithThreshold(values.ownerAddress, values.threshold).encodeABI() - - const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) - if (txHash) { - setOwners(safeAddress, owners.push(makeOwner({ name: values.ownerName, address: values.ownerAddress }))) + try { + sendAddOwner(values, safeAddress, owners, openSnackbar, createTransaction) + } catch (error) { + // eslint-disable-next-line + console.log('Error while removing an owner ' + error) } } diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx index 8d049f51..92aa347f 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx @@ -8,6 +8,7 @@ import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' import { setOwners } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import CheckOwner from './screens/CheckOwner' +import ThresholdForm from './screens/ThresholdForm' import { withStyles } from '@material-ui/core/styles' const styles = () => ({ @@ -34,6 +35,30 @@ type Props = { } type ActiveScreen = 'checkOwner' | 'selectThreshold' | 'reviewRemoveOwner' +const SENTINEL_ADDRESS = '0x0000000000000000000000000000000000000001' + +export const sendRemoveOwner = async ( + values: Object, + safeAddress: string, + ownerAddressToRemove: string, + ownerNameToRemove: string, + owners: List, + openSnackbar: Function, + createTransaction: Function, +) => { + const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) + const storedOwners = await gnosisSafe.getOwners() + const index = storedOwners.findIndex(ownerAddress => ownerAddress === ownerAddressToRemove) + const prevAddress = index === 0 ? SENTINEL_ADDRESS : storedOwners[index - 1] + const txData = gnosisSafe.contract.methods.removeOwner(prevAddress, ownerAddressToRemove, values.threshold).encodeABI() + const text = `Remove Owner ${ownerNameToRemove} (${ownerAddressToRemove})` + + const txHash = createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) + if (txHash) { + setOwners(safeAddress, owners.filter(o => o.address !== ownerAddressToRemove)) + } +} + const RemoveOwner = ({ onClose, isOpen, @@ -81,7 +106,14 @@ const RemoveOwner = ({ {({ openSnackbar }) => { - const onRemoveOwner = async () => { + const onRemoveOwner = () => { + onClose() + try { + sendRemoveOwner(values, safeAddress, ownerAddress, ownerName, owners, openSnackbar, createTransaction) + } catch (error) { + // eslint-disable-next-line + console.log('Error while removing an owner ' + error) + } } return ( @@ -102,6 +134,15 @@ const RemoveOwner = ({ onSubmit={ownerSubmitted} /> )} + {activeScreen === 'selectThreshold' && ( + + )} ) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.jsx new file mode 100644 index 00000000..9d1671af --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.jsx @@ -0,0 +1,139 @@ +// @flow +import React from 'react' +import { List } from 'immutable' +import { withStyles } from '@material-ui/core/styles' +import Close from '@material-ui/icons/Close' +import IconButton from '@material-ui/core/IconButton' +import SelectField from '~/components/forms/SelectField' +import MenuItem from '@material-ui/core/MenuItem' +import Paragraph from '~/components/layout/Paragraph' +import Row from '~/components/layout/Row' +import GnoForm from '~/components/forms/GnoForm' +import Col from '~/components/layout/Col' +import Button from '~/components/layout/Button' +import Block from '~/components/layout/Block' +import Hairline from '~/components/layout/Hairline' +import Field from '~/components/forms/Field' +import TextField from '~/components/forms/TextField' +import type { Owner } from '~/routes/safe/store/models/owner' +import { + composeValidators, + required, + minValue, + maxValue, + mustBeInteger, +} from '~/components/forms/validator' +import { styles } from './style' + +type Props = { + onClose: () => void, + classes: Object, + owners: List, + threshold: number, + onClickBack: Function, + onSubmit: Function, +} + +const ThresholdForm = ({ + classes, + onClose, + owners, + threshold, + onClickBack, + onSubmit, +}: Props) => { + const handleSubmit = (values) => { + onSubmit(values) + } + const defaultThreshold = threshold > 1 ? threshold - 1 : threshold + + return ( + + + + Remove owner + + 2 of 3 + + + + + + + {(...args) => { + const formState = args[2] + const numOptions = owners.size > 1 ? owners.size - 1 : 1 + + return ( + + + + + Set the required owner confirmations: + + + + + Any transaction over any daily limit requires the confirmation of: + + + + + ( + + + {[...Array(Number(numOptions))].map((x, index) => ( + + {index + 1} + + ))} + + {props.meta.error && props.meta.touched && ( + + {props.meta.error} + + )} + + )} + validate={composeValidators(required, mustBeInteger, minValue(1), maxValue(numOptions))} + data-testid="threshold-select-input" + /> + + + + out of + {' '} + {owners.size - 1} + {' '} + owner(s) + + + + + + + + + + + ) + }} + + + ) +} + +export default withStyles(styles)(ThresholdForm) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/style.js b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/style.js new file mode 100644 index 00000000..dfd2de15 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/style.js @@ -0,0 +1,45 @@ +// @flow +import { lg, md, sm } from '~/theme/variables' + +export const styles = () => ({ + heading: { + padding: `${sm} ${lg}`, + justifyContent: 'flex-start', + boxSizing: 'border-box', + maxHeight: '75px', + }, + annotation: { + letterSpacing: '-1px', + color: '#a2a8ba', + marginRight: 'auto', + marginLeft: '20px', + }, + manage: { + fontSize: '24px', + }, + closeIcon: { + height: '35px', + width: '35px', + }, + headingText: { + fontSize: '16px', + }, + formContainer: { + padding: `${md} ${lg}`, + minHeight: '340px', + }, + ownersText: { + marginLeft: sm, + }, + buttonRow: { + height: '84px', + justifyContent: 'center', + }, + inputRow: { + position: 'relative', + }, + errorText: { + position: 'absolute', + bottom: '-25px', + }, +}) diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 3b07c3b7..bdc38b17 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -93,7 +93,7 @@ class ManageOwners extends React.Component { showAddOwner, showRemoveOwner, selectedOwnerName, - selectedOwnerAddress + selectedOwnerAddress, } = this.state const columns = generateColumns() From 5d413fbbcc2a7f36e6c34bb0c12b8fff0b2d0fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 28 May 2019 13:16:42 +0200 Subject: [PATCH 28/71] Add review screen in remove owner modal --- .../ManageOwners/RemoveOwnerModal/index.jsx | 14 ++ .../RemoveOwnerModal/screens/Review/index.jsx | 181 ++++++++++++++++++ .../RemoveOwnerModal/screens/Review/style.js | 78 ++++++++ .../safe/store/actions/createTransaction.js | 1 + 4 files changed, 274 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/style.js diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx index 92aa347f..ad37e4db 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx @@ -9,6 +9,7 @@ import { setOwners } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import CheckOwner from './screens/CheckOwner' import ThresholdForm from './screens/ThresholdForm' +import ReviewRemoveOwner from './screens/Review' import { withStyles } from '@material-ui/core/styles' const styles = () => ({ @@ -143,6 +144,19 @@ const RemoveOwner = ({ onSubmit={thresholdSubmitted} /> )} + {activeScreen === 'reviewRemoveOwner' && ( + + )} ) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx new file mode 100644 index 00000000..728b3389 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx @@ -0,0 +1,181 @@ +// @flow +import React from 'react' +import { List } from 'immutable' +import classNames from 'classnames' +import { withStyles } from '@material-ui/core/styles' +import OpenInNew from '@material-ui/icons/OpenInNew' +import Close from '@material-ui/icons/Close' +import IconButton from '@material-ui/core/IconButton' +import Identicon from '~/components/Identicon' +import Link from '~/components/layout/Link' +import Paragraph from '~/components/layout/Paragraph' +import Row from '~/components/layout/Row' +import GnoForm from '~/components/forms/GnoForm' +import Col from '~/components/layout/Col' +import Button from '~/components/layout/Button' +import Block from '~/components/layout/Block' +import Hairline from '~/components/layout/Hairline' +import Field from '~/components/forms/Field' +import TextField from '~/components/forms/TextField' +import type { Owner } from '~/routes/safe/store/models/owner' +import { getEtherScanLink } from '~/logic/wallets/getWeb3' +import { secondary } from '~/theme/variables' +import { styles } from './style' + +const openIconStyle = { + height: '16px', + color: secondary, +} + +type Props = { + onClose: () => void, + classes: Object, + safeName: string, + owners: List, + network: string, + values: Object, + ownerAddress: string, + ownerName: string, + onClickBack: Function, + onSubmit: Function, +} + +const ReviewRemoveOwner = ({ + classes, + onClose, + safeName, + owners, + network, + values, + ownerAddress, + ownerName, + onClickBack, + onSubmit, +}: Props) => { + const handleSubmit = () => { + onSubmit() + } + + return ( + + + + Remove owner + + 3 of 3 + + + + + + + + + + + + Details + + + + + Safe name + + + {safeName} + + + + + Any transaction requires the confirmation of: + + + {values.threshold} out of {owners.size - 1} owner(s) + + + + + + + + {owners.size - 1} Safe owner(s) + + + + {owners.map(owner => owner.get('address') != ownerAddress && ( + + + + + + + + + {owner.get('name')} + + + + {owner.get('address')} + + + + + + + + + + + ))} + + + REMOVING OWNER ↓ + + + + + + + + + + + {ownerName} + + + + {ownerAddress} + + + + + + + + + + + + + + + + + + + ) +} + +export default withStyles(styles)(ReviewRemoveOwner) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/style.js b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/style.js new file mode 100644 index 00000000..94b34c28 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/style.js @@ -0,0 +1,78 @@ +// @flow +import { + lg, md, sm, border, background, +} from '~/theme/variables' + +export const styles = () => ({ + root: { + height: '372px', + }, + heading: { + padding: `${sm} ${lg}`, + justifyContent: 'flex-start', + boxSizing: 'border-box', + maxHeight: '75px', + }, + annotation: { + letterSpacing: '-1px', + color: '#a2a8ba', + marginRight: 'auto', + marginLeft: '20px', + }, + manage: { + fontSize: '24px', + }, + closeIcon: { + height: '35px', + width: '35px', + }, + info: { + backgroundColor: background, + padding: sm, + justifyContent: 'center', + textAlign: 'center', + flexDirection: 'column', + }, + buttonRow: { + height: '84px', + justifyContent: 'center', + }, + details: { + padding: lg, + borderRight: `solid 1px ${border}`, + height: '100%', + }, + owners: { + overflow: 'auto', + height: '100%', + }, + ownersTitle: { + padding: lg, + }, + owner: { + padding: sm, + alignItems: 'center', + }, + name: { + textOverflow: 'ellipsis', + overflow: 'hidden', + }, + userName: { + whiteSpace: 'nowrap', + }, + selectedOwner: { + padding: sm, + alignItems: 'center', + backgroundColor: '#ffe6ea', + }, + user: { + justifyContent: 'left', + }, + open: { + paddingLeft: sm, + width: 'auto', + '&:hover': { + cursor: 'pointer', + }, + }, +}) diff --git a/src/routes/safe/store/actions/createTransaction.js b/src/routes/safe/store/actions/createTransaction.js index c4b6ff99..4970332f 100644 --- a/src/routes/safe/store/actions/createTransaction.js +++ b/src/routes/safe/store/actions/createTransaction.js @@ -31,6 +31,7 @@ const createTransaction = ( txHash = await executeTransaction(safeInstance, to, valueInWei, txData, CALL, nonce, from) openSnackbar('Transaction has been confirmed', 'success') } else { + console.log('Temporal error: threshold != 1') // txHash = await approveTransaction(safeAddress, to, valueInWei, txData, CALL, nonce) } // dispatch(addTransactions(txHash)) From fc220940840ca589251569a53f8ffdbb4f850ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 28 May 2019 17:39:00 +0200 Subject: [PATCH 29/71] Remove old implementation of remove owner --- .../RemoveOwner/RemoveOwnerForm/index.jsx | 50 -------- .../components/RemoveOwner/Review/index.jsx | 47 ------- .../safe/components/RemoveOwner/actions.js | 12 -- .../safe/components/RemoveOwner/index.jsx | 121 ------------------ .../safe/components/RemoveOwner/selector.js | 21 --- 5 files changed, 251 deletions(-) delete mode 100644 src/routes/safe/components/RemoveOwner/RemoveOwnerForm/index.jsx delete mode 100644 src/routes/safe/components/RemoveOwner/Review/index.jsx delete mode 100644 src/routes/safe/components/RemoveOwner/actions.js delete mode 100644 src/routes/safe/components/RemoveOwner/index.jsx delete mode 100644 src/routes/safe/components/RemoveOwner/selector.js diff --git a/src/routes/safe/components/RemoveOwner/RemoveOwnerForm/index.jsx b/src/routes/safe/components/RemoveOwner/RemoveOwnerForm/index.jsx deleted file mode 100644 index 5f1a61a4..00000000 --- a/src/routes/safe/components/RemoveOwner/RemoveOwnerForm/index.jsx +++ /dev/null @@ -1,50 +0,0 @@ -// @flow -import * as React from 'react' -import Field from '~/components/forms/Field' -import SnackbarContent from '~/components/SnackbarContent' -import OpenPaper from '~/components/Stepper/OpenPaper' -import Checkbox from '~/components/forms/Checkbox' -import Block from '~/components/layout/Block' -import Heading from '~/components/layout/Heading' - -export const DECREASE_PARAM = 'decrease' - -type Props = { - numOwners: number, - threshold: number, - name: string, - disabled: boolean, - pendingTransactions: boolean, -} - -const RemoveOwnerForm = ({ - numOwners, threshold, name, disabled, pendingTransactions, -}: Props) => ( - controls: React.Node, -) => ( - - - Remove Owner - {' '} - {!!name && name} - - - {`Actual number of owners: ${numOwners}, threhsold of safe: ${threshold}`} - - {pendingTransactions && ( - - )} - - - - {disabled && '(disabled) '} - Decrease threshold? - - - -) - -export default RemoveOwnerForm diff --git a/src/routes/safe/components/RemoveOwner/Review/index.jsx b/src/routes/safe/components/RemoveOwner/Review/index.jsx deleted file mode 100644 index f9e35c2d..00000000 --- a/src/routes/safe/components/RemoveOwner/Review/index.jsx +++ /dev/null @@ -1,47 +0,0 @@ -// @flow -import * as React from 'react' -import CircularProgress from '@material-ui/core/CircularProgress' -import Block from '~/components/layout/Block' -import OpenPaper from '~/components/Stepper/OpenPaper' -import Bold from '~/components/layout/Bold' -import Heading from '~/components/layout/Heading' -import Paragraph from '~/components/layout/Paragraph' -import { DECREASE_PARAM } from '~/routes/safe/components/RemoveOwner/RemoveOwnerForm' - -type Props = { - name: string, -} - -type FormProps = { - values: Object, - submitting: boolean, -} - -const spinnerStyle = { - minHeight: '50px', -} - -const Review = ({ name }: Props) => (controls: React.Node, { values, submitting }: FormProps) => { - const text = values[DECREASE_PARAM] - ? 'This operation will decrease the threshold of the safe' - : 'This operation will not modify the threshold of the safe' - - return ( - - Review the Remove Owner operation - - Owner Name: - {' '} - {name} - - - {text} - - - { submitting && } - - - ) -} - -export default Review diff --git a/src/routes/safe/components/RemoveOwner/actions.js b/src/routes/safe/components/RemoveOwner/actions.js deleted file mode 100644 index 32f51f38..00000000 --- a/src/routes/safe/components/RemoveOwner/actions.js +++ /dev/null @@ -1,12 +0,0 @@ -// @flow -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' - -type FetchTransactions = typeof fetchTransactions - -export type Actions = { - fetchTransactions: FetchTransactions, -} - -export default { - fetchTransactions, -} diff --git a/src/routes/safe/components/RemoveOwner/index.jsx b/src/routes/safe/components/RemoveOwner/index.jsx deleted file mode 100644 index d82592ab..00000000 --- a/src/routes/safe/components/RemoveOwner/index.jsx +++ /dev/null @@ -1,121 +0,0 @@ -// @flow -import * as React from 'react' -import Stepper from '~/components/Stepper' -import { connect } from 'react-redux' -import { type Safe } from '~/routes/safe/store/models/safe' -import { createTransaction } from '~/logic/safe/safeFrontendOperations' -import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' -import RemoveOwnerForm, { DECREASE_PARAM } from './RemoveOwnerForm' -import Review from './Review' -import selector, { type SelectorProps } from './selector' -import actions, { type Actions } from './actions' - -const getSteps = () => [ - 'Fill Owner Form', 'Review Remove order operation', -] - -type Props = SelectorProps & Actions & { - safe: Safe, - threshold: number, - name: string, - userToRemove: string, -} - -type State = { - done: boolean, -} - -const SENTINEL_ADDRESS = '0x0000000000000000000000000000000000000001' -export const REMOVE_OWNER_RESET_BUTTON_TEXT = 'RESET' - -export const initialValuesFrom = (decreaseMandatory: boolean = false) => ({ - [DECREASE_PARAM]: decreaseMandatory, -}) - -export const shouldDecrease = (numOwners: number, threshold: number) => threshold === numOwners - -export const removeOwner = async ( - values: Object, - safe: Safe, - threshold: number, - userToRemove: string, - name: string, - executor: string, -) => { - const safeAddress = safe.get('address') - const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) - const nonce = await gnosisSafe.nonce() - const newThreshold = values[DECREASE_PARAM] ? threshold - 1 : threshold - const storedOwners = await gnosisSafe.getOwners() - const index = storedOwners.findIndex(ownerAddress => ownerAddress === userToRemove) - const prevAddress = index === 0 ? SENTINEL_ADDRESS : storedOwners[index - 1] - const data = gnosisSafe.contract.removeOwner(prevAddress, userToRemove, newThreshold).encodeABI() - const text = name || userToRemove - - return createTransaction(safe, `Remove Owner ${text}`, safeAddress, '0', nonce, executor, data) -} - -class RemoveOwner extends React.Component { - state = { - done: false, - } - - onRemoveOwner = async (values: Object) => { - try { - const { - safe, threshold, executor, fetchTransactions, userToRemove, name, - } = this.props - await removeOwner(values, safe, threshold, userToRemove, name, executor) - fetchTransactions(safe.get('address')) - this.setState({ done: true }) - } catch (error) { - this.setState({ done: false }) - // eslint-disable-next-line - console.log('Error while adding owner ' + error) - } - } - - onReset = () => { - this.setState({ done: false }) - } - - render() { - const { safe, name, pendingTransactions } = this.props - const { done } = this.state - const steps = getSteps() - const numOwners = safe.get('owners').count() - const threshold = safe.get('threshold') - const finishedButton = - const decrease = shouldDecrease(numOwners, threshold) - const initialValues = initialValuesFrom(decrease) - const disabled = decrease || threshold === 1 - - return ( - - - - { RemoveOwnerForm } - - - { Review } - - - - ) - } -} - -export default connect(selector, actions)(RemoveOwner) diff --git a/src/routes/safe/components/RemoveOwner/selector.js b/src/routes/safe/components/RemoveOwner/selector.js deleted file mode 100644 index 92dacedb..00000000 --- a/src/routes/safe/components/RemoveOwner/selector.js +++ /dev/null @@ -1,21 +0,0 @@ -// @flow -import { List } from 'immutable' -import { createStructuredSelector, createSelector } from 'reselect' -import { userAccountSelector } from '~/logic/wallets/store/selectors' -import { type Transaction } from '~/routes/safe/store/models/transaction' -import { safeTransactionsSelector } from '~/routes/safe/store/selectors/index' - -const pendingTransactionsSelector = createSelector( - safeTransactionsSelector, - (transactions: List) => transactions.findEntry((tx: Transaction) => tx.get('isExecuted')), -) - -export type SelectorProps = { - executor: typeof userAccountSelector, - pendingTransactions: typeof pendingTransactionsSelector, -} - -export default createStructuredSelector({ - executor: userAccountSelector, - pendingTransactions: pendingTransactionsSelector, -}) From e20cce9855335a1306c2fc2db2bfe45f51d6e709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 10 Jun 2019 10:00:04 +0200 Subject: [PATCH 30/71] Create replace owner modal window --- .../ManageOwners/ReplaceOwnerModal/index.jsx | 151 ++++++++++++++++++ .../Settings/ManageOwners/index.jsx | 15 ++ 2 files changed, 166 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx new file mode 100644 index 00000000..112dd654 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx @@ -0,0 +1,151 @@ +// @flow +import React, { useState, useEffect } from 'react' +import { List } from 'immutable' +import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' +import Modal from '~/components/Modal' +import { type Safe } from '~/routes/safe/store/models/safe' +import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' +import { setOwners } from '~/logic/safe/utils' +import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' +import OwnerForm from './screens/OwnerForm' +import ReviewReplaceOwner from './screens/Review' +import { withStyles } from '@material-ui/core/styles' + +const styles = () => ({ + biggerModalWindow: { + width: '775px', + minHeight: '500px', + position: 'static', + }, +}) + +type Props = { + onClose: () => void, + classes: Object, + isOpen: boolean, + safeAddress: string, + safeName: string, + ownerAddress: string, + ownerName: string, + owners: List, + network: string, + userAddress: string, + createTransaction: Function, +} +type ActiveScreen = 'ownerForm' | 'reviewReplaceOwner' + +const SENTINEL_ADDRESS = '0x0000000000000000000000000000000000000001' + +export const sendReplaceOwner = async ( + values: Object, + safeAddress: string, + ownerAddressToRemove: string, + ownerNameToRemove: string, + owners: List, + openSnackbar: Function, + createTransaction: Function, +) => { + const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) + const storedOwners = await gnosisSafe.getOwners() + const index = storedOwners.findIndex(ownerAddress => ownerAddress === ownerAddressToRemove) + const prevAddress = index === 0 ? SENTINEL_ADDRESS : storedOwners[index - 1] + const txData = gnosisSafe.contract.methods.swapOwner(prevAddress, ownerAddressToRemove, values.ownerAddress).encodeABI() + const text = `Replace Owner ${ownerNameToRemove} (${ownerAddressToRemove}) with ${values.ownerName} (${values.ownerAddress})` + + const ownersWithoutOldOwner = owners.filter(o => o.address !== ownerAddressToRemove) + const ownersWithNewOwner = ownersWithoutOldOwner.push(makeOwner({ name: values.ownerName, address: values.ownerAddress })) + + const txHash = createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) + if (txHash) { + setOwners(safeAddress, ownersWithNewOwner) + } +} + +const ReplaceOwner = ({ + onClose, + isOpen, + classes, + safeAddress, + safeName, + ownerAddress, + ownerName, + owners, + network, + userAddress, + createTransaction, +}: Props) => { + const [activeScreen, setActiveScreen] = useState('checkOwner') + const [values, setValues] = useState({}) + + useEffect( + () => () => { + setActiveScreen('checkOwner') + setValues({}) + }, + [isOpen], + ) + + const onClickBack = () => setActiveScreen('checkOwner') + + const ownerSubmitted = (newValues: Object) => { + values.ownerName = newValues.ownerName + values.ownerAddress = newValues.ownerAddress + setValues(values) + setActiveScreen('reviewReplaceOwner') + } + + return ( + + + {({ openSnackbar }) => { + const onReplaceOwner = () => { + onClose() + try { + sendReplaceOwner(values, safeAddress, ownerAddress, ownerName, owners, openSnackbar, createTransaction) + } catch (error) { + // eslint-disable-next-line + console.log('Error while removing an owner ' + error) + } + } + + return ( + + + {activeScreen === 'checkOwner' && ( + + )} + {activeScreen === 'reviewReplaceOwner' && ( + + )} + + + ) + }} + + + ) +} + +export default withStyles(styles)(ReplaceOwner) diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index bdc38b17..5b60cc24 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -21,6 +21,7 @@ import Hairline from '~/components/layout/Hairline' import Button from '~/components/layout/Button' import AddOwnerModal from './AddOwnerModal' import RemoveOwnerModal from './RemoveOwnerModal' +import ReplaceOwnerModal from './ReplaceOwnerModal' import OwnerAddressTableCell from './OwnerAddressTableCell' import type { Owner } from '~/routes/safe/store/models/owner' import { @@ -60,6 +61,7 @@ class ManageOwners extends React.Component { selectedOwnerName: undefined, showAddOwner: false, showRemoveOwner: false, + showReplaceOwner: false, } onShow = (action: Action, row?: Object) => () => { @@ -92,6 +94,7 @@ class ManageOwners extends React.Component { const { showAddOwner, showRemoveOwner, + showReplaceOwner, selectedOwnerName, selectedOwnerAddress, } = this.state @@ -170,6 +173,18 @@ class ManageOwners extends React.Component { userAddress={userAddress} createTransaction={createTransaction} /> + ) } From 96c79a6415e6b2a50d39d7b021a84d6f8cf00eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 10 Jun 2019 11:21:32 +0200 Subject: [PATCH 31/71] Add owner form in modal for replace an owner --- .../screens/OwnerForm/index.jsx | 160 ++++++++++++++++++ .../screens/OwnerForm/style.js | 38 +++++ 2 files changed, 198 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx new file mode 100644 index 00000000..beefc586 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx @@ -0,0 +1,160 @@ +// @flow +import React from 'react' +import classNames from 'classnames/bind' +import { withStyles } from '@material-ui/core/styles' +import Close from '@material-ui/icons/Close' +import IconButton from '@material-ui/core/IconButton' +import Paragraph from '~/components/layout/Paragraph' +import Row from '~/components/layout/Row' +import GnoForm from '~/components/forms/GnoForm' +import Col from '~/components/layout/Col' +import Button from '~/components/layout/Button' +import Block from '~/components/layout/Block' +import Hairline from '~/components/layout/Hairline' +import Field from '~/components/forms/Field' +import TextField from '~/components/forms/TextField' +import Identicon from '~/components/Identicon' +import Link from '~/components/layout/Link' +import OpenInNew from '@material-ui/icons/OpenInNew' +import { getEtherScanLink } from '~/logic/wallets/getWeb3' +import { + composeValidators, + required, + mustBeEthereumAddress, + minMaxLength, +} from '~/components/forms/validator' +import { styles } from './style' +import { secondary } from '~/theme/variables' + +const openIconStyle = { + height: '16px', + color: secondary, +} + +type Props = { + onClose: () => void, + classes: Object, + ownerAddress: string, + ownerName: string, + network: string, + onSubmit: Function, +} + +const OwnerForm = ({ + classes, + onClose, + ownerAddress, + ownerName, + network, + onSubmit, +}: Props) => { + const handleSubmit = (values) => { + onSubmit(values) + } + + return ( + + + + Replace owner + + 1 of 2 + + + + + + + {(...args) => { + const formState = args[2] + + return ( + + + + + Review the owner you want to replace from the active Safe. Then specify the new owner you want to replace it with: + + + + + Current owner + + + + + + + + + + {ownerName} + + + + {ownerAddress} + + + + + + + + + + + New owner + + + + + + + + + + + + + + + + + + + + ) + }} + + + ) +} + +export default withStyles(styles)(OwnerForm) diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js new file mode 100644 index 00000000..bb4c1c1f --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js @@ -0,0 +1,38 @@ +// @flow +import { lg, md, sm } from '~/theme/variables' + +export const styles = () => ({ + heading: { + padding: `${sm} ${lg}`, + justifyContent: 'flex-start', + boxSizing: 'border-box', + maxHeight: '75px', + }, + annotation: { + letterSpacing: '-1px', + color: '#a2a8ba', + marginRight: 'auto', + marginLeft: '20px', + }, + manage: { + fontSize: '24px', + }, + closeIcon: { + height: '35px', + width: '35px', + }, + formContainer: { + padding: `${md} ${lg}`, + minHeight: '340px', + }, + buttonRow: { + height: '84px', + justifyContent: 'center', + }, + owner: { + alignItems: 'center', + }, + user: { + justifyContent: 'left', + }, +}) From ccee257a3983c54d04ff682b18d90c0f929eddc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 11 Jun 2019 09:47:52 +0200 Subject: [PATCH 32/71] Add review screen in modal for replace an owner --- .../screens/Review/index.jsx | 207 ++++++++++++++++++ .../ReplaceOwnerModal/screens/Review/style.js | 83 +++++++ 2 files changed, 290 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/style.js diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx new file mode 100644 index 00000000..6302e690 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx @@ -0,0 +1,207 @@ +// @flow +import React from 'react' +import { List } from 'immutable' +import classNames from 'classnames' +import { withStyles } from '@material-ui/core/styles' +import OpenInNew from '@material-ui/icons/OpenInNew' +import Close from '@material-ui/icons/Close' +import IconButton from '@material-ui/core/IconButton' +import Identicon from '~/components/Identicon' +import Link from '~/components/layout/Link' +import Paragraph from '~/components/layout/Paragraph' +import Row from '~/components/layout/Row' +import GnoForm from '~/components/forms/GnoForm' +import Col from '~/components/layout/Col' +import Button from '~/components/layout/Button' +import Block from '~/components/layout/Block' +import Hairline from '~/components/layout/Hairline' +import Field from '~/components/forms/Field' +import TextField from '~/components/forms/TextField' +import type { Owner } from '~/routes/safe/store/models/owner' +import { getEtherScanLink } from '~/logic/wallets/getWeb3' +import { secondary } from '~/theme/variables' +import { styles } from './style' + +const openIconStyle = { + height: '16px', + color: secondary, +} + +type Props = { + onClose: () => void, + classes: Object, + safeName: string, + owners: List, + network: string, + values: Object, + ownerAddress: string, + ownerName: string, + onClickBack: Function, + onSubmit: Function, +} + +const ReviewRemoveOwner = ({ + classes, + onClose, + safeName, + owners, + network, + values, + ownerAddress, + ownerName, + onClickBack, + onSubmit, +}: Props) => { + const handleSubmit = () => { + onSubmit() + } + + return ( + + + + Replace owner + + 2 of 2 + + + + + + + + + + + + Details + + + + + Safe name + + + {safeName} + + + + + Any transaction requires the confirmation of: + + + {values.threshold} out of {owners.size} owner(s) + + + + + + + + {owners.size} Safe owner(s) + + + + {owners.map(owner => owner.get('address') != ownerAddress && ( + + + + + + + + + {owner.get('name')} + + + + {owner.get('address')} + + + + + + + + + + + ))} + + + REMOVING OWNER ↓ + + + + + + + + + + + {ownerName} + + + + {ownerAddress} + + + + + + + + + + + ADDING NEW OWNER ↓ + + + + + + + + + + + {values.ownerName} + + + + {values.ownerAddress} + + + + + + + + + + + + + + + + + + + ) +} + +export default withStyles(styles)(ReviewRemoveOwner) diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/style.js b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/style.js new file mode 100644 index 00000000..29241ceb --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/style.js @@ -0,0 +1,83 @@ +// @flow +import { + lg, md, sm, border, background, +} from '~/theme/variables' + +export const styles = () => ({ + root: { + height: '372px', + }, + heading: { + padding: `${sm} ${lg}`, + justifyContent: 'flex-start', + boxSizing: 'border-box', + maxHeight: '75px', + }, + annotation: { + letterSpacing: '-1px', + color: '#a2a8ba', + marginRight: 'auto', + marginLeft: '20px', + }, + manage: { + fontSize: '24px', + }, + closeIcon: { + height: '35px', + width: '35px', + }, + info: { + backgroundColor: background, + padding: sm, + justifyContent: 'center', + textAlign: 'center', + flexDirection: 'column', + }, + buttonRow: { + height: '84px', + justifyContent: 'center', + }, + details: { + padding: lg, + borderRight: `solid 1px ${border}`, + height: '100%', + }, + owners: { + overflow: 'auto', + height: '100%', + }, + ownersTitle: { + padding: lg, + }, + owner: { + padding: sm, + alignItems: 'center', + }, + name: { + textOverflow: 'ellipsis', + overflow: 'hidden', + }, + userName: { + whiteSpace: 'nowrap', + }, + selectedOwnerRemoved: { + padding: sm, + alignItems: 'center', + backgroundColor: '#ffe6ea', + }, + selectedOwnerAdded: { + padding: sm, + alignItems: 'center', + backgroundColor: '#fff3e2', + }, + user: { + justifyContent: 'left', + }, + open: { + paddingLeft: sm, + width: 'auto', + '&:hover': { + cursor: 'pointer', + }, + }, +}) From cf8427b89acea8f0c416142ce98df9956235417f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 11 Jun 2019 10:56:08 +0200 Subject: [PATCH 33/71] Create edit owner modal window --- .../ManageOwners/EditOwnerModal/index.jsx | 140 ++++++++++++++++++ .../ManageOwners/EditOwnerModal/style.js | 39 +++++ .../Settings/ManageOwners/index.jsx | 11 ++ 3 files changed, 190 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/style.js diff --git a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx new file mode 100644 index 00000000..80e1bdbe --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx @@ -0,0 +1,140 @@ +// @flow +import React from 'react' +import { connect } from 'react-redux' +import { List } from 'immutable' +import { withStyles } from '@material-ui/core/styles' +import OpenInNew from '@material-ui/icons/OpenInNew' +import Row from '~/components/layout/Row' +import Col from '~/components/layout/Col' +import Link from '~/components/layout/Link' +import Block from '~/components/layout/Block' +import GnoForm from '~/components/forms/GnoForm' +import Button from '~/components/layout/Button' +import Hairline from '~/components/layout/Hairline' +import Field from '~/components/forms/Field' +import TextField from '~/components/forms/TextField' +import Paragraph from '~/components/layout/Paragraph' +import Identicon from '~/components/Identicon' +import IconButton from '@material-ui/core/IconButton' +import Close from '@material-ui/icons/Close' +import { getEtherScanLink } from '~/logic/wallets/getWeb3' +import type { Owner } from '~/routes/safe/store/models/owner' +import { makeOwner } from '~/routes/safe/store/models/owner' +import { + composeValidators, + required, + minMaxLength, +} from '~/components/forms/validator' +import Modal from '~/components/Modal' +import { setOwners } from '~/logic/safe/utils' +import { styles } from './style' +import { secondary } from '~/theme/variables' + +const openIconStyle = { + height: '16px', + color: secondary, +} + +const stylesModal = () => ({ + smallerModalWindow: { + height: 'auto', + position: 'static', + }, +}) + +type Props = { + onClose: () => void, + classes: Object, + isOpen: boolean, + safeAddress: string, + ownerAddress: string, + owners: List, + network: string, +} + +const EditOwnerComponent = ({ + onClose, + isOpen, + classes, + safeAddress, + ownerAddress, + owners, + network, +}: Props) => { + const handleSubmit = (values) => { + const updatedOwners = owners.filter(o => o.address !== ownerAddress).push( + makeOwner({ name: values.ownerName, address: ownerAddress }), + ) + setOwners(safeAddress, updatedOwners) + onClose() + } + + return ( + + + + Edit owner name + + + + + + + + {(...args) => ( + + + + + + + + + + {ownerAddress} + + + + + + + + + + + + + + )} + + + ) +} + +const EditOwnerModal = withStyles(styles)(EditOwnerComponent) + +export default EditOwnerModal diff --git a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/style.js b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/style.js new file mode 100644 index 00000000..8e6294f9 --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/style.js @@ -0,0 +1,39 @@ +// @flow +import { + lg, md, sm, error, background, +} from '~/theme/variables' + +export const styles = (theme: Object) => ({ + heading: { + padding: `${sm} ${lg}`, + justifyContent: 'space-between', + maxHeight: '75px', + boxSizing: 'border-box', + }, + manage: { + fontSize: '24px', + }, + container: { + padding: `${md} ${lg}`, + paddingBottom: '40px', + }, + close: { + height: '35px', + width: '35px', + }, + buttonRow: { + height: '84px', + justifyContent: 'center', + }, + buttonEdit: { + color: '#fff', + backgroundColor: error, + }, + open: { + paddingLeft: sm, + width: 'auto', + '&:hover': { + cursor: 'pointer', + }, + }, +}) diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 5b60cc24..1b9bac83 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -22,6 +22,7 @@ import Button from '~/components/layout/Button' import AddOwnerModal from './AddOwnerModal' import RemoveOwnerModal from './RemoveOwnerModal' import ReplaceOwnerModal from './ReplaceOwnerModal' +import EditOwnerModal from './EditOwnerModal' import OwnerAddressTableCell from './OwnerAddressTableCell' import type { Owner } from '~/routes/safe/store/models/owner' import { @@ -62,6 +63,7 @@ class ManageOwners extends React.Component { showAddOwner: false, showRemoveOwner: false, showReplaceOwner: false, + showEditOwner: false, } onShow = (action: Action, row?: Object) => () => { @@ -95,6 +97,7 @@ class ManageOwners extends React.Component { showAddOwner, showRemoveOwner, showReplaceOwner, + showEditOwner, selectedOwnerName, selectedOwnerAddress, } = this.state @@ -185,6 +188,14 @@ class ManageOwners extends React.Component { userAddress={userAddress} createTransaction={createTransaction} /> + ) } From 905de7afab0a46f028ebf49d010f2b8bf6523030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 11 Jun 2019 14:09:16 +0200 Subject: [PATCH 34/71] Refactor imports --- .../ManageOwners/RemoveOwnerModal/index.jsx | 2 +- .../screens/CheckOwner/index.jsx | 103 +++++++----------- .../screens/OwnerForm/style.js | 6 + .../Settings/ManageOwners/index.jsx | 29 +++-- 4 files changed, 68 insertions(+), 72 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx index ad37e4db..a0481a76 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx @@ -4,7 +4,7 @@ import { List } from 'immutable' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' import { type Safe } from '~/routes/safe/store/models/safe' -import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' +import { type Owner } from '~/routes/safe/store/models/owner' import { setOwners } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import CheckOwner from './screens/CheckOwner' diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx index 75d514d1..f9420fe7 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx @@ -11,19 +11,10 @@ import Col from '~/components/layout/Col' import Button from '~/components/layout/Button' import Block from '~/components/layout/Block' import Hairline from '~/components/layout/Hairline' -import Field from '~/components/forms/Field' -import TextField from '~/components/forms/TextField' import Link from '~/components/layout/Link' import Identicon from '~/components/Identicon' import OpenInNew from '@material-ui/icons/OpenInNew' import { getEtherScanLink } from '~/logic/wallets/getWeb3' -import { - composeValidators, - required, - mustBeEthereumAddress, - minMaxLength, - noErrorsOn, -} from '~/components/forms/validator' import { styles } from './style' import { secondary } from '~/theme/variables' @@ -65,59 +56,49 @@ const CheckOwner = ({ - - {(...args) => { - const formState = args[2] - - return ( - - - - - Review the owner you want to remove from the active Safe: - - - - - - - - - - {ownerName} - - - - {ownerAddress} - - - - - - - - + + + + Review the owner you want to remove from the active Safe: + + + + + + + + + + {ownerName} + + + + {ownerAddress} + + + + - - - - - - - ) - }} - + + + + + + + + + ) } diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js index bb4c1c1f..54952dc1 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js @@ -35,4 +35,10 @@ export const styles = () => ({ user: { justifyContent: 'left', }, + userName: { + whiteSpace: 'nowrap', + }, + name: { + marginRight: `${sm}`, + }, }) diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 1b9bac83..352e51dd 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -1,20 +1,13 @@ // @flow import React from 'react' -import classNames from 'classnames' import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' -import Identicon from '~/components/Identicon' import Block from '~/components/layout/Block' import Col from '~/components/layout/Col' -import Field from '~/components/forms/Field' -import { - composeValidators, required, minMaxLength, -} from '~/components/forms/validator' import Table from '~/components/Table' import { type Column, cellWidth } from '~/components/Table/TableHead' import TableRow from '@material-ui/core/TableRow' import TableCell from '@material-ui/core/TableCell' -import TextField from '~/components/forms/TextField' import Row from '~/components/layout/Row' import Paragraph from '~/components/layout/Paragraph' import Hairline from '~/components/layout/Hairline' @@ -50,6 +43,7 @@ type Props = { safeName: string, owners: List, network: string, + threshold: number, userAddress: string, createTransaction: Function, } @@ -129,9 +123,24 @@ class ManageOwners extends React.Component { ))} - - - + Edit owner + Replace owner + Remove owner From f03fde5ffebecb6befddf3d15b053217616c01f6 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 26 Jun 2019 19:24:00 +0400 Subject: [PATCH 35/71] Little bit performance improvement for SafeOwnersForm in safe creation, still has to be improved --- src/components/Table/index.jsx | 10 ++-- .../open/components/SafeOwnersForm/index.jsx | 11 +++-- .../Settings/ManageOwners/index.jsx | 47 ++++++++++--------- .../components/Settings/ManageOwners/style.js | 4 +- src/routes/safe/components/Settings/index.jsx | 8 ++-- 5 files changed, 43 insertions(+), 37 deletions(-) diff --git a/src/components/Table/index.jsx b/src/components/Table/index.jsx index 33ff0ac6..d9d2fdcc 100644 --- a/src/components/Table/index.jsx +++ b/src/components/Table/index.jsx @@ -2,12 +2,12 @@ import * as React from 'react' import classNames from 'classnames' import { List } from 'immutable' -import Row from '~/components/layout/Row' import Table from '@material-ui/core/Table' import TableBody from '@material-ui/core/TableBody' import { withStyles } from '@material-ui/core/styles' import CircularProgress from '@material-ui/core/CircularProgress' import TablePagination from '@material-ui/core/TablePagination' +import Row from '~/components/layout/Row' import { type Order, stableSort, getSorting } from '~/components/Table/sorting' import TableHead, { type Column } from '~/components/Table/TableHead' import { xl } from '~/theme/variables' @@ -31,7 +31,6 @@ type State = { orderProp: boolean, rowsPerPage: number, fixed?: boolean, - noBorder: boolean, } const styles = { @@ -134,13 +133,16 @@ class GnoTable extends React.Component, State> { return ( {!isEmpty && ( -
+
{children(sortedData)}
)} {isEmpty && ( - + )} diff --git a/src/routes/open/components/SafeOwnersForm/index.jsx b/src/routes/open/components/SafeOwnersForm/index.jsx index a76d156f..cec64ddc 100644 --- a/src/routes/open/components/SafeOwnersForm/index.jsx +++ b/src/routes/open/components/SafeOwnersForm/index.jsx @@ -1,6 +1,8 @@ // @flow import * as React from 'react' import { withStyles } from '@material-ui/core/styles' +import InputAdornment from '@material-ui/core/InputAdornment' +import CheckCircle from '@material-ui/icons/CheckCircle' import Field from '~/components/forms/Field' import TextField from '~/components/forms/TextField' import { @@ -15,8 +17,6 @@ import Button from '~/components/layout/Button' import Row from '~/components/layout/Row' import Img from '~/components/layout/Img' import Col from '~/components/layout/Col' -import InputAdornment from '@material-ui/core/InputAdornment' -import CheckCircle from '@material-ui/icons/CheckCircle' import { getOwnerNameBy, getOwnerAddressBy } from '~/routes/open/components/fields' import Paragraph from '~/components/layout/Paragraph' import OpenPaper from '~/components/Stepper/OpenPaper' @@ -74,8 +74,11 @@ const styles = () => ({ }) const getAddressValidators = (addresses: string[], position: number) => { + // thanks Rich Harris + // https://twitter.com/Rich_Harris/status/1125850391155965952 const copy = addresses.slice() - copy.splice(position, 1) + copy[position] = copy[copy.length - 1] + copy.pop() return composeValidators(required, mustBeEthereumAddress, uniqueAddress(copy)) } @@ -97,7 +100,7 @@ export const calculateValuesAfterRemoving = (index: number, notRemovedOwners: nu return initialValues } -class SafeOwners extends React.Component { +class SafeOwners extends React.PureComponent { state = { numOwners: 1, } diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 352e51dd..62aa55d3 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -2,16 +2,17 @@ import React from 'react' import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' +import TableRow from '@material-ui/core/TableRow' +import TableCell from '@material-ui/core/TableCell' import Block from '~/components/layout/Block' import Col from '~/components/layout/Col' import Table from '~/components/Table' import { type Column, cellWidth } from '~/components/Table/TableHead' -import TableRow from '@material-ui/core/TableRow' -import TableCell from '@material-ui/core/TableCell' import Row from '~/components/layout/Row' import Paragraph from '~/components/layout/Paragraph' import Hairline from '~/components/layout/Hairline' import Button from '~/components/layout/Button' +import Img from '~/components/layout/Img' import AddOwnerModal from './AddOwnerModal' import RemoveOwnerModal from './RemoveOwnerModal' import ReplaceOwnerModal from './ReplaceOwnerModal' @@ -48,6 +49,15 @@ type Props = { createTransaction: Function, } +type State = { + selectedOwnerAddress?: string, + selectedOwnerName?: string, + showAddOwner: boolean, + showRemoveOwner: boolean, + showReplaceOwner: boolean, + showEditOwner: boolean, +} + type Action = 'AddOwner' | 'EditOwner' | 'ReplaceOwner' | 'RemoveOwner' class ManageOwners extends React.Component { @@ -78,14 +88,7 @@ class ManageOwners extends React.Component { render() { const { - classes, - safeAddress, - safeName, - owners, - threshold, - network, - userAddress, - createTransaction, + classes, safeAddress, safeName, owners, threshold, network, userAddress, createTransaction, } = this.props const { showAddOwner, @@ -106,36 +109,33 @@ class ManageOwners extends React.Component { Manage Safe Owners - +
{(sortedData: Array) => sortedData.map((row: any, index: number) => ( {autoColumns.map((column: Column) => ( - {column.id === OWNERS_TABLE_ADDRESS_ID ? : row[column.id]} + {column.id === OWNERS_TABLE_ADDRESS_ID ? ( + + ) : ( + row[column.id] + )} ))} - Edit owner - Replace owner - Remove owner { - ))} + )) + }
diff --git a/src/routes/safe/components/Settings/ManageOwners/style.js b/src/routes/safe/components/Settings/ManageOwners/style.js index 32a6c455..7ea08992 100644 --- a/src/routes/safe/components/Settings/ManageOwners/style.js +++ b/src/routes/safe/components/Settings/ManageOwners/style.js @@ -1,7 +1,5 @@ // @flow -import { - sm, xs, md, lg, border, -} from '~/theme/variables' +import { lg } from '~/theme/variables' export const styles = () => ({ title: { diff --git a/src/routes/safe/components/Settings/index.jsx b/src/routes/safe/components/Settings/index.jsx index 8c8317b9..7d67d86e 100644 --- a/src/routes/safe/components/Settings/index.jsx +++ b/src/routes/safe/components/Settings/index.jsx @@ -7,6 +7,8 @@ import { withStyles } from '@material-ui/core/styles' import Block from '~/components/layout/Block' import Col from '~/components/layout/Col' import Row from '~/components/layout/Row' +import Span from '~/components/layout/Span' +import Img from '~/components/layout/Img' import RemoveSafeModal from './RemoveSafeModal' import Paragraph from '~/components/layout/Paragraph' import Hairline from '~/components/layout/Hairline' @@ -83,10 +85,10 @@ class Settings extends React.Component { - + Remove Safe - - Trash Icon + + Trash Icon Date: Thu, 27 Jun 2019 12:21:47 +0400 Subject: [PATCH 36/71] add memoization to few validators --- src/components/forms/validator.js | 20 +++++++++++++++---- .../screens/AddCustomToken/validators.js | 13 +----------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/components/forms/validator.js b/src/components/forms/validator.js index d885bc59..de0f30ff 100644 --- a/src/components/forms/validator.js +++ b/src/components/forms/validator.js @@ -2,9 +2,21 @@ import { type FieldValidator } from 'final-form' import { getWeb3 } from '~/logic/wallets/getWeb3' +export const simpleMemoize = (fn: Function) => { + let lastArg + let lastResult + return (arg: any) => { + if (arg !== lastArg) { + lastArg = arg + lastResult = fn(arg) + } + return lastResult + } +} + type Field = boolean | string | null | typeof undefined -export const required = (value: Field) => (value ? undefined : 'Required') +export const required = simpleMemoize((value: Field) => (value ? undefined : 'Required')) export const mustBeInteger = (value: string) => (!Number.isInteger(Number(value)) || value.includes('.') ? 'Must be an integer' : undefined) @@ -46,17 +58,17 @@ export const maxValue = (max: number) => (value: string) => { export const ok = () => undefined -export const mustBeEthereumAddress = (address: Field) => { +export const mustBeEthereumAddress = simpleMemoize((address: Field) => { const isAddress: boolean = getWeb3().utils.isAddress(address) return isAddress ? undefined : 'Address should be a valid Ethereum address' -} +}) export const minMaxLength = (minLen: string | number, maxLen: string | number) => (value: string) => (value.length >= +minLen && value.length <= +maxLen ? undefined : `Should be ${minLen} to ${maxLen} symbols`) export const ADDRESS_REPEATED_ERROR = 'Address already introduced' -export const uniqueAddress = (addresses: string[]) => (value: string) => (addresses.includes(value) ? ADDRESS_REPEATED_ERROR : undefined) +export const uniqueAddress = (addresses: string[]) => simpleMemoize((value: string) => (addresses.includes(value) ? ADDRESS_REPEATED_ERROR : undefined)) export const composeValidators = (...validators: Function[]): FieldValidator => (value: Field) => validators.reduce((error, validator) => error || validator(value), undefined) diff --git a/src/routes/safe/components/Balances/Tokens/screens/AddCustomToken/validators.js b/src/routes/safe/components/Balances/Tokens/screens/AddCustomToken/validators.js index 07feaadb..d9db666d 100644 --- a/src/routes/safe/components/Balances/Tokens/screens/AddCustomToken/validators.js +++ b/src/routes/safe/components/Balances/Tokens/screens/AddCustomToken/validators.js @@ -3,20 +3,9 @@ import { List } from 'immutable' import { getWeb3 } from '~/logic/wallets/getWeb3' import { type Token } from '~/logic/tokens/store/model/token' import { sameAddress } from '~/logic/wallets/ethAddresses' +import { simpleMemoize } from '~/components/forms/validator' // import { getStandardTokenContract } from '~/logic/tokens/store/actions/fetchTokens' -export const simpleMemoize = (fn: Function) => { - let lastArg - let lastResult - return (arg: any) => { - if (arg !== lastArg) { - lastArg = arg - lastResult = fn(arg) - } - return lastResult - } -} - // eslint-disable-next-line export const addressIsTokenContract = simpleMemoize(async (tokenAddress: string) => { // SECOND APPROACH: From 8e8cd136749378e91c53b9fcdd828fa13d3ac38d Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 27 Jun 2019 14:54:12 +0400 Subject: [PATCH 37/71] remove unused vars, fix eslint errors, add initial value for owners name when editing --- src/routes/load/components/Layout.jsx | 2 +- .../Settings/ManageOwners/EditOwnerModal/index.jsx | 11 ++++++----- .../safe/components/Settings/ManageOwners/index.jsx | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/routes/load/components/Layout.jsx b/src/routes/load/components/Layout.jsx index cdbf5ade..0fa0a213 100644 --- a/src/routes/load/components/Layout.jsx +++ b/src/routes/load/components/Layout.jsx @@ -1,11 +1,11 @@ // @flow import * as React from 'react' import ChevronLeft from '@material-ui/icons/ChevronLeft' +import IconButton from '@material-ui/core/IconButton' import Stepper from '~/components/Stepper' import Block from '~/components/layout/Block' import Heading from '~/components/layout/Heading' import Row from '~/components/layout/Row' -import IconButton from '@material-ui/core/IconButton' import ReviewInformation from '~/routes/load/components/ReviewInformation' import OwnerList from '~/routes/load/components/OwnerList' import DetailsForm, { safeFieldsValidation } from '~/routes/load/components/DetailsForm' diff --git a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx index 80e1bdbe..1d0453ba 100644 --- a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx @@ -1,11 +1,11 @@ // @flow import React from 'react' -import { connect } from 'react-redux' import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' +import Close from '@material-ui/icons/Close' import OpenInNew from '@material-ui/icons/OpenInNew' +import IconButton from '@material-ui/core/IconButton' import Row from '~/components/layout/Row' -import Col from '~/components/layout/Col' import Link from '~/components/layout/Link' import Block from '~/components/layout/Block' import GnoForm from '~/components/forms/GnoForm' @@ -15,8 +15,6 @@ import Field from '~/components/forms/Field' import TextField from '~/components/forms/TextField' import Paragraph from '~/components/layout/Paragraph' import Identicon from '~/components/Identicon' -import IconButton from '@material-ui/core/IconButton' -import Close from '@material-ui/icons/Close' import { getEtherScanLink } from '~/logic/wallets/getWeb3' import type { Owner } from '~/routes/safe/store/models/owner' import { makeOwner } from '~/routes/safe/store/models/owner' @@ -50,6 +48,7 @@ type Props = { ownerAddress: string, owners: List, network: string, + selectedOwnerName: string, } const EditOwnerComponent = ({ @@ -58,6 +57,7 @@ const EditOwnerComponent = ({ classes, safeAddress, ownerAddress, + selectedOwnerName, owners, network, }: Props) => { @@ -87,7 +87,7 @@ const EditOwnerComponent = ({
- {(...args) => ( + {() => ( @@ -98,6 +98,7 @@ const EditOwnerComponent = ({ validate={composeValidators(required, minMaxLength(1, 50))} placeholder="Owner name*" text="Owner name*" + initialValue={selectedOwnerName} className={classes.addressInput} /> diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 62aa55d3..3954dbfe 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -203,6 +203,7 @@ class ManageOwners extends React.Component { isOpen={showEditOwner} safeAddress={safeAddress} ownerAddress={selectedOwnerAddress} + selectedOwnerName={selectedOwnerName} owners={owners} network={network} /> From 60ba580308ceccfd5cf3a307b0ceee577be49371 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 27 Jun 2019 15:15:00 +0400 Subject: [PATCH 38/71] fix removing safe owner --- .../ManageOwners/RemoveOwnerModal/index.jsx | 13 +- .../screens/CheckOwner/index.jsx | 5 +- .../screens/OwnerForm/index.jsx | 179 ++++++++---------- .../components/Settings/ManageOwners/style.js | 3 - 4 files changed, 90 insertions(+), 110 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx index a0481a76..ba6b16e8 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx @@ -1,16 +1,15 @@ // @flow import React, { useState, useEffect } from 'react' import { List } from 'immutable' +import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' -import { type Safe } from '~/routes/safe/store/models/safe' import { type Owner } from '~/routes/safe/store/models/owner' import { setOwners } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import CheckOwner from './screens/CheckOwner' import ThresholdForm from './screens/ThresholdForm' import ReviewRemoveOwner from './screens/Review' -import { withStyles } from '@material-ui/core/styles' const styles = () => ({ biggerModalWindow: { @@ -31,7 +30,6 @@ type Props = { owners: List, threshold: number, network: string, - userAddress: string, createTransaction: Function, } type ActiveScreen = 'checkOwner' | 'selectThreshold' | 'reviewRemoveOwner' @@ -51,8 +49,10 @@ export const sendRemoveOwner = async ( const storedOwners = await gnosisSafe.getOwners() const index = storedOwners.findIndex(ownerAddress => ownerAddress === ownerAddressToRemove) const prevAddress = index === 0 ? SENTINEL_ADDRESS : storedOwners[index - 1] - const txData = gnosisSafe.contract.methods.removeOwner(prevAddress, ownerAddressToRemove, values.threshold).encodeABI() - const text = `Remove Owner ${ownerNameToRemove} (${ownerAddressToRemove})` + const txData = gnosisSafe.contract.methods + .removeOwner(prevAddress, ownerAddressToRemove, values.threshold) + .encodeABI() + // const text = `Remove Owner ${ownerNameToRemove} (${ownerAddressToRemove})` const txHash = createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) if (txHash) { @@ -71,7 +71,6 @@ const RemoveOwner = ({ owners, threshold, network, - userAddress, createTransaction, }: Props) => { const [activeScreen, setActiveScreen] = useState('checkOwner') @@ -93,7 +92,7 @@ const RemoveOwner = ({ } } - const ownerSubmitted = (newValues: Object) => { + const ownerSubmitted = () => { setActiveScreen('selectThreshold') } diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx index f9420fe7..636db589 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx @@ -4,16 +4,15 @@ import classNames from 'classnames/bind' import { withStyles } from '@material-ui/core/styles' import Close from '@material-ui/icons/Close' import IconButton from '@material-ui/core/IconButton' +import OpenInNew from '@material-ui/icons/OpenInNew' import Paragraph from '~/components/layout/Paragraph' import Row from '~/components/layout/Row' -import GnoForm from '~/components/forms/GnoForm' import Col from '~/components/layout/Col' import Button from '~/components/layout/Button' import Block from '~/components/layout/Block' import Hairline from '~/components/layout/Hairline' import Link from '~/components/layout/Link' import Identicon from '~/components/Identicon' -import OpenInNew from '@material-ui/icons/OpenInNew' import { getEtherScanLink } from '~/logic/wallets/getWeb3' import { styles } from './style' import { secondary } from '~/theme/variables' @@ -94,7 +93,7 @@ const CheckOwner = ({ variant="contained" minWidth={140} color="primary" - data-testid="review-tx-btn" + onClick={handleSubmit} > Next diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx index beefc586..161c99be 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx @@ -4,6 +4,7 @@ import classNames from 'classnames/bind' import { withStyles } from '@material-ui/core/styles' import Close from '@material-ui/icons/Close' import IconButton from '@material-ui/core/IconButton' +import OpenInNew from '@material-ui/icons/OpenInNew' import Paragraph from '~/components/layout/Paragraph' import Row from '~/components/layout/Row' import GnoForm from '~/components/forms/GnoForm' @@ -15,13 +16,9 @@ import Field from '~/components/forms/Field' import TextField from '~/components/forms/TextField' import Identicon from '~/components/Identicon' import Link from '~/components/layout/Link' -import OpenInNew from '@material-ui/icons/OpenInNew' import { getEtherScanLink } from '~/logic/wallets/getWeb3' import { - composeValidators, - required, - mustBeEthereumAddress, - minMaxLength, + composeValidators, required, mustBeEthereumAddress, minMaxLength, } from '~/components/forms/validator' import { styles } from './style' import { secondary } from '~/theme/variables' @@ -41,12 +38,7 @@ type Props = { } const OwnerForm = ({ - classes, - onClose, - ownerAddress, - ownerName, - network, - onSubmit, + classes, onClose, ownerAddress, ownerName, network, onSubmit, }: Props) => { const handleSubmit = (values) => { onSubmit(values) @@ -65,93 +57,86 @@ const OwnerForm = ({ - {(...args) => { - const formState = args[2] - - return ( - - - - - Review the owner you want to replace from the active Safe. Then specify the new owner you want to replace it with: - - - - - Current owner - - - - - - - - - - {ownerName} - - - - {ownerAddress} - - - - - - - - - - - New owner - - - - - - - - - - - - - - - - - + {() => ( + + + + + Review the owner you want to replace from the active Safe. Then specify the new owner you want to + replace it with: + - - ) - }} + + Current owner + + + + + + + + + {ownerName} + + + + {ownerAddress} + + + + + + + + + + New owner + + + + + + + + + + + + + + + + + + + )} ) diff --git a/src/routes/safe/components/Settings/ManageOwners/style.js b/src/routes/safe/components/Settings/ManageOwners/style.js index 7ea08992..a0be24f6 100644 --- a/src/routes/safe/components/Settings/ManageOwners/style.js +++ b/src/routes/safe/components/Settings/ManageOwners/style.js @@ -16,9 +16,6 @@ export const styles = () => ({ '&:hover $actions': { visibility: 'initial', }, - '&:focus $actions': { - visibility: 'initial', - }, }, actions: { justifyContent: 'flex-end', From a27b4a3a477546ab345d7ee4d2a8443cfb71933e Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 27 Jun 2019 15:30:43 +0400 Subject: [PATCH 39/71] fixing eslint errors --- .../screens/CheckOwner/index.jsx | 1 - .../screens/CheckOwner/style.js | 2 +- .../RemoveOwnerModal/screens/Review/index.jsx | 69 +++++++++++-------- .../RemoveOwnerModal/screens/Review/style.js | 2 +- .../screens/ThresholdForm/index.jsx | 25 ++----- 5 files changed, 49 insertions(+), 50 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx index 636db589..00be9eb8 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx @@ -89,7 +89,6 @@ const CheckOwner = ({ - diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 3954dbfe..e275e7f8 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -47,6 +47,7 @@ type Props = { threshold: number, userAddress: string, createTransaction: Function, + updateSafe: Function, } type State = { @@ -88,7 +89,15 @@ class ManageOwners extends React.Component { render() { const { - classes, safeAddress, safeName, owners, threshold, network, userAddress, createTransaction, + classes, + safeAddress, + safeName, + owners, + threshold, + network, + userAddress, + createTransaction, + updateSafe, } = this.props const { showAddOwner, @@ -206,6 +215,7 @@ class ManageOwners extends React.Component { selectedOwnerName={selectedOwnerName} owners={owners} network={network} + updateSafe={updateSafe} /> ) diff --git a/src/routes/safe/components/Settings/index.jsx b/src/routes/safe/components/Settings/index.jsx index 7d67d86e..156e3413 100644 --- a/src/routes/safe/components/Settings/index.jsx +++ b/src/routes/safe/components/Settings/index.jsx @@ -145,6 +145,7 @@ class Settings extends React.Component { network={network} createTransaction={createTransaction} userAddress={userAddress} + updateSafe={updateSafe} /> )} {granted && menuOptionIndex === 3 && ( diff --git a/src/routes/safe/store/middleware/safeStorage.js b/src/routes/safe/store/middleware/safeStorage.js index d49b1a50..f6dc81aa 100644 --- a/src/routes/safe/store/middleware/safeStorage.js +++ b/src/routes/safe/store/middleware/safeStorage.js @@ -1,8 +1,8 @@ // @flow +import type { Store, AnyAction } from 'redux' import { ADD_SAFE } from '~/routes/safe/store/actions/addSafe' import { UPDATE_SAFE } from '~/routes/safe/store/actions/updateSafe' import { REMOVE_SAFE } from '~/routes/safe/store/actions/removeSafe' -import type { Store, AnyAction } from 'redux' import { type GlobalState } from '~/store/' import { saveSafes, setOwners, removeOwners } from '~/logic/safe/utils' import { safesMapSelector } from '~/routes/safeList/store/selectors' @@ -41,6 +41,12 @@ const safeStorageMware = (store: Store) => (next: Function) => asyn if (action.type === ADD_SAFE) { const { safe } = action.payload setOwners(safe.address, safe.owners) + } else if (action.type === UPDATE_SAFE) { + const { address, owners } = action.payload + + if (address && owners) { + setOwners(address, owners) + } } else if (action.type === REMOVE_SAFE) { const safeAddress = action.payload removeOwners(safeAddress) diff --git a/src/test/safe.dom.settings.test.js b/src/test/safe.dom.settings.name.test.js similarity index 100% rename from src/test/safe.dom.settings.test.js rename to src/test/safe.dom.settings.name.test.js diff --git a/src/test/safe.dom.settings.owners.test.js b/src/test/safe.dom.settings.owners.test.js new file mode 100644 index 00000000..802e769e --- /dev/null +++ b/src/test/safe.dom.settings.owners.test.js @@ -0,0 +1,25 @@ +// @flow +import { fireEvent, cleanup } from '@testing-library/react' +import { aNewStore } from '~/store' +import { aMinedSafe } from '~/test/builder/safe.redux.builder' +import { renderSafeView } from '~/test/builder/safe.dom.utils' +import { sleep } from '~/utils/timer' +import 'jest-dom/extend-expect' +import { SETTINGS_TAB_BTN_TESTID, SAFE_VIEW_NAME_HEADING_TESTID } from '~/routes/safe/components/Layout' +import { SAFE_NAME_INPUT_TESTID, SAFE_NAME_SUBMIT_BTN_TESTID } from '~/routes/safe/components/Settings/ChangeSafeName' + +afterEach(cleanup) + +describe('DOM > Feature > Settings > Manage owners', () => { + let store + let safeAddress + beforeEach(async () => { + store = aNewStore() + // using 4th account because other accounts were used in other tests and paid gas + safeAddress = await aMinedSafe(store) + }) + + it('Changes owner\'s name', async () => { + + }) +}) From 7c389ca49a9ac86712627227351a48cc488844c7 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 27 Jun 2019 17:26:19 +0400 Subject: [PATCH 41/71] fix displaying threshold in replacing owner modal, eslint fixes --- .../ManageOwners/ReplaceOwnerModal/index.jsx | 20 +++--- .../screens/Review/index.jsx | 69 +++++++++++-------- .../Settings/ManageOwners/index.jsx | 1 + 3 files changed, 54 insertions(+), 36 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx index 112dd654..c824b649 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx @@ -1,15 +1,14 @@ // @flow import React, { useState, useEffect } from 'react' import { List } from 'immutable' +import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' -import { type Safe } from '~/routes/safe/store/models/safe' import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' import { setOwners } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import OwnerForm from './screens/OwnerForm' import ReviewReplaceOwner from './screens/Review' -import { withStyles } from '@material-ui/core/styles' const styles = () => ({ biggerModalWindow: { @@ -29,10 +28,10 @@ type Props = { ownerName: string, owners: List, network: string, - userAddress: string, + threshold: string, createTransaction: Function, } -type ActiveScreen = 'ownerForm' | 'reviewReplaceOwner' +type ActiveScreen = 'checkOwner' | 'reviewReplaceOwner' const SENTINEL_ADDRESS = '0x0000000000000000000000000000000000000001' @@ -49,11 +48,15 @@ export const sendReplaceOwner = async ( const storedOwners = await gnosisSafe.getOwners() const index = storedOwners.findIndex(ownerAddress => ownerAddress === ownerAddressToRemove) const prevAddress = index === 0 ? SENTINEL_ADDRESS : storedOwners[index - 1] - const txData = gnosisSafe.contract.methods.swapOwner(prevAddress, ownerAddressToRemove, values.ownerAddress).encodeABI() - const text = `Replace Owner ${ownerNameToRemove} (${ownerAddressToRemove}) with ${values.ownerName} (${values.ownerAddress})` + const txData = gnosisSafe.contract.methods + .swapOwner(prevAddress, ownerAddressToRemove, values.ownerAddress) + .encodeABI() + // const text = `Replace Owner ${ownerNameToRemove} (${ownerAddressToRemove}) with ${values.ownerName} (${values.ownerAddress})` const ownersWithoutOldOwner = owners.filter(o => o.address !== ownerAddressToRemove) - const ownersWithNewOwner = ownersWithoutOldOwner.push(makeOwner({ name: values.ownerName, address: values.ownerAddress })) + const ownersWithNewOwner = ownersWithoutOldOwner.push( + makeOwner({ name: values.ownerName, address: values.ownerAddress }), + ) const txHash = createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) if (txHash) { @@ -71,7 +74,7 @@ const ReplaceOwner = ({ ownerName, owners, network, - userAddress, + threshold, createTransaction, }: Props) => { const [activeScreen, setActiveScreen] = useState('checkOwner') @@ -137,6 +140,7 @@ const ReplaceOwner = ({ ownerName={ownerName} onClickBack={onClickBack} onSubmit={onReplaceOwner} + threshold={threshold} /> )} diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx index 6302e690..1b960669 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx @@ -10,13 +10,10 @@ import Identicon from '~/components/Identicon' import Link from '~/components/layout/Link' import Paragraph from '~/components/layout/Paragraph' import Row from '~/components/layout/Row' -import GnoForm from '~/components/forms/GnoForm' import Col from '~/components/layout/Col' import Button from '~/components/layout/Button' import Block from '~/components/layout/Block' import Hairline from '~/components/layout/Hairline' -import Field from '~/components/forms/Field' -import TextField from '~/components/forms/TextField' import type { Owner } from '~/routes/safe/store/models/owner' import { getEtherScanLink } from '~/logic/wallets/getWeb3' import { secondary } from '~/theme/variables' @@ -38,6 +35,7 @@ type Props = { ownerName: string, onClickBack: Function, onSubmit: Function, + threshold: string, } const ReviewRemoveOwner = ({ @@ -50,6 +48,7 @@ const ReviewRemoveOwner = ({ ownerAddress, ownerName, onClickBack, + threshold, onSubmit, }: Props) => { const handleSubmit = () => { @@ -90,7 +89,13 @@ const ReviewRemoveOwner = ({ Any transaction requires the confirmation of: - {values.threshold} out of {owners.size} owner(s) + {threshold} + {' '} + out of + {' '} + {owners.size} + {' '} + owner(s) @@ -98,35 +103,43 @@ const ReviewRemoveOwner = ({ - {owners.size} Safe owner(s) + {owners.size} + {' '} + Safe owner(s) - {owners.map(owner => owner.get('address') != ownerAddress && ( - - - - - - - - - {owner.get('name')} - - - - {owner.get('address')} + {owners.map( + owner => owner.address !== ownerAddress && ( + + + + + + + + + {owner.get('name')} - - - + + + {owner.get('address')} + + + + + - - - - - - ))} + + + + + ), + )} REMOVING OWNER ↓ diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index e275e7f8..0e0ae9ac 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -204,6 +204,7 @@ class ManageOwners extends React.Component { ownerName={selectedOwnerName} owners={owners} network={network} + threshold={threshold} userAddress={userAddress} createTransaction={createTransaction} /> From 2136c39ef21f2630c931a9548a8691f2f7ffe1fa Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 27 Jun 2019 17:41:37 +0400 Subject: [PATCH 42/71] fixing disappearing safe owner when replacing WIP --- .../ManageOwners/ReplaceOwnerModal/index.jsx | 24 +++++++++++++------ .../Settings/ManageOwners/index.jsx | 1 + 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx index c824b649..1681e90b 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx @@ -5,7 +5,6 @@ import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' -import { setOwners } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import OwnerForm from './screens/OwnerForm' import ReviewReplaceOwner from './screens/Review' @@ -30,6 +29,7 @@ type Props = { network: string, threshold: string, createTransaction: Function, + updateSafe: Function } type ActiveScreen = 'checkOwner' | 'reviewReplaceOwner' @@ -43,6 +43,7 @@ export const sendReplaceOwner = async ( owners: List, openSnackbar: Function, createTransaction: Function, + updateSafe: Function, ) => { const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) const storedOwners = await gnosisSafe.getOwners() @@ -53,14 +54,13 @@ export const sendReplaceOwner = async ( .encodeABI() // const text = `Replace Owner ${ownerNameToRemove} (${ownerAddressToRemove}) with ${values.ownerName} (${values.ownerAddress})` - const ownersWithoutOldOwner = owners.filter(o => o.address !== ownerAddressToRemove) - const ownersWithNewOwner = ownersWithoutOldOwner.push( - makeOwner({ name: values.ownerName, address: values.ownerAddress }), - ) + const ownerToRemoveIndex = owners.findIndex(o => o.address === ownerAddressToRemove) + const newOwner = makeOwner({ name: values.ownerName, address: values.ownerAddress }) const txHash = createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) + if (txHash) { - setOwners(safeAddress, ownersWithNewOwner) + updateSafe({ address: safeAddress, owners: owners.set(ownerToRemoveIndex, newOwner) }) } } @@ -76,6 +76,7 @@ const ReplaceOwner = ({ network, threshold, createTransaction, + updateSafe, }: Props) => { const [activeScreen, setActiveScreen] = useState('checkOwner') const [values, setValues] = useState({}) @@ -104,7 +105,16 @@ const ReplaceOwner = ({ const onReplaceOwner = () => { onClose() try { - sendReplaceOwner(values, safeAddress, ownerAddress, ownerName, owners, openSnackbar, createTransaction) + sendReplaceOwner( + values, + safeAddress, + ownerAddress, + ownerName, + owners, + openSnackbar, + createTransaction, + updateSafe, + ) } catch (error) { // eslint-disable-next-line console.log('Error while removing an owner ' + error) diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 0e0ae9ac..1ad3d2f5 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -207,6 +207,7 @@ class ManageOwners extends React.Component { threshold={threshold} userAddress={userAddress} createTransaction={createTransaction} + updateSafe={updateSafe} /> Date: Fri, 28 Jun 2019 12:57:26 +0400 Subject: [PATCH 43/71] await for tx hash --- .../Settings/ManageOwners/ReplaceOwnerModal/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx index 1681e90b..11bc7756 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx @@ -57,7 +57,7 @@ export const sendReplaceOwner = async ( const ownerToRemoveIndex = owners.findIndex(o => o.address === ownerAddressToRemove) const newOwner = makeOwner({ name: values.ownerName, address: values.ownerAddress }) - const txHash = createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) + const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) if (txHash) { updateSafe({ address: safeAddress, owners: owners.set(ownerToRemoveIndex, newOwner) }) From 32ae4ff807c846ced26b1e847470c19ffcc93955 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 28 Jun 2019 13:01:19 +0400 Subject: [PATCH 44/71] fix removing safe owner --- .../ManageOwners/RemoveOwnerModal/index.jsx | 19 +++++++++++++++---- .../Settings/ManageOwners/index.jsx | 1 + 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx index ba6b16e8..7499fd5a 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx @@ -5,7 +5,6 @@ import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' import { type Owner } from '~/routes/safe/store/models/owner' -import { setOwners } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import CheckOwner from './screens/CheckOwner' import ThresholdForm from './screens/ThresholdForm' @@ -31,6 +30,7 @@ type Props = { threshold: number, network: string, createTransaction: Function, + updateSafe: Function, } type ActiveScreen = 'checkOwner' | 'selectThreshold' | 'reviewRemoveOwner' @@ -44,6 +44,7 @@ export const sendRemoveOwner = async ( owners: List, openSnackbar: Function, createTransaction: Function, + updateSafe: Function, ) => { const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) const storedOwners = await gnosisSafe.getOwners() @@ -54,9 +55,9 @@ export const sendRemoveOwner = async ( .encodeABI() // const text = `Remove Owner ${ownerNameToRemove} (${ownerAddressToRemove})` - const txHash = createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) + const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) if (txHash) { - setOwners(safeAddress, owners.filter(o => o.address !== ownerAddressToRemove)) + updateSafe({ address: safeAddress, owners: owners.filter(o => o.address !== ownerAddressToRemove) }) } } @@ -72,6 +73,7 @@ const RemoveOwner = ({ threshold, network, createTransaction, + updateSafe, }: Props) => { const [activeScreen, setActiveScreen] = useState('checkOwner') const [values, setValues] = useState({}) @@ -109,7 +111,16 @@ const RemoveOwner = ({ const onRemoveOwner = () => { onClose() try { - sendRemoveOwner(values, safeAddress, ownerAddress, ownerName, owners, openSnackbar, createTransaction) + sendRemoveOwner( + values, + safeAddress, + ownerAddress, + ownerName, + owners, + openSnackbar, + createTransaction, + updateSafe, + ) } catch (error) { // eslint-disable-next-line console.log('Error while removing an owner ' + error) diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 1ad3d2f5..e1af5cf8 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -194,6 +194,7 @@ class ManageOwners extends React.Component { network={network} userAddress={userAddress} createTransaction={createTransaction} + updateSafe={updateSafe} /> Date: Fri, 28 Jun 2019 13:59:51 +0400 Subject: [PATCH 45/71] tests wip --- src/components/layout/Row/index.jsx | 5 +- src/routes/safe/components/Safe/Address.jsx | 21 --- .../safe/components/Safe/BalanceInfo.jsx | 80 ----------- .../safe/components/Safe/Confirmations.jsx | 36 ----- .../safe/components/Safe/MultisigTx.jsx | 35 ----- src/routes/safe/components/Safe/Owners.jsx | 91 ------------ .../components/Safe/assets/gnosis_safe.svg | 17 --- src/routes/safe/components/Safe/index.jsx | 135 ------------------ .../ManageOwners/EditOwnerModal/index.jsx | 6 +- .../ManageOwners/ReplaceOwnerModal/index.jsx | 2 +- .../Settings/ManageOwners/index.jsx | 6 +- src/routes/safe/components/Settings/index.jsx | 3 + src/test/safe.dom.settings.name.test.js | 2 +- src/test/safe.dom.settings.owners.test.js | 36 ++++- .../utils/transactions/addOwner.helper.js | 53 ------- .../utils/transactions/removeOwner.helper.js | 49 ------- 16 files changed, 51 insertions(+), 526 deletions(-) delete mode 100644 src/routes/safe/components/Safe/Address.jsx delete mode 100644 src/routes/safe/components/Safe/BalanceInfo.jsx delete mode 100644 src/routes/safe/components/Safe/Confirmations.jsx delete mode 100644 src/routes/safe/components/Safe/MultisigTx.jsx delete mode 100644 src/routes/safe/components/Safe/Owners.jsx delete mode 100644 src/routes/safe/components/Safe/assets/gnosis_safe.svg delete mode 100644 src/routes/safe/components/Safe/index.jsx delete mode 100644 src/test/utils/transactions/addOwner.helper.js delete mode 100644 src/test/utils/transactions/removeOwner.helper.js diff --git a/src/components/layout/Row/index.jsx b/src/components/layout/Row/index.jsx index 0d4433ae..1bb6e855 100644 --- a/src/components/layout/Row/index.jsx +++ b/src/components/layout/Row/index.jsx @@ -12,10 +12,11 @@ type Props = { margin?: 'xs' | 'sm' | 'md' | 'lg' | 'xl', align?: 'center' | 'end' | 'start', grow?: boolean, + testId?: string, } const Row = ({ - children, className, margin, align, grow, ...props + children, className, margin, align, grow, testId = '', ...props }: Props) => { const rowClassNames = cx( styles.row, @@ -26,7 +27,7 @@ const Row = ({ ) return ( -
+
{children}
) diff --git a/src/routes/safe/components/Safe/Address.jsx b/src/routes/safe/components/Safe/Address.jsx deleted file mode 100644 index 52dd3135..00000000 --- a/src/routes/safe/components/Safe/Address.jsx +++ /dev/null @@ -1,21 +0,0 @@ -// @flow -import * as React from 'react' -import ListItem from '@material-ui/core/ListItem' -import Avatar from '@material-ui/core/Avatar' -import Mail from '@material-ui/icons/Mail' -import ListItemText from '~/components/List/ListItemText' - -type Props = { - address: string, -} - -const Address = ({ address }: Props) => ( - - - - - - -) - -export default Address diff --git a/src/routes/safe/components/Safe/BalanceInfo.jsx b/src/routes/safe/components/Safe/BalanceInfo.jsx deleted file mode 100644 index 470ae2a4..00000000 --- a/src/routes/safe/components/Safe/BalanceInfo.jsx +++ /dev/null @@ -1,80 +0,0 @@ -// @flow -import * as React from 'react' -import classNames from 'classnames' -import AccountBalance from '@material-ui/icons/AccountBalance' -import Avatar from '@material-ui/core/Avatar' -import Collapse from '@material-ui/core/Collapse' -import IconButton from '@material-ui/core/IconButton' -import List from '@material-ui/core/List' -import Img from '~/components/layout/Img' -import ListItem from '@material-ui/core/ListItem' -import ListItemIcon from '@material-ui/core/ListItemIcon' -import ListItemText from '@material-ui/core/ListItemText' -import { withStyles } from '@material-ui/core/styles' -import ExpandLess from '@material-ui/icons/ExpandLess' -import ExpandMore from '@material-ui/icons/ExpandMore' -import { Map } from 'immutable' -import Button from '~/components/layout/Button' -import openHoc, { type Open } from '~/components/hoc/OpenHoc' -import { type WithStyles } from '~/theme/mui' -import { type Token } from '~/logic/tokens/store/model/token' - -type Props = Open & WithStyles & { - tokens: Map, - onMoveFunds: (token: Token) => void, -} - -const styles = { - nested: { - paddingLeft: '40px', - }, -} - -export const MOVE_FUNDS_BUTTON_TEXT = 'Move' - -const BalanceComponent = openHoc(({ - open, toggle, tokens, classes, onMoveFunds, -}: Props) => { - const hasBalances = tokens.count() > 0 - - return ( - - - - - - - - {open - ? - : - } - - - - - {tokens.valueSeq().map((token: Token) => { - const symbol = token.get('symbol') - const name = token.get('name') - const disabled = Number(token.get('funds')) === 0 - const onMoveFundsClick = () => onMoveFunds(token) - - return ( - - - {name} - - - - - ) - })} - - - - ) -}) - -export default withStyles(styles)(BalanceComponent) diff --git a/src/routes/safe/components/Safe/Confirmations.jsx b/src/routes/safe/components/Safe/Confirmations.jsx deleted file mode 100644 index 06aeb23d..00000000 --- a/src/routes/safe/components/Safe/Confirmations.jsx +++ /dev/null @@ -1,36 +0,0 @@ -// @flow -import * as React from 'react' -import ListItem from '@material-ui/core/ListItem' -import Avatar from '@material-ui/core/Avatar' -import DoneAll from '@material-ui/icons/DoneAll' -import ListItemText from '~/components/List/ListItemText' -import Button from '~/components/layout/Button' - -type Props = { - confirmations: number, - onEditThreshold: () => void, -} - -const EDIT_THRESHOLD_BUTTON_TEXT = 'EDIT' - -const Confirmations = ({ confirmations, onEditThreshold }: Props) => ( - - - - - - - -) - -export default Confirmations diff --git a/src/routes/safe/components/Safe/MultisigTx.jsx b/src/routes/safe/components/Safe/MultisigTx.jsx deleted file mode 100644 index db9b3c4f..00000000 --- a/src/routes/safe/components/Safe/MultisigTx.jsx +++ /dev/null @@ -1,35 +0,0 @@ -// @flow -import * as React from 'react' -import ListItem from '@material-ui/core/ListItem' -import Avatar from '@material-ui/core/Avatar' -import AcoountBalanceWallet from '@material-ui/icons/AccountBalanceWallet' -import Button from '~/components/layout/Button' -import ListItemText from '~/components/List/ListItemText' - -type Props = { - onSeeTxs: () => void, -} - -export const SEE_MULTISIG_BUTTON_TEXT = 'TXs' - -const MultisigTransactionsComponent = ({ onSeeTxs }: Props) => { - const text = 'See multisig txs executed on this Safe' - - return ( - - - - - - - - ) -} - -export default MultisigTransactionsComponent diff --git a/src/routes/safe/components/Safe/Owners.jsx b/src/routes/safe/components/Safe/Owners.jsx deleted file mode 100644 index acc106c3..00000000 --- a/src/routes/safe/components/Safe/Owners.jsx +++ /dev/null @@ -1,91 +0,0 @@ -// @flow -import * as React from 'react' -import openHoc, { type Open } from '~/components/hoc/OpenHoc' -import { withStyles } from '@material-ui/core/styles' -import Collapse from '@material-ui/core/Collapse' -import ListItemText from '~/components/List/ListItemText' -import List from '@material-ui/core/List' -import ListItem from '@material-ui/core/ListItem' -import ListItemIcon from '@material-ui/core/ListItemIcon' -import Avatar from '@material-ui/core/Avatar' -import IconButton from '@material-ui/core/IconButton' -import Button from '~/components/layout/Button' -import Group from '@material-ui/icons/Group' -import Delete from '@material-ui/icons/Delete' -import Person from '@material-ui/icons/Person' -import ExpandLess from '@material-ui/icons/ExpandLess' -import ExpandMore from '@material-ui/icons/ExpandMore' -import { type OwnerProps } from '~/routes/safe/store/models/owner' -import { type WithStyles } from '~/theme/mui' -import { sameAddress } from '~/logic/wallets/ethAddresses' - -const styles = { - nested: { - paddingLeft: '40px', - }, -} - -type Props = Open & WithStyles & { - owners: List, - userAddress: string, - onAddOwner: () => void, - onRemoveOwner: (name: string, addres: string) => void, -} - -export const ADD_OWNER_BUTTON_TEXT = 'Add' -export const REMOVE_OWNER_BUTTON_TEXT = 'Delete' - -const Owners = openHoc(({ - open, toggle, owners, classes, onAddOwner, userAddress, onRemoveOwner, -}: Props) => ( - - - - - - - - {open - ? - : - } - - - - - - {owners.map((owner) => { - const onRemoveIconClick = () => onRemoveOwner(owner.name, owner.address) - - return ( - - - - - - { !sameAddress(userAddress, owner.address) - && ( - - - - ) - } - - ) - })} - - - -)) - -export default withStyles(styles)(Owners) diff --git a/src/routes/safe/components/Safe/assets/gnosis_safe.svg b/src/routes/safe/components/Safe/assets/gnosis_safe.svg deleted file mode 100644 index c7bf5502..00000000 --- a/src/routes/safe/components/Safe/assets/gnosis_safe.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/routes/safe/components/Safe/index.jsx b/src/routes/safe/components/Safe/index.jsx deleted file mode 100644 index 23af1114..00000000 --- a/src/routes/safe/components/Safe/index.jsx +++ /dev/null @@ -1,135 +0,0 @@ -// @flow -import ListComponent from '@material-ui/core/List' -import * as React from 'react' -import { List } from 'immutable' -import Block from '~/components/layout/Block' -import Col from '~/components/layout/Col' -import Bold from '~/components/layout/Bold' -import Img from '~/components/layout/Img' -import Paragraph from '~/components/layout/Paragraph' -import Row from '~/components/layout/Row' -import { type Safe } from '~/routes/safe/store/models/safe' -import { type Token } from '~/logic/tokens/store/model/token' - -import Transactions from '~/routes/safe/components/Transactions' -import Threshold from '~/routes/safe/components/Threshold' -import AddOwner from '~/routes/safe/components/AddOwner' -import RemoveOwner from '~/routes/safe/components/RemoveOwner' -import SendToken from '~/routes/safe/components/SendToken' - -import Address from './Address' -import BalanceInfo from './BalanceInfo' -import Owners from './Owners' -import Confirmations from './Confirmations' -import MultisigTx from './MultisigTx' - -const safeIcon = require('./assets/gnosis_safe.svg') - -type SafeProps = { - safe: Safe, - tokens: List, - userAddress: string, -} - -type State = { - component?: React.Node, -} - -const listStyle = { - width: '100%', -} - -class GnoSafe extends React.PureComponent { - state = { - component: undefined, - } - - onListTransactions = () => { - const { safe } = this.props - - this.setState({ - component: ( - - ), - }) - } - - onEditThreshold = () => { - const { safe } = this.props - - this.setState({ - component: , - }) - } - - onAddOwner = (e: SyntheticEvent) => { - const { safe } = this.props - e.stopPropagation() - this.setState({ component: }) - } - - onRemoveOwner = (name: string, address: string) => { - const { safe } = this.props - - this.setState({ - component: ( - - ), - }) - } - - onMoveTokens = (ercToken: Token) => { - const { safe } = this.props - - this.setState({ - component: ( - - ), - }) - } - - render() { - const { safe, tokens, userAddress } = this.props - const { component } = this.state - const address = safe.get('address') - - return ( - - - - - - -
- - - - - - - {safe.name.toUpperCase()} - - - - - {component || Safe Icon} - - - - - ) - } -} - -export default GnoSafe diff --git a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx index 99f73289..835970f4 100644 --- a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx @@ -22,6 +22,9 @@ import Modal from '~/components/Modal' import { styles } from './style' import { secondary } from '~/theme/variables' +export const RENAME_OWNER_INPUT_TESTID = 'rename-owner-input' +export const SAVE_OWNER_CHANGES_BTN_TESTID = 'save-owner-changes-btn' + const openIconStyle = { height: '16px', color: secondary, @@ -96,6 +99,7 @@ const EditOwnerComponent = ({ text="Owner name*" initialValue={selectedOwnerName} className={classes.addressInput} + testId={RENAME_OWNER_INPUT_TESTID} /> @@ -115,7 +119,7 @@ const EditOwnerComponent = ({ - diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx index 11bc7756..4ed0942d 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx @@ -29,7 +29,7 @@ type Props = { network: string, threshold: string, createTransaction: Function, - updateSafe: Function + updateSafe: Function, } type ActiveScreen = 'checkOwner' | 'reviewReplaceOwner' diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index e1af5cf8..31230182 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -28,6 +28,9 @@ import ReplaceOwnerIcon from './assets/icons/replace-owner.svg' import RenameOwnerIcon from './assets/icons/rename-owner.svg' import RemoveOwnerIcon from '../assets/icons/bin.svg' +export const RENAME_OWNER_BTN_TESTID = 'rename-owner-btn' +export const OWNERS_ROW_TESTID = 'owners-row' + const controlsStyle = { backgroundColor: 'white', padding: sm, @@ -120,7 +123,7 @@ class ManageOwners extends React.Component { {(sortedData: Array) => sortedData.map((row: any, index: number) => ( - + {autoColumns.map((column: Column) => ( {column.id === OWNERS_TABLE_ADDRESS_ID ? ( @@ -137,6 +140,7 @@ class ManageOwners extends React.Component { className={classes.editOwnerIcon} src={RenameOwnerIcon} onClick={this.onShow('EditOwner', row)} + testId={RENAME_OWNER_BTN_TESTID} /> Replace owner { Owners ( {owners.size} diff --git a/src/test/safe.dom.settings.name.test.js b/src/test/safe.dom.settings.name.test.js index c635e9d0..2cfd40b5 100644 --- a/src/test/safe.dom.settings.name.test.js +++ b/src/test/safe.dom.settings.name.test.js @@ -10,7 +10,7 @@ import { SAFE_NAME_INPUT_TESTID, SAFE_NAME_SUBMIT_BTN_TESTID } from '~/routes/sa afterEach(cleanup) -describe('DOM > Feature > Settings', () => { +describe('DOM > Feature > Settings - Name', () => { let store let safeAddress beforeEach(async () => { diff --git a/src/test/safe.dom.settings.owners.test.js b/src/test/safe.dom.settings.owners.test.js index 802e769e..9146c841 100644 --- a/src/test/safe.dom.settings.owners.test.js +++ b/src/test/safe.dom.settings.owners.test.js @@ -5,12 +5,14 @@ import { aMinedSafe } from '~/test/builder/safe.redux.builder' import { renderSafeView } from '~/test/builder/safe.dom.utils' import { sleep } from '~/utils/timer' import 'jest-dom/extend-expect' -import { SETTINGS_TAB_BTN_TESTID, SAFE_VIEW_NAME_HEADING_TESTID } from '~/routes/safe/components/Layout' -import { SAFE_NAME_INPUT_TESTID, SAFE_NAME_SUBMIT_BTN_TESTID } from '~/routes/safe/components/Settings/ChangeSafeName' +import { SETTINGS_TAB_BTN_TESTID } from '~/routes/safe/components/Layout' +import { OWNERS_SETTINGS_TAB_TEST_ID } from '~/routes/safe/components/Settings' +import { RENAME_OWNER_BTN_TESTID, OWNERS_ROW_TESTID } from '~/routes/safe/components/Settings/ManageOwners' +import { RENAME_OWNER_INPUT_TESTID, SAVE_OWNER_CHANGES_BTN_TESTID } from '~/routes/safe/components/Settings/ManageOwners/EditOwnerModal' afterEach(cleanup) -describe('DOM > Feature > Settings > Manage owners', () => { +describe('DOM > Feature > Settings - Manage owners', () => { let store let safeAddress beforeEach(async () => { @@ -20,6 +22,34 @@ describe('DOM > Feature > Settings > Manage owners', () => { }) it('Changes owner\'s name', async () => { + const NEW_OWNER_NAME = 'NEW OWNER NAME' + const SafeDom = renderSafeView(store, safeAddress) + await sleep(1300) + + // Travel to settings + const settingsBtn = SafeDom.getByTestId(SETTINGS_TAB_BTN_TESTID) + fireEvent.click(settingsBtn) + await sleep(200) + + // click on owners settings + const ownersSettingsBtn = SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TEST_ID) + fireEvent.click(ownersSettingsBtn) + await sleep(200) + + // open rename owner modal + const renameOwnerBtn = SafeDom.getByTestId(RENAME_OWNER_BTN_TESTID) + fireEvent.click(renameOwnerBtn) + + // rename owner + const ownerNameInput = SafeDom.getByTestId(RENAME_OWNER_INPUT_TESTID) + const saveOwnerChangesBtn = SafeDom.getByTestId(SAVE_OWNER_CHANGES_BTN_TESTID) + fireEvent.change(ownerNameInput, { target: { value: NEW_OWNER_NAME } }) + fireEvent.click(saveOwnerChangesBtn) + await sleep(200) + + // check if the name updated + const ownerRow = SafeDom.getByTestId(OWNERS_ROW_TESTID) + expect(ownerRow).toHaveTextContent(NEW_OWNER_NAME) }) }) diff --git a/src/test/utils/transactions/addOwner.helper.js b/src/test/utils/transactions/addOwner.helper.js deleted file mode 100644 index fe038f3d..00000000 --- a/src/test/utils/transactions/addOwner.helper.js +++ /dev/null @@ -1,53 +0,0 @@ -// @flow -import TestUtils from 'react-dom/test-utils' -import { sleep } from '~/utils/timer' -import { checkMinedTx, checkPendingTx } from '~/test/builder/safe.dom.utils' -import { whenExecuted } from '~/test/utils/logTransactions' -import AddOwner from '~/routes/safe/components/AddOwner' - -export const sendAddOwnerForm = async ( - SafeDom: React.Component, - addOwner: React.Component, - ownerName: string, - ownerAddress: string, - increase: boolean = false, -) => { - // load add multisig form component - TestUtils.Simulate.click(addOwner) - // give time to re-render it - await sleep(400) - - // fill the form - const inputs = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'input') - const nameInput = inputs[0] - const addressInput = inputs[1] - TestUtils.Simulate.change(nameInput, { target: { value: ownerName } }) - TestUtils.Simulate.change(addressInput, { target: { value: ownerAddress } }) - - if (increase) { - const increaseInput = inputs[2] - TestUtils.Simulate.change(increaseInput, { target: { value: 'true' } }) - } - - // $FlowFixMe - const form = TestUtils.findRenderedDOMComponentWithTag(SafeDom, 'form') - - // submit it - TestUtils.Simulate.submit(form) - TestUtils.Simulate.submit(form) - - return whenExecuted(SafeDom, AddOwner) -} - -export const checkMinedAddOwnerTx = (Transaction: React.Component, name: string) => { - checkMinedTx(Transaction, name) -} - -export const checkPendingAddOwnerTx = async ( - Transaction: React.Component, - safeThreshold: number, - name: string, - statusses: string[], -) => { - await checkPendingTx(Transaction, safeThreshold, name, statusses) -} diff --git a/src/test/utils/transactions/removeOwner.helper.js b/src/test/utils/transactions/removeOwner.helper.js deleted file mode 100644 index fd492ae9..00000000 --- a/src/test/utils/transactions/removeOwner.helper.js +++ /dev/null @@ -1,49 +0,0 @@ -// @flow -import * as React from 'react' -import TestUtils from 'react-dom/test-utils' -import { sleep } from '~/utils/timer' -import { checkMinedTx, EXPAND_OWNERS_INDEX, checkPendingTx } from '~/test/builder/safe.dom.utils' -import { filterMoveButtonsFrom } from '~/test/builder/safe.dom.builder' -import { whenExecuted } from '~/test/utils/logTransactions' -import RemoveOwner from '~/routes/safe/components/RemoveOwner' - -export const sendRemoveOwnerForm = async ( - SafeDom: React.Component, - expandOwners: React.Component, -) => { - // Expand owners - TestUtils.Simulate.click(expandOwners) - await sleep(400) - - // Get delete button user - const allButtons = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'button') - const buttons = filterMoveButtonsFrom(allButtons) - const removeUserButton = buttons[EXPAND_OWNERS_INDEX + 2] // + 2 one the Add and the next delete - expect(removeUserButton.getAttribute('aria-label')).toBe('Delete') - - // render form for deleting the user - TestUtils.Simulate.click(removeUserButton) - await sleep(400) - - // $FlowFixMe - const form = TestUtils.findRenderedDOMComponentWithTag(SafeDom, 'form') - - // submit it - TestUtils.Simulate.submit(form) - TestUtils.Simulate.submit(form) - - return whenExecuted(SafeDom, RemoveOwner) -} - -export const checkMinedRemoveOwnerTx = (Transaction: React.Component, name: string) => { - checkMinedTx(Transaction, name) -} - -export const checkPendingRemoveOwnerTx = async ( - Transaction: React.Component, - safeThreshold: number, - name: string, - statusses: string[], -) => { - await checkPendingTx(Transaction, safeThreshold, name, statusses) -} From 6dba23242c01dc6013ce0862d8c4caca8149e7f6 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 28 Jun 2019 14:20:36 +0400 Subject: [PATCH 46/71] fix tests, add test for changing owner's name --- src/components/layout/Img/index.jsx | 7 +- .../Settings/ManageOwners/index.jsx | 2 +- src/store/index.js | 6 +- src/test/builder/safe.dom.utils.js | 13 +-- src/test/safe.dom.funds.test.js | 110 +++++++++++------- src/test/safe.dom.tokens.test.js | 73 ------------ 6 files changed, 74 insertions(+), 137 deletions(-) delete mode 100644 src/test/safe.dom.tokens.test.js diff --git a/src/components/layout/Img/index.jsx b/src/components/layout/Img/index.jsx index dd5886ff..45405cb4 100644 --- a/src/components/layout/Img/index.jsx +++ b/src/components/layout/Img/index.jsx @@ -10,15 +10,16 @@ type Props = { fullwidth?: boolean, bordered?: boolean, className?: string, - style?: React.Node, + style?: Object, + testId? : string, } const Img = ({ - fullwidth, alt, bordered, className, style, ...props + fullwidth, alt, bordered, className, style, testId = '', ...props }: Props) => { const classes = cx(styles.img, { fullwidth, bordered }, className) - return {alt} + return {alt} } export default Img diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 31230182..2ba4793e 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -123,7 +123,7 @@ class ManageOwners extends React.Component {
{(sortedData: Array) => sortedData.map((row: any, index: number) => ( - + {autoColumns.map((column: Column) => ( {column.id === OWNERS_TABLE_ADDRESS_ID ? ( diff --git a/src/store/index.js b/src/store/index.js index b9703c0f..bad964d4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,5 +1,5 @@ // @flow -import { createBrowserHistory, createMemoryHistory } from 'history' +import { createBrowserHistory } from 'history' import { connectRouter, routerMiddleware } from 'connected-react-router' import { combineReducers, createStore, applyMiddleware, compose, type Reducer, type Store, @@ -14,7 +14,7 @@ import transactions, { TRANSACTIONS_REDUCER_ID, } from '~/routes/safe/store/reducer/transactions' -export const history = process.env.NODE_ENV === 'test' ? createMemoryHistory() : createBrowserHistory() +export const history = createBrowserHistory() // eslint-disable-next-line const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose @@ -39,4 +39,4 @@ const reducers: Reducer = combineReducers({ export const store: Store = createStore(reducers, finalCreateStore) -export const aNewStore = (localState?: Object): Store => createStore(reducers, localState, finalCreateStore) +export const aNewStore = (localState?: Object): Store => createStore(reducers, localState, finalCreateStore) \ No newline at end of file diff --git a/src/test/builder/safe.dom.utils.js b/src/test/builder/safe.dom.utils.js index 3234e3c5..72100de5 100644 --- a/src/test/builder/safe.dom.utils.js +++ b/src/test/builder/safe.dom.utils.js @@ -3,11 +3,10 @@ import * as React from 'react' import TestUtils from 'react-dom/test-utils' import { type Store } from 'redux' import { Provider } from 'react-redux' +import { render } from '@testing-library/react' import { ConnectedRouter } from 'connected-react-router' import PageFrame from '~/components/layout/PageFrame' -import { render } from '@testing-library/react' import ListItemText from '~/components/List/ListItemText/index' -import { SEE_MULTISIG_BUTTON_TEXT } from '~/routes/safe/components/Safe/MultisigTx' import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' import { sleep } from '~/utils/timer' import { history } from '~/store' @@ -23,16 +22,6 @@ export const EDIT_INDEX = 4 export const WITHDRAW_INDEX = 5 export const LIST_TXS_INDEX = 6 -export const listTxsClickingOn = async (store: Store, seeTxsButton: Element, safeAddress: string) => { - await store.dispatch(fetchTransactions(safeAddress)) - await sleep(1200) - expect(seeTxsButton.getElementsByTagName('span')[0].innerHTML).toEqual(SEE_MULTISIG_BUTTON_TEXT) - TestUtils.Simulate.click(seeTxsButton) - - // give some time to expand the transactions - await sleep(800) -} - export const checkMinedTx = (Transaction: React.Component, name: string) => { const paragraphs = TestUtils.scryRenderedDOMComponentsWithTag(Transaction, 'p') diff --git a/src/test/safe.dom.funds.test.js b/src/test/safe.dom.funds.test.js index cf09cca5..974f3a93 100644 --- a/src/test/safe.dom.funds.test.js +++ b/src/test/safe.dom.funds.test.js @@ -1,16 +1,19 @@ // @flow -import { render, fireEvent, cleanup } from '@testing-library/react' -import * as fetchBalancesAction from '~/logic/tokens/store/actions/fetchTokens' +import { fireEvent, cleanup } from '@testing-library/react' +import { List } from 'immutable' import { aNewStore } from '~/store' import { aMinedSafe } from '~/test/builder/safe.redux.builder' -import { sendTokenTo, getFirstTokenContract } from '~/test/utils/tokenMovements' -import { EXPAND_BALANCE_INDEX, renderSafeView } from '~/test/builder/safe.dom.utils' -import { getWeb3 } from '~/logic/wallets/getWeb3' -import { sendMoveTokensForm, dispatchTknBalance } from '~/test/utils/transactions/moveTokens.helper' +import { sendTokenTo, sendEtherTo } from '~/test/utils/tokenMovements' +import { renderSafeView } from '~/test/builder/safe.dom.utils' +import { getWeb3, getBalanceInEtherOf } from '~/logic/wallets/getWeb3' +import { dispatchAddTokenToList } from '~/test/utils/transactions/moveTokens.helper' import { sleep } from '~/utils/timer' -import { ETH_ADDRESS } from '~/logic/tokens/utils/tokenHelpers' +import TokenBalanceRecord from '~/routes/safe/store/models/tokenBalance' import { calculateBalanceOf } from '~/routes/safe/store/actions/fetchTokenBalances' +import updateActiveTokens from '~/routes/safe/store/actions/updateActiveTokens' import 'jest-dom/extend-expect' +import updateSafe from '~/routes/safe/store/actions/updateSafe' +import { BALANCE_ROW_TEST_ID } from '~/routes/safe/components/Balances' afterEach(cleanup) @@ -20,26 +23,23 @@ describe('DOM > Feature > Funds', () => { let accounts beforeEach(async () => { store = aNewStore() + // using 4th account because other accounts were used in other tests and paid gas safeAddress = await aMinedSafe(store) accounts = await getWeb3().eth.getAccounts() }) - it('Sends ETH', async () => { + it('Sends ETH with threshold = 1', async () => { // GIVEN - const numTokens = '100' - const tokenAddress = await sendTokenTo(safeAddress, numTokens) - - await dispatchTknBalance(store, tokenAddress, safeAddress) - // const StandardToken = await fetchBalancesAction.getStandardTokenContract() - // const myToken = await StandardToken.at(tokenAddress) - // console.log(await myToken.allowance(safeAddress, accounts[2])) - // console.log(await myToken.balanceOf(safeAddress)) + const ethAmount = '5' + await sendEtherTo(safeAddress, ethAmount) + const balanceAfterSendingEthToSafe = await getBalanceInEtherOf(accounts[0]) // WHEN - const SafeDom = await renderSafeView(store, safeAddress) - await sleep(800) + const SafeDom = renderSafeView(store, safeAddress) + await sleep(1300) - const balanceRows = SafeDom.getAllByTestId('balance-row') + // Open send funds modal + const balanceRows = SafeDom.getAllByTestId(BALANCE_ROW_TEST_ID) expect(balanceRows[0]).toHaveTextContent(`${ethAmount} ETH`) const sendButton = SafeDom.getByTestId('balance-send-btn') fireEvent.click(sendButton) @@ -59,44 +59,64 @@ describe('DOM > Feature > Funds', () => { await sleep(1000) // THEN - const safeFunds = await calculateBalanceOf(ETH_ADDRESS, safeAddress, 18) + const safeFunds = await getBalanceInEtherOf(safeAddress) expect(Number(safeFunds)).toBe(0) const receiverFunds = await getBalanceInEtherOf(accounts[0]) - const ESTIMATED_GASCOSTS = 0.1 + const ESTIMATED_GASCOSTS = 0.3 expect(Number(parseInt(receiverFunds, 10) - parseInt(balanceAfterSendingEthToSafe, 10))).toBeGreaterThan( parseInt(ethAmount, 10) - ESTIMATED_GASCOSTS, ) }) - it('Sends Tokens', async () => { + it('Sends Tokens with threshold = 1', async () => { // GIVEN - const numTokens = '100' - const tokenAddress = await sendTokenTo(safeAddress, numTokens) - - await dispatchTknBalance(store, tokenAddress, safeAddress) - // const StandardToken = await fetchBalancesAction.getStandardTokenContract() - // const myToken = await StandardToken.at(tokenAddress) - // console.log(await myToken.allowance(safeAddress, accounts[2])) - // console.log(await myToken.balanceOf(safeAddress)) + const tokensAmount = '100' + const tokenReceiver = accounts[1] + const tokenAddress = await sendTokenTo(safeAddress, tokensAmount) + await dispatchAddTokenToList(store, tokenAddress) // WHEN const SafeDom = await renderSafeView(store, safeAddress) - await sleep(800) - // $FlowFixMe - const buttons = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'button') - const expandBalance = buttons[EXPAND_BALANCE_INDEX] - const receiver = accounts[2] - await sendMoveTokensForm(SafeDom, expandBalance, 20, accounts[2]) + await sleep(1300) + + // Activate token + const safeTokenBalance = await calculateBalanceOf(tokenAddress, safeAddress, 18) + expect(safeTokenBalance).toBe(tokensAmount) + + const balanceAsRecord = TokenBalanceRecord({ + address: tokenAddress, + balance: safeTokenBalance, + }) + store.dispatch(updateActiveTokens(safeAddress, List([tokenAddress]))) + store.dispatch(updateSafe({ address: safeAddress, balances: List([balanceAsRecord]) })) + await sleep(1000) + + // Open send funds modal + const balanceRows = SafeDom.getAllByTestId(BALANCE_ROW_TEST_ID) + expect(balanceRows.length).toBe(2) + const sendButtons = SafeDom.getAllByTestId('balance-send-btn') + expect(sendButtons.length).toBe(2) + fireEvent.click(sendButtons[1]) + + // Fill first send funds screen + const recipientInput = SafeDom.getByPlaceholderText('Recipient*') + const amountInput = SafeDom.getByPlaceholderText('Amount*') + const reviewBtn = SafeDom.getByTestId('review-tx-btn') + fireEvent.change(recipientInput, { target: { value: tokenReceiver } }) + fireEvent.change(amountInput, { target: { value: tokensAmount } }) + await sleep(200) + fireEvent.click(reviewBtn) + + // Submit the tx (Review Tx screen) + const submitBtn = SafeDom.getByTestId('submit-tx-btn') + fireEvent.click(submitBtn) + await sleep(1000) // THEN - const safeFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, safeAddress, 18) - expect(Number(safeFunds)).toBe(80) - const receiverFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, receiver, 18) - expect(Number(receiverFunds)).toBe(20) - - const token = await getFirstTokenContract(getWeb3(), accounts[0]) - const nativeSafeFunds = await token.balanceOf(safeAddress) - expect(Number(nativeSafeFunds.valueOf())).toEqual(80 * 10 ** 18) + const safeFunds = await calculateBalanceOf(tokenAddress, safeAddress, 18) + expect(Number(safeFunds)).toBe(0) + const receiverFunds = await calculateBalanceOf(tokenAddress, tokenReceiver, 18) + expect(receiverFunds).toBe(tokensAmount) }) -}) +}) \ No newline at end of file diff --git a/src/test/safe.dom.tokens.test.js b/src/test/safe.dom.tokens.test.js deleted file mode 100644 index fe5e856c..00000000 --- a/src/test/safe.dom.tokens.test.js +++ /dev/null @@ -1,73 +0,0 @@ -// @flow - -import TestUtils from 'react-dom/test-utils' -import * as fetchBalancesAction from '~/logic/tokens/store/actions/fetchTokens' -import { aNewStore } from '~/store' -import { aMinedSafe } from '~/test/builder/safe.redux.builder' -import { addTknTo, getFirstTokenContract } from '~/test/utils/tokenMovements' -import { EXPAND_BALANCE_INDEX, travelToSafe } from '~/test/builder/safe.dom.utils' -import { getWeb3 } from '~/logic/wallets/getWeb3' -import { sendMoveTokensForm, dispatchTknBalance } from '~/test/utils/transactions/moveTokens.helper' -import { sleep } from '~/utils/timer' - -describe('DOM > Feature > SAFE ERC20 TOKENS', () => { - let accounts - beforeEach(async () => { - accounts = await getWeb3().eth.getAccounts() - }) - - it('sends ERC20 tokens', async () => { - // GIVEN - const store = aNewStore() - const safeAddress = await aMinedSafe(store) - - const numTokens = '100' - const tokenAddress = await addTknTo(safeAddress, numTokens) - - await dispatchTknBalance(store, tokenAddress, safeAddress) - // const StandardToken = await fetchBalancesAction.getStandardTokenContract() - // const myToken = await StandardToken.at(tokenAddress) - // console.log(await myToken.allowance(safeAddress, accounts[2])) - // console.log(await myToken.balanceOf(safeAddress)) - - // WHEN - const SafeDom = await travelToSafe(store, safeAddress) - await sleep(800) - // $FlowFixMe - const buttons = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'button') - const expandBalance = buttons[EXPAND_BALANCE_INDEX] - const receiver = accounts[2] - await sendMoveTokensForm(SafeDom, expandBalance, 20, accounts[2]) - - // THEN - const safeFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, safeAddress, 18) - expect(Number(safeFunds)).toBe(80) - const receiverFunds = await fetchBalancesAction.calculateBalanceOf(tokenAddress, receiver, 18) - expect(Number(receiverFunds)).toBe(20) - - const token = await getFirstTokenContract(getWeb3(), accounts[0]) - const nativeSafeFunds = await token.balanceOf(safeAddress) - expect(Number(nativeSafeFunds.valueOf())).toEqual(80 * 10 ** 18) - }) - - it('disables send token button when balance is 0', async () => { - // GIVEN - const token = await getFirstTokenContract(getWeb3(), accounts[0]) - await dispatchTknBalance(store, token.address, safeAddress) - - // WHEN - const SafeDom = travelToSafe(store, safeAddress) - - // $FlowFixMe - const buttons = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'button') - const expandBalance = buttons[EXPAND_BALANCE_INDEX] - - TestUtils.Simulate.click(expandBalance) - await sleep(800) - - // $FlowFixMe - const balanceButtons = TestUtils.scryRenderedDOMComponentsWithTag(SafeDom, 'button') - const tokenButton = balanceButtons[EXPAND_BALANCE_INDEX + 1] // expand button, and the next one is for sending - expect(tokenButton.hasAttribute('disabled')).toBe(true) - }) -}) From 93678064d967094eb60e460d3f82c33be0e01ec8 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 28 Jun 2019 14:24:20 +0400 Subject: [PATCH 47/71] remove accesing owner props via .get() since it's a record --- src/components/layout/Img/index.jsx | 2 +- src/logic/safe/utils/safeStorage.js | 2 +- .../AddOwnerModal/screens/Review/index.jsx | 10 +++++----- .../RemoveOwnerModal/screens/Review/index.jsx | 10 +++++----- .../ReplaceOwnerModal/screens/Review/index.jsx | 10 +++++----- .../components/Settings/ManageOwners/dataFetcher.js | 4 ++-- src/routes/safe/container/selector.js | 2 +- src/store/index.js | 2 +- src/test/safe.dom.funds.test.js | 2 +- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/components/layout/Img/index.jsx b/src/components/layout/Img/index.jsx index 45405cb4..94dbd5f4 100644 --- a/src/components/layout/Img/index.jsx +++ b/src/components/layout/Img/index.jsx @@ -11,7 +11,7 @@ type Props = { bordered?: boolean, className?: string, style?: Object, - testId? : string, + testId?: string, } const Img = ({ diff --git a/src/logic/safe/utils/safeStorage.js b/src/logic/safe/utils/safeStorage.js index 3a5ad40e..37a6fb27 100644 --- a/src/logic/safe/utils/safeStorage.js +++ b/src/logic/safe/utils/safeStorage.js @@ -28,7 +28,7 @@ export const saveSafes = async (safes: Object) => { export const setOwners = async (safeAddress: string, owners: List) => { try { - const ownersAsMap = Map(owners.map((owner: Owner) => [owner.get('address').toLowerCase(), owner.get('name')])) + const ownersAsMap = Map(owners.map((owner: Owner) => [owner.address.toLowerCase(), owner.name])) await saveToStorage(`${OWNERS_KEY}-${safeAddress}`, ownersAsMap) } catch (err) { // eslint-disable-next-line diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx index b9252b0a..70b2f562 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx @@ -98,21 +98,21 @@ const ReviewAddOwner = ({ {owners.map(owner => ( - + - + - {owner.get('name')} + {owner.name} - {owner.get('address')} + {owner.address} - + diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx index 993f04b5..15f73587 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx @@ -109,23 +109,23 @@ const ReviewRemoveOwner = ({ {owners.map( owner => owner.address !== ownerAddress && ( - + - + - {owner.get('name')} + {owner.name} - {owner.get('address')} + {owner.address} diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx index 1b960669..e8469b17 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx @@ -111,23 +111,23 @@ const ReviewRemoveOwner = ({ {owners.map( owner => owner.address !== ownerAddress && ( - + - + - {owner.get('name')} + {owner.name} - {owner.get('address')} + {owner.address} diff --git a/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js b/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js index f66e4489..9575d735 100644 --- a/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js +++ b/src/routes/safe/components/Settings/ManageOwners/dataFetcher.js @@ -17,8 +17,8 @@ export type OwnerRow = SortRow export const getOwnerData = (owners: List): List => { const rows = owners.map((owner: Owner) => ({ - [OWNERS_TABLE_NAME_ID]: owner.get('name'), - [OWNERS_TABLE_ADDRESS_ID]: owner.get('address'), + [OWNERS_TABLE_NAME_ID]: owner.name, + [OWNERS_TABLE_ADDRESS_ID]: owner.address, })) return rows diff --git a/src/routes/safe/container/selector.js b/src/routes/safe/container/selector.js index 14db2918..fc3bcf0e 100644 --- a/src/routes/safe/container/selector.js +++ b/src/routes/safe/container/selector.js @@ -46,7 +46,7 @@ export const grantedSelector: Selector = crea return false } - return owners.find((owner: Owner) => sameAddress(owner.get('address'), userAccount)) !== undefined + return owners.find((owner: Owner) => sameAddress(owner.address, userAccount)) !== undefined }, ) diff --git a/src/store/index.js b/src/store/index.js index bad964d4..9542511c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -39,4 +39,4 @@ const reducers: Reducer = combineReducers({ export const store: Store = createStore(reducers, finalCreateStore) -export const aNewStore = (localState?: Object): Store => createStore(reducers, localState, finalCreateStore) \ No newline at end of file +export const aNewStore = (localState?: Object): Store => createStore(reducers, localState, finalCreateStore) diff --git a/src/test/safe.dom.funds.test.js b/src/test/safe.dom.funds.test.js index 974f3a93..4e245ed1 100644 --- a/src/test/safe.dom.funds.test.js +++ b/src/test/safe.dom.funds.test.js @@ -119,4 +119,4 @@ describe('DOM > Feature > Funds', () => { const receiverFunds = await calculateBalanceOf(tokenAddress, tokenReceiver, 18) expect(receiverFunds).toBe(tokensAmount) }) -}) \ No newline at end of file +}) From 0c9717831aa904da75e8993071846f5aab36a034 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 28 Jun 2019 15:12:32 +0400 Subject: [PATCH 48/71] adding owner fixes wip --- .../ManageOwners/AddOwnerModal/index.jsx | 39 +++--- .../AddOwnerModal/screens/OwnerForm/index.jsx | 116 ++++++++---------- 2 files changed, 74 insertions(+), 81 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx index 4a0af47d..3562d77d 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx @@ -1,16 +1,14 @@ // @flow import React, { useState, useEffect } from 'react' import { List } from 'immutable' +import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' -import { type Safe } from '~/routes/safe/store/models/safe' import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' -import { setOwners } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import OwnerForm from './screens/OwnerForm' import ThresholdForm from './screens/ThresholdForm' import ReviewAddOwner from './screens/Review' -import { withStyles } from '@material-ui/core/styles' const styles = () => ({ biggerModalWindow: { @@ -29,7 +27,7 @@ type Props = { owners: List, threshold: number, network: string, - userAddress: string, + updateSafe: Function, createTransaction: Function, } type ActiveScreen = 'selectOwner' | 'selectThreshold' | 'reviewAddOwner' @@ -38,15 +36,19 @@ export const sendAddOwner = async ( values: Object, safeAddress: string, owners: List, - openSnackbar: Fuction, + openSnackbar: Function, createTransaction: Function, + updateSafe: Function, ) => { const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) const txData = gnosisSafe.contract.methods.addOwnerWithThreshold(values.ownerAddress, values.threshold).encodeABI() const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) if (txHash) { - setOwners(safeAddress, owners.push(makeOwner({ name: values.ownerName, address: values.ownerAddress }))) + updateSafe({ + address: safeAddress, + owners: owners.push(makeOwner({ name: values.ownerName, address: values.ownerAddress })), + }) } } @@ -59,8 +61,8 @@ const AddOwner = ({ owners, threshold, network, - userAddress, createTransaction, + updateSafe, }: Props) => { const [activeScreen, setActiveScreen] = useState('selectOwner') const [values, setValues] = useState({}) @@ -82,15 +84,19 @@ const AddOwner = ({ } const ownerSubmitted = (newValues: Object) => { - values.ownerName = newValues.ownerName - values.ownerAddress = newValues.ownerAddress - setValues(values) + setValues(stateValues => ({ + ...stateValues, + ownerName: newValues.ownerName, + ownerAddress: newValues.ownerAddress, + })) setActiveScreen('selectThreshold') } const thresholdSubmitted = (newValues: Object) => { - values.threshold = newValues.threshold - setValues(values) + setValues(stateValues => ({ + ...stateValues, + threshold: newValues.threshold, + })) setActiveScreen('reviewAddOwner') } @@ -101,7 +107,7 @@ const AddOwner = ({ const onAddOwner = async () => { onClose() try { - sendAddOwner(values, safeAddress, owners, openSnackbar, createTransaction) + sendAddOwner(values, safeAddress, owners, openSnackbar, createTransaction, updateSafe) } catch (error) { // eslint-disable-next-line console.log('Error while removing an owner ' + error) @@ -117,12 +123,7 @@ const AddOwner = ({ paperClassName={classes.biggerModalWindow} > - {activeScreen === 'selectOwner' && ( - - )} + {activeScreen === 'selectOwner' && } {activeScreen === 'selectThreshold' && ( void, classes: Object, onSubmit: Function, + owners: List, } -const OwnerForm = ({ - classes, - onClose, - onSubmit, -}: Props) => { +const OwnerForm = ({ classes, onClose, onSubmit }: Props) => { const handleSubmit = (values) => { onSubmit(values) } @@ -49,63 +47,57 @@ const OwnerForm = ({ - {(...args) => { - const formState = args[2] - - return ( - - - - - Add a new owner to the active Safe - - - - - - - - - - - - - - - - - + {() => ( + + + + Add a new owner to the active Safe - - ) - }} + + + + + + + + + + + + + + + + + + )} ) From 9cbc31b9aef6f4a051b0c983bd3eab7f5f27ba8b Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 28 Jun 2019 16:04:31 +0400 Subject: [PATCH 49/71] add validator for already existing owner address --- .../Settings/ManageOwners/AddOwnerModal/index.jsx | 4 +++- .../AddOwnerModal/screens/OwnerForm/index.jsx | 14 +++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx index 3562d77d..8d285be2 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx @@ -123,7 +123,9 @@ const AddOwner = ({ paperClassName={classes.biggerModalWindow} > - {activeScreen === 'selectOwner' && } + {activeScreen === 'selectOwner' && ( + + )} {activeScreen === 'selectThreshold' && ( void, classes: Object, onSubmit: Function, - owners: List, + owners: List, } -const OwnerForm = ({ classes, onClose, onSubmit }: Props) => { +const OwnerForm = ({ + classes, onClose, onSubmit, owners, +}: Props) => { const handleSubmit = (values) => { onSubmit(values) } + const ownerDoesntExist = uniqueAddress(owners.map(o => o.address)) return ( @@ -72,7 +76,7 @@ const OwnerForm = ({ classes, onClose, onSubmit }: Props) => { name="ownerAddress" component={TextField} type="text" - validate={composeValidators(required, mustBeEthereumAddress)} + validate={composeValidators(required, mustBeEthereumAddress, ownerDoesntExist)} placeholder="Owner address*" text="Owner address*" className={classes.addressInput} @@ -83,7 +87,7 @@ const OwnerForm = ({ classes, onClose, onSubmit }: Props) => { From 8d82e19fcc60e7aba6b14e87b4328b64056be0dd Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 28 Jun 2019 16:12:50 +0400 Subject: [PATCH 50/71] fix adding new owner --- .../components/Settings/ManageOwners/AddOwnerModal/index.jsx | 1 + src/routes/safe/components/Settings/ManageOwners/index.jsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx index 8d285be2..b794eeb0 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx @@ -44,6 +44,7 @@ export const sendAddOwner = async ( const txData = gnosisSafe.contract.methods.addOwnerWithThreshold(values.ownerAddress, values.threshold).encodeABI() const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) + if (txHash) { updateSafe({ address: safeAddress, diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 2ba4793e..2054007b 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -185,6 +185,7 @@ class ManageOwners extends React.Component { network={network} userAddress={userAddress} createTransaction={createTransaction} + updateSafe={updateSafe} /> Date: Fri, 28 Jun 2019 17:06:33 +0400 Subject: [PATCH 51/71] add test for removing owner --- .../components/ReviewInformation/index.jsx | 4 +- .../screens/CheckOwner/index.jsx | 3 + .../RemoveOwnerModal/screens/Review/index.jsx | 4 +- .../screens/ThresholdForm/index.jsx | 4 +- .../Settings/ManageOwners/index.jsx | 2 + src/test/safe.dom.settings.owners.test.js | 61 +++++++++++++++++-- 6 files changed, 70 insertions(+), 8 deletions(-) diff --git a/src/routes/open/components/ReviewInformation/index.jsx b/src/routes/open/components/ReviewInformation/index.jsx index 36b424d8..704a1498 100644 --- a/src/routes/open/components/ReviewInformation/index.jsx +++ b/src/routes/open/components/ReviewInformation/index.jsx @@ -1,10 +1,10 @@ // @flow import * as React from 'react' import classNames from 'classnames' -import { getNamesFrom, getAccountsFrom } from '~/routes/open/utils/safeDataExtractor' -import Block from '~/components/layout/Block' import { withStyles } from '@material-ui/core/styles' import OpenInNew from '@material-ui/icons/OpenInNew' +import { getNamesFrom, getAccountsFrom } from '~/routes/open/utils/safeDataExtractor' +import Block from '~/components/layout/Block' import Identicon from '~/components/Identicon' import OpenPaper from '~/components/Stepper/OpenPaper' import Col from '~/components/layout/Col' diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx index 00be9eb8..a059bb08 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx @@ -17,6 +17,8 @@ import { getEtherScanLink } from '~/logic/wallets/getWeb3' import { styles } from './style' import { secondary } from '~/theme/variables' +export const REMOVE_OWNER_MODAL_NEXT_BTN_TESTID = 'remove-owner-next-btn' + const openIconStyle = { height: '16px', color: secondary, @@ -93,6 +95,7 @@ const CheckOwner = ({ minWidth={140} color="primary" onClick={handleSubmit} + testId={REMOVE_OWNER_MODAL_NEXT_BTN_TESTID} > Next diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx index 15f73587..f7e2d63e 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review/index.jsx @@ -19,6 +19,8 @@ import { getEtherScanLink } from '~/logic/wallets/getWeb3' import { secondary } from '~/theme/variables' import { styles } from './style' +export const REMOVE_OWNER_REVIEW_BTN_TESTID = 'remove-owner-review-btn' + const openIconStyle = { height: '16px', color: secondary, @@ -180,7 +182,7 @@ const ReviewRemoveOwner = ({ variant="contained" minWidth={140} color="primary" - data-testid="review-tx-btn" + testId={REMOVE_OWNER_REVIEW_BTN_TESTID} > Submit diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.jsx index cc813947..56f118f3 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.jsx @@ -20,6 +20,8 @@ import { } from '~/components/forms/validator' import { styles } from './style' +export const REMOVE_OWNER_THRESHOLD_NEXT_BTN_TESTID = 'remove-owner-threshold-next-btn' + type Props = { onClose: () => void, classes: Object, @@ -112,7 +114,7 @@ owner(s) variant="contained" minWidth={140} color="primary" - data-testid="review-tx-btn" + data-testid={REMOVE_OWNER_THRESHOLD_NEXT_BTN_TESTID} > Review diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 2054007b..9031c686 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -29,6 +29,7 @@ import RenameOwnerIcon from './assets/icons/rename-owner.svg' import RemoveOwnerIcon from '../assets/icons/bin.svg' export const RENAME_OWNER_BTN_TESTID = 'rename-owner-btn' +export const REMOVE_OWNER_BTN_TESTID = 'remove-owner-btn' export const OWNERS_ROW_TESTID = 'owners-row' const controlsStyle = { @@ -153,6 +154,7 @@ class ManageOwners extends React.Component { className={classes.removeOwnerIcon} src={RemoveOwnerIcon} onClick={this.onShow('RemoveOwner', row)} + testId={REMOVE_OWNER_BTN_TESTID} /> diff --git a/src/test/safe.dom.settings.owners.test.js b/src/test/safe.dom.settings.owners.test.js index 9146c841..dafafe27 100644 --- a/src/test/safe.dom.settings.owners.test.js +++ b/src/test/safe.dom.settings.owners.test.js @@ -7,8 +7,18 @@ import { sleep } from '~/utils/timer' import 'jest-dom/extend-expect' import { SETTINGS_TAB_BTN_TESTID } from '~/routes/safe/components/Layout' import { OWNERS_SETTINGS_TAB_TEST_ID } from '~/routes/safe/components/Settings' -import { RENAME_OWNER_BTN_TESTID, OWNERS_ROW_TESTID } from '~/routes/safe/components/Settings/ManageOwners' -import { RENAME_OWNER_INPUT_TESTID, SAVE_OWNER_CHANGES_BTN_TESTID } from '~/routes/safe/components/Settings/ManageOwners/EditOwnerModal' +import { + RENAME_OWNER_BTN_TESTID, + OWNERS_ROW_TESTID, + REMOVE_OWNER_BTN_TESTID, +} from '~/routes/safe/components/Settings/ManageOwners' +import { + RENAME_OWNER_INPUT_TESTID, + SAVE_OWNER_CHANGES_BTN_TESTID, +} from '~/routes/safe/components/Settings/ManageOwners/EditOwnerModal' +import { REMOVE_OWNER_MODAL_NEXT_BTN_TESTID } from '~/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner' +import { REMOVE_OWNER_THRESHOLD_NEXT_BTN_TESTID } from '~/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm' +import { REMOVE_OWNER_REVIEW_BTN_TESTID } from '~/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review' afterEach(cleanup) @@ -17,11 +27,10 @@ describe('DOM > Feature > Settings - Manage owners', () => { let safeAddress beforeEach(async () => { store = aNewStore() - // using 4th account because other accounts were used in other tests and paid gas safeAddress = await aMinedSafe(store) }) - it('Changes owner\'s name', async () => { + it("Changes owner's name", async () => { const NEW_OWNER_NAME = 'NEW OWNER NAME' const SafeDom = renderSafeView(store, safeAddress) @@ -52,4 +61,48 @@ describe('DOM > Feature > Settings - Manage owners', () => { const ownerRow = SafeDom.getByTestId(OWNERS_ROW_TESTID) expect(ownerRow).toHaveTextContent(NEW_OWNER_NAME) }) + + it('Removes an owner', async () => { + const twoOwnersSafeAddress = await aMinedSafe(store, 2) + + const SafeDom = renderSafeView(store, twoOwnersSafeAddress) + await sleep(1300) + + // Travel to settings + const settingsBtn = SafeDom.getByTestId(SETTINGS_TAB_BTN_TESTID) + fireEvent.click(settingsBtn) + await sleep(200) + + // click on owners settings + const ownersSettingsBtn = SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TEST_ID) + fireEvent.click(ownersSettingsBtn) + await sleep(200) + + // check if there are 2 owners + let ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) + expect(ownerRows.length).toBe(2) + + // click remove owner btn which opens the modal + const removeOwnerBtn = SafeDom.getAllByTestId(REMOVE_OWNER_BTN_TESTID)[1] + fireEvent.click(removeOwnerBtn) + + // modal navigation + const nextBtnStep1 = SafeDom.getByTestId(REMOVE_OWNER_MODAL_NEXT_BTN_TESTID) + fireEvent.click(nextBtnStep1) + + const nextBtnStep2 = SafeDom.getByTestId(REMOVE_OWNER_THRESHOLD_NEXT_BTN_TESTID) + fireEvent.click(nextBtnStep2) + + const nextBtnStep3 = SafeDom.getByTestId(REMOVE_OWNER_REVIEW_BTN_TESTID) + fireEvent.click(nextBtnStep3) + await sleep(400) + + // check if owner was removed + ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) + expect(ownerRows.length).toBe(1) + }) + + it('Replaces a owner', async () => {}) + + it('Adds a new owner', async () => {}) }) From 161820a6c597a387f4d035755a0c641a19ff954f Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 28 Jun 2019 18:15:19 +0400 Subject: [PATCH 52/71] adding owner test wip --- .../AddOwnerModal/screens/OwnerForm/index.jsx | 8 +- .../AddOwnerModal/screens/Review/index.jsx | 28 ++-- .../screens/ThresholdForm/index.jsx | 152 ++++++++---------- .../Settings/ManageOwners/index.jsx | 2 + src/test/safe.dom.settings.owners.test.js | 52 +++++- 5 files changed, 143 insertions(+), 99 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx index 13c3dd95..0609d615 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx @@ -23,6 +23,10 @@ import { } from '~/components/forms/validator' import { styles } from './style' +export const ADD_OWNER_NAME_INPUT_TESTID = 'add-owner-name-input' +export const ADD_OWNER_ADDRESS_INPUT_TESTID = 'add-owner-address-testid' +export const ADD_OWNER_NEXT_BTN_TESTID = 'add-owner-next btn' + type Props = { onClose: () => void, classes: Object, @@ -67,6 +71,7 @@ const OwnerForm = ({ placeholder="Owner name*" text="Owner name*" className={classes.addressInput} + testId={ADD_OWNER_NAME_INPUT_TESTID} /> @@ -80,6 +85,7 @@ const OwnerForm = ({ placeholder="Owner address*" text="Owner address*" className={classes.addressInput} + testId={ADD_OWNER_ADDRESS_INPUT_TESTID} /> @@ -95,7 +101,7 @@ const OwnerForm = ({ variant="contained" minWidth={140} color="primary" - data-testid="review-tx-btn" + testId={ADD_OWNER_NEXT_BTN_TESTID} > Next diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx index 70b2f562..a5d936aa 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx @@ -10,18 +10,17 @@ import Identicon from '~/components/Identicon' import Link from '~/components/layout/Link' import Paragraph from '~/components/layout/Paragraph' import Row from '~/components/layout/Row' -import GnoForm from '~/components/forms/GnoForm' import Col from '~/components/layout/Col' import Button from '~/components/layout/Button' import Block from '~/components/layout/Block' import Hairline from '~/components/layout/Hairline' -import Field from '~/components/forms/Field' -import TextField from '~/components/forms/TextField' import type { Owner } from '~/routes/safe/store/models/owner' import { getEtherScanLink } from '~/logic/wallets/getWeb3' import { secondary } from '~/theme/variables' import { styles } from './style' +export const ADD_OWNER_SUBMIT_BTN = 'add-owner-submit-btn' + const openIconStyle = { height: '16px', color: secondary, @@ -39,14 +38,7 @@ type Props = { } const ReviewAddOwner = ({ - classes, - onClose, - safeName, - owners, - network, - values, - onClickBack, - onSubmit, + classes, onClose, safeName, owners, network, values, onClickBack, onSubmit, }: Props) => { const handleSubmit = () => { onSubmit() @@ -85,7 +77,13 @@ const ReviewAddOwner = ({ Any transaction requires the confirmation of: - {values.threshold} out of {owners.size + 1} owner(s) + {values.threshold} + {' '} + out of + {' '} + {owners.size + 1} + {' '} + owner(s) @@ -93,7 +91,9 @@ const ReviewAddOwner = ({ - {owners.size + 1} Safe owner(s) + {owners.size + 1} + {' '} + Safe owner(s) @@ -164,7 +164,7 @@ const ReviewAddOwner = ({ variant="contained" minWidth={140} color="primary" - data-testid="review-tx-btn" + testId={ADD_OWNER_SUBMIT_BTN} > Submit diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx index 6a6c3f5a..2d15e999 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm/index.jsx @@ -4,8 +4,8 @@ import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' import Close from '@material-ui/icons/Close' import IconButton from '@material-ui/core/IconButton' -import SelectField from '~/components/forms/SelectField' import MenuItem from '@material-ui/core/MenuItem' +import SelectField from '~/components/forms/SelectField' import Paragraph from '~/components/layout/Paragraph' import Row from '~/components/layout/Row' import GnoForm from '~/components/forms/GnoForm' @@ -14,17 +14,14 @@ import Button from '~/components/layout/Button' import Block from '~/components/layout/Block' import Hairline from '~/components/layout/Hairline' import Field from '~/components/forms/Field' -import TextField from '~/components/forms/TextField' import type { Owner } from '~/routes/safe/store/models/owner' import { - composeValidators, - required, - minValue, - maxValue, - mustBeInteger, + composeValidators, required, minValue, maxValue, mustBeInteger, } from '~/components/forms/validator' import { styles } from './style' +export const ADD_OWNER_THRESHOLD_NEXT_BTN_TESTID = 'add-owner-threshold-next-btn' + type Props = { onClose: () => void, classes: Object, @@ -35,12 +32,7 @@ type Props = { } const ThresholdForm = ({ - classes, - onClose, - owners, - threshold, - onClickBack, - onSubmit, + classes, onClose, owners, threshold, onClickBack, onSubmit, }: Props) => { const handleSubmit = (values) => { onSubmit(values) @@ -58,77 +50,73 @@ const ThresholdForm = ({ - - {(...args) => { - const formState = args[2] - - return ( - - - - + + {() => ( + + + + Set the required owner confirmations: - - - - - Any transaction over any daily limit requires the confirmation of: - - - - - ( - - - {[...Array(Number(owners.size + 1))].map((x, index) => ( - - {index + 1} - - ))} - - {props.meta.error && props.meta.touched && ( - - {props.meta.error} - - )} - - )} - validate={composeValidators(required, mustBeInteger, minValue(1), maxValue(owners.size + 1))} - data-testid="threshold-select-input" - /> - - - - out of - {' '} - {owners.size + 1} - {' '} - owner(s) - - - - - - - - + - - ) - }} + + + Any transaction over any daily limit requires the confirmation of: + + + + + ( + + + {[...Array(Number(owners.size + 1))].map((x, index) => ( + + {index + 1} + + ))} + + {props.meta.error && props.meta.touched && ( + + {props.meta.error} + + )} + + )} + validate={composeValidators(required, mustBeInteger, minValue(1), maxValue(owners.size + 1))} + data-testid="threshold-select-input" + /> + + + + out of + {' '} + {owners.size + 1} + {' '} +owner(s) + + + + + + + + + + + )} ) diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 9031c686..896be266 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -30,6 +30,7 @@ import RemoveOwnerIcon from '../assets/icons/bin.svg' export const RENAME_OWNER_BTN_TESTID = 'rename-owner-btn' export const REMOVE_OWNER_BTN_TESTID = 'remove-owner-btn' +export const ADD_OWNER_BTN_TESTID = 'add-owner-btn' export const OWNERS_ROW_TESTID = 'owners-row' const controlsStyle = { @@ -172,6 +173,7 @@ class ManageOwners extends React.Component { variant="contained" color="primary" onClick={this.onShow('AddOwner')} + testId={ADD_OWNER_BTN_TESTID} > Add new owner diff --git a/src/test/safe.dom.settings.owners.test.js b/src/test/safe.dom.settings.owners.test.js index dafafe27..91da6179 100644 --- a/src/test/safe.dom.settings.owners.test.js +++ b/src/test/safe.dom.settings.owners.test.js @@ -6,11 +6,13 @@ import { renderSafeView } from '~/test/builder/safe.dom.utils' import { sleep } from '~/utils/timer' import 'jest-dom/extend-expect' import { SETTINGS_TAB_BTN_TESTID } from '~/routes/safe/components/Layout' +import { getWeb3 } from '~/logic/wallets/getWeb3' import { OWNERS_SETTINGS_TAB_TEST_ID } from '~/routes/safe/components/Settings' import { RENAME_OWNER_BTN_TESTID, OWNERS_ROW_TESTID, REMOVE_OWNER_BTN_TESTID, + ADD_OWNER_BTN_TESTID, } from '~/routes/safe/components/Settings/ManageOwners' import { RENAME_OWNER_INPUT_TESTID, @@ -19,6 +21,13 @@ import { import { REMOVE_OWNER_MODAL_NEXT_BTN_TESTID } from '~/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner' import { REMOVE_OWNER_THRESHOLD_NEXT_BTN_TESTID } from '~/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm' import { REMOVE_OWNER_REVIEW_BTN_TESTID } from '~/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/Review' +import { ADD_OWNER_THRESHOLD_NEXT_BTN_TESTID } from '~/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/ThresholdForm' +import { + ADD_OWNER_NAME_INPUT_TESTID, + ADD_OWNER_ADDRESS_INPUT_TESTID, + ADD_OWNER_NEXT_BTN_TESTID, +} from '~/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm' +import { ADD_OWNER_SUBMIT_BTN } from '~/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review' afterEach(cleanup) @@ -102,7 +111,46 @@ describe('DOM > Feature > Settings - Manage owners', () => { expect(ownerRows.length).toBe(1) }) - it('Replaces a owner', async () => {}) + it('Adds a new owner', async () => { + const NEW_OWNER_NAME = 'I am a new owner' + const NEW_OWNER_ADDRESS = (await getWeb3().eth.getAccounts())[1] - it('Adds a new owner', async () => {}) + const SafeDom = renderSafeView(store, safeAddress) + await sleep(1300) + + // Travel to settings + const settingsBtn = SafeDom.getByTestId(SETTINGS_TAB_BTN_TESTID) + fireEvent.click(settingsBtn) + await sleep(200) + + // click on owners settings + const ownersSettingsBtn = SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TEST_ID) + fireEvent.click(ownersSettingsBtn) + await sleep(200) + + // click add owner btn + fireEvent.click(SafeDom.getByTestId(ADD_OWNER_BTN_TESTID)) + await sleep(200) + + // fill and travel add owner modal + const ownerNameInput = SafeDom.getByTestId(ADD_OWNER_NAME_INPUT_TESTID) + const ownerAddressInput = SafeDom.getByTestId(ADD_OWNER_ADDRESS_INPUT_TESTID) + const nextBtn = SafeDom.getByTestId(ADD_OWNER_NEXT_BTN_TESTID) + fireEvent.change(ownerNameInput, { target: { value: NEW_OWNER_NAME } }) + fireEvent.change(ownerAddressInput, { target: { value: NEW_OWNER_ADDRESS } }) + fireEvent.click(nextBtn) + await sleep(200) + + fireEvent.click(SafeDom.getByTestId(ADD_OWNER_THRESHOLD_NEXT_BTN_TESTID)) + fireEvent.click(SafeDom.getByTestId(ADD_OWNER_SUBMIT_BTN)) + await sleep(400) + + // check if owner was added + const newOwnerRow = SafeDom.getAllByTestId(OWNERS_ROW_TESTID)[1] + + expect(newOwnerRow).toHaveTextContent(NEW_OWNER_NAME) + expect(newOwnerRow).toHaveTextContent(NEW_OWNER_ADDRESS) + }) + + it('Replaces a owner', async () => {}) }) From 1b1ff1ea3313825818e2eaffd78457fec2f31191 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 28 Jun 2019 18:50:39 +0400 Subject: [PATCH 53/71] fixed eslint errors, add test for adding owner but it fails (from interface works) TBD --- src/logic/contracts/safeContracts.js | 4 ++-- src/test/safe.dom.settings.owners.test.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/logic/contracts/safeContracts.js b/src/logic/contracts/safeContracts.js index cc4cab95..3669d257 100644 --- a/src/logic/contracts/safeContracts.js +++ b/src/logic/contracts/safeContracts.js @@ -1,9 +1,9 @@ // @flow import contract from 'truffle-contract' -import { ensureOnce } from '~/utils/singleton' -import { getWeb3 } from '~/logic/wallets/getWeb3' import GnosisSafeSol from '@gnosis.pm/safe-contracts/build/contracts/GnosisSafe.json' import ProxyFactorySol from '@gnosis.pm/safe-contracts/build/contracts/ProxyFactory.json' +import { ensureOnce } from '~/utils/singleton' +import { getWeb3 } from '~/logic/wallets/getWeb3' import { calculateGasOf, calculateGasPrice } from '~/logic/wallets/ethTransactions' import { ZERO_ADDRESS } from '~/logic/wallets/ethAddresses' diff --git a/src/test/safe.dom.settings.owners.test.js b/src/test/safe.dom.settings.owners.test.js index 91da6179..3cbbd566 100644 --- a/src/test/safe.dom.settings.owners.test.js +++ b/src/test/safe.dom.settings.owners.test.js @@ -6,7 +6,6 @@ import { renderSafeView } from '~/test/builder/safe.dom.utils' import { sleep } from '~/utils/timer' import 'jest-dom/extend-expect' import { SETTINGS_TAB_BTN_TESTID } from '~/routes/safe/components/Layout' -import { getWeb3 } from '~/logic/wallets/getWeb3' import { OWNERS_SETTINGS_TAB_TEST_ID } from '~/routes/safe/components/Settings' import { RENAME_OWNER_BTN_TESTID, @@ -113,7 +112,7 @@ describe('DOM > Feature > Settings - Manage owners', () => { it('Adds a new owner', async () => { const NEW_OWNER_NAME = 'I am a new owner' - const NEW_OWNER_ADDRESS = (await getWeb3().eth.getAccounts())[1] + const NEW_OWNER_ADDRESS = '0x0E329Fa8d6fCd1BA0cDA495431F1F7ca24F442c3' const SafeDom = renderSafeView(store, safeAddress) await sleep(1300) @@ -142,6 +141,7 @@ describe('DOM > Feature > Settings - Manage owners', () => { await sleep(200) fireEvent.click(SafeDom.getByTestId(ADD_OWNER_THRESHOLD_NEXT_BTN_TESTID)) + await sleep(200) fireEvent.click(SafeDom.getByTestId(ADD_OWNER_SUBMIT_BTN)) await sleep(400) From c909c6402094f63fd59b9b19b5653d896de6df32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 2 Jul 2019 08:57:02 +0200 Subject: [PATCH 54/71] Format imports --- src/logic/safe/utils/safeStorage.js | 2 +- src/logic/tokens/store/actions/removeToken.js | 2 +- src/logic/wallets/tokens.js | 2 +- .../RemoveOwnerModal/screens/CheckOwner/style.js | 4 +--- src/test/tokens.dom.adding.test.js | 2 +- src/test/utils/ethereumErrors.js | 2 +- src/test/utils/logTransactions.js | 9 ++++++--- src/test/utils/safeHelper.js | 2 +- 8 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/logic/safe/utils/safeStorage.js b/src/logic/safe/utils/safeStorage.js index 37a6fb27..82c45762 100644 --- a/src/logic/safe/utils/safeStorage.js +++ b/src/logic/safe/utils/safeStorage.js @@ -1,6 +1,6 @@ // @flow -import { type Owner } from '~/routes/safe/store/models/owner' import { List, Map } from 'immutable' +import { type Owner } from '~/routes/safe/store/models/owner' import { loadFromStorage, saveToStorage, removeFromStorage } from '~/utils/storage' export const SAFES_KEY = 'SAFES' diff --git a/src/logic/tokens/store/actions/removeToken.js b/src/logic/tokens/store/actions/removeToken.js index 40059789..0dedb20a 100644 --- a/src/logic/tokens/store/actions/removeToken.js +++ b/src/logic/tokens/store/actions/removeToken.js @@ -1,9 +1,9 @@ // @flow import { createAction } from 'redux-actions' +import type { Dispatch as ReduxDispatch } from 'redux' import { type Token } from '~/logic/tokens/store/model/token' import { removeTokenFromStorage, removeFromActiveTokens } from '~/logic/tokens/utils/tokensStorage' import { type GlobalState } from '~/store/index' -import type { Dispatch as ReduxDispatch } from 'redux' export const REMOVE_TOKEN = 'REMOVE_TOKEN' diff --git a/src/logic/wallets/tokens.js b/src/logic/wallets/tokens.js index 890ef840..b573f250 100644 --- a/src/logic/wallets/tokens.js +++ b/src/logic/wallets/tokens.js @@ -1,6 +1,6 @@ // @flow -import { getWeb3 } from '~/logic/wallets/getWeb3' import { BigNumber } from 'bignumber.js' +import { getWeb3 } from '~/logic/wallets/getWeb3' export const toNative = (amt: string | number | BigNumber, decimal: number): BigNumber => { const web3 = getWeb3() diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/style.js b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/style.js index d0645851..d05cc023 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/style.js +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/style.js @@ -1,7 +1,5 @@ // @flow -import { - lg, md, sm, -} from '~/theme/variables' +import { lg, md, sm } from '~/theme/variables' export const styles = () => ({ heading: { diff --git a/src/test/tokens.dom.adding.test.js b/src/test/tokens.dom.adding.test.js index a77c734a..0daf9b76 100644 --- a/src/test/tokens.dom.adding.test.js +++ b/src/test/tokens.dom.adding.test.js @@ -1,6 +1,6 @@ // @flow -import { getWeb3 } from '~/logic/wallets/getWeb3' import { fireEvent } from '@testing-library/react' +import { getWeb3 } from '~/logic/wallets/getWeb3' import { getFirstTokenContract } from '~/test/utils/tokenMovements' import { aNewStore } from '~/store' import { aMinedSafe } from '~/test/builder/safe.redux.builder' diff --git a/src/test/utils/ethereumErrors.js b/src/test/utils/ethereumErrors.js index f4f0cd43..73bf6c02 100644 --- a/src/test/utils/ethereumErrors.js +++ b/src/test/utils/ethereumErrors.js @@ -1,6 +1,6 @@ // @flow -import { getWeb3 } from '~/logic/wallets/getWeb3' import abi from 'ethereumjs-abi' +import { getWeb3 } from '~/logic/wallets/getWeb3' /* console.log(`to[${to}] \n\n valieInWei[${valueInWei}] \n\n diff --git a/src/test/utils/logTransactions.js b/src/test/utils/logTransactions.js index e76f197e..f73c4d2a 100644 --- a/src/test/utils/logTransactions.js +++ b/src/test/utils/logTransactions.js @@ -1,9 +1,9 @@ // @flow import React from 'react' -import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' -import GnoStepper from '~/components/Stepper' import Stepper from '@material-ui/core/Stepper' import TestUtils from 'react-dom/test-utils' +import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' +import GnoStepper from '~/components/Stepper' export const printOutApprove = async ( subject: string, @@ -38,7 +38,10 @@ type FinsihedTx = { finishedTransaction: boolean, } -export const whenExecuted = (SafeDom: React.Component, ParentComponent: React.ElementType): Promise => new Promise((resolve, reject) => { +export const whenExecuted = ( + SafeDom: React.Component, + ParentComponent: React.ElementType, +): Promise => new Promise((resolve, reject) => { let times = 0 const interval = setInterval(() => { if (times >= MAX_TIMES_EXECUTED) { diff --git a/src/test/utils/safeHelper.js b/src/test/utils/safeHelper.js index 6449ff9d..2e7c2b5b 100644 --- a/src/test/utils/safeHelper.js +++ b/src/test/utils/safeHelper.js @@ -1,7 +1,7 @@ // @flow +import { type Match } from 'react-router-dom' import { buildMatchPropsFrom } from '~/test/utils/buildReactRouterProps' import { safeSelector } from '~/routes/safe/store/selectors/index' -import { type Match } from 'react-router-dom' import { type GlobalState } from '~/store' import { type Safe } from '~/routes/safe/store/models/safe' From 970f7037aac9ede08f73219c6f84bbe5c6653051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 2 Jul 2019 08:59:01 +0200 Subject: [PATCH 55/71] Sort owners by name --- .../safe/components/Settings/ManageOwners/index.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 896be266..9873e76c 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -20,7 +20,7 @@ import EditOwnerModal from './EditOwnerModal' import OwnerAddressTableCell from './OwnerAddressTableCell' import type { Owner } from '~/routes/safe/store/models/owner' import { - getOwnerData, generateColumns, OWNERS_TABLE_ADDRESS_ID, type OwnerRow, + getOwnerData, generateColumns, OWNERS_TABLE_NAME_ID, OWNERS_TABLE_ADDRESS_ID, type OwnerRow, } from './dataFetcher' import { sm, boldFont } from '~/theme/variables' import { styles } from './style' @@ -123,7 +123,15 @@ class ManageOwners extends React.Component { Manage Safe Owners -
+
{(sortedData: Array) => sortedData.map((row: any, index: number) => ( {autoColumns.map((column: Column) => ( From 3f4d675e5b7b7be60bdd8be3687daa6697c34913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Wed, 3 Jul 2019 16:37:59 +0200 Subject: [PATCH 56/71] Set overflow to auto in Safes table --- src/components/layout/Table/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/layout/Table/index.jsx b/src/components/layout/Table/index.jsx index 886e9ee4..7c21f556 100644 --- a/src/components/layout/Table/index.jsx +++ b/src/components/layout/Table/index.jsx @@ -20,7 +20,7 @@ const buildWidthFrom = (size: number) => ({ }) const overflowStyle = { - overflowX: 'scroll', + overflowX: 'auto', } // see: https://css-tricks.com/responsive-data-tables/ From ce7a1ad0dfe51ce240d73629b7f2f36757e81e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Wed, 3 Jul 2019 17:00:01 +0200 Subject: [PATCH 57/71] Increment sleep times in tests --- src/test/safe.dom.settings.owners.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/safe.dom.settings.owners.test.js b/src/test/safe.dom.settings.owners.test.js index 3cbbd566..49a31ec7 100644 --- a/src/test/safe.dom.settings.owners.test.js +++ b/src/test/safe.dom.settings.owners.test.js @@ -103,7 +103,7 @@ describe('DOM > Feature > Settings - Manage owners', () => { const nextBtnStep3 = SafeDom.getByTestId(REMOVE_OWNER_REVIEW_BTN_TESTID) fireEvent.click(nextBtnStep3) - await sleep(400) + await sleep(1300) // check if owner was removed ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) @@ -143,7 +143,7 @@ describe('DOM > Feature > Settings - Manage owners', () => { fireEvent.click(SafeDom.getByTestId(ADD_OWNER_THRESHOLD_NEXT_BTN_TESTID)) await sleep(200) fireEvent.click(SafeDom.getByTestId(ADD_OWNER_SUBMIT_BTN)) - await sleep(400) + await sleep(1000) // check if owner was added const newOwnerRow = SafeDom.getAllByTestId(OWNERS_ROW_TESTID)[1] From 89dbe7895a2475c1281395d158f4492862703ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Wed, 3 Jul 2019 17:25:47 +0200 Subject: [PATCH 58/71] Update dependencies --- package.json | 22 +-- yarn.lock | 454 ++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 367 insertions(+), 109 deletions(-) diff --git a/package.json b/package.json index 3b840efa..13f26c75 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "react-dom": "^16.8.6", "react-final-form": "6.3.0", "react-final-form-listeners": "^1.0.2", - "react-hot-loader": "4.11.1", + "react-hot-loader": "4.12.3", "react-infinite-scroll-component": "^4.5.2", "react-redux": "7.1.0", "react-router-dom": "^4.3.1", @@ -61,9 +61,9 @@ "web3": "1.0.0-beta.37" }, "devDependencies": { - "@babel/cli": "7.4.4", - "@babel/core": "7.4.5", - "@babel/plugin-proposal-class-properties": "7.4.4", + "@babel/cli": "7.5.0", + "@babel/core": "7.5.0", + "@babel/plugin-proposal-class-properties": "7.5.0", "@babel/plugin-proposal-decorators": "7.4.4", "@babel/plugin-proposal-do-expressions": "^7.0.0", "@babel/plugin-proposal-export-default-from": "^7.0.0", @@ -82,7 +82,7 @@ "@babel/plugin-transform-member-expression-literals": "^7.2.0", "@babel/plugin-transform-property-literals": "^7.2.0", "@babel/polyfill": "7.4.4", - "@babel/preset-env": "7.4.5", + "@babel/preset-env": "7.5.0", "@babel/preset-flow": "^7.0.0-beta.40", "@babel/preset-react": "^7.0.0-beta.40", "@sambego/storybook-state": "^1.0.7", @@ -106,14 +106,14 @@ "eslint-config-airbnb": "^17.1.0", "eslint-plugin-flowtype": "3.11.1", "eslint-plugin-import": "2.18.0", - "eslint-plugin-jest": "22.7.1", + "eslint-plugin-jest": "22.7.2", "eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-react": "7.14.2", "ethereumjs-abi": "^0.6.7", "extract-text-webpack-plugin": "^4.0.0-beta.0", "file-loader": "4.0.0", "flow-bin": "0.102.0", - "fs-extra": "8.0.1", + "fs-extra": "8.1.0", "html-loader": "^0.5.5", "html-webpack-plugin": "^3.0.4", "jest": "24.8.0", @@ -129,11 +129,11 @@ "storybook-host": "^5.0.3", "storybook-router": "^0.3.3", "style-loader": "^0.23.1", - "truffle": "5.0.24", - "truffle-contract": "4.0.21", - "truffle-solidity-loader": "0.1.23", + "truffle": "5.0.26", + "truffle-contract": "4.0.23", + "truffle-solidity-loader": "0.1.25", "uglifyjs-webpack-plugin": "2.1.3", - "webpack": "4.35.0", + "webpack": "4.35.2", "webpack-bundle-analyzer": "3.3.2", "webpack-cli": "3.3.5", "webpack-dev-server": "3.7.2", diff --git a/yarn.lock b/yarn.lock index 39959f66..27566875 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@babel/cli@7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.4.4.tgz#5454bb7112f29026a4069d8e6f0e1794e651966c" - integrity sha512-XGr5YjQSjgTa6OzQZY57FAJsdeVSAKR/u/KA5exWIz66IKtv/zXtHy+fIZcMry/EgYegwuHE7vzGnrFhjdIAsQ== +"@babel/cli@7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.5.0.tgz#f403c930692e28ecfa3bf02a9e7562b474f38271" + integrity sha512-qNH55fWbKrEsCwID+Qc/3JDPnsSGpIIiMDbppnR8Z6PxLAqMQCFNqBctkIkBrMH49Nx+qqVTrHRWUR+ho2k+qQ== dependencies: commander "^2.8.1" convert-source-map "^1.1.0" @@ -46,7 +46,27 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@7.4.5", "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.4.3": +"@babel/core@7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.0.tgz#6ed6a2881ad48a732c5433096d96d1b0ee5eb734" + integrity sha512-6Isr4X98pwXqHvtigw71CKgmhL1etZjPs5A67jL/w0TkLM9eqmFR40YrnJvEc1WnMZFsskjsmid8bHZyxKEAnw== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.5.0" + "@babel/helpers" "^7.5.0" + "@babel/parser" "^7.5.0" + "@babel/template" "^7.4.4" + "@babel/traverse" "^7.5.0" + "@babel/types" "^7.5.0" + convert-source-map "^1.1.0" + debug "^4.1.0" + json5 "^2.1.0" + lodash "^4.17.11" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.4.3": version "7.4.5" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.5.tgz#081f97e8ffca65a9b4b0fdc7e274e703f000c06a" integrity sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA== @@ -77,6 +97,17 @@ source-map "^0.5.0" trim-right "^1.0.1" +"@babel/generator@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.0.tgz#f20e4b7a91750ee8b63656073d843d2a736dca4a" + integrity sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA== + dependencies: + "@babel/types" "^7.5.0" + jsesc "^2.5.1" + lodash "^4.17.11" + source-map "^0.5.0" + trim-right "^1.0.1" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -121,6 +152,18 @@ "@babel/helper-replace-supers" "^7.4.4" "@babel/helper-split-export-declaration" "^7.4.4" +"@babel/helper-create-class-features-plugin@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.0.tgz#02edb97f512d44ba23b3227f1bf2ed43454edac5" + integrity sha512-EAoMc3hE5vE5LNhMqDOwB1usHvmRjCDAnH8CD4PVkX9/Yr3W/tcz8xE8QvdZxfsFBDICwZnF2UTHIqslRpvxmA== + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.4.4" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/helper-define-map@^7.4.0", "@babel/helper-define-map@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz#6969d1f570b46bdc900d1eba8e5d59c48ba2c12a" @@ -261,6 +304,15 @@ "@babel/traverse" "^7.4.4" "@babel/types" "^7.4.4" +"@babel/helpers@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.5.0.tgz#7f0c17666e7ed8355ed6eff643dde12fb681ddb4" + integrity sha512-EgCUEa8cNwuMrwo87l2d7i2oShi8m2Q58H7h3t4TWtqATZalJYFwfL9DulRe02f3KdqM9xmMCw3v/7Ll+EiaWg== + dependencies: + "@babel/template" "^7.4.4" + "@babel/traverse" "^7.5.0" + "@babel/types" "^7.5.0" + "@babel/highlight@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" @@ -275,6 +327,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.5.tgz#04af8d5d5a2b044a2a1bffacc1e5e6673544e872" integrity sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew== +"@babel/parser@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.0.tgz#3e0713dff89ad6ae37faec3b29dcfc5c979770b7" + integrity sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA== + "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" @@ -292,7 +349,15 @@ "@babel/helper-create-class-features-plugin" "^7.4.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-proposal-class-properties@7.4.4", "@babel/plugin-proposal-class-properties@^7.3.3": +"@babel/plugin-proposal-class-properties@7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.0.tgz#5bc6a0537d286fcb4fd4e89975adbca334987007" + integrity sha512-9L/JfPCT+kShiiTTzcnBJ8cOwdKVmlC1RcCf9F0F9tERVrM4iWtWnXtjWCRqNm2la2BxO1MPArWNsU9zsSJWSQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.5.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-proposal-class-properties@^7.3.3": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.4.tgz#93a6486eed86d53452ab9bab35e368e9461198ce" integrity sha512-WjKTI8g8d5w1Bc9zgwSz2nfrsNQsXcCf9J9cdCvrJV6RF56yztwm4TmJC0MgJ9tvwO9gUA/mcYe89bLdGfiXFg== @@ -326,6 +391,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-do-expressions" "^7.2.0" +"@babel/plugin-proposal-dynamic-import@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz#e532202db4838723691b10a67b8ce509e397c506" + integrity sha512-x/iMjggsKTFHYC6g11PL7Qy58IK8H5zqfm9e6hu4z1iH2IRyAp9u9dL80zA6R76yFovETFLKz2VJIC2iIPBuFw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-dynamic-import" "^7.2.0" + "@babel/plugin-proposal-export-default-from@^7.0.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.2.0.tgz#737b0da44b9254b6152fe29bb99c64e5691f6f68" @@ -407,6 +480,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" +"@babel/plugin-proposal-object-rest-spread@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.0.tgz#4838ce3cbc9a84dd00bce7a17e9e9c36119f83a0" + integrity sha512-G1qy5EdcO3vYhbxlXjRSR2SXB8GsxYv9hoRKT1Jdn3qy/NUnFqUUnqymKZ00Pbj+3FXNh06B+BUZzecrp3sxNw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + "@babel/plugin-proposal-optional-catch-binding@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" @@ -611,6 +692,15 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-remap-async-to-generator" "^7.1.0" +"@babel/plugin-transform-async-to-generator@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz#89a3848a0166623b5bc481164b5936ab947e887e" + integrity sha512-mqvkzwIGkq0bEF1zLRRiTdjfomZJDV33AH3oQzHVGkI2VzEmXLpKKOBvEVaFZBJdN0XTyH38s9j/Kiqr68dggg== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + "@babel/plugin-transform-block-scoped-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" @@ -675,6 +765,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-transform-destructuring@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.5.0.tgz#f6c09fdfe3f94516ff074fe877db7bc9ef05855a" + integrity sha512-YbYgbd3TryYYLGyC7ZR+Tq8H/+bCmwoaxHfJHupom5ECstzbRLTch6gOQbhEY9Z4hiCNHEURgq06ykFv9JZ/QQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-dotall-regex@^7.4.3", "@babel/plugin-transform-dotall-regex@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz#361a148bc951444312c69446d76ed1ea8e4450c3" @@ -691,6 +788,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-transform-duplicate-keys@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.5.0.tgz#c5dbf5106bf84cdf691222c0974c12b1df931853" + integrity sha512-igcziksHizyQPlX9gfSjHkE2wmoCH3evvD2qR5w29/Dk0SMKE/eOI7f1HhBdNhR/zxJDqrgpoDTq5YSLH/XMsQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-exponentiation-operator@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" @@ -752,6 +856,15 @@ "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-transform-modules-amd@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.5.0.tgz#ef00435d46da0a5961aa728a1d2ecff063e4fb91" + integrity sha512-n20UsQMKnWrltocZZm24cRURxQnWIvsABPJlw/fvoy9c6AgHZzoelAIzajDHAQrDpuKFFPPcFGd7ChsYuIUMpg== + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + babel-plugin-dynamic-import-node "^2.3.0" + "@babel/plugin-transform-modules-commonjs@^7.4.3", "@babel/plugin-transform-modules-commonjs@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz#0bef4713d30f1d78c2e59b3d6db40e60192cac1e" @@ -761,6 +874,16 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" +"@babel/plugin-transform-modules-commonjs@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.5.0.tgz#425127e6045231360858eeaa47a71d75eded7a74" + integrity sha512-xmHq0B+ytyrWJvQTc5OWAC4ii6Dhr0s22STOoydokG51JjWhyYo5mRPXoi+ZmtHQhZZwuXNN+GG5jy5UZZJxIQ== + dependencies: + "@babel/helper-module-transforms" "^7.4.4" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + babel-plugin-dynamic-import-node "^2.3.0" + "@babel/plugin-transform-modules-systemjs@^7.4.0", "@babel/plugin-transform-modules-systemjs@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.4.tgz#dc83c5665b07d6c2a7b224c00ac63659ea36a405" @@ -769,6 +892,15 @@ "@babel/helper-hoist-variables" "^7.4.4" "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-transform-modules-systemjs@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.5.0.tgz#e75266a13ef94202db2a0620977756f51d52d249" + integrity sha512-Q2m56tyoQWmuNGxEtUyeEkm6qJYFqs4c+XyXH5RAuYxObRNz9Zgj/1g2GMnjYp2EUyEy7YTrxliGCXzecl/vJg== + dependencies: + "@babel/helper-hoist-variables" "^7.4.4" + "@babel/helper-plugin-utils" "^7.0.0" + babel-plugin-dynamic-import-node "^2.3.0" + "@babel/plugin-transform-modules-umd@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" @@ -995,7 +1127,63 @@ js-levenshtein "^1.1.3" semver "^5.5.0" -"@babel/preset-env@7.4.5", "@babel/preset-env@^7.4.3", "@babel/preset-env@^7.4.5": +"@babel/preset-env@7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.5.0.tgz#1122a751e864850b4dbce38bd9b4497840ee6f01" + integrity sha512-/5oQ7cYg+6sH9Dt9yx5IiylnLPiUdyMHl5y+K0mKVNiW2wJ7FpU5bg8jKcT8PcCbxdYzfv6OuC63jLEtMuRSmQ== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-async-generator-functions" "^7.2.0" + "@babel/plugin-proposal-dynamic-import" "^7.5.0" + "@babel/plugin-proposal-json-strings" "^7.2.0" + "@babel/plugin-proposal-object-rest-spread" "^7.5.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-syntax-async-generators" "^7.2.0" + "@babel/plugin-syntax-dynamic-import" "^7.2.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + "@babel/plugin-transform-arrow-functions" "^7.2.0" + "@babel/plugin-transform-async-to-generator" "^7.5.0" + "@babel/plugin-transform-block-scoped-functions" "^7.2.0" + "@babel/plugin-transform-block-scoping" "^7.4.4" + "@babel/plugin-transform-classes" "^7.4.4" + "@babel/plugin-transform-computed-properties" "^7.2.0" + "@babel/plugin-transform-destructuring" "^7.5.0" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/plugin-transform-duplicate-keys" "^7.5.0" + "@babel/plugin-transform-exponentiation-operator" "^7.2.0" + "@babel/plugin-transform-for-of" "^7.4.4" + "@babel/plugin-transform-function-name" "^7.4.4" + "@babel/plugin-transform-literals" "^7.2.0" + "@babel/plugin-transform-member-expression-literals" "^7.2.0" + "@babel/plugin-transform-modules-amd" "^7.5.0" + "@babel/plugin-transform-modules-commonjs" "^7.5.0" + "@babel/plugin-transform-modules-systemjs" "^7.5.0" + "@babel/plugin-transform-modules-umd" "^7.2.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.4.5" + "@babel/plugin-transform-new-target" "^7.4.4" + "@babel/plugin-transform-object-super" "^7.2.0" + "@babel/plugin-transform-parameters" "^7.4.4" + "@babel/plugin-transform-property-literals" "^7.2.0" + "@babel/plugin-transform-regenerator" "^7.4.5" + "@babel/plugin-transform-reserved-words" "^7.2.0" + "@babel/plugin-transform-shorthand-properties" "^7.2.0" + "@babel/plugin-transform-spread" "^7.2.0" + "@babel/plugin-transform-sticky-regex" "^7.2.0" + "@babel/plugin-transform-template-literals" "^7.4.4" + "@babel/plugin-transform-typeof-symbol" "^7.2.0" + "@babel/plugin-transform-unicode-regex" "^7.4.4" + "@babel/types" "^7.5.0" + browserslist "^4.6.0" + core-js-compat "^3.1.1" + invariant "^2.2.2" + js-levenshtein "^1.1.3" + semver "^5.5.0" + +"@babel/preset-env@^7.4.3", "@babel/preset-env@^7.4.5": version "7.4.5" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.4.5.tgz#2fad7f62983d5af563b5f3139242755884998a58" integrity sha512-f2yNVXM+FsR5V8UwcFeIHzHWgnhXg3NpRmy0ADvALpnhB0SLbCvrCRr4BLOUYbQNLS+Z0Yer46x9dJXpXewI7w== @@ -1129,6 +1317,21 @@ globals "^11.1.0" lodash "^4.17.11" +"@babel/traverse@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.0.tgz#4216d6586854ef5c3c4592dab56ec7eb78485485" + integrity sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.5.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.5.0" + "@babel/types" "^7.5.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.11" + "@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.4.tgz#8db9e9a629bb7c29370009b4b779ed93fe57d5f0" @@ -1138,6 +1341,15 @@ lodash "^4.17.11" to-fast-properties "^2.0.0" +"@babel/types@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.0.tgz#e47d43840c2e7f9105bc4d3a2c371b4d0c7832ab" + integrity sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ== + dependencies: + esutils "^2.0.2" + lodash "^4.17.11" + to-fast-properties "^2.0.0" + "@cnakazawa/watch@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" @@ -3316,7 +3528,7 @@ babel-plugin-dynamic-import-node@2.2.0: dependencies: object.assign "^4.1.0" -babel-plugin-dynamic-import-node@^2.2.0: +babel-plugin-dynamic-import-node@^2.2.0, babel-plugin-dynamic-import-node@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ== @@ -6535,10 +6747,10 @@ eslint-plugin-import@2.18.0: read-pkg-up "^2.0.0" resolve "^1.11.0" -eslint-plugin-jest@22.7.1: - version "22.7.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.7.1.tgz#5dcdf8f7a285f98040378220d6beca581f0ab2a1" - integrity sha512-CrT3AzA738neimv8G8iK2HCkrCwHnAJeeo7k5TEHK86VMItKl6zdJT/tHBDImfnVVAYsVs4Y6BUdBZQCCgfiyw== +eslint-plugin-jest@22.7.2: + version "22.7.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.7.2.tgz#7ab118a66a34e46ae5e16a128b5d24fd28b43dca" + integrity sha512-Aecqe3ulBVI7amgOycVI8ZPL8o0SnGHOf3zn2/Ciu8TXyXDHcjtwD3hOs3ss/Qh/VAwlW/DMcuiXg5btgF+XMA== eslint-plugin-jsx-a11y@^6.0.3: version "6.2.1" @@ -7768,12 +7980,12 @@ fs-extra@6.0.1, fs-extra@^6.0.1: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@8.0.1, fs-extra@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.0.1.tgz#90294081f978b1f182f347a440a209154344285b" - integrity sha512-W+XLrggcDzlle47X/XnS7FXrXu9sDo+Ze9zpndeBxdgv88FHLm1HtmkhEwavruS6koanBjp098rUpHs65EmG7A== +fs-extra@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== dependencies: - graceful-fs "^4.1.2" + graceful-fs "^4.2.0" jsonfile "^4.0.0" universalify "^0.1.0" @@ -7824,6 +8036,15 @@ fs-extra@^7.0.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.0.1.tgz#90294081f978b1f182f347a440a209154344285b" + integrity sha512-W+XLrggcDzlle47X/XnS7FXrXu9sDo+Ze9zpndeBxdgv88FHLm1HtmkhEwavruS6koanBjp098rUpHs65EmG7A== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-minipass@^1.2.5: version "1.2.6" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07" @@ -8258,6 +8479,11 @@ graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1. resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== +graceful-fs@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" + integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== + "graceful-readlink@>= 1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" @@ -13320,10 +13546,10 @@ react-helmet-async@^1.0.2: react-fast-compare "2.0.4" shallowequal "1.1.0" -react-hot-loader@4.11.1: - version "4.11.1" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.11.1.tgz#2cabbd0f1c8a44c28837b86d6ce28521e6d9a8ac" - integrity sha512-HAC0UedYzM3mD+ZaQHesntFO0yi2ftOV4ZMMRTj43E4GvW5sQqYTPvur+6J7EaH3MDr/RqjDKXyCqKepV8+y7w== +react-hot-loader@4.12.3: + version "4.12.3" + resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.3.tgz#0972255cd110a00860902e82bb2b789a262cfe01" + integrity sha512-XBhxogFOxEh8L4Ykdk2mp704Xc/eoy+bwadEYMvmBhjAz3wg+DfMpINMkA+kLTRDinqwjssDfA9DhUJznRjvuA== dependencies: fast-levenshtein "^2.0.6" global "^4.3.0" @@ -13987,7 +14213,7 @@ request-promise-core@1.1.2: dependencies: lodash "^4.17.11" -request-promise-native@^1.0.5: +request-promise-native@^1.0.5, request-promise-native@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.7.tgz#a49868a624bdea5069f1251d0a836e0d89aa2c59" integrity sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w== @@ -15729,10 +15955,10 @@ truffle-artifactor@^2.1.2: truffle-contract "^2.0.3" truffle-contract-schema "^0.0.5" -truffle-artifactor@^4.0.20: - version "4.0.20" - resolved "https://registry.yarnpkg.com/truffle-artifactor/-/truffle-artifactor-4.0.20.tgz#1baba681f407485fda7c408976ce0ad31a13d5ac" - integrity sha512-IX+KvGNPkDQlMW1+9txYYn1+6IkvLPFiIh+hIjj2E7yYg9XS3zYxYbWg/wTcGyZsdtHwRVLOks7EvA0k+5LD1w== +truffle-artifactor@^4.0.22: + version "4.0.22" + resolved "https://registry.yarnpkg.com/truffle-artifactor/-/truffle-artifactor-4.0.22.tgz#3ca2061842ac0803b83538a11126fd2d8480d4e6" + integrity sha512-jqgLahO/29TnWvBZAj9Vo58LUs82fR5FcPvof5sy8q+b4y/nRc+v4cOWFYIZPkLo8sRRotN/U0T17S7CyrR9wQ== dependencies: fs-extra "6.0.1" lodash "4.17.11" @@ -15755,15 +15981,16 @@ truffle-blockchain-utils@^0.0.5: resolved "https://registry.yarnpkg.com/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.5.tgz#a4e5c064dadd69f782a137f3d276d21095da7a47" integrity sha1-pOXAZNrdafeCoTfz0nbSEJXaekc= -truffle-box@^1.0.28: - version "1.0.28" - resolved "https://registry.yarnpkg.com/truffle-box/-/truffle-box-1.0.28.tgz#da117d387db4048e2e556080739a60e446f71dda" - integrity sha512-mOmo2EdB0gUcV84pB6xPPhTsycLjjjz90kSd4V47IqJhx6dDSx6jEs/wBDNcA0gcEVf54x1IcuBgvnPZhH0wXw== +truffle-box@^1.0.29: + version "1.0.29" + resolved "https://registry.yarnpkg.com/truffle-box/-/truffle-box-1.0.29.tgz#dd785925541f2bb024e0fe34276d1f53af6546e6" + integrity sha512-QdhEIAae+Jdf/QvheOFrz0gVaR09Sy9Q36FG2lCJVmrA0hxTT+JWJxQ7EXn3CyZD03KGy8ORUHyDAJX8bX/QUA== dependencies: fs-extra "6.0.1" github-download "^0.5.0" ora "^3.0.0" request "^2.85.0" + request-promise-native "^1.0.7" tmp "0.0.33" truffle-config "^1.1.13" vcsurl "^0.1.1" @@ -15773,25 +16000,25 @@ truffle-code-utils@^1.2.4: resolved "https://registry.yarnpkg.com/truffle-code-utils/-/truffle-code-utils-1.2.4.tgz#19acbc225a5c99081c7aa4bbda122f6fbf2d27e9" integrity sha512-MtIusUMxJeJlOqoqda4DYJ86gqSGDVMGiqhVEVgHL2J5L4plci/uePgYROajklXE9H/g6u7yotnAKOhCdTB9/A== -truffle-compile-vyper@^1.0.18: - version "1.0.18" - resolved "https://registry.yarnpkg.com/truffle-compile-vyper/-/truffle-compile-vyper-1.0.18.tgz#f9ed4c4141a76edfd1b32f6fd87eb95cd96495d3" - integrity sha512-MAsmYqY0eFklYtG3IBtBqlT0sibyq2yox2T356R1XGh/KpsFC1AbjyxsSTBL+pzpSb0ro3Fd2qZkluS1sSoijg== +truffle-compile-vyper@^1.0.20: + version "1.0.20" + resolved "https://registry.yarnpkg.com/truffle-compile-vyper/-/truffle-compile-vyper-1.0.20.tgz#3984ffb17ca2bc9a4f207e1d930d0a27e22ff9f6" + integrity sha512-LkF+puWaSg+1AjMl/hWrQS2DlbrB3rDuN3Ap974gXTwagLUDc4yvmN6luQ3Wd5Irn89ugX6lYrzXaETfrEsD+Q== dependencies: async "2.6.1" colors "^1.1.2" eslint "^5.5.0" minimatch "^3.0.4" - truffle-compile "^4.1.1" + truffle-compile "^4.1.3" -truffle-compile@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/truffle-compile/-/truffle-compile-4.1.1.tgz#581a3a6b851282b17ba010b141b8c1f5c9667420" - integrity sha512-b4XTcK2L/nb11ekeZy3Q4cx0DRaoqrZ4UQfd0cp6CXq3IVqMuEF+lNXjHnu+tIbzhMN2Zov1xV5DtoJC3vOJmw== +truffle-compile@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/truffle-compile/-/truffle-compile-4.1.3.tgz#698a650d27b961b12e0594c078ec870a931eafde" + integrity sha512-pCMhw3r5+M9RNe37/Hvzjk8FrOvTXm3qpuGufynQCMWYcsOwLPyLrMRmgtTWL5sABP42JuNpM4xrfBDqatmv6Q== dependencies: - async "2.6.1" colors "^1.1.2" debug "^4.1.0" + fs-extra "^8.0.1" ora "^3.0.0" original-require "^1.0.1" request "^2.85.0" @@ -15800,7 +16027,7 @@ truffle-compile@^4.1.1: semver "^5.6.0" solc "^0.5.0" truffle-config "^1.1.13" - truffle-contract-sources "^0.1.4" + truffle-contract-sources "^0.1.5" truffle-error "^0.0.5" truffle-expect "^0.0.9" @@ -15841,10 +16068,10 @@ truffle-contract-schema@^3.0.11: crypto-js "^3.1.9-1" debug "^4.1.0" -truffle-contract-sources@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/truffle-contract-sources/-/truffle-contract-sources-0.1.4.tgz#bc6dacfe8a3744e00dc9238e11e70d8951c4c7b1" - integrity sha512-Evi9UEaOYz99XVkl11rrlAR6lho0rZzByEoqpdbPPku+z0ONeyqXls3fKoTtwp7Zrus4ihJKS/AIiQOSm93ccA== +truffle-contract-sources@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/truffle-contract-sources/-/truffle-contract-sources-0.1.5.tgz#cacd788b7904d53747fa88d04412b77a1826b46f" + integrity sha512-skhZ8s3sLM4PyRFqn8zbBWG2z1P5zX7ndQPYokr2aiez8o44x5hmUoPeiXgKlMYIyR1Y1zOyNpaVEZyBY1+4Cw== dependencies: debug "^4.1.0" glob "^7.1.2" @@ -15865,10 +16092,10 @@ truffle-contract@4.0.0-next.0: web3-eth-abi "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -truffle-contract@4.0.21, truffle-contract@^4.0.21: - version "4.0.21" - resolved "https://registry.yarnpkg.com/truffle-contract/-/truffle-contract-4.0.21.tgz#aa336764d9712346ee1914b383b43a57f6ff3962" - integrity sha512-nFoEYDCyDihw3eDC7aHSJcNVP7WQbKl0N8umxXS5gAb3AujlNeV0OCV5lbAMMY4KwyfwaZp+uVjLnK/AnuSbww== +truffle-contract@4.0.23, truffle-contract@^4.0.23: + version "4.0.23" + resolved "https://registry.yarnpkg.com/truffle-contract/-/truffle-contract-4.0.23.tgz#a1e5a83972552bf81e879323eb1990970496db9f" + integrity sha512-aTiKSRoum01n9G77ESAqRvCoK8S5FBjNdN1NKkibAUfcdZTIm2VmFcmW702nKGX8hMAU+pSY3cXNaI8VhIdAfQ== dependencies: bignumber.js "^7.2.1" ethers "^4.0.0-beta.1" @@ -15891,10 +16118,10 @@ truffle-contract@^2.0.3: truffle-contract-schema "^0.0.5" web3 "^0.20.1" -truffle-core@^5.0.24: - version "5.0.24" - resolved "https://registry.yarnpkg.com/truffle-core/-/truffle-core-5.0.24.tgz#80e6694032411aca6d98c0f4e38d49143df25a5c" - integrity sha512-rAjOUZnfGBivlwvkM2EyzL3tQJAqyDq/5IVgwR4LkM/dlYi5ZeIjA7Jj8LiUwtlmUiuYJi0R6bpk/cTjtJFaJQ== +truffle-core@^5.0.26: + version "5.0.26" + resolved "https://registry.yarnpkg.com/truffle-core/-/truffle-core-5.0.26.tgz#d9ee01bf62dca5d8c1c48825547de93ef5637e44" + integrity sha512-ylli1AcILbCFwuzXCjEdDyQCaGURKcQmYXNwuQqDhccFM2MbB+vohNXyoXHI5rT4SzIkaLfn7a4MaJEsGZXcbA== dependencies: app-module-path "^2.2.0" async "2.6.1" @@ -15923,26 +16150,26 @@ truffle-core@^5.0.24: source-map-support "^0.5.3" spawn-args "^0.1.0" temp "^0.8.3" - truffle-artifactor "^4.0.20" - truffle-box "^1.0.28" - truffle-compile "^4.1.1" + truffle-artifactor "^4.0.22" + truffle-box "^1.0.29" + truffle-compile "^4.1.3" truffle-config "^1.1.13" - truffle-contract "^4.0.21" - truffle-contract-sources "^0.1.4" + truffle-contract "^4.0.23" + truffle-contract-sources "^0.1.5" truffle-debug-utils "^1.0.18" - truffle-debugger "^5.0.16" - truffle-deployer "^3.0.22" + truffle-debugger "^5.0.18" + truffle-deployer "^3.0.24" truffle-error "^0.0.5" truffle-expect "^0.0.9" truffle-init "^1.0.7" truffle-interface-adapter "^0.1.6" - truffle-migrate "^3.0.22" + truffle-migrate "^3.0.24" truffle-provider "^0.1.10" truffle-provisioner "^0.1.5" truffle-require "^2.0.13" truffle-resolver "^5.0.14" truffle-solidity-utils "^1.2.3" - truffle-workflow-compile "^2.0.20" + truffle-workflow-compile "^2.0.22" universal-analytics "^0.4.17" web3 "1.0.0-beta.37" xregexp "^4.2.4" @@ -15957,10 +16184,10 @@ truffle-debug-utils@^1.0.18: debug "^4.1.0" node-dir "0.1.17" -truffle-debugger@^5.0.16: - version "5.0.16" - resolved "https://registry.yarnpkg.com/truffle-debugger/-/truffle-debugger-5.0.16.tgz#b2b42609357c127479b617be6c1fb410374d8789" - integrity sha512-aeCRZPmowbFm8D0s8/e+FQPhStxcGpsEnZ2B446GHhSB+Y04fcqohOQqyPDXyua2P1nkLfuxhWBxFW2qgr23ig== +truffle-debugger@^5.0.18: + version "5.0.18" + resolved "https://registry.yarnpkg.com/truffle-debugger/-/truffle-debugger-5.0.18.tgz#0b7162ffc983188eabac046c595cfead0cad7fb5" + integrity sha512-5gtnUpx0HlY5J2W8BS9M4kO9KI392uk//cGBgKWsX6BuevS1Q8f4tiKwOr5yIIkPNt7Ua1ksU0O9N9cz29TpDw== dependencies: bn.js "^4.11.8" debug "^4.1.0" @@ -15973,7 +16200,7 @@ truffle-debugger@^5.0.16: reselect-tree "^1.3.1" truffle-code-utils "^1.2.4" truffle-decode-utils "^1.0.14" - truffle-decoder "^3.0.5" + truffle-decoder "^3.0.6" truffle-expect "^0.0.9" truffle-solidity-utils "^1.2.3" web3 "1.0.0-beta.37" @@ -15990,10 +16217,10 @@ truffle-decode-utils@^1.0.14: web3 "1.0.0-beta.37" web3-eth-abi "1.0.0-beta.52" -truffle-decoder@^3.0.5: - version "3.0.5" - resolved "https://registry.yarnpkg.com/truffle-decoder/-/truffle-decoder-3.0.5.tgz#78d106eb50a3f032da963e0059a802bebafe618a" - integrity sha512-lY1ls6Hht9NK/UAzNYh9bfx5fDPBe7DvJGTwYm4TehwpaCsz67xTMrYN/Fr+6qFSxXXQ0lSW3X0VRQcbD5CDlA== +truffle-decoder@^3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/truffle-decoder/-/truffle-decoder-3.0.6.tgz#81f2a79b3e9b7d8f481aa624a848fedfa465548f" + integrity sha512-+oTTnymkCs/CClbk7xZCE2Im/2a26p0NRLFIhGghU3W25KxS6h810eeL+PHgtkNTCnbRbd/KNJaVS68j8u1IJg== dependencies: abi-decoder "^1.2.0" async-eventemitter "^0.2.4" @@ -16003,15 +16230,16 @@ truffle-decoder@^3.0.5: lodash.isequal "^4.5.0" lodash.merge "^4.6.1" truffle-decode-utils "^1.0.14" + utf8 "^3.0.0" web3 "1.0.0-beta.37" -truffle-deployer@^3.0.22: - version "3.0.22" - resolved "https://registry.yarnpkg.com/truffle-deployer/-/truffle-deployer-3.0.22.tgz#6b779241208a6a8180041e9c0b0e6cc408803e17" - integrity sha512-5XmwBU/53xnVzOMAS3gjhdQAxRKRcy/rwUiqg0Fr5YMncqKj/gRfQvaJxav8k1GWPz7Cxjh7Yc7dC4HPd9sZjA== +truffle-deployer@^3.0.24: + version "3.0.24" + resolved "https://registry.yarnpkg.com/truffle-deployer/-/truffle-deployer-3.0.24.tgz#7c8fb6110018babee86911093d5949d45bf51704" + integrity sha512-1CoUsG0J8eVGS+aG6+c/r4Bf9YV4G+jVcKINDA438mJMNoDW7QgKCRU4qRGki1v4KlfnlhRVp0JfRuRVQvqQCQ== dependencies: emittery "^0.4.0" - truffle-contract "^4.0.21" + truffle-contract "^4.0.23" truffle-expect "^0.0.9" truffle-error@^0.0.3: @@ -16070,16 +16298,16 @@ truffle-interface-adapter@^0.1.6: bn.js "^4.11.8" web3 "1.0.0-beta.37" -truffle-migrate@^3.0.22: - version "3.0.22" - resolved "https://registry.yarnpkg.com/truffle-migrate/-/truffle-migrate-3.0.22.tgz#6f66f9b79c57d69f09cf17ee39bedb1506479c1e" - integrity sha512-saTphMwl8oG95N3HqYettzkh7jjLfBR/Z40Pp087OL84YbqGpLxGXzfW6vF37IRs0UZfE0Ip0Py5VFIXRdgvmw== +truffle-migrate@^3.0.24: + version "3.0.24" + resolved "https://registry.yarnpkg.com/truffle-migrate/-/truffle-migrate-3.0.24.tgz#205e16aea91eca597e84d2f952c1dbda6367c685" + integrity sha512-0NekMBRC058Lk6PpJx7kCaBGVgOgM997tThRTL5brBb/oQg6wDOgPucChQEsKol07eqZ6BAfkXVyL9RkkFW+ow== dependencies: async "2.6.1" emittery "^0.4.0" node-dir "0.1.17" truffle-config "^1.1.13" - truffle-deployer "^3.0.22" + truffle-deployer "^3.0.24" truffle-expect "^0.0.9" truffle-interface-adapter "^0.1.6" truffle-reporters "^1.0.10" @@ -16131,41 +16359,41 @@ truffle-resolver@^5.0.14: truffle-expect "^0.0.9" truffle-provisioner "^0.1.5" -truffle-solidity-loader@0.1.23: - version "0.1.23" - resolved "https://registry.yarnpkg.com/truffle-solidity-loader/-/truffle-solidity-loader-0.1.23.tgz#b94ced7b412f8760468fc5e8ea6a6c6c86628a2c" - integrity sha512-AT83a1pqu8XSVa9NttTOVjDqCuwGFEVEUSjKKMxeKSorlK8tZqlipAe5GHs2lTZ1ffnRgGBFgPUrfiSr9tQp+w== +truffle-solidity-loader@0.1.25: + version "0.1.25" + resolved "https://registry.yarnpkg.com/truffle-solidity-loader/-/truffle-solidity-loader-0.1.25.tgz#458c5219e0ba5099a9a99f85a73607e7557ad6f3" + integrity sha512-5TgUk5w7fo+MKGDFyFmIt1icQxCXbqwRk0WeYDB5Xizr/PUbVW37scTfdv38cSgI2FJ7eZyvLsKE6zAa78hFCw== dependencies: chalk "^1.1.3" find-up "^1.1.2" loader-utils "^1.1.0" schema-utils "^1.0.0" truffle-config "^1.1.13" - truffle-core "^5.0.24" + truffle-core "^5.0.26" truffle-solidity-utils@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/truffle-solidity-utils/-/truffle-solidity-utils-1.2.3.tgz#9e83c80fe5eeac1b9587f227af57e3feee5e183c" integrity sha512-Rf9KLx8BFTX6/1jxKuzWC5AegSMTN9uxLIKWP38oBAxHq/ilD64W+W5eyEqBxAXUYlAABj9jpOg4Pn5NRYtxOg== -truffle-workflow-compile@^2.0.20: - version "2.0.20" - resolved "https://registry.yarnpkg.com/truffle-workflow-compile/-/truffle-workflow-compile-2.0.20.tgz#2faa3c3e2d0873beebce2c5fc265027e36c12fd8" - integrity sha512-XyUW5DTmnsCF9149/0kgUkRPe5gBzCb7W8FfjqXsUuGMKbSqucb+yMOU7qidSsl7NGiDBekWoR4G5Li6Z5k21g== +truffle-workflow-compile@^2.0.22: + version "2.0.22" + resolved "https://registry.yarnpkg.com/truffle-workflow-compile/-/truffle-workflow-compile-2.0.22.tgz#9ff49d5ddb0547bfed0ca2771923d18a07792210" + integrity sha512-RVcwWj61SwrAZFwoKMGm1lwWtJgNX6Yor+m5mxeVwJVoBH1d++mKUYTtf8eeujJQSfNHCo6OJe5RKtzrePOVfg== dependencies: mkdirp "^0.5.1" - truffle-artifactor "^4.0.20" - truffle-compile "^4.1.1" - truffle-compile-vyper "^1.0.18" + truffle-artifactor "^4.0.22" + truffle-compile "^4.1.3" + truffle-compile-vyper "^1.0.20" truffle-config "^1.1.13" truffle-expect "^0.0.9" truffle-external-compile "^1.0.11" truffle-resolver "^5.0.14" -truffle@5.0.24: - version "5.0.24" - resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.0.24.tgz#5cbba0bb280a2907529e9b71b9444f064c649262" - integrity sha512-a7sAi7S3s82+qQBstGJzEUE09QjJLRlY00ITrK4N4Qfzgje3thUA2nIGl2uExdD07w6bUZBOLWW9eoCVwps1Eg== +truffle@5.0.26: + version "5.0.26" + resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.0.26.tgz#cb9a6dcd77501821ba6e8ba51b2d4eef58da7458" + integrity sha512-gf3Khot59ZM2Tegqb2md0lpr1SXGUHKJkSajCyXsiFCiiHUbX6NpXn/mgJgk1SXt7FAHpL0zYdLI1pYfqzvBFw== dependencies: app-module-path "^2.2.0" mocha "5.2.0" @@ -17725,7 +17953,37 @@ webpack-sources@^1.1.0, webpack-sources@^1.3.0: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@4.35.0, webpack@^4.33.0: +webpack@4.35.2: + version "4.35.2" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.35.2.tgz#5c8b8a66602cbbd6ec65c6e6747914a61c1449b1" + integrity sha512-TZAmorNymV4q66gAM/h90cEjG+N3627Q2MnkSgKlX/z3DlNVKUtqy57lz1WmZU2+FUZwzM+qm7cGaO95PyrX5A== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-module-context" "1.8.5" + "@webassemblyjs/wasm-edit" "1.8.5" + "@webassemblyjs/wasm-parser" "1.8.5" + acorn "^6.0.5" + acorn-dynamic-import "^4.0.0" + ajv "^6.1.0" + ajv-keywords "^3.1.0" + chrome-trace-event "^1.0.0" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.0" + json-parse-better-errors "^1.0.2" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + micromatch "^3.1.8" + mkdirp "~0.5.0" + neo-async "^2.5.0" + node-libs-browser "^2.0.0" + schema-utils "^1.0.0" + tapable "^1.1.0" + terser-webpack-plugin "^1.1.0" + watchpack "^1.5.0" + webpack-sources "^1.3.0" + +webpack@^4.33.0: version "4.35.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.35.0.tgz#ad3f0f8190876328806ccb7a36f3ce6e764b8378" integrity sha512-M5hL3qpVvtr8d4YaJANbAQBc4uT01G33eDpl/psRTBCfjxFTihdhin1NtAKB1ruDwzeVdcsHHV3NX+QsAgOosw== From 482da14439f82e8b53e636eca8c2afe54cc59f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Wed, 3 Jul 2019 17:39:22 +0200 Subject: [PATCH 59/71] Fix edit, remove and replace owners --- .../ManageOwners/AddOwnerModal/index.jsx | 16 ++++++++-- .../ManageOwners/RemoveOwnerModal/index.jsx | 23 +++++++++----- .../ManageOwners/ReplaceOwnerModal/index.jsx | 31 +++++++++++++------ 3 files changed, 52 insertions(+), 18 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx index b794eeb0..11a68e73 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx @@ -6,6 +6,7 @@ import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' +import { getOwners } from '~/logic/safe/utils' import OwnerForm from './screens/OwnerForm' import ThresholdForm from './screens/ThresholdForm' import ReviewAddOwner from './screens/Review' @@ -35,7 +36,7 @@ type ActiveScreen = 'selectOwner' | 'selectThreshold' | 'reviewAddOwner' export const sendAddOwner = async ( values: Object, safeAddress: string, - owners: List, + ownersOld: List, openSnackbar: Function, createTransaction: Function, updateSafe: Function, @@ -45,10 +46,21 @@ export const sendAddOwner = async ( const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) + const owners = [] + const storedOwners = await getOwners(safeAddress) + storedOwners.forEach((value, key) => owners.push(makeOwner({ + address: key, + name: (values.ownerAddress.toLowerCase() === key.toLowerCase()) ? values.ownerName : value, + }))) + const newOwnerIndex = List(owners).findIndex(o => o.address.toLowerCase() === values.ownerAddress.toLowerCase()) + if (newOwnerIndex < 0) { + owners.push(makeOwner({ address: values.ownerAddress, name: values.ownerName })) + } + if (txHash) { updateSafe({ address: safeAddress, - owners: owners.push(makeOwner({ name: values.ownerName, address: values.ownerAddress })), + owners: List(owners), }) } } diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx index 7499fd5a..9bd2c1c1 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx @@ -4,8 +4,9 @@ import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' -import { type Owner } from '~/routes/safe/store/models/owner' +import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' +import { getOwners } from '~/logic/safe/utils' import CheckOwner from './screens/CheckOwner' import ThresholdForm from './screens/ThresholdForm' import ReviewRemoveOwner from './screens/Review' @@ -41,23 +42,31 @@ export const sendRemoveOwner = async ( safeAddress: string, ownerAddressToRemove: string, ownerNameToRemove: string, - owners: List, + ownersOld: List, openSnackbar: Function, createTransaction: Function, updateSafe: Function, ) => { const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) - const storedOwners = await gnosisSafe.getOwners() - const index = storedOwners.findIndex(ownerAddress => ownerAddress === ownerAddressToRemove) - const prevAddress = index === 0 ? SENTINEL_ADDRESS : storedOwners[index - 1] + const safeOwners = await gnosisSafe.getOwners() + const index = safeOwners.findIndex(ownerAddress => ownerAddress.toLowerCase() === ownerAddressToRemove.toLowerCase()) + const prevAddress = index === 0 ? SENTINEL_ADDRESS : safeOwners[index - 1] const txData = gnosisSafe.contract.methods .removeOwner(prevAddress, ownerAddressToRemove, values.threshold) .encodeABI() - // const text = `Remove Owner ${ownerNameToRemove} (${ownerAddressToRemove})` const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) + + let owners = [] + const storedOwners = await getOwners(safeAddress) + storedOwners.forEach((value, key) => owners.push(makeOwner({ address: key, name: value }))) + owners = List(owners).filter(o => o.address.toLowerCase() !== ownerAddressToRemove.toLowerCase()) + if (txHash) { - updateSafe({ address: safeAddress, owners: owners.filter(o => o.address !== ownerAddressToRemove) }) + updateSafe({ + address: safeAddress, + owners, + }) } } diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx index 4ed0942d..33b676e2 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx @@ -5,6 +5,7 @@ import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' +import { getOwners } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import OwnerForm from './screens/OwnerForm' import ReviewReplaceOwner from './screens/Review' @@ -40,27 +41,38 @@ export const sendReplaceOwner = async ( safeAddress: string, ownerAddressToRemove: string, ownerNameToRemove: string, - owners: List, + ownersOld: List, openSnackbar: Function, createTransaction: Function, updateSafe: Function, ) => { const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) - const storedOwners = await gnosisSafe.getOwners() - const index = storedOwners.findIndex(ownerAddress => ownerAddress === ownerAddressToRemove) - const prevAddress = index === 0 ? SENTINEL_ADDRESS : storedOwners[index - 1] + const safeOwners = await gnosisSafe.getOwners() + const index = safeOwners.findIndex(ownerAddress => ownerAddress.toLowerCase() === ownerAddressToRemove.toLowerCase()) + const prevAddress = index === 0 ? SENTINEL_ADDRESS : safeOwners[index - 1] const txData = gnosisSafe.contract.methods .swapOwner(prevAddress, ownerAddressToRemove, values.ownerAddress) .encodeABI() - // const text = `Replace Owner ${ownerNameToRemove} (${ownerAddressToRemove}) with ${values.ownerName} (${values.ownerAddress})` - - const ownerToRemoveIndex = owners.findIndex(o => o.address === ownerAddressToRemove) - const newOwner = makeOwner({ name: values.ownerName, address: values.ownerAddress }) const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) + let owners = [] + const storedOwners = await getOwners(safeAddress) + storedOwners.forEach((value, key) => owners.push(makeOwner({ + address: key, + name: (values.ownerAddress.toLowerCase() === key.toLowerCase()) ? values.ownerName : value, + }))) + const newOwnerIndex = List(owners).findIndex(o => o.address.toLowerCase() === values.ownerAddress.toLowerCase()) + if (newOwnerIndex < 0) { + owners.push(makeOwner({ address: values.ownerAddress, name: values.ownerName })) + } + owners = List(owners).filter(o => o.address.toLowerCase() !== ownerAddressToRemove.toLowerCase()) + if (txHash) { - updateSafe({ address: safeAddress, owners: owners.set(ownerToRemoveIndex, newOwner) }) + updateSafe({ + address: safeAddress, + owners, + }) } } @@ -135,6 +147,7 @@ const ReplaceOwner = ({ onClose={onClose} ownerAddress={ownerAddress} ownerName={ownerName} + owners={owners} network={network} onSubmit={ownerSubmitted} /> From b064b0fa9f9796351cee8c8b249cbf84fc1f0e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Wed, 3 Jul 2019 18:33:05 +0200 Subject: [PATCH 60/71] Show owner list when current address in not an owner --- .../Settings/ManageOwners/index.jsx | 96 +++++++++++-------- .../components/Settings/ManageOwners/style.js | 4 - src/routes/safe/components/Settings/index.jsx | 22 ++--- 3 files changed, 63 insertions(+), 59 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 9873e76c..b10327d0 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -9,7 +9,7 @@ import Col from '~/components/layout/Col' import Table from '~/components/Table' import { type Column, cellWidth } from '~/components/Table/TableHead' import Row from '~/components/layout/Row' -import Paragraph from '~/components/layout/Paragraph' +import Heading from '~/components/layout/Heading' import Hairline from '~/components/layout/Hairline' import Button from '~/components/layout/Button' import Img from '~/components/layout/Img' @@ -22,7 +22,7 @@ import type { Owner } from '~/routes/safe/store/models/owner' import { getOwnerData, generateColumns, OWNERS_TABLE_NAME_ID, OWNERS_TABLE_ADDRESS_ID, type OwnerRow, } from './dataFetcher' -import { sm, boldFont } from '~/theme/variables' +import { lg, sm, boldFont } from '~/theme/variables' import { styles } from './style' import ReplaceOwnerIcon from './assets/icons/replace-owner.svg' import RenameOwnerIcon from './assets/icons/rename-owner.svg' @@ -43,6 +43,10 @@ const addOwnerButtonStyle = { fontWeight: boldFont, } +const title = { + padding: lg, +} + type Props = { classes: Object, safeAddress: string, @@ -53,6 +57,7 @@ type Props = { userAddress: string, createTransaction: Function, updateSafe: Function, + granted: boolean, } type State = { @@ -103,6 +108,7 @@ class ManageOwners extends React.Component { userAddress, createTransaction, updateSafe, + granted, } = this.props const { showAddOwner, @@ -120,9 +126,7 @@ class ManageOwners extends React.Component { return ( - - Manage Safe Owners - + Manage Safe Owners
{ ))} - - Edit owner - Replace owner - Remove owner - + {granted && ( + + Edit owner + Replace owner + {ownerData.size > 1 && ( + Remove owner + )} + + )} )) }
- - - - - - + {granted && ( + + + + + + + + + )} ({ - title: { - padding: `${lg} 20px`, - fontSize: '16px', - }, formContainer: { minHeight: '369px', }, diff --git a/src/routes/safe/components/Settings/index.jsx b/src/routes/safe/components/Settings/index.jsx index 80e0f342..30358896 100644 --- a/src/routes/safe/components/Settings/index.jsx +++ b/src/routes/safe/components/Settings/index.jsx @@ -20,8 +20,6 @@ import actions, { type Actions } from './actions' import { styles } from './style' import RemoveSafeIcon from './assets/icons/bin.svg' -export const OWNERS_SETTINGS_TAB_TEST_ID = 'owner-settings-tab' - type State = { showRemoveSafe: boolean, menuOptionIndex: number, @@ -111,18 +109,15 @@ class Settings extends React.Component { Safe name + + Owners ({owners.size}) + + {granted && ( - - Owners ( - {owners.size} -) - - { {menuOptionIndex === 1 && ( )} - {granted && menuOptionIndex === 2 && ( + {menuOptionIndex === 2 && ( { createTransaction={createTransaction} userAddress={userAddress} updateSafe={updateSafe} + granted={granted} /> )} {granted && menuOptionIndex === 3 && ( From efff7ce3885a11ce7c164e8b9416a488704c64da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 4 Jul 2019 08:21:43 +0200 Subject: [PATCH 61/71] Update styles --- .../safe/components/Settings/ChangeSafeName/index.jsx | 7 +++---- .../safe/components/Settings/ChangeSafeName/style.js | 6 +----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/routes/safe/components/Settings/ChangeSafeName/index.jsx b/src/routes/safe/components/Settings/ChangeSafeName/index.jsx index 84290bbc..70319bdc 100644 --- a/src/routes/safe/components/Settings/ChangeSafeName/index.jsx +++ b/src/routes/safe/components/Settings/ChangeSafeName/index.jsx @@ -4,6 +4,7 @@ import { withStyles } from '@material-ui/core/styles' import Block from '~/components/layout/Block' import Col from '~/components/layout/Col' import Field from '~/components/forms/Field' +import Heading from '~/components/layout/Heading' import { composeValidators, required, minMaxLength } from '~/components/forms/validator' import TextField from '~/components/forms/TextField' import GnoForm from '~/components/forms/GnoForm' @@ -49,10 +50,8 @@ const ChangeSafeName = (props: Props) => { {() => ( - - Modify Safe name - - + Modify Safe name + You can change the name of this Safe. This name is only stored locally and never shared with Gnosis or any third parties. diff --git a/src/routes/safe/components/Settings/ChangeSafeName/style.js b/src/routes/safe/components/Settings/ChangeSafeName/style.js index 6971727e..4f0637fa 100644 --- a/src/routes/safe/components/Settings/ChangeSafeName/style.js +++ b/src/routes/safe/components/Settings/ChangeSafeName/style.js @@ -2,12 +2,8 @@ import { lg } from '~/theme/variables' export const styles = () => ({ - title: { - padding: `${lg} 0 20px`, - fontSize: '16px', - }, formContainer: { - padding: '0 20px', + padding: lg, minHeight: '369px', }, root: { From 01e212d9fe96b9796f599a7bb6ea77dee2f47110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 4 Jul 2019 08:57:27 +0200 Subject: [PATCH 62/71] Validate owner address when it is replaced --- .../ReplaceOwnerModal/screens/OwnerForm/index.jsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx index 161c99be..1fa5709a 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx @@ -1,6 +1,7 @@ // @flow import React from 'react' import classNames from 'classnames/bind' +import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' import Close from '@material-ui/icons/Close' import IconButton from '@material-ui/core/IconButton' @@ -17,8 +18,13 @@ import TextField from '~/components/forms/TextField' import Identicon from '~/components/Identicon' import Link from '~/components/layout/Link' import { getEtherScanLink } from '~/logic/wallets/getWeb3' +import { type Owner } from '~/routes/safe/store/models/owner' import { - composeValidators, required, mustBeEthereumAddress, minMaxLength, + composeValidators, + required, + mustBeEthereumAddress, + minMaxLength, + uniqueAddress, } from '~/components/forms/validator' import { styles } from './style' import { secondary } from '~/theme/variables' @@ -35,14 +41,16 @@ type Props = { ownerName: string, network: string, onSubmit: Function, + owners: List, } const OwnerForm = ({ - classes, onClose, ownerAddress, ownerName, network, onSubmit, + classes, onClose, ownerAddress, ownerName, network, onSubmit, owners, }: Props) => { const handleSubmit = (values) => { onSubmit(values) } + const ownerDoesntExist = uniqueAddress(owners.map(o => o.address)) return ( @@ -111,7 +119,7 @@ const OwnerForm = ({ name="ownerAddress" component={TextField} type="text" - validate={composeValidators(required, mustBeEthereumAddress)} + validate={composeValidators(required, mustBeEthereumAddress, ownerDoesntExist)} placeholder="Owner address*" text="Owner address*" className={classes.addressInput} @@ -130,7 +138,6 @@ const OwnerForm = ({ variant="contained" minWidth={140} color="primary" - data-testid="review-tx-btn" > Next From e14a9ae3d7fccf1a38e6ac9488431a18af63cfc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 4 Jul 2019 23:08:16 +0200 Subject: [PATCH 63/71] Add test for replacing an owner and refactoring --- .../AddOwnerModal/screens/OwnerForm/index.jsx | 2 +- .../AddOwnerModal/screens/Review/index.jsx | 4 +- .../screens/OwnerForm/index.jsx | 7 ++ .../screens/Review/index.jsx | 4 +- .../Settings/ManageOwners/index.jsx | 2 + src/routes/safe/components/Settings/index.jsx | 3 + src/test/safe.dom.settings.owners.test.js | 84 ++++++++++++++++--- 7 files changed, 91 insertions(+), 15 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx index 0609d615..f661110f 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx @@ -25,7 +25,7 @@ import { styles } from './style' export const ADD_OWNER_NAME_INPUT_TESTID = 'add-owner-name-input' export const ADD_OWNER_ADDRESS_INPUT_TESTID = 'add-owner-address-testid' -export const ADD_OWNER_NEXT_BTN_TESTID = 'add-owner-next btn' +export const ADD_OWNER_NEXT_BTN_TESTID = 'add-owner-next-btn' type Props = { onClose: () => void, diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx index a5d936aa..8f3a9fda 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review/index.jsx @@ -19,7 +19,7 @@ import { getEtherScanLink } from '~/logic/wallets/getWeb3' import { secondary } from '~/theme/variables' import { styles } from './style' -export const ADD_OWNER_SUBMIT_BTN = 'add-owner-submit-btn' +export const ADD_OWNER_SUBMIT_BTN_TESTID = 'add-owner-submit-btn' const openIconStyle = { height: '16px', @@ -164,7 +164,7 @@ const ReviewAddOwner = ({ variant="contained" minWidth={140} color="primary" - testId={ADD_OWNER_SUBMIT_BTN} + testId={ADD_OWNER_SUBMIT_BTN_TESTID} > Submit diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx index 1fa5709a..861ec813 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/index.jsx @@ -29,6 +29,10 @@ import { import { styles } from './style' import { secondary } from '~/theme/variables' +export const REPLACE_OWNER_NAME_INPUT_TESTID = 'replace-owner-name-input' +export const REPLACE_OWNER_ADDRESS_INPUT_TESTID = 'replace-owner-address-testid' +export const REPLACE_OWNER_NEXT_BTN_TESTID = 'replace-owner-next-btn' + const openIconStyle = { height: '16px', color: secondary, @@ -110,6 +114,7 @@ const OwnerForm = ({ placeholder="Owner name*" text="Owner name*" className={classes.addressInput} + testId={REPLACE_OWNER_NAME_INPUT_TESTID} /> @@ -123,6 +128,7 @@ const OwnerForm = ({ placeholder="Owner address*" text="Owner address*" className={classes.addressInput} + testId={REPLACE_OWNER_ADDRESS_INPUT_TESTID} /> @@ -138,6 +144,7 @@ const OwnerForm = ({ variant="contained" minWidth={140} color="primary" + testId={REPLACE_OWNER_NEXT_BTN_TESTID} > Next diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx index e8469b17..8c92dd7f 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review/index.jsx @@ -19,6 +19,8 @@ import { getEtherScanLink } from '~/logic/wallets/getWeb3' import { secondary } from '~/theme/variables' import { styles } from './style' +export const REPLACE_OWNER_SUBMIT_BTN_TESTID = 'replace-owner-submit-btn' + const openIconStyle = { height: '16px', color: secondary, @@ -208,7 +210,7 @@ const ReviewRemoveOwner = ({ variant="contained" minWidth={140} color="primary" - data-testid="review-tx-btn" + testId={REPLACE_OWNER_SUBMIT_BTN_TESTID} > Submit diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index b10327d0..51222476 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -31,6 +31,7 @@ import RemoveOwnerIcon from '../assets/icons/bin.svg' export const RENAME_OWNER_BTN_TESTID = 'rename-owner-btn' export const REMOVE_OWNER_BTN_TESTID = 'remove-owner-btn' export const ADD_OWNER_BTN_TESTID = 'add-owner-btn' +export const REPLACE_OWNER_BTN_TESTID = 'replace-owner-btn' export const OWNERS_ROW_TESTID = 'owners-row' const controlsStyle = { @@ -162,6 +163,7 @@ class ManageOwners extends React.Component { className={classes.replaceOwnerIcon} src={ReplaceOwnerIcon} onClick={this.onShow('ReplaceOwner', row)} + testId={REPLACE_OWNER_BTN_TESTID} /> {ownerData.size > 1 && ( { Owners ({owners.size}) diff --git a/src/test/safe.dom.settings.owners.test.js b/src/test/safe.dom.settings.owners.test.js index 49a31ec7..34619ff4 100644 --- a/src/test/safe.dom.settings.owners.test.js +++ b/src/test/safe.dom.settings.owners.test.js @@ -6,12 +6,13 @@ import { renderSafeView } from '~/test/builder/safe.dom.utils' import { sleep } from '~/utils/timer' import 'jest-dom/extend-expect' import { SETTINGS_TAB_BTN_TESTID } from '~/routes/safe/components/Layout' -import { OWNERS_SETTINGS_TAB_TEST_ID } from '~/routes/safe/components/Settings' +import { OWNERS_SETTINGS_TAB_TESTID } from '~/routes/safe/components/Settings' import { RENAME_OWNER_BTN_TESTID, OWNERS_ROW_TESTID, REMOVE_OWNER_BTN_TESTID, ADD_OWNER_BTN_TESTID, + REPLACE_OWNER_BTN_TESTID, } from '~/routes/safe/components/Settings/ManageOwners' import { RENAME_OWNER_INPUT_TESTID, @@ -26,7 +27,13 @@ import { ADD_OWNER_ADDRESS_INPUT_TESTID, ADD_OWNER_NEXT_BTN_TESTID, } from '~/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm' -import { ADD_OWNER_SUBMIT_BTN } from '~/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review' +import { ADD_OWNER_SUBMIT_BTN_TESTID } from '~/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/Review' +import { + REPLACE_OWNER_NEXT_BTN_TESTID, + REPLACE_OWNER_NAME_INPUT_TESTID, + REPLACE_OWNER_ADDRESS_INPUT_TESTID, +} from '~/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm' +import { REPLACE_OWNER_SUBMIT_BTN_TESTID } from '~/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/Review' afterEach(cleanup) @@ -50,7 +57,7 @@ describe('DOM > Feature > Settings - Manage owners', () => { await sleep(200) // click on owners settings - const ownersSettingsBtn = SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TEST_ID) + const ownersSettingsBtn = SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TESTID) fireEvent.click(ownersSettingsBtn) await sleep(200) @@ -82,13 +89,15 @@ describe('DOM > Feature > Settings - Manage owners', () => { await sleep(200) // click on owners settings - const ownersSettingsBtn = SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TEST_ID) + const ownersSettingsBtn = SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TESTID) fireEvent.click(ownersSettingsBtn) await sleep(200) // check if there are 2 owners let ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) expect(ownerRows.length).toBe(2) + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') + expect(ownerRows[1]).toHaveTextContent('Adol 2 Eth Account0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0') // click remove owner btn which opens the modal const removeOwnerBtn = SafeDom.getAllByTestId(REMOVE_OWNER_BTN_TESTID)[1] @@ -108,6 +117,7 @@ describe('DOM > Feature > Settings - Manage owners', () => { // check if owner was removed ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) expect(ownerRows.length).toBe(1) + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') }) it('Adds a new owner', async () => { @@ -123,10 +133,15 @@ describe('DOM > Feature > Settings - Manage owners', () => { await sleep(200) // click on owners settings - const ownersSettingsBtn = SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TEST_ID) + const ownersSettingsBtn = SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TESTID) fireEvent.click(ownersSettingsBtn) await sleep(200) + // check if there is 1 owner + let ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) + expect(ownerRows.length).toBe(1) + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') + // click add owner btn fireEvent.click(SafeDom.getByTestId(ADD_OWNER_BTN_TESTID)) await sleep(200) @@ -142,15 +157,62 @@ describe('DOM > Feature > Settings - Manage owners', () => { fireEvent.click(SafeDom.getByTestId(ADD_OWNER_THRESHOLD_NEXT_BTN_TESTID)) await sleep(200) - fireEvent.click(SafeDom.getByTestId(ADD_OWNER_SUBMIT_BTN)) + fireEvent.click(SafeDom.getByTestId(ADD_OWNER_SUBMIT_BTN_TESTID)) await sleep(1000) // check if owner was added - const newOwnerRow = SafeDom.getAllByTestId(OWNERS_ROW_TESTID)[1] - - expect(newOwnerRow).toHaveTextContent(NEW_OWNER_NAME) - expect(newOwnerRow).toHaveTextContent(NEW_OWNER_ADDRESS) + ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) + expect(ownerRows.length).toBe(2) + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') + expect(ownerRows[1]).toHaveTextContent(`${NEW_OWNER_NAME}${NEW_OWNER_ADDRESS}`) }) - it('Replaces a owner', async () => {}) + it('Replaces an owner', async () => { + const NEW_OWNER_NAME = 'I replaced an old owner' + const NEW_OWNER_ADDRESS = '0x1dF62f291b2E969fB0849d99D9Ce41e2F137006e' + + const twoOwnersSafeAddress = await aMinedSafe(store, 2) + + const SafeDom = renderSafeView(store, twoOwnersSafeAddress) + await sleep(1300) + + // Travel to settings + const settingsBtn = SafeDom.getByTestId(SETTINGS_TAB_BTN_TESTID) + fireEvent.click(settingsBtn) + await sleep(200) + + // click on owners settings + const ownersSettingsBtn = SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TESTID) + fireEvent.click(ownersSettingsBtn) + await sleep(200) + + // check if there are 2 owners + let ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) + expect(ownerRows.length).toBe(2) + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') + expect(ownerRows[1]).toHaveTextContent('Adol 2 Eth Account0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0') + + // click replace owner btn which opens the modal + const replaceOwnerBtn = SafeDom.getAllByTestId(REPLACE_OWNER_BTN_TESTID)[1] + fireEvent.click(replaceOwnerBtn) + + // fill and travel add owner modal + const ownerNameInput = SafeDom.getByTestId(REPLACE_OWNER_NAME_INPUT_TESTID) + const ownerAddressInput = SafeDom.getByTestId(REPLACE_OWNER_ADDRESS_INPUT_TESTID) + const nextBtn = SafeDom.getByTestId(REPLACE_OWNER_NEXT_BTN_TESTID) + fireEvent.change(ownerNameInput, { target: { value: NEW_OWNER_NAME } }) + fireEvent.change(ownerAddressInput, { target: { value: NEW_OWNER_ADDRESS } }) + fireEvent.click(nextBtn) + await sleep(200) + + const replaceSubmitBtn = SafeDom.getByTestId(REPLACE_OWNER_SUBMIT_BTN_TESTID) + fireEvent.click(replaceSubmitBtn) + await sleep(1000) + + // check if the owner was replaced + ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) + expect(ownerRows.length).toBe(2) + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') + expect(ownerRows[1]).toHaveTextContent(`${NEW_OWNER_NAME}${NEW_OWNER_ADDRESS}`) + }) }) From ca50de5cb2d3c1489f8f8e6975af4dd4d4439b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 8 Jul 2019 13:49:29 +0200 Subject: [PATCH 64/71] Remove old updateSafeName action --- src/routes/safe/components/Settings/actions.js | 10 ---------- src/routes/safe/store/actions/updateSafeName.js | 10 ---------- 2 files changed, 20 deletions(-) delete mode 100644 src/routes/safe/components/Settings/actions.js delete mode 100644 src/routes/safe/store/actions/updateSafeName.js diff --git a/src/routes/safe/components/Settings/actions.js b/src/routes/safe/components/Settings/actions.js deleted file mode 100644 index 0f1aae07..00000000 --- a/src/routes/safe/components/Settings/actions.js +++ /dev/null @@ -1,10 +0,0 @@ -// @flow -import updateSafeName from '~/routes/safe/store/actions/updateSafeName' - -export type Actions = { - updateSafeName: Function, -} - -export default { - updateSafeName, -} diff --git a/src/routes/safe/store/actions/updateSafeName.js b/src/routes/safe/store/actions/updateSafeName.js deleted file mode 100644 index 131201f3..00000000 --- a/src/routes/safe/store/actions/updateSafeName.js +++ /dev/null @@ -1,10 +0,0 @@ -// @flow -import type { Dispatch as ReduxDispatch } from 'redux' -import { type GlobalState } from '~/store' -import updateSafe from './updateSafe' - -const updateSafeName = (safeAddress: string, safeName: string) => async (dispatch: ReduxDispatch) => { - dispatch(updateSafe({ address: safeAddress, name: safeName })) -} - -export default updateSafeName From 2b076045da1579fec1d7ac1dc08ac24ceb1ca108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 12 Jul 2019 12:08:20 +0200 Subject: [PATCH 65/71] Add manage owners redux actions --- .../safe/components/Settings/actions.js | 19 +++++++++++++++++++ src/routes/safe/store/actions/addSafeOwner.js | 8 ++++++++ .../safe/store/actions/editSafeOwner.js | 8 ++++++++ .../safe/store/actions/removeSafeOwner.js | 8 ++++++++ .../safe/store/actions/replaceSafeOwner.js | 8 ++++++++ 5 files changed, 51 insertions(+) create mode 100644 src/routes/safe/components/Settings/actions.js create mode 100644 src/routes/safe/store/actions/addSafeOwner.js create mode 100644 src/routes/safe/store/actions/editSafeOwner.js create mode 100644 src/routes/safe/store/actions/removeSafeOwner.js create mode 100644 src/routes/safe/store/actions/replaceSafeOwner.js diff --git a/src/routes/safe/components/Settings/actions.js b/src/routes/safe/components/Settings/actions.js new file mode 100644 index 00000000..0d8e6622 --- /dev/null +++ b/src/routes/safe/components/Settings/actions.js @@ -0,0 +1,19 @@ +// @flow +import addSafeOwner from '~/routes/safe/store/actions/addSafeOwner' +import removeSafeOwner from '~/routes/safe/store/actions/removeSafeOwner' +import replaceSafeOwner from '~/routes/safe/store/actions/replaceSafeOwner' +import editSafeOwner from '~/routes/safe/store/actions/editSafeOwner' + +export type Actions = { + addSafeOwner: Function, + removeSafeOwner: Function, + replaceSafeOwner: Function, + editSafeOwner: Function, +} + +export default { + addSafeOwner, + removeSafeOwner, + replaceSafeOwner, + editSafeOwner, +} diff --git a/src/routes/safe/store/actions/addSafeOwner.js b/src/routes/safe/store/actions/addSafeOwner.js new file mode 100644 index 00000000..bb9a4f0c --- /dev/null +++ b/src/routes/safe/store/actions/addSafeOwner.js @@ -0,0 +1,8 @@ +// @flow +import { createAction } from 'redux-actions' + +export const ADD_SAFE_OWNER = 'ADD_SAFE_OWNER' + +const addSafeOwner = createAction(ADD_SAFE_OWNER) + +export default addSafeOwner diff --git a/src/routes/safe/store/actions/editSafeOwner.js b/src/routes/safe/store/actions/editSafeOwner.js new file mode 100644 index 00000000..1edf0606 --- /dev/null +++ b/src/routes/safe/store/actions/editSafeOwner.js @@ -0,0 +1,8 @@ +// @flow +import { createAction } from 'redux-actions' + +export const EDIT_SAFE_OWNER = 'EDIT_SAFE_OWNER' + +const editSafeOwner = createAction(EDIT_SAFE_OWNER) + +export default editSafeOwner diff --git a/src/routes/safe/store/actions/removeSafeOwner.js b/src/routes/safe/store/actions/removeSafeOwner.js new file mode 100644 index 00000000..b83312c0 --- /dev/null +++ b/src/routes/safe/store/actions/removeSafeOwner.js @@ -0,0 +1,8 @@ +// @flow +import { createAction } from 'redux-actions' + +export const REMOVE_SAFE_OWNER = 'REMOVE_SAFE_OWNER' + +const removeSafeOwner = createAction(REMOVE_SAFE_OWNER) + +export default removeSafeOwner diff --git a/src/routes/safe/store/actions/replaceSafeOwner.js b/src/routes/safe/store/actions/replaceSafeOwner.js new file mode 100644 index 00000000..f6e75418 --- /dev/null +++ b/src/routes/safe/store/actions/replaceSafeOwner.js @@ -0,0 +1,8 @@ +// @flow +import { createAction } from 'redux-actions' + +export const REPLACE_SAFE_OWNER = 'REPLACE_SAFE_OWNER' + +const replaceSafeOwner = createAction(REPLACE_SAFE_OWNER) + +export default replaceSafeOwner From d8bc944fe97210d3b2672726066f6ee51e6e6e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 12 Jul 2019 16:22:29 +0200 Subject: [PATCH 66/71] Refactor manage owners test --- src/test/safe.dom.settings.owners.test.js | 30 +++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/test/safe.dom.settings.owners.test.js b/src/test/safe.dom.settings.owners.test.js index 34619ff4..654b78e7 100644 --- a/src/test/safe.dom.settings.owners.test.js +++ b/src/test/safe.dom.settings.owners.test.js @@ -96,8 +96,10 @@ describe('DOM > Feature > Settings - Manage owners', () => { // check if there are 2 owners let ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) expect(ownerRows.length).toBe(2) - expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') - expect(ownerRows[1]).toHaveTextContent('Adol 2 Eth Account0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0') + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account') + expect(ownerRows[0]).toHaveTextContent('0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') + expect(ownerRows[1]).toHaveTextContent('Adol 2 Eth Account') + expect(ownerRows[1]).toHaveTextContent('0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0') // click remove owner btn which opens the modal const removeOwnerBtn = SafeDom.getAllByTestId(REMOVE_OWNER_BTN_TESTID)[1] @@ -117,7 +119,8 @@ describe('DOM > Feature > Settings - Manage owners', () => { // check if owner was removed ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) expect(ownerRows.length).toBe(1) - expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account') + expect(ownerRows[0]).toHaveTextContent('0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') }) it('Adds a new owner', async () => { @@ -140,7 +143,8 @@ describe('DOM > Feature > Settings - Manage owners', () => { // check if there is 1 owner let ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) expect(ownerRows.length).toBe(1) - expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account') + expect(ownerRows[0]).toHaveTextContent('0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') // click add owner btn fireEvent.click(SafeDom.getByTestId(ADD_OWNER_BTN_TESTID)) @@ -163,8 +167,10 @@ describe('DOM > Feature > Settings - Manage owners', () => { // check if owner was added ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) expect(ownerRows.length).toBe(2) - expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') - expect(ownerRows[1]).toHaveTextContent(`${NEW_OWNER_NAME}${NEW_OWNER_ADDRESS}`) + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account') + expect(ownerRows[0]).toHaveTextContent('0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') + expect(ownerRows[1]).toHaveTextContent(NEW_OWNER_NAME) + expect(ownerRows[1]).toHaveTextContent(NEW_OWNER_ADDRESS) }) it('Replaces an owner', async () => { @@ -189,8 +195,10 @@ describe('DOM > Feature > Settings - Manage owners', () => { // check if there are 2 owners let ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) expect(ownerRows.length).toBe(2) - expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') - expect(ownerRows[1]).toHaveTextContent('Adol 2 Eth Account0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0') + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account') + expect(ownerRows[0]).toHaveTextContent('0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') + expect(ownerRows[1]).toHaveTextContent('Adol 2 Eth Account') + expect(ownerRows[1]).toHaveTextContent('0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0') // click replace owner btn which opens the modal const replaceOwnerBtn = SafeDom.getAllByTestId(REPLACE_OWNER_BTN_TESTID)[1] @@ -212,7 +220,9 @@ describe('DOM > Feature > Settings - Manage owners', () => { // check if the owner was replaced ownerRows = SafeDom.getAllByTestId(OWNERS_ROW_TESTID) expect(ownerRows.length).toBe(2) - expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') - expect(ownerRows[1]).toHaveTextContent(`${NEW_OWNER_NAME}${NEW_OWNER_ADDRESS}`) + expect(ownerRows[0]).toHaveTextContent('Adol 1 Eth Account') + expect(ownerRows[0]).toHaveTextContent('0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1') + expect(ownerRows[1]).toHaveTextContent(NEW_OWNER_NAME) + expect(ownerRows[1]).toHaveTextContent(NEW_OWNER_ADDRESS) }) }) From 9564f568c16a01d10dce621a86b294f8d74a6985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 12 Jul 2019 16:59:24 +0200 Subject: [PATCH 67/71] Refactor owner management components --- .../ManageOwners/AddOwnerModal/index.jsx | 27 ++++------------- .../ManageOwners/EditOwnerModal/index.jsx | 22 +++----------- .../ManageOwners/EditOwnerModal/style.js | 8 +++-- .../ManageOwners/RemoveOwnerModal/index.jsx | 21 ++++--------- .../ManageOwners/ReplaceOwnerModal/index.jsx | 30 ++++++------------- .../Settings/ManageOwners/index.jsx | 18 +++++++---- src/routes/safe/components/Settings/index.jsx | 18 +++++++++-- 7 files changed, 58 insertions(+), 86 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx index 11a68e73..98ae7d59 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx @@ -4,9 +4,8 @@ import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' -import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' +import { type Owner } from '~/routes/safe/store/models/owner' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' -import { getOwners } from '~/logic/safe/utils' import OwnerForm from './screens/OwnerForm' import ThresholdForm from './screens/ThresholdForm' import ReviewAddOwner from './screens/Review' @@ -28,7 +27,7 @@ type Props = { owners: List, threshold: number, network: string, - updateSafe: Function, + addSafeOwner: Function, createTransaction: Function, } type ActiveScreen = 'selectOwner' | 'selectThreshold' | 'reviewAddOwner' @@ -39,29 +38,15 @@ export const sendAddOwner = async ( ownersOld: List, openSnackbar: Function, createTransaction: Function, - updateSafe: Function, + addSafeOwner: Function, ) => { const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) const txData = gnosisSafe.contract.methods.addOwnerWithThreshold(values.ownerAddress, values.threshold).encodeABI() const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) - const owners = [] - const storedOwners = await getOwners(safeAddress) - storedOwners.forEach((value, key) => owners.push(makeOwner({ - address: key, - name: (values.ownerAddress.toLowerCase() === key.toLowerCase()) ? values.ownerName : value, - }))) - const newOwnerIndex = List(owners).findIndex(o => o.address.toLowerCase() === values.ownerAddress.toLowerCase()) - if (newOwnerIndex < 0) { - owners.push(makeOwner({ address: values.ownerAddress, name: values.ownerName })) - } - if (txHash) { - updateSafe({ - address: safeAddress, - owners: List(owners), - }) + addSafeOwner({ safeAddress, ownerName: values.ownerName, ownerAddress: values.ownerAddress }) } } @@ -75,7 +60,7 @@ const AddOwner = ({ threshold, network, createTransaction, - updateSafe, + addSafeOwner, }: Props) => { const [activeScreen, setActiveScreen] = useState('selectOwner') const [values, setValues] = useState({}) @@ -120,7 +105,7 @@ const AddOwner = ({ const onAddOwner = async () => { onClose() try { - sendAddOwner(values, safeAddress, owners, openSnackbar, createTransaction, updateSafe) + sendAddOwner(values, safeAddress, owners, openSnackbar, createTransaction, addSafeOwner) } catch (error) { // eslint-disable-next-line console.log('Error while removing an owner ' + error) diff --git a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx index 835970f4..02a12bd4 100644 --- a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.jsx @@ -1,6 +1,5 @@ // @flow import React from 'react' -import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' import Close from '@material-ui/icons/Close' import OpenInNew from '@material-ui/icons/OpenInNew' @@ -16,7 +15,6 @@ import TextField from '~/components/forms/TextField' import Paragraph from '~/components/layout/Paragraph' import Identicon from '~/components/Identicon' import { getEtherScanLink } from '~/logic/wallets/getWeb3' -import type { Owner } from '~/routes/safe/store/models/owner' import { composeValidators, required, minMaxLength } from '~/components/forms/validator' import Modal from '~/components/Modal' import { styles } from './style' @@ -30,23 +28,15 @@ const openIconStyle = { color: secondary, } -const stylesModal = () => ({ - smallerModalWindow: { - height: 'auto', - position: 'static', - }, -}) - type Props = { onClose: () => void, classes: Object, isOpen: boolean, safeAddress: string, ownerAddress: string, - owners: List, network: string, selectedOwnerName: string, - updateSafe: Function, + editSafeOwner: Function, } const EditOwnerComponent = ({ @@ -56,15 +46,11 @@ const EditOwnerComponent = ({ safeAddress, ownerAddress, selectedOwnerName, - updateSafe, - owners, + editSafeOwner, network, }: Props) => { const handleSubmit = (values) => { - const ownerToUpdateIndex = owners.findIndex(o => o.address === ownerAddress) - const updatedOwners = owners.update(ownerToUpdateIndex, owner => owner.set('name', values.ownerName)) - - updateSafe({ address: safeAddress, owners: updatedOwners }) + editSafeOwner({ safeAddress, ownerAddress, ownerName: values.ownerName }) onClose() } @@ -74,7 +60,7 @@ const EditOwnerComponent = ({ description="Edit owner from Safe" handleClose={onClose} open={isOpen} - paperClassName={stylesModal.smallerModalWindow} + paperClassName={classes.smallerModalWindow} > diff --git a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/style.js b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/style.js index 8e6294f9..69e9a9a4 100644 --- a/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/style.js +++ b/src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/style.js @@ -1,9 +1,9 @@ // @flow import { - lg, md, sm, error, background, + lg, md, sm, error, } from '~/theme/variables' -export const styles = (theme: Object) => ({ +export const styles = () => ({ heading: { padding: `${sm} ${lg}`, justifyContent: 'space-between', @@ -36,4 +36,8 @@ export const styles = (theme: Object) => ({ cursor: 'pointer', }, }, + smallerModalWindow: { + height: 'auto', + position: 'static', + }, }) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx index 9bd2c1c1..4dc4512c 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx @@ -4,9 +4,8 @@ import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' -import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' +import { type Owner } from '~/routes/safe/store/models/owner' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' -import { getOwners } from '~/logic/safe/utils' import CheckOwner from './screens/CheckOwner' import ThresholdForm from './screens/ThresholdForm' import ReviewRemoveOwner from './screens/Review' @@ -31,7 +30,7 @@ type Props = { threshold: number, network: string, createTransaction: Function, - updateSafe: Function, + removeSafeOwner: Function, } type ActiveScreen = 'checkOwner' | 'selectThreshold' | 'reviewRemoveOwner' @@ -45,7 +44,7 @@ export const sendRemoveOwner = async ( ownersOld: List, openSnackbar: Function, createTransaction: Function, - updateSafe: Function, + removeSafeOwner: Function, ) => { const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) const safeOwners = await gnosisSafe.getOwners() @@ -57,16 +56,8 @@ export const sendRemoveOwner = async ( const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) - let owners = [] - const storedOwners = await getOwners(safeAddress) - storedOwners.forEach((value, key) => owners.push(makeOwner({ address: key, name: value }))) - owners = List(owners).filter(o => o.address.toLowerCase() !== ownerAddressToRemove.toLowerCase()) - if (txHash) { - updateSafe({ - address: safeAddress, - owners, - }) + removeSafeOwner({ safeAddress, ownerAddress: ownerAddressToRemove }) } } @@ -82,7 +73,7 @@ const RemoveOwner = ({ threshold, network, createTransaction, - updateSafe, + removeSafeOwner, }: Props) => { const [activeScreen, setActiveScreen] = useState('checkOwner') const [values, setValues] = useState({}) @@ -128,7 +119,7 @@ const RemoveOwner = ({ owners, openSnackbar, createTransaction, - updateSafe, + removeSafeOwner, ) } catch (error) { // eslint-disable-next-line diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx index 33b676e2..25393b0c 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx @@ -4,8 +4,6 @@ import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' -import { type Owner, makeOwner } from '~/routes/safe/store/models/owner' -import { getOwners } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import OwnerForm from './screens/OwnerForm' import ReviewReplaceOwner from './screens/Review' @@ -30,7 +28,7 @@ type Props = { network: string, threshold: string, createTransaction: Function, - updateSafe: Function, + replaceSafeOwner: Function, } type ActiveScreen = 'checkOwner' | 'reviewReplaceOwner' @@ -44,7 +42,7 @@ export const sendReplaceOwner = async ( ownersOld: List, openSnackbar: Function, createTransaction: Function, - updateSafe: Function, + replaceSafeOwner: Function, ) => { const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) const safeOwners = await gnosisSafe.getOwners() @@ -56,22 +54,12 @@ export const sendReplaceOwner = async ( const txHash = await createTransaction(safeAddress, safeAddress, 0, txData, openSnackbar) - let owners = [] - const storedOwners = await getOwners(safeAddress) - storedOwners.forEach((value, key) => owners.push(makeOwner({ - address: key, - name: (values.ownerAddress.toLowerCase() === key.toLowerCase()) ? values.ownerName : value, - }))) - const newOwnerIndex = List(owners).findIndex(o => o.address.toLowerCase() === values.ownerAddress.toLowerCase()) - if (newOwnerIndex < 0) { - owners.push(makeOwner({ address: values.ownerAddress, name: values.ownerName })) - } - owners = List(owners).filter(o => o.address.toLowerCase() !== ownerAddressToRemove.toLowerCase()) - if (txHash) { - updateSafe({ - address: safeAddress, - owners, + replaceSafeOwner({ + safeAddress, + oldOwnerAddress: ownerAddressToRemove, + ownerAddress: values.ownerAddress, + ownerName: values.ownerName, }) } } @@ -88,7 +76,7 @@ const ReplaceOwner = ({ network, threshold, createTransaction, - updateSafe, + replaceSafeOwner, }: Props) => { const [activeScreen, setActiveScreen] = useState('checkOwner') const [values, setValues] = useState({}) @@ -125,7 +113,7 @@ const ReplaceOwner = ({ owners, openSnackbar, createTransaction, - updateSafe, + replaceSafeOwner, ) } catch (error) { // eslint-disable-next-line diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 51222476..a02e815a 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -57,7 +57,10 @@ type Props = { threshold: number, userAddress: string, createTransaction: Function, - updateSafe: Function, + addSafeOwner: Function, + removeSafeOwner: Function, + replaceSafeOwner: Function, + editSafeOwner: Function, granted: boolean, } @@ -108,7 +111,10 @@ class ManageOwners extends React.Component { network, userAddress, createTransaction, - updateSafe, + addSafeOwner, + removeSafeOwner, + replaceSafeOwner, + editSafeOwner, granted, } = this.props const { @@ -211,7 +217,7 @@ class ManageOwners extends React.Component { network={network} userAddress={userAddress} createTransaction={createTransaction} - updateSafe={updateSafe} + addSafeOwner={addSafeOwner} /> { network={network} userAddress={userAddress} createTransaction={createTransaction} - updateSafe={updateSafe} + removeSafeOwner={removeSafeOwner} /> { threshold={threshold} userAddress={userAddress} createTransaction={createTransaction} - updateSafe={updateSafe} + replaceSafeOwner={replaceSafeOwner} /> { selectedOwnerName={selectedOwnerName} owners={owners} network={network} - updateSafe={updateSafe} + editSafeOwner={editSafeOwner} /> ) diff --git a/src/routes/safe/components/Settings/index.jsx b/src/routes/safe/components/Settings/index.jsx index 63608556..e7bd0de7 100644 --- a/src/routes/safe/components/Settings/index.jsx +++ b/src/routes/safe/components/Settings/index.jsx @@ -37,7 +37,10 @@ type Props = Actions & { threshold: number, network: string, createTransaction: Function, - updateSafe: Function, + addSafeOwner: Function, + removeSafeOwner: Function, + replaceSafeOwner: Function, + editSafeOwner: Function, userAddress: string, } @@ -75,6 +78,10 @@ class Settings extends React.Component { userAddress, createTransaction, updateSafe, + addSafeOwner, + removeSafeOwner, + replaceSafeOwner, + editSafeOwner, } = this.props return ( @@ -116,7 +123,9 @@ class Settings extends React.Component { onClick={this.handleChange(2)} testId={OWNERS_SETTINGS_TAB_TESTID} > - Owners ({owners.size}) + Owners ( + {owners.size} +) {granted && ( @@ -146,7 +155,10 @@ class Settings extends React.Component { network={network} createTransaction={createTransaction} userAddress={userAddress} - updateSafe={updateSafe} + addSafeOwner={addSafeOwner} + removeSafeOwner={removeSafeOwner} + replaceSafeOwner={replaceSafeOwner} + editSafeOwner={editSafeOwner} granted={granted} /> )} From 967a769b6de0cca2bf1c57f05a1195e31faaa9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 12 Jul 2019 17:52:53 +0200 Subject: [PATCH 68/71] Add owner management actions to storage middleware --- src/logic/safe/utils/safeStorage.js | 2 +- .../safe/store/middleware/safeStorage.js | 101 ++++++++++++++---- 2 files changed, 79 insertions(+), 24 deletions(-) diff --git a/src/logic/safe/utils/safeStorage.js b/src/logic/safe/utils/safeStorage.js index 82c45762..88681021 100644 --- a/src/logic/safe/utils/safeStorage.js +++ b/src/logic/safe/utils/safeStorage.js @@ -42,7 +42,7 @@ export const getOwners = async (safeAddress: string): Map => { return data ? Map(data) : Map() } -export const removeOwners = async (safeAddress: string): Map => { +export const removeOwners = async (safeAddress: string) => { try { await removeFromStorage(`${OWNERS_KEY}-${safeAddress}`) } catch (err) { diff --git a/src/routes/safe/store/middleware/safeStorage.js b/src/routes/safe/store/middleware/safeStorage.js index f6dc81aa..445d4cba 100644 --- a/src/routes/safe/store/middleware/safeStorage.js +++ b/src/routes/safe/store/middleware/safeStorage.js @@ -1,18 +1,35 @@ // @flow import type { Store, AnyAction } from 'redux' +import { List } from 'immutable' import { ADD_SAFE } from '~/routes/safe/store/actions/addSafe' import { UPDATE_SAFE } from '~/routes/safe/store/actions/updateSafe' import { REMOVE_SAFE } from '~/routes/safe/store/actions/removeSafe' +import { ADD_SAFE_OWNER } from '~/routes/safe/store/actions/addSafeOwner' +import { REMOVE_SAFE_OWNER } from '~/routes/safe/store/actions/removeSafeOwner' +import { REPLACE_SAFE_OWNER } from '~/routes/safe/store/actions/replaceSafeOwner' +import { EDIT_SAFE_OWNER } from '~/routes/safe/store/actions/editSafeOwner' import { type GlobalState } from '~/store/' -import { saveSafes, setOwners, removeOwners } from '~/logic/safe/utils' +import { + saveSafes, getOwners, setOwners, removeOwners, +} from '~/logic/safe/utils' import { safesMapSelector } from '~/routes/safeList/store/selectors' import { getActiveTokensAddressesForAllSafes } from '~/routes/safe/store/selectors' import { tokensSelector } from '~/logic/tokens/store/selectors' import type { Token } from '~/logic/tokens/store/model/token' +import { makeOwner } from '~/routes/safe/store/models/owner' import { saveActiveTokens } from '~/logic/tokens/utils/tokensStorage' import { ACTIVATE_TOKEN_FOR_ALL_SAFES } from '~/routes/safe/store/actions/activateTokenForAllSafes' -const watchedActions = [ADD_SAFE, UPDATE_SAFE, REMOVE_SAFE, ACTIVATE_TOKEN_FOR_ALL_SAFES] +const watchedActions = [ + ADD_SAFE, + UPDATE_SAFE, + REMOVE_SAFE, + ADD_SAFE_OWNER, + REMOVE_SAFE_OWNER, + REPLACE_SAFE_OWNER, + EDIT_SAFE_OWNER, + ACTIVATE_TOKEN_FOR_ALL_SAFES, +] const safeStorageMware = (store: Store) => (next: Function) => async (action: AnyAction) => { const handledAction = next(action) @@ -20,36 +37,74 @@ const safeStorageMware = (store: Store) => (next: Function) => asyn if (watchedActions.includes(action.type)) { const state: GlobalState = store.getState() const safes = safesMapSelector(state) - saveSafes(safes.toJSON()) + await saveSafes(safes.toJSON()) - // recalculate active tokens - if (action.payload.activeTokens || action.type === ACTIVATE_TOKEN_FOR_ALL_SAFES) { - const tokens = tokensSelector(state) - const activeTokenAddresses = getActiveTokensAddressesForAllSafes(state) + let owners + const { safeAddress, ownerName, ownerAddress } = action.payload + switch (action.type) { + case ACTIVATE_TOKEN_FOR_ALL_SAFES: + const { activeTokens } = action.payload + if (activeTokens) { + const tokens = tokensSelector(state) + const activeTokenAddresses = getActiveTokensAddressesForAllSafes(state) - const activeTokens = tokens.withMutations((map) => { - map.forEach((token: Token) => { - if (!activeTokenAddresses.has(token.address)) { - map.remove(token.address) - } + const activeTokens = tokens.withMutations((map) => { + map.forEach((token: Token) => { + if (!activeTokenAddresses.has(token.address)) { + map.remove(token.address) + } + }) }) - }) - saveActiveTokens(activeTokens) - } + saveActiveTokens(activeTokens) + } + break - if (action.type === ADD_SAFE) { + case ADD_SAFE: const { safe } = action.payload setOwners(safe.address, safe.owners) - } else if (action.type === UPDATE_SAFE) { - const { address, owners } = action.payload + break - if (address && owners) { - setOwners(address, owners) + case UPDATE_SAFE: + owners = action.payload.owners + if (safeAddress && owners) { + setOwners(safeAddress, owners) } - } else if (action.type === REMOVE_SAFE) { - const safeAddress = action.payload - removeOwners(safeAddress) + break + + case REMOVE_SAFE: + await removeOwners(safeAddress) + break + + case ADD_SAFE_OWNER: + owners = List(safes.get(safeAddress).owners) + setOwners(safeAddress, owners.push(makeOwner({ address: ownerAddress, name: ownerName }))) + break + + case REMOVE_SAFE_OWNER: + owners = List(safes.get(safeAddress).owners) + setOwners(safeAddress, owners.filter(o => o.address.toLowerCase() !== ownerAddress.toLowerCase())) + break + + case REPLACE_SAFE_OWNER: + const { oldOwnerAddress } = action.payload + owners = List(safes.get(safeAddress).owners) + setOwners( + safeAddress, + owners + .filter(o => o.address.toLowerCase() !== oldOwnerAddress.toLowerCase()) + .push(makeOwner({ address: ownerAddress, name: ownerName })), + ) + break + + case EDIT_SAFE_OWNER: + owners = List(safes.get(safeAddress).owners) + const ownerToUpdateIndex = owners.findIndex(o => o.address.toLowerCase() === ownerAddress.toLowerCase()) + setOwners(safeAddress, owners.update(ownerToUpdateIndex, owner => owner.set('name', ownerName))) + break + + default: + break } } From 4c483cdd5dad0f493cee57b045c94ea6a45a0b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 12 Jul 2019 17:54:27 +0200 Subject: [PATCH 69/71] Refactor storage middleware --- .../safe/store/middleware/safeStorage.js | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/src/routes/safe/store/middleware/safeStorage.js b/src/routes/safe/store/middleware/safeStorage.js index 445d4cba..afdfdb4f 100644 --- a/src/routes/safe/store/middleware/safeStorage.js +++ b/src/routes/safe/store/middleware/safeStorage.js @@ -9,9 +9,7 @@ import { REMOVE_SAFE_OWNER } from '~/routes/safe/store/actions/removeSafeOwner' import { REPLACE_SAFE_OWNER } from '~/routes/safe/store/actions/replaceSafeOwner' import { EDIT_SAFE_OWNER } from '~/routes/safe/store/actions/editSafeOwner' import { type GlobalState } from '~/store/' -import { - saveSafes, getOwners, setOwners, removeOwners, -} from '~/logic/safe/utils' +import { saveSafes, setOwners, removeOwners } from '~/logic/safe/utils' import { safesMapSelector } from '~/routes/safeList/store/selectors' import { getActiveTokensAddressesForAllSafes } from '~/routes/safe/store/selectors' import { tokensSelector } from '~/logic/tokens/store/selectors' @@ -39,16 +37,14 @@ const safeStorageMware = (store: Store) => (next: Function) => asyn const safes = safesMapSelector(state) await saveSafes(safes.toJSON()) - let owners - const { safeAddress, ownerName, ownerAddress } = action.payload switch (action.type) { - case ACTIVATE_TOKEN_FOR_ALL_SAFES: - const { activeTokens } = action.payload + case ACTIVATE_TOKEN_FOR_ALL_SAFES: { + let { activeTokens } = action.payload if (activeTokens) { const tokens = tokensSelector(state) const activeTokenAddresses = getActiveTokensAddressesForAllSafes(state) - const activeTokens = tokens.withMutations((map) => { + activeTokens = tokens.withMutations((map) => { map.forEach((token: Token) => { if (!activeTokenAddresses.has(token.address)) { map.remove(token.address) @@ -59,36 +55,41 @@ const safeStorageMware = (store: Store) => (next: Function) => asyn saveActiveTokens(activeTokens) } break - - case ADD_SAFE: + } + case ADD_SAFE: { const { safe } = action.payload setOwners(safe.address, safe.owners) break - - case UPDATE_SAFE: - owners = action.payload.owners + } + case UPDATE_SAFE: { + const { safeAddress, owners } = action.payload if (safeAddress && owners) { setOwners(safeAddress, owners) } break - - case REMOVE_SAFE: + } + case REMOVE_SAFE: { + const { safeAddress } = action.payload await removeOwners(safeAddress) break - - case ADD_SAFE_OWNER: - owners = List(safes.get(safeAddress).owners) + } + case ADD_SAFE_OWNER: { + const { safeAddress, ownerAddress, ownerName } = action.payload + const owners = List(safes.get(safeAddress).owners) setOwners(safeAddress, owners.push(makeOwner({ address: ownerAddress, name: ownerName }))) break - - case REMOVE_SAFE_OWNER: - owners = List(safes.get(safeAddress).owners) + } + case REMOVE_SAFE_OWNER: { + const { safeAddress, ownerAddress } = action.payload + const owners = List(safes.get(safeAddress).owners) setOwners(safeAddress, owners.filter(o => o.address.toLowerCase() !== ownerAddress.toLowerCase())) break - - case REPLACE_SAFE_OWNER: - const { oldOwnerAddress } = action.payload - owners = List(safes.get(safeAddress).owners) + } + case REPLACE_SAFE_OWNER: { + const { + safeAddress, ownerAddress, ownerName, oldOwnerAddress, + } = action.payload + const owners = List(safes.get(safeAddress).owners) setOwners( safeAddress, owners @@ -96,13 +97,14 @@ const safeStorageMware = (store: Store) => (next: Function) => asyn .push(makeOwner({ address: ownerAddress, name: ownerName })), ) break - - case EDIT_SAFE_OWNER: - owners = List(safes.get(safeAddress).owners) + } + case EDIT_SAFE_OWNER: { + const { safeAddress, ownerAddress, ownerName } = action.payload + const owners = List(safes.get(safeAddress).owners) const ownerToUpdateIndex = owners.findIndex(o => o.address.toLowerCase() === ownerAddress.toLowerCase()) setOwners(safeAddress, owners.update(ownerToUpdateIndex, owner => owner.set('name', ownerName))) break - + } default: break } From f5a4381170d8b0f3933b7b389d34d4c3c43eaa0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 12 Jul 2019 17:57:37 +0200 Subject: [PATCH 70/71] Handle owner management actions in safe reducer --- src/routes/safe/store/reducer/safe.js | 42 ++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/routes/safe/store/reducer/safe.js b/src/routes/safe/store/reducer/safe.js index c3aff170..088ff9a6 100644 --- a/src/routes/safe/store/reducer/safe.js +++ b/src/routes/safe/store/reducer/safe.js @@ -4,12 +4,16 @@ import { handleActions, type ActionType } from 'redux-actions' import { ADD_SAFE, buildOwnersFrom } from '~/routes/safe/store/actions/addSafe' import SafeRecord, { type Safe, type SafeProps } from '~/routes/safe/store/models/safe' import TokenBalance from '~/routes/safe/store/models/tokenBalance' -import { type OwnerProps } from '~/routes/safe/store/models/owner' +import { makeOwner, type OwnerProps } from '~/routes/safe/store/models/owner' import { loadFromStorage } from '~/utils/storage' import { SAFES_KEY } from '~/logic/safe/utils' import { UPDATE_SAFE } from '~/routes/safe/store/actions/updateSafe' import { ACTIVATE_TOKEN_FOR_ALL_SAFES } from '~/routes/safe/store/actions/activateTokenForAllSafes' import { REMOVE_SAFE } from '~/routes/safe/store/actions/removeSafe' +import { ADD_SAFE_OWNER } from '~/routes/safe/store/actions/addSafeOwner' +import { REMOVE_SAFE_OWNER } from '~/routes/safe/store/actions/removeSafeOwner' +import { REPLACE_SAFE_OWNER } from '~/routes/safe/store/actions/replaceSafeOwner' +import { EDIT_SAFE_OWNER } from '~/routes/safe/store/actions/editSafeOwner' export const SAFE_REDUCER_ID = 'safes' @@ -97,6 +101,42 @@ export default handleActions( return state.delete(safeAddress) }, + [ADD_SAFE_OWNER]: (state: State, action: ActionType): State => { + const { safeAddress, ownerName, ownerAddress } = action.payload + + return state.update(safeAddress, prevSafe => prevSafe.merge({ + owners: prevSafe.owners.push(makeOwner({ address: ownerAddress, name: ownerName })), + })) + }, + [REMOVE_SAFE_OWNER]: (state: State, action: ActionType): State => { + const { safeAddress, ownerAddress } = action.payload + + return state.update(safeAddress, prevSafe => prevSafe.merge({ + owners: prevSafe.owners.filter(o => o.address.toLowerCase() !== ownerAddress.toLowerCase()), + })) + }, + [REPLACE_SAFE_OWNER]: (state: State, action: ActionType): State => { + const { + safeAddress, oldOwnerAddress, ownerName, ownerAddress, + } = action.payload + + return state.update(safeAddress, prevSafe => prevSafe.merge({ + owners: prevSafe.owners + .filter(o => o.address.toLowerCase() !== oldOwnerAddress.toLowerCase()) + .push(makeOwner({ address: ownerAddress, name: ownerName })), + })) + }, + [EDIT_SAFE_OWNER]: (state: State, action: ActionType): State => { + const { safeAddress, ownerAddress, ownerName } = action.payload + + return state.update(safeAddress, (prevSafe) => { + const ownerToUpdateIndex = prevSafe.owners.findIndex( + o => o.address.toLowerCase() === ownerAddress.toLowerCase(), + ) + const updatedOwners = prevSafe.owners.update(ownerToUpdateIndex, owner => owner.set('name', ownerName)) + return prevSafe.merge({ owners: updatedOwners }) + }) + }, }, Map(), ) From 4d0adc5027b39e675f1c5a74944598bc6c4af528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Mon, 15 Jul 2019 12:51:51 +0200 Subject: [PATCH 71/71] Refactor sentinel address --- src/logic/contracts/safeContracts.js | 2 ++ .../Settings/ManageOwners/RemoveOwnerModal/index.jsx | 4 +--- .../Settings/ManageOwners/ReplaceOwnerModal/index.jsx | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/logic/contracts/safeContracts.js b/src/logic/contracts/safeContracts.js index 3669d257..d90d8366 100644 --- a/src/logic/contracts/safeContracts.js +++ b/src/logic/contracts/safeContracts.js @@ -7,6 +7,8 @@ import { getWeb3 } from '~/logic/wallets/getWeb3' import { calculateGasOf, calculateGasPrice } from '~/logic/wallets/ethTransactions' import { ZERO_ADDRESS } from '~/logic/wallets/ethAddresses' +export const SENTINEL_ADDRESS = '0x0000000000000000000000000000000000000001' + let proxyFactoryMaster let safeMaster diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx index 4dc4512c..244c6b9d 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx @@ -5,7 +5,7 @@ import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' import { type Owner } from '~/routes/safe/store/models/owner' -import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' +import { getGnosisSafeInstanceAt, SENTINEL_ADDRESS } from '~/logic/contracts/safeContracts' import CheckOwner from './screens/CheckOwner' import ThresholdForm from './screens/ThresholdForm' import ReviewRemoveOwner from './screens/Review' @@ -34,8 +34,6 @@ type Props = { } type ActiveScreen = 'checkOwner' | 'selectThreshold' | 'reviewRemoveOwner' -const SENTINEL_ADDRESS = '0x0000000000000000000000000000000000000001' - export const sendRemoveOwner = async ( values: Object, safeAddress: string, diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx index 25393b0c..74089e60 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx @@ -4,7 +4,7 @@ import { List } from 'immutable' import { withStyles } from '@material-ui/core/styles' import { SharedSnackbarConsumer } from '~/components/SharedSnackBar' import Modal from '~/components/Modal' -import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' +import { getGnosisSafeInstanceAt, SENTINEL_ADDRESS } from '~/logic/contracts/safeContracts' import OwnerForm from './screens/OwnerForm' import ReviewReplaceOwner from './screens/Review' @@ -32,8 +32,6 @@ type Props = { } type ActiveScreen = 'checkOwner' | 'reviewReplaceOwner' -const SENTINEL_ADDRESS = '0x0000000000000000000000000000000000000001' - export const sendReplaceOwner = async ( values: Object, safeAddress: string,