From 03ce409b74ce5f51846b6b59dc40502311fc8be3 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Sat, 8 May 2021 14:45:30 -0700 Subject: [PATCH] revert to using artifacts folder --- README.md | 4 +- artifacts/BConst.json | 2861 + artifacts/BFactory.json | 3139 + artifacts/BMath.json | 17065 ++++++ artifacts/BNum.json | 13484 +++++ artifacts/BPool.json | 69377 ++++++++++++++++++++++ artifacts/BToken.json | 14550 +++++ artifacts/BTokenBase.json | 14333 +++++ artifacts/Context.json | 666 + artifacts/DTFactory.json | 4726 ++ artifacts/DataTokenTemplate.json | 15147 +++++ artifacts/Deployer.json | 829 + artifacts/Dispenser.json | 17468 ++++++ artifacts/ERC20.json | 11836 ++++ artifacts/FixedRateExchange.json | 16191 +++++ artifacts/IERC20.json | 1949 + artifacts/IERC20Template.json | 2981 + artifacts/Metadata.json | 2505 + artifacts/Migrations.json | 963 + artifacts/OPFCommunityFeeCollector.json | 3496 ++ artifacts/Ownable.json | 3279 + artifacts/SafeMath.json | 5061 ++ artifacts/address.json | 44 + docs/README.md | 2 +- docs/RELEASE_PROCESS.md | 2 +- migrations/2_deploy_contracts.js | 2 +- package.json | 4 +- scripts/deploy_docker.sh | 4 +- scripts/deploy_pypi.sh | 3 + 29 files changed, 221962 insertions(+), 9 deletions(-) create mode 100644 artifacts/BConst.json create mode 100644 artifacts/BFactory.json create mode 100644 artifacts/BMath.json create mode 100644 artifacts/BNum.json create mode 100644 artifacts/BPool.json create mode 100644 artifacts/BToken.json create mode 100644 artifacts/BTokenBase.json create mode 100644 artifacts/Context.json create mode 100644 artifacts/DTFactory.json create mode 100644 artifacts/DataTokenTemplate.json create mode 100644 artifacts/Deployer.json create mode 100644 artifacts/Dispenser.json create mode 100644 artifacts/ERC20.json create mode 100644 artifacts/FixedRateExchange.json create mode 100644 artifacts/IERC20.json create mode 100644 artifacts/IERC20Template.json create mode 100644 artifacts/Metadata.json create mode 100644 artifacts/Migrations.json create mode 100644 artifacts/OPFCommunityFeeCollector.json create mode 100644 artifacts/Ownable.json create mode 100644 artifacts/SafeMath.json create mode 100644 artifacts/address.json diff --git a/README.md b/README.md index aec91f811..58f5e98b2 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Ocean contracts are deployed to Rinkeby, Ethereum mainnet, and more. [Here are d * In a separate terminal, start the testnet: `ganache-cli` * In your main terminal, run: `yarn deploy` -* Confirm: are `"development"` entries updated in addresses file `./ocean_abis/address.json`? +* Confirm: are `"development"` entries updated in addresses file `./artifacts/address.json`? #### Deploy to Remote (e.g. Rinkeby) @@ -81,7 +81,7 @@ export INFURA_TOKEN='GET INFURA_TOKEN FROM INFURA PLATFORM' yarn deploy:rinkeby ``` -* Confirm: are `"rinkeby"` entries updated in addresses file `./ocean_abis/address.json`? +* Confirm: are `"rinkeby"` entries updated in addresses file `./artifacts/address.json`? ## 🦑 Local Development diff --git a/artifacts/BConst.json b/artifacts/BConst.json new file mode 100644 index 000000000..5bed35ee7 --- /dev/null +++ b/artifacts/BConst.json @@ -0,0 +1,2861 @@ +{ + "contractName": "BConst", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "MAX_TOTAL_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BPOW_PRECISION", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BALANCE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "INIT_POOL_SUPPLY", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_OUT_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BONE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EXIT_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_IN_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"MAX_TOTAL_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BPOW_PRECISION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BALANCE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"INIT_POOL_SUPPLY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_OUT_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BONE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EXIT_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_IN_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol\":\"BConst\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol\":{\"keccak256\":\"0x21675a0793e0be762a27e09ed3b0bd86e035c73ac3078dd841c38804445d5f5a\",\"urls\":[\"bzzr://47016ef4a80276f320b28a058fc92e7d9d93433bb5e4aa934668383cbefad77e\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061027c806100206000396000f3fe608060405234801561001057600080fd5b506004361061011d576000357c010000000000000000000000000000000000000000000000000000000090048063b7b800a4116100b4578063c36596a611610083578063c36596a614610144578063c6580d1214610194578063e4a28a5214610122578063ec0930211461019c5761011d565b8063b7b800a414610174578063ba019dab1461017c578063bc063e1a14610184578063bc694ea21461018c5761011d565b8063867378c5116100f0578063867378c5146101545780639381cd2b1461015c578063992e2a9214610164578063b0e0d1361461016c5761011d565b806309a3bbe414610122578063189d00ca1461013c578063218b53821461014457806376c7a3c71461014c575b600080fd5b61012a6101a4565b60408051918252519081900360200190f35b61012a6101b1565b61012a6101c5565b61012a6101d1565b61012a6101e3565b61012a6101f7565b61012a610204565b61012a610210565b61012a610215565b61012a61021a565b61012a61021f565b61012a61022f565b61012a61023b565b61012a610240565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b620f4240670de0b6b3a76400006101c1565b64e8d4a51000670de0b6b3a76400006101c1565b68056bc75e2d6310000081565b6704a03ce68d21555681565b600881565b600281565b600181565b600a670de0b6b3a76400006101c1565b671bc16d674ec7ffff81565b600081565b6002670de0b6b3a76400006101c156fea165627a7a72305820ac4fd1da763d7dcc1d4d871a3c11c3017e5505a029594e883e46d70fcafec1260029", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061011d576000357c010000000000000000000000000000000000000000000000000000000090048063b7b800a4116100b4578063c36596a611610083578063c36596a614610144578063c6580d1214610194578063e4a28a5214610122578063ec0930211461019c5761011d565b8063b7b800a414610174578063ba019dab1461017c578063bc063e1a14610184578063bc694ea21461018c5761011d565b8063867378c5116100f0578063867378c5146101545780639381cd2b1461015c578063992e2a9214610164578063b0e0d1361461016c5761011d565b806309a3bbe414610122578063189d00ca1461013c578063218b53821461014457806376c7a3c71461014c575b600080fd5b61012a6101a4565b60408051918252519081900360200190f35b61012a6101b1565b61012a6101c5565b61012a6101d1565b61012a6101e3565b61012a6101f7565b61012a610204565b61012a610210565b61012a610215565b61012a61021a565b61012a61021f565b61012a61022f565b61012a61023b565b61012a610240565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b620f4240670de0b6b3a76400006101c1565b64e8d4a51000670de0b6b3a76400006101c1565b68056bc75e2d6310000081565b6704a03ce68d21555681565b600881565b600281565b600181565b600a670de0b6b3a76400006101c1565b671bc16d674ec7ffff81565b600081565b6002670de0b6b3a76400006101c156fea165627a7a72305820ac4fd1da763d7dcc1d4d871a3c11c3017e5505a029594e883e46d70fcafec1260029", + "sourceMap": "667:914:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;667:914:2;;;;;;;", + "deployedSourceMap": "667:914:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;667:914:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1111:50;;;:::i;:::-;;;;;;;;;;;;;;;;1403:54;;;:::i;1004:45::-;;;:::i;840:53::-;;;:::i;1167:54::-;;;:::i;1228:51::-;;;:::i;1519:59::-;;;:::i;791:42::-;;;:::i;743:::-;;;:::i;1286:46::-;;;:::i;899:50::-;;;:::i;1338:59::-;;;:::i;955:42::-;;;:::i;1464:49::-;;;:::i;1111:50::-;1152:9;1111:50;:::o;1403:54::-;1451:6;730;1444:13;;1403:54;:::o;1004:45::-;730:6;1004:45;:::o;840:53::-;888:5;730:6;881:12;;1167:54;1215:6;730;1208:13;;1228:51;1269:10;1228:51;:::o;1519:59::-;1560:18;1519:59;:::o;791:42::-;832:1;791:42;:::o;743:::-;784:1;743:42;:::o;1286:46::-;1327:5;1286:46;:::o;899:50::-;947:2;730:6;940:9;;1338:59;1379:18;1338:59;:::o;955:42::-;996:1;955:42;:::o;1464:49::-;1512:1;730:6;1505:8;", + "source": "// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity 0.5.7;\n\ncontract BConst {\n uint public constant BONE = 10**18;\n\n uint public constant MIN_BOUND_TOKENS = 2;\n uint public constant MAX_BOUND_TOKENS = 8;\n\n uint public constant MIN_FEE = BONE / 10**6;\n uint public constant MAX_FEE = BONE / 10;\n uint public constant EXIT_FEE = 0;\n\n uint public constant MIN_WEIGHT = BONE;\n uint public constant MAX_WEIGHT = BONE * 50;\n uint public constant MAX_TOTAL_WEIGHT = BONE * 50;\n uint public constant MIN_BALANCE = BONE / 10**12;\n\n uint public constant INIT_POOL_SUPPLY = BONE * 100;\n\n uint public constant MIN_BPOW_BASE = 1 wei;\n uint public constant MAX_BPOW_BASE = (2 * BONE) - 1 wei;\n uint public constant BPOW_PRECISION = BONE / 10**10;\n\n uint public constant MAX_IN_RATIO = BONE / 2;\n uint public constant MAX_OUT_RATIO = (BONE / 3) + 1 wei;\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol", + "exportedSymbols": { + "BConst": [ + 280 + ] + }, + "id": 281, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 197, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "643:22:2" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 280, + "linearizedBaseContracts": [ + 280 + ], + "name": "BConst", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 202, + "name": "BONE", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "689:47:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 198, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "689:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + }, + "id": 201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "730:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3138", + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "734:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "src": "730:6:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 205, + "name": "MIN_BOUND_TOKENS", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "743:42:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 203, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "743:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "32", + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "784:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 208, + "name": "MAX_BOUND_TOKENS", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "791:42:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 206, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "791:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "38", + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "832:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 215, + "name": "MIN_FEE", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "840:53:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 209, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "840:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 210, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "881:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "888:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "36", + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "892:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6_by_1", + "typeString": "int_const 6" + }, + "value": "6" + }, + "src": "888:5:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + } + }, + "src": "881:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 220, + "name": "MAX_FEE", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "899:50:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 216, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "899:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 217, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "940:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "947:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "940:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 223, + "name": "EXIT_FEE", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "955:42:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 221, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "955:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "996:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 226, + "name": "MIN_WEIGHT", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "1004:45:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 224, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1004:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "id": 225, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1045:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 231, + "name": "MAX_WEIGHT", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "1055:50:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 227, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1055:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 228, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1096:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3530", + "id": 229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1103:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "50" + }, + "src": "1096:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 236, + "name": "MAX_TOTAL_WEIGHT", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "1111:50:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 232, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1111:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 233, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1152:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3530", + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1159:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "50" + }, + "src": "1152:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 243, + "name": "MIN_BALANCE", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "1167:54:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 237, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1167:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 238, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1208:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1000000000000_by_1", + "typeString": "int_const 1000000000000" + }, + "id": 241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1215:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3132", + "id": 240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1219:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12_by_1", + "typeString": "int_const 12" + }, + "value": "12" + }, + "src": "1215:6:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000_by_1", + "typeString": "int_const 1000000000000" + } + }, + "src": "1208:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 248, + "name": "INIT_POOL_SUPPLY", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "1228:51:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 244, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1228:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 245, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1269:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "313030", + "id": 246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1276:3:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "src": "1269:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 251, + "name": "MIN_BPOW_BASE", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "1286:46:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 249, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1286:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31", + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1327:5:2", + "subdenomination": "wei", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 259, + "name": "MAX_BPOW_BASE", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "1338:59:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 252, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1338:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1380:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 254, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1384:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1380:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 256, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1379:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 257, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1392:5:2", + "subdenomination": "wei", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1379:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 266, + "name": "BPOW_PRECISION", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "1403:54:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 260, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1403:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 261, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1444:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_10000000000_by_1", + "typeString": "int_const 10000000000" + }, + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1451:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1455:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "1451:6:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000000000_by_1", + "typeString": "int_const 10000000000" + } + }, + "src": "1444:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 271, + "name": "MAX_IN_RATIO", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "1464:49:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 267, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1464:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 268, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1505:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 269, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1512:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "1505:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 279, + "name": "MAX_OUT_RATIO", + "nodeType": "VariableDeclaration", + "scope": 280, + "src": "1519:59:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 272, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1519:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 273, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1561:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1568:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "1561:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 276, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1560:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1573:5:2", + "subdenomination": "wei", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1560:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + } + ], + "scope": 281, + "src": "667:914:2" + } + ], + "src": "643:939:2" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol", + "exportedSymbols": { + "BConst": [ + 280 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 197, + "name": "PragmaDirective", + "src": "643:22:2" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 280 + ], + "name": "BConst", + "scope": 281 + }, + "children": [ + { + "attributes": { + "constant": true, + "name": "BONE", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 198, + "name": "ElementaryTypeName", + "src": "689:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "**", + "type": "int_const 1000000000000000000" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3130", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 10", + "value": "10" + }, + "id": 199, + "name": "Literal", + "src": "730:2:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3138", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 18", + "value": "18" + }, + "id": 200, + "name": "Literal", + "src": "734:2:2" + } + ], + "id": 201, + "name": "BinaryOperation", + "src": "730:6:2" + } + ], + "id": 202, + "name": "VariableDeclaration", + "src": "689:47:2" + }, + { + "attributes": { + "constant": true, + "name": "MIN_BOUND_TOKENS", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 203, + "name": "ElementaryTypeName", + "src": "743:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "32", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2", + "value": "2" + }, + "id": 204, + "name": "Literal", + "src": "784:1:2" + } + ], + "id": 205, + "name": "VariableDeclaration", + "src": "743:42:2" + }, + { + "attributes": { + "constant": true, + "name": "MAX_BOUND_TOKENS", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 206, + "name": "ElementaryTypeName", + "src": "791:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "38", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 8", + "value": "8" + }, + "id": 207, + "name": "Literal", + "src": "832:1:2" + } + ], + "id": 208, + "name": "VariableDeclaration", + "src": "791:42:2" + }, + { + "attributes": { + "constant": true, + "name": "MIN_FEE", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 209, + "name": "ElementaryTypeName", + "src": "840:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 210, + "name": "Identifier", + "src": "881:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "**", + "type": "int_const 1000000" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3130", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 10", + "value": "10" + }, + "id": 211, + "name": "Literal", + "src": "888:2:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "36", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 6", + "value": "6" + }, + "id": 212, + "name": "Literal", + "src": "892:1:2" + } + ], + "id": 213, + "name": "BinaryOperation", + "src": "888:5:2" + } + ], + "id": 214, + "name": "BinaryOperation", + "src": "881:12:2" + } + ], + "id": 215, + "name": "VariableDeclaration", + "src": "840:53:2" + }, + { + "attributes": { + "constant": true, + "name": "MAX_FEE", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 216, + "name": "ElementaryTypeName", + "src": "899:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 217, + "name": "Identifier", + "src": "940:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3130", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 10", + "value": "10" + }, + "id": 218, + "name": "Literal", + "src": "947:2:2" + } + ], + "id": 219, + "name": "BinaryOperation", + "src": "940:9:2" + } + ], + "id": 220, + "name": "VariableDeclaration", + "src": "899:50:2" + }, + { + "attributes": { + "constant": true, + "name": "EXIT_FEE", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 221, + "name": "ElementaryTypeName", + "src": "955:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 222, + "name": "Literal", + "src": "996:1:2" + } + ], + "id": 223, + "name": "VariableDeclaration", + "src": "955:42:2" + }, + { + "attributes": { + "constant": true, + "name": "MIN_WEIGHT", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 224, + "name": "ElementaryTypeName", + "src": "1004:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 225, + "name": "Identifier", + "src": "1045:4:2" + } + ], + "id": 226, + "name": "VariableDeclaration", + "src": "1004:45:2" + }, + { + "attributes": { + "constant": true, + "name": "MAX_WEIGHT", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 227, + "name": "ElementaryTypeName", + "src": "1055:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 228, + "name": "Identifier", + "src": "1096:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3530", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 50", + "value": "50" + }, + "id": 229, + "name": "Literal", + "src": "1103:2:2" + } + ], + "id": 230, + "name": "BinaryOperation", + "src": "1096:9:2" + } + ], + "id": 231, + "name": "VariableDeclaration", + "src": "1055:50:2" + }, + { + "attributes": { + "constant": true, + "name": "MAX_TOTAL_WEIGHT", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 232, + "name": "ElementaryTypeName", + "src": "1111:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 233, + "name": "Identifier", + "src": "1152:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3530", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 50", + "value": "50" + }, + "id": 234, + "name": "Literal", + "src": "1159:2:2" + } + ], + "id": 235, + "name": "BinaryOperation", + "src": "1152:9:2" + } + ], + "id": 236, + "name": "VariableDeclaration", + "src": "1111:50:2" + }, + { + "attributes": { + "constant": true, + "name": "MIN_BALANCE", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 237, + "name": "ElementaryTypeName", + "src": "1167:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 238, + "name": "Identifier", + "src": "1208:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1000000000000_by_1", + "typeString": "int_const 1000000000000" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "**", + "type": "int_const 1000000000000" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3130", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 10", + "value": "10" + }, + "id": 239, + "name": "Literal", + "src": "1215:2:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3132", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 12", + "value": "12" + }, + "id": 240, + "name": "Literal", + "src": "1219:2:2" + } + ], + "id": 241, + "name": "BinaryOperation", + "src": "1215:6:2" + } + ], + "id": 242, + "name": "BinaryOperation", + "src": "1208:13:2" + } + ], + "id": 243, + "name": "VariableDeclaration", + "src": "1167:54:2" + }, + { + "attributes": { + "constant": true, + "name": "INIT_POOL_SUPPLY", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 244, + "name": "ElementaryTypeName", + "src": "1228:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 245, + "name": "Identifier", + "src": "1269:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "313030", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 100", + "value": "100" + }, + "id": 246, + "name": "Literal", + "src": "1276:3:2" + } + ], + "id": 247, + "name": "BinaryOperation", + "src": "1269:10:2" + } + ], + "id": 248, + "name": "VariableDeclaration", + "src": "1228:51:2" + }, + { + "attributes": { + "constant": true, + "name": "MIN_BPOW_BASE", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 249, + "name": "ElementaryTypeName", + "src": "1286:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": "wei", + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 250, + "name": "Literal", + "src": "1327:5:2" + } + ], + "id": 251, + "name": "VariableDeclaration", + "src": "1286:46:2" + }, + { + "attributes": { + "constant": true, + "name": "MAX_BPOW_BASE", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 252, + "name": "ElementaryTypeName", + "src": "1338:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "-", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "32", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2", + "value": "2" + }, + "id": 253, + "name": "Literal", + "src": "1380:1:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 254, + "name": "Identifier", + "src": "1384:4:2" + } + ], + "id": 255, + "name": "BinaryOperation", + "src": "1380:8:2" + } + ], + "id": 256, + "name": "TupleExpression", + "src": "1379:10:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": "wei", + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 257, + "name": "Literal", + "src": "1392:5:2" + } + ], + "id": 258, + "name": "BinaryOperation", + "src": "1379:18:2" + } + ], + "id": 259, + "name": "VariableDeclaration", + "src": "1338:59:2" + }, + { + "attributes": { + "constant": true, + "name": "BPOW_PRECISION", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 260, + "name": "ElementaryTypeName", + "src": "1403:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 261, + "name": "Identifier", + "src": "1444:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_10000000000_by_1", + "typeString": "int_const 10000000000" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "**", + "type": "int_const 10000000000" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3130", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 10", + "value": "10" + }, + "id": 262, + "name": "Literal", + "src": "1451:2:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3130", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 10", + "value": "10" + }, + "id": 263, + "name": "Literal", + "src": "1455:2:2" + } + ], + "id": 264, + "name": "BinaryOperation", + "src": "1451:6:2" + } + ], + "id": 265, + "name": "BinaryOperation", + "src": "1444:13:2" + } + ], + "id": 266, + "name": "VariableDeclaration", + "src": "1403:54:2" + }, + { + "attributes": { + "constant": true, + "name": "MAX_IN_RATIO", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 267, + "name": "ElementaryTypeName", + "src": "1464:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 268, + "name": "Identifier", + "src": "1505:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "32", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2", + "value": "2" + }, + "id": 269, + "name": "Literal", + "src": "1512:1:2" + } + ], + "id": 270, + "name": "BinaryOperation", + "src": "1505:8:2" + } + ], + "id": 271, + "name": "VariableDeclaration", + "src": "1464:49:2" + }, + { + "attributes": { + "constant": true, + "name": "MAX_OUT_RATIO", + "scope": 280, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 272, + "name": "ElementaryTypeName", + "src": "1519:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "+", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 273, + "name": "Identifier", + "src": "1561:4:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "33", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 3", + "value": "3" + }, + "id": 274, + "name": "Literal", + "src": "1568:1:2" + } + ], + "id": 275, + "name": "BinaryOperation", + "src": "1561:8:2" + } + ], + "id": 276, + "name": "TupleExpression", + "src": "1560:10:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": "wei", + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 277, + "name": "Literal", + "src": "1573:5:2" + } + ], + "id": 278, + "name": "BinaryOperation", + "src": "1560:18:2" + } + ], + "id": 279, + "name": "VariableDeclaration", + "src": "1519:59:2" + } + ], + "id": 280, + "name": "ContractDefinition", + "src": "667:914:2" + } + ], + "id": 281, + "name": "SourceUnit", + "src": "643:939:2" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.758Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/BFactory.json b/artifacts/BFactory.json new file mode 100644 index 000000000..2e367f59b --- /dev/null +++ b/artifacts/BFactory.json @@ -0,0 +1,3139 @@ +{ + "contractName": "BFactory", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "MAX_TOTAL_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BPOW_PRECISION", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BALANCE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "INIT_POOL_SUPPLY", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_OUT_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "bpoolTemplate", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BONE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EXIT_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_IN_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "_bpoolTemplate", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "newBPoolAddress", + "type": "address" + }, + { + "indexed": true, + "name": "bpoolTemplateAddress", + "type": "address" + } + ], + "name": "BPoolCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "bpoolAddress", + "type": "address" + }, + { + "indexed": true, + "name": "registeredBy", + "type": "address" + } + ], + "name": "BPoolRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "instance", + "type": "address" + } + ], + "name": "InstanceDeployed", + "type": "event" + }, + { + "constant": false, + "inputs": [], + "name": "newBPool", + "outputs": [ + { + "name": "bpool", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"MAX_TOTAL_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BPOW_PRECISION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BALANCE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"INIT_POOL_SUPPLY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_OUT_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"bpoolTemplate\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BONE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EXIT_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"newBPool\",\"outputs\":[{\"name\":\"bpool\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_IN_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_bpoolTemplate\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"newBPoolAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"bpoolTemplateAddress\",\"type\":\"address\"}],\"name\":\"BPoolCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"bpoolAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"registeredBy\",\"type\":\"address\"}],\"name\":\"BPoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"instance\",\"type\":\"address\"}],\"name\":\"InstanceDeployed\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BFactory.sol\":\"BFactory\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol\":{\"keccak256\":\"0x21675a0793e0be762a27e09ed3b0bd86e035c73ac3078dd841c38804445d5f5a\",\"urls\":[\"bzzr://47016ef4a80276f320b28a058fc92e7d9d93433bb5e4aa934668383cbefad77e\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BFactory.sol\":{\"keccak256\":\"0xbe79e34d5d123d52d92d4b576e822574d8a61462aec76042ccf70848c8ad9d1c\",\"urls\":[\"bzzr://b6dbeb70ebcdee5e23b973e6025abeb4dd3bc85dd5714fe8f1ab095d0b739ba1\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BMath.sol\":{\"keccak256\":\"0x2e3f07713561f2a0983999255794f5741c5854633b8524675767fde35f1b98c2\",\"urls\":[\"bzzr://e8c50205e3f6bd1d37fcdf178486f9560814e28ed8467af5a4ceb30651991cf8\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol\":{\"keccak256\":\"0x84cf31d699784debbe9ec94be2086cdd2918c944473d5228c54dda10a660af8a\",\"urls\":[\"bzzr://7fcfbf954d6cdeec6709ad7543a9fa1576b788930245adc8d93030f6c72358cd\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BPool.sol\":{\"keccak256\":\"0x5317eb03e13ef8512444d550ce4811c67610fef0ece0d45f583fc14658bb2d92\",\"urls\":[\"bzzr://0557c64a1179384e994a9675724430e4db5b2dd15fdc7e59b9b6fdfa65f12dcb\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol\":{\"keccak256\":\"0xad046b7ad912f72a90330abb3abddc3aa711077c0021d6a9d0dba2c99534e51b\",\"urls\":[\"bzzr://159aed1b631f2af168fd17235b6827859cb5d6cb7e95abeff3cc3d8079710f41\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/utils/Deployer.sol\":{\"keccak256\":\"0x60ebf25d36c0ee9d310c74eda954a474b0d867f23f57d3b8923d9ee7cc313dcc\",\"urls\":[\"bzzr://81ebb3c5acb99bc74b4bd7ee9897282cb2c983344195645cec8bc2e642680c53\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405160208061069f8339810180604052602081101561003057600080fd5b5051600160a060020a038116610091576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610672602d913960400191505060405180910390fd5b60008054600160a060020a03909216600160a060020a03199092169190911790556105b1806100c16000396000f3fe608060405234801561001057600080fd5b5060043610610133576000357c010000000000000000000000000000000000000000000000000000000090048063ba019dab116100bf578063c36596a61161008e578063c36596a61461015a578063c6580d12146101ce578063d556c5dc146101d6578063e4a28a5214610138578063ec093021146101de57610133565b8063ba019dab14610192578063bae6ae121461019a578063bc063e1a146101be578063bc694ea2146101c657610133565b8063867378c511610106578063867378c51461016a5780639381cd2b14610172578063992e2a921461017a578063b0e0d13614610182578063b7b800a41461018a57610133565b806309a3bbe414610138578063189d00ca14610152578063218b53821461015a57806376c7a3c714610162575b600080fd5b6101406101e6565b60408051918252519081900360200190f35b6101406101f3565b610140610207565b610140610213565b610140610225565b610140610239565b610140610246565b610140610252565b610140610257565b61014061025c565b6101a2610261565b60408051600160a060020a039092168252519081900360200190f35b610140610270565b610140610280565b61014061028c565b6101a2610291565b6101406104a0565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b620f4240670de0b6b3a7640000610203565b64e8d4a51000670de0b6b3a7640000610203565b68056bc75e2d6310000081565b6704a03ce68d21555681565b600881565b600281565b600181565b600054600160a060020a031681565b600a670de0b6b3a7640000610203565b671bc16d674ec7ffff81565b600081565b600080546102a790600160a060020a03166104b0565b9050600160a060020a038116610308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806105626024913960400191505060405180910390fd5b604080517f506de97400000000000000000000000000000000000000000000000000000000815233600482015230602482015264e8d4a5100060448201526000606482018190526084820181905291518392600160a060020a0384169263506de9749260a48083019360209383900390910190829087803b15801561038c57600080fd5b505af11580156103a0573d6000803e3d6000fd5b505050506040513d60208110156103b657600080fd5b505161042357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4552525f494e495449414c495a455f42504f4f4c000000000000000000000000604482015290519081900360640190fd5b60008054604051600160a060020a0391821692918516917f83d56eda3b93446228a036eafbbbcb38aa8f27a21a302b860469af9cb27c84eb91a360408051600160a060020a0384168152905133917fb19f201dd081bc52562d1f83f3585fd08caa9de15534e6e4787f5ae63d39106c919081900360200190a25090565b6002670de0b6b3a7640000610203565b6040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081526c010000000000000000000000008202601482018190527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000602883015260009160378184f060408051600160a060020a038316815290519194507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c925081900360200190a15091905056fe42466163746f72793a20696e76616c69642062706f6f6c207a65726f2061646472657373a165627a7a72305820a74a48c4d3b15040d3e2e58751470d837ef6d4dfd556d9d1d9a7a60774a3b50b002942466163746f72793a20696e76616c69642062706f6f6c2074656d706c617465207a65726f2061646472657373", + "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610133576000357c010000000000000000000000000000000000000000000000000000000090048063ba019dab116100bf578063c36596a61161008e578063c36596a61461015a578063c6580d12146101ce578063d556c5dc146101d6578063e4a28a5214610138578063ec093021146101de57610133565b8063ba019dab14610192578063bae6ae121461019a578063bc063e1a146101be578063bc694ea2146101c657610133565b8063867378c511610106578063867378c51461016a5780639381cd2b14610172578063992e2a921461017a578063b0e0d13614610182578063b7b800a41461018a57610133565b806309a3bbe414610138578063189d00ca14610152578063218b53821461015a57806376c7a3c714610162575b600080fd5b6101406101e6565b60408051918252519081900360200190f35b6101406101f3565b610140610207565b610140610213565b610140610225565b610140610239565b610140610246565b610140610252565b610140610257565b61014061025c565b6101a2610261565b60408051600160a060020a039092168252519081900360200190f35b610140610270565b610140610280565b61014061028c565b6101a2610291565b6101406104a0565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b620f4240670de0b6b3a7640000610203565b64e8d4a51000670de0b6b3a7640000610203565b68056bc75e2d6310000081565b6704a03ce68d21555681565b600881565b600281565b600181565b600054600160a060020a031681565b600a670de0b6b3a7640000610203565b671bc16d674ec7ffff81565b600081565b600080546102a790600160a060020a03166104b0565b9050600160a060020a038116610308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806105626024913960400191505060405180910390fd5b604080517f506de97400000000000000000000000000000000000000000000000000000000815233600482015230602482015264e8d4a5100060448201526000606482018190526084820181905291518392600160a060020a0384169263506de9749260a48083019360209383900390910190829087803b15801561038c57600080fd5b505af11580156103a0573d6000803e3d6000fd5b505050506040513d60208110156103b657600080fd5b505161042357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4552525f494e495449414c495a455f42504f4f4c000000000000000000000000604482015290519081900360640190fd5b60008054604051600160a060020a0391821692918516917f83d56eda3b93446228a036eafbbbcb38aa8f27a21a302b860469af9cb27c84eb91a360408051600160a060020a0384168152905133917fb19f201dd081bc52562d1f83f3585fd08caa9de15534e6e4787f5ae63d39106c919081900360200190a25090565b6002670de0b6b3a7640000610203565b6040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081526c010000000000000000000000008202601482018190527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000602883015260009160378184f060408051600160a060020a038316815290519194507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c925081900360200190a15091905056fe42466163746f72793a20696e76616c69642062706f6f6c207a65726f2061646472657373a165627a7a72305820a74a48c4d3b15040d3e2e58751470d837ef6d4dfd556d9d1d9a7a60774a3b50b0029", + "sourceMap": "650:1489:3:-;;;1110:234;8:9:-1;5:2;;;30:1;27;20:12;5:2;1110:234:3;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1110:234:3;-1:-1:-1;;;;;1197:28:3;;1176:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1307:13;:30;;-1:-1:-1;;;;;1307:30:3;;;-1:-1:-1;;;;;;1307:30:3;;;;;;;;;650:1489;;;;;;", + "deployedSourceMap": "650:1489:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;650:1489:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1111:50:2;;;:::i;:::-;;;;;;;;;;;;;;;;1403:54;;;:::i;1004:45::-;;;:::i;840:53::-;;;:::i;1167:54::-;;;:::i;1228:51::-;;;:::i;1519:59::-;;;:::i;791:42::-;;;:::i;743:::-;;;:::i;1286:46::-;;;:::i;695:28:3:-;;;:::i;:::-;;;;-1:-1:-1;;;;;695:28:3;;;;;;;;;;;;;;899:50:2;;;:::i;1338:59::-;;;:::i;955:42::-;;;:::i;1515:622:3:-;;;:::i;1464:49:2:-;;;:::i;1111:50::-;1152:9;1111:50;:::o;1403:54::-;1451:6;730;1444:13;;1403:54;:::o;1004:45::-;730:6;1004:45;:::o;840:53::-;888:5;730:6;881:12;;1167:54;1215:6;730;1208:13;;1228:51;1269:10;1228:51;:::o;1519:59::-;1560:18;1519:59;:::o;791:42::-;832:1;791:42;:::o;743:::-;784:1;743:42;:::o;1286:46::-;1327:5;1286:46;:::o;695:28:3:-;;;-1:-1:-1;;;;;695:28:3;;:::o;899:50:2:-;947:2;730:6;940:9;;1338:59;1379:18;1338:59;:::o;955:42::-;996:1;955:42;:::o;1515:622:3:-;1569:13;1613;;1606:21;;-1:-1:-1;;;;;1613:13:3;1606:6;:21::i;:::-;1598:29;-1:-1:-1;;;;;;1658:19:3;;1637:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1816:170;;;;;;1858:10;1816:170;;;;1894:4;1816:170;;;;881:12:2;1816:170:3;;;;-1:-1:-1;1816:170:3;;;;;;;;;;;;;;1778:5;;-1:-1:-1;;;;;1816:24:3;;;;;:170;;;;;;;;;;;;;;;;:24;:170;;;5:2:-1;;;;30:1;27;20:12;5:2;1816:170:3;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1816:170:3;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1816:170:3;1795:237;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2067:13;;;2047:34;;-1:-1:-1;;;;;2067:13:3;;;;2047:34;;;;;;;2096;;;-1:-1:-1;;;;;2096:34:3;;;;;;2119:10;;2096:34;;;;;;;;;;1515:622;;:::o;1464:49:2:-;1512:1;730:6;1505:8;;811:963:14;1415:4;1409:11;1445:66;1431:81;;944:15;;;1541:4;1530:16;;1523:37;;;1596:66;1589:4;1578:16;;1571:92;889:16;;1703:4;1409:11;889:16;1686:22;1732:35;;;-1:-1:-1;;;;;1732:35:14;;;;;;1674:34;;-1:-1:-1;1732:35:14;;-1:-1:-1;1732:35:14;;;;;;;811:963;;;;:::o", + "source": "pragma solidity 0.5.7;\n// Copyright BigchainDB GmbH and Ocean Protocol contributors\n// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)\n// Code is Apache-2.0 and docs are CC-BY-4.0\n\nimport './BPool.sol';\nimport './BConst.sol';\nimport '../utils/Deployer.sol';\n\n/*\n* @title BFactory contract\n* @author Ocean Protocol (with code from Balancer Labs)\n*\n* @dev Ocean implementation of Balancer BPool Factory\n* BFactory deploys BPool proxy contracts.\n* New BPool proxy contracts are links to the template contract's bytecode.\n* Proxy contract functionality is based on Ocean Protocol custom\n* implementation of ERC1167 standard.\n*/\ncontract BFactory is BConst, Deployer {\n\n address public bpoolTemplate;\n\n event BPoolCreated(\n address indexed newBPoolAddress,\n address indexed bpoolTemplateAddress\n );\n \n event BPoolRegistered(\n address bpoolAddress,\n address indexed registeredBy\n );\n \n /* @dev Called on contract deployment. Cannot be called with zero address.\n @param _bpoolTemplate -- address of a deployed BPool contract. */\n constructor(address _bpoolTemplate)\n public \n {\n require(\n _bpoolTemplate != address(0), \n 'BFactory: invalid bpool template zero address'\n );\n bpoolTemplate = _bpoolTemplate;\n }\n\n /* @dev Deploys new BPool proxy contract.\n Template contract address could not be a zero address. \n @return address of a new proxy BPool contract */\n function newBPool()\n external\n returns (address bpool)\n {\n bpool = deploy(bpoolTemplate);\n require(\n bpool != address(0), \n 'BFactory: invalid bpool zero address'\n );\n BPool bpoolInstance = BPool(bpool);\t\n require(\n bpoolInstance.initialize(\n msg.sender,\n address(this), \n MIN_FEE, \n false,\n false\n ),\n 'ERR_INITIALIZE_BPOOL'\n );\n emit BPoolCreated(bpool, bpoolTemplate);\n emit BPoolRegistered(bpool, msg.sender);\n }\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BFactory.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BFactory.sol", + "exportedSymbols": { + "BFactory": [ + 376 + ] + }, + "id": 377, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 282, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "0:22:3" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BPool.sol", + "file": "./BPool.sol", + "id": 283, + "nodeType": "ImportDirective", + "scope": 377, + "sourceUnit": 3779, + "src": "185:21:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol", + "file": "./BConst.sol", + "id": 284, + "nodeType": "ImportDirective", + "scope": 377, + "sourceUnit": 281, + "src": "207:22:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/utils/Deployer.sol", + "file": "../utils/Deployer.sol", + "id": 285, + "nodeType": "ImportDirective", + "scope": 377, + "sourceUnit": 6301, + "src": "230:31:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 286, + "name": "BConst", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 280, + "src": "671:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BConst_$280", + "typeString": "contract BConst" + } + }, + "id": 287, + "nodeType": "InheritanceSpecifier", + "src": "671:6:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 288, + "name": "Deployer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6300, + "src": "679:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Deployer_$6300", + "typeString": "contract Deployer" + } + }, + "id": 289, + "nodeType": "InheritanceSpecifier", + "src": "679:8:3" + } + ], + "contractDependencies": [ + 280, + 6300 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 376, + "linearizedBaseContracts": [ + 376, + 6300, + 280 + ], + "name": "BFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 291, + "name": "bpoolTemplate", + "nodeType": "VariableDeclaration", + "scope": 376, + "src": "695:28:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 290, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "695:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 297, + "name": "BPoolCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 293, + "indexed": true, + "name": "newBPoolAddress", + "nodeType": "VariableDeclaration", + "scope": 297, + "src": "758:31:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 292, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "758:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 295, + "indexed": true, + "name": "bpoolTemplateAddress", + "nodeType": "VariableDeclaration", + "scope": 297, + "src": "799:36:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 294, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "799:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "748:93:3" + }, + "src": "730:112:3" + }, + { + "anonymous": false, + "documentation": null, + "id": 303, + "name": "BPoolRegistered", + "nodeType": "EventDefinition", + "parameters": { + "id": 302, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 299, + "indexed": false, + "name": "bpoolAddress", + "nodeType": "VariableDeclaration", + "scope": 303, + "src": "883:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 298, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "883:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 301, + "indexed": true, + "name": "registeredBy", + "nodeType": "VariableDeclaration", + "scope": 303, + "src": "913:28:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 300, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "913:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "873:74:3" + }, + "src": "852:96:3" + }, + { + "body": { + "id": 321, + "nodeType": "Block", + "src": "1166:178:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 309, + "name": "_bpoolTemplate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 305, + "src": "1197:14:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1223:1:3", + "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": 310, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1215:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1215:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1197:28:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "42466163746f72793a20696e76616c69642062706f6f6c2074656d706c617465207a65726f2061646472657373", + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1240:47:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_49a92892ed7a662247fa7cd45ceca8efadce7dcbf82de2eb28b2dfc85ee3a8ce", + "typeString": "literal_string \"BFactory: invalid bpool template zero address\"" + }, + "value": "BFactory: invalid bpool template zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_49a92892ed7a662247fa7cd45ceca8efadce7dcbf82de2eb28b2dfc85ee3a8ce", + "typeString": "literal_string \"BFactory: invalid bpool template zero address\"" + } + ], + "id": 308, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1176:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1176:121:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 316, + "nodeType": "ExpressionStatement", + "src": "1176:121:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 317, + "name": "bpoolTemplate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 291, + "src": "1307:13:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 318, + "name": "_bpoolTemplate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 305, + "src": "1323:14:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1307:30:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 320, + "nodeType": "ExpressionStatement", + "src": "1307:30:3" + } + ] + }, + "documentation": null, + "id": 322, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 305, + "name": "_bpoolTemplate", + "nodeType": "VariableDeclaration", + "scope": 322, + "src": "1122:22:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 304, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1122:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1121:24:3" + }, + "returnParameters": { + "id": 307, + "nodeType": "ParameterList", + "parameters": [], + "src": "1166:0:3" + }, + "scope": 376, + "src": "1110:234:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 374, + "nodeType": "Block", + "src": "1588:549:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 327, + "name": "bpool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "1598:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 329, + "name": "bpoolTemplate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 291, + "src": "1613:13:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 328, + "name": "deploy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6299, + "src": "1606:6:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_address_$", + "typeString": "function (address) returns (address)" + } + }, + "id": 330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1606:21:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1598:29:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 332, + "nodeType": "ExpressionStatement", + "src": "1598:29:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 334, + "name": "bpool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "1658:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1675:1:3", + "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": 335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1667:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1667:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1658:19:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "42466163746f72793a20696e76616c69642062706f6f6c207a65726f2061646472657373", + "id": 339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1692:38:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f7929f7a9d1eec1904ee2b3469854d272342ec90cd225a9e6ccdd2ba8672552", + "typeString": "literal_string \"BFactory: invalid bpool zero address\"" + }, + "value": "BFactory: invalid bpool zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f7929f7a9d1eec1904ee2b3469854d272342ec90cd225a9e6ccdd2ba8672552", + "typeString": "literal_string \"BFactory: invalid bpool zero address\"" + } + ], + "id": 333, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1637:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1637:103:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 341, + "nodeType": "ExpressionStatement", + "src": "1637:103:3" + }, + { + "assignments": [ + 343 + ], + "declarations": [ + { + "constant": false, + "id": 343, + "name": "bpoolInstance", + "nodeType": "VariableDeclaration", + "scope": 374, + "src": "1750:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BPool_$3778", + "typeString": "contract BPool" + }, + "typeName": { + "contractScope": null, + "id": 342, + "name": "BPool", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3778, + "src": "1750:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BPool_$3778", + "typeString": "contract BPool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 347, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 345, + "name": "bpool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "1778:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 344, + "name": "BPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3778, + "src": "1772:5:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BPool_$3778_$", + "typeString": "type(contract BPool)" + } + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1772:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BPool_$3778", + "typeString": "contract BPool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1750:34:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 351, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "1858:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1858:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 354, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7157, + "src": "1894:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BFactory_$376", + "typeString": "contract BFactory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BFactory_$376", + "typeString": "contract BFactory" + } + ], + "id": 353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1886:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1886:13:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 356, + "name": "MIN_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 215, + "src": "1918:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1944:5:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1967:5:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "argumentTypes": null, + "id": 349, + "name": "bpoolInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 343, + "src": "1816:13:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BPool_$3778", + "typeString": "contract BPool" + } + }, + "id": 350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 1630, + "src": "1816:24:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bool_$_t_bool_$returns$_t_bool_$", + "typeString": "function (address,address,uint256,bool,bool) external returns (bool)" + } + }, + "id": 359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1816:170:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e495449414c495a455f42504f4f4c", + "id": 360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2000:22:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e72bfb874cc5fc9c4486bc89c825d8de1ff180586329759974eaedb736a911fb", + "typeString": "literal_string \"ERR_INITIALIZE_BPOOL\"" + }, + "value": "ERR_INITIALIZE_BPOOL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e72bfb874cc5fc9c4486bc89c825d8de1ff180586329759974eaedb736a911fb", + "typeString": "literal_string \"ERR_INITIALIZE_BPOOL\"" + } + ], + "id": 348, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1795:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1795:237:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 362, + "nodeType": "ExpressionStatement", + "src": "1795:237:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 364, + "name": "bpool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "2060:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 365, + "name": "bpoolTemplate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 291, + "src": "2067:13:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 363, + "name": "BPoolCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 297, + "src": "2047:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2047:34:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 367, + "nodeType": "EmitStatement", + "src": "2042:39:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 369, + "name": "bpool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "2112:5:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 370, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "2119:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2119:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 368, + "name": "BPoolRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 303, + "src": "2096:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2096:34:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 373, + "nodeType": "EmitStatement", + "src": "2091:39:3" + } + ] + }, + "documentation": null, + "id": 375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "newBPool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 323, + "nodeType": "ParameterList", + "parameters": [], + "src": "1532:2:3" + }, + "returnParameters": { + "id": 326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 325, + "name": "bpool", + "nodeType": "VariableDeclaration", + "scope": 375, + "src": "1569:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 324, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1569:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1568:15:3" + }, + "scope": 376, + "src": "1515:622:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 377, + "src": "650:1489:3" + } + ], + "src": "0:2140:3" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BFactory.sol", + "exportedSymbols": { + "BFactory": [ + 376 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 282, + "name": "PragmaDirective", + "src": "0:22:3" + }, + { + "attributes": { + "SourceUnit": 3779, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BPool.sol", + "file": "./BPool.sol", + "scope": 377, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 283, + "name": "ImportDirective", + "src": "185:21:3" + }, + { + "attributes": { + "SourceUnit": 281, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol", + "file": "./BConst.sol", + "scope": 377, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 284, + "name": "ImportDirective", + "src": "207:22:3" + }, + { + "attributes": { + "SourceUnit": 6301, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/utils/Deployer.sol", + "file": "../utils/Deployer.sol", + "scope": 377, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 285, + "name": "ImportDirective", + "src": "230:31:3" + }, + { + "attributes": { + "contractDependencies": [ + 280, + 6300 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 376, + 6300, + 280 + ], + "name": "BFactory", + "scope": 377 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BConst", + "referencedDeclaration": 280, + "type": "contract BConst" + }, + "id": 286, + "name": "UserDefinedTypeName", + "src": "671:6:3" + } + ], + "id": 287, + "name": "InheritanceSpecifier", + "src": "671:6:3" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Deployer", + "referencedDeclaration": 6300, + "type": "contract Deployer" + }, + "id": 288, + "name": "UserDefinedTypeName", + "src": "679:8:3" + } + ], + "id": 289, + "name": "InheritanceSpecifier", + "src": "679:8:3" + }, + { + "attributes": { + "constant": false, + "name": "bpoolTemplate", + "scope": 376, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 290, + "name": "ElementaryTypeName", + "src": "695:7:3" + } + ], + "id": 291, + "name": "VariableDeclaration", + "src": "695:28:3" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "BPoolCreated" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "newBPoolAddress", + "scope": 297, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 292, + "name": "ElementaryTypeName", + "src": "758:7:3" + } + ], + "id": 293, + "name": "VariableDeclaration", + "src": "758:31:3" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "bpoolTemplateAddress", + "scope": 297, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 294, + "name": "ElementaryTypeName", + "src": "799:7:3" + } + ], + "id": 295, + "name": "VariableDeclaration", + "src": "799:36:3" + } + ], + "id": 296, + "name": "ParameterList", + "src": "748:93:3" + } + ], + "id": 297, + "name": "EventDefinition", + "src": "730:112:3" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "BPoolRegistered" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": false, + "name": "bpoolAddress", + "scope": 303, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 298, + "name": "ElementaryTypeName", + "src": "883:7:3" + } + ], + "id": 299, + "name": "VariableDeclaration", + "src": "883:20:3" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "registeredBy", + "scope": 303, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 300, + "name": "ElementaryTypeName", + "src": "913:7:3" + } + ], + "id": 301, + "name": "VariableDeclaration", + "src": "913:28:3" + } + ], + "id": 302, + "name": "ParameterList", + "src": "873:74:3" + } + ], + "id": 303, + "name": "EventDefinition", + "src": "852:96:3" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "modifiers": [ + null + ], + "name": "", + "scope": 376, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_bpoolTemplate", + "scope": 322, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 304, + "name": "ElementaryTypeName", + "src": "1122:7:3" + } + ], + "id": 305, + "name": "VariableDeclaration", + "src": "1122:22:3" + } + ], + "id": 306, + "name": "ParameterList", + "src": "1121:24:3" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 307, + "name": "ParameterList", + "src": "1166:0:3" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_49a92892ed7a662247fa7cd45ceca8efadce7dcbf82de2eb28b2dfc85ee3a8ce", + "typeString": "literal_string \"BFactory: invalid bpool template zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 308, + "name": "Identifier", + "src": "1176:7:3" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 305, + "type": "address", + "value": "_bpoolTemplate" + }, + "id": 309, + "name": "Identifier", + "src": "1197:14:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 310, + "name": "ElementaryTypeNameExpression", + "src": "1215:7:3" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 311, + "name": "Literal", + "src": "1223:1:3" + } + ], + "id": 312, + "name": "FunctionCall", + "src": "1215:10:3" + } + ], + "id": 313, + "name": "BinaryOperation", + "src": "1197:28:3" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "42466163746f72793a20696e76616c69642062706f6f6c2074656d706c617465207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"BFactory: invalid bpool template zero address\"", + "value": "BFactory: invalid bpool template zero address" + }, + "id": 314, + "name": "Literal", + "src": "1240:47:3" + } + ], + "id": 315, + "name": "FunctionCall", + "src": "1176:121:3" + } + ], + "id": 316, + "name": "ExpressionStatement", + "src": "1176:121:3" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 291, + "type": "address", + "value": "bpoolTemplate" + }, + "id": 317, + "name": "Identifier", + "src": "1307:13:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 305, + "type": "address", + "value": "_bpoolTemplate" + }, + "id": 318, + "name": "Identifier", + "src": "1323:14:3" + } + ], + "id": 319, + "name": "Assignment", + "src": "1307:30:3" + } + ], + "id": 320, + "name": "ExpressionStatement", + "src": "1307:30:3" + } + ], + "id": 321, + "name": "Block", + "src": "1166:178:3" + } + ], + "id": 322, + "name": "FunctionDefinition", + "src": "1110:234:3" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "newBPool", + "scope": 376, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 323, + "name": "ParameterList", + "src": "1532:2:3" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "bpool", + "scope": 375, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 324, + "name": "ElementaryTypeName", + "src": "1569:7:3" + } + ], + "id": 325, + "name": "VariableDeclaration", + "src": "1569:13:3" + } + ], + "id": 326, + "name": "ParameterList", + "src": "1568:15:3" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 325, + "type": "address", + "value": "bpool" + }, + "id": 327, + "name": "Identifier", + "src": "1598:5:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6299, + "type": "function (address) returns (address)", + "value": "deploy" + }, + "id": 328, + "name": "Identifier", + "src": "1606:6:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 291, + "type": "address", + "value": "bpoolTemplate" + }, + "id": 329, + "name": "Identifier", + "src": "1613:13:3" + } + ], + "id": 330, + "name": "FunctionCall", + "src": "1606:21:3" + } + ], + "id": 331, + "name": "Assignment", + "src": "1598:29:3" + } + ], + "id": 332, + "name": "ExpressionStatement", + "src": "1598:29:3" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f7929f7a9d1eec1904ee2b3469854d272342ec90cd225a9e6ccdd2ba8672552", + "typeString": "literal_string \"BFactory: invalid bpool zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 333, + "name": "Identifier", + "src": "1637:7:3" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 325, + "type": "address", + "value": "bpool" + }, + "id": 334, + "name": "Identifier", + "src": "1658:5:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 335, + "name": "ElementaryTypeNameExpression", + "src": "1667:7:3" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 336, + "name": "Literal", + "src": "1675:1:3" + } + ], + "id": 337, + "name": "FunctionCall", + "src": "1667:10:3" + } + ], + "id": 338, + "name": "BinaryOperation", + "src": "1658:19:3" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "42466163746f72793a20696e76616c69642062706f6f6c207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"BFactory: invalid bpool zero address\"", + "value": "BFactory: invalid bpool zero address" + }, + "id": 339, + "name": "Literal", + "src": "1692:38:3" + } + ], + "id": 340, + "name": "FunctionCall", + "src": "1637:103:3" + } + ], + "id": 341, + "name": "ExpressionStatement", + "src": "1637:103:3" + }, + { + "attributes": { + "assignments": [ + 343 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "bpoolInstance", + "scope": 374, + "stateVariable": false, + "storageLocation": "default", + "type": "contract BPool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BPool", + "referencedDeclaration": 3778, + "type": "contract BPool" + }, + "id": 342, + "name": "UserDefinedTypeName", + "src": "1750:5:3" + } + ], + "id": 343, + "name": "VariableDeclaration", + "src": "1750:19:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract BPool", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3778, + "type": "type(contract BPool)", + "value": "BPool" + }, + "id": 344, + "name": "Identifier", + "src": "1772:5:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 325, + "type": "address", + "value": "bpool" + }, + "id": 345, + "name": "Identifier", + "src": "1778:5:3" + } + ], + "id": 346, + "name": "FunctionCall", + "src": "1772:12:3" + } + ], + "id": 347, + "name": "VariableDeclarationStatement", + "src": "1750:34:3" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e72bfb874cc5fc9c4486bc89c825d8de1ff180586329759974eaedb736a911fb", + "typeString": "literal_string \"ERR_INITIALIZE_BPOOL\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 348, + "name": "Identifier", + "src": "1795:7:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "initialize", + "referencedDeclaration": 1630, + "type": "function (address,address,uint256,bool,bool) external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 343, + "type": "contract BPool", + "value": "bpoolInstance" + }, + "id": 349, + "name": "Identifier", + "src": "1816:13:3" + } + ], + "id": 350, + "name": "MemberAccess", + "src": "1816:24:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 351, + "name": "Identifier", + "src": "1858:3:3" + } + ], + "id": 352, + "name": "MemberAccess", + "src": "1858:10:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BFactory_$376", + "typeString": "contract BFactory" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 353, + "name": "ElementaryTypeNameExpression", + "src": "1886:7:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7157, + "type": "contract BFactory", + "value": "this" + }, + "id": 354, + "name": "Identifier", + "src": "1894:4:3" + } + ], + "id": 355, + "name": "FunctionCall", + "src": "1886:13:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 215, + "type": "uint256", + "value": "MIN_FEE" + }, + "id": 356, + "name": "Identifier", + "src": "1918:7:3" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 357, + "name": "Literal", + "src": "1944:5:3" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 358, + "name": "Literal", + "src": "1967:5:3" + } + ], + "id": 359, + "name": "FunctionCall", + "src": "1816:170:3" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f494e495449414c495a455f42504f4f4c", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_INITIALIZE_BPOOL\"", + "value": "ERR_INITIALIZE_BPOOL" + }, + "id": 360, + "name": "Literal", + "src": "2000:22:3" + } + ], + "id": 361, + "name": "FunctionCall", + "src": "1795:237:3" + } + ], + "id": 362, + "name": "ExpressionStatement", + "src": "1795:237:3" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 297, + "type": "function (address,address)", + "value": "BPoolCreated" + }, + "id": 363, + "name": "Identifier", + "src": "2047:12:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 325, + "type": "address", + "value": "bpool" + }, + "id": 364, + "name": "Identifier", + "src": "2060:5:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 291, + "type": "address", + "value": "bpoolTemplate" + }, + "id": 365, + "name": "Identifier", + "src": "2067:13:3" + } + ], + "id": 366, + "name": "FunctionCall", + "src": "2047:34:3" + } + ], + "id": 367, + "name": "EmitStatement", + "src": "2042:39:3" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 303, + "type": "function (address,address)", + "value": "BPoolRegistered" + }, + "id": 368, + "name": "Identifier", + "src": "2096:15:3" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 325, + "type": "address", + "value": "bpool" + }, + "id": 369, + "name": "Identifier", + "src": "2112:5:3" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 370, + "name": "Identifier", + "src": "2119:3:3" + } + ], + "id": 371, + "name": "MemberAccess", + "src": "2119:10:3" + } + ], + "id": 372, + "name": "FunctionCall", + "src": "2096:34:3" + } + ], + "id": 373, + "name": "EmitStatement", + "src": "2091:39:3" + } + ], + "id": 374, + "name": "Block", + "src": "1588:549:3" + } + ], + "id": 375, + "name": "FunctionDefinition", + "src": "1515:622:3" + } + ], + "id": 376, + "name": "ContractDefinition", + "src": "650:1489:3" + } + ], + "id": 377, + "name": "SourceUnit", + "src": "0:2140:3" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.759Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/BMath.json b/artifacts/BMath.json new file mode 100644 index 000000000..9cb843a47 --- /dev/null +++ b/artifacts/BMath.json @@ -0,0 +1,17065 @@ +{ + "contractName": "BMath", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "MAX_TOTAL_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BPOW_PRECISION", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BALANCE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "INIT_POOL_SUPPLY", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_OUT_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BONE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EXIT_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_IN_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceIn", + "type": "uint256" + }, + { + "name": "tokenWeightIn", + "type": "uint256" + }, + { + "name": "tokenBalanceOut", + "type": "uint256" + }, + { + "name": "tokenWeightOut", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcSpotPrice", + "outputs": [ + { + "name": "spotPrice", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceIn", + "type": "uint256" + }, + { + "name": "tokenWeightIn", + "type": "uint256" + }, + { + "name": "tokenBalanceOut", + "type": "uint256" + }, + { + "name": "tokenWeightOut", + "type": "uint256" + }, + { + "name": "tokenAmountIn", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcOutGivenIn", + "outputs": [ + { + "name": "tokenAmountOut", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceIn", + "type": "uint256" + }, + { + "name": "tokenWeightIn", + "type": "uint256" + }, + { + "name": "tokenBalanceOut", + "type": "uint256" + }, + { + "name": "tokenWeightOut", + "type": "uint256" + }, + { + "name": "tokenAmountOut", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcInGivenOut", + "outputs": [ + { + "name": "tokenAmountIn", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceIn", + "type": "uint256" + }, + { + "name": "tokenWeightIn", + "type": "uint256" + }, + { + "name": "poolSupply", + "type": "uint256" + }, + { + "name": "totalWeight", + "type": "uint256" + }, + { + "name": "tokenAmountIn", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcPoolOutGivenSingleIn", + "outputs": [ + { + "name": "poolAmountOut", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceIn", + "type": "uint256" + }, + { + "name": "tokenWeightIn", + "type": "uint256" + }, + { + "name": "poolSupply", + "type": "uint256" + }, + { + "name": "totalWeight", + "type": "uint256" + }, + { + "name": "poolAmountOut", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcSingleInGivenPoolOut", + "outputs": [ + { + "name": "tokenAmountIn", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceOut", + "type": "uint256" + }, + { + "name": "tokenWeightOut", + "type": "uint256" + }, + { + "name": "poolSupply", + "type": "uint256" + }, + { + "name": "totalWeight", + "type": "uint256" + }, + { + "name": "poolAmountIn", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcSingleOutGivenPoolIn", + "outputs": [ + { + "name": "tokenAmountOut", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceOut", + "type": "uint256" + }, + { + "name": "tokenWeightOut", + "type": "uint256" + }, + { + "name": "poolSupply", + "type": "uint256" + }, + { + "name": "totalWeight", + "type": "uint256" + }, + { + "name": "tokenAmountOut", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcPoolInGivenSingleOut", + "outputs": [ + { + "name": "poolAmountIn", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"MAX_TOTAL_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BPOW_PRECISION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"poolAmountOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcSingleInGivenPoolOut\",\"outputs\":[{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcPoolInGivenSingleOut\",\"outputs\":[{\"name\":\"poolAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcPoolOutGivenSingleIn\",\"outputs\":[{\"name\":\"poolAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BALANCE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"poolAmountIn\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcSingleOutGivenPoolIn\",\"outputs\":[{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"INIT_POOL_SUPPLY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_OUT_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcSpotPrice\",\"outputs\":[{\"name\":\"spotPrice\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcOutGivenIn\",\"outputs\":[{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BONE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EXIT_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_IN_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcInGivenOut\",\"outputs\":[{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{\"calcInGivenOut(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcInGivenOut // // aI = tokenAmountIn // // bO = tokenBalanceOut / / bO \\\\ (wO / wI) \\\\ // // bI = tokenBalanceIn bI * | | ------------ | ^ - 1 | // // aO = tokenAmountOut aI = \\\\ \\\\ ( bO - aO ) / / // // wI = tokenWeightIn -------------------------------------------- // // wO = tokenWeightOut ( 1 - sF ) // // sF = swapFee //*********************************************************************************************\"},\"calcOutGivenIn(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcOutGivenIn // // aO = tokenAmountOut // // bO = tokenBalanceOut // // bI = tokenBalanceIn / / bI \\\\ (wI / wO) \\\\ // // aI = tokenAmountIn aO = bO * | 1 - | -------------------------- | ^ | // // wI = tokenWeightIn \\\\ \\\\ ( bI + ( aI * ( 1 - sF )) / / // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************\"},\"calcPoolInGivenSingleOut(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcPoolInGivenSingleOut // // pAi = poolAmountIn // / tAo \\\\\\\\ / wO \\\\ \\\\ // // bO = tokenBalanceOut // | bO - -------------------------- |\\\\ | ---- | \\\\ // // tAo = tokenAmountOut pS - || \\\\ 1 - ((1 - (tO / tW)) * sF)/ | ^ \\\\ tW / * pS | // // ps = poolSupply \\\\\\\\ -----------------------------------/ / // // wO = tokenWeightOut pAi = \\\\\\\\ bO / / // // tW = totalWeight ------------------------------------------------------------- // // sF = swapFee ( 1 - eF ) // // eF = exitFee //*********************************************************************************************\"},\"calcPoolOutGivenSingleIn(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcPoolOutGivenSingleIn // // pAo = poolAmountOut / \\\\ // // tAi = tokenAmountIn /// / // wI \\\\ \\\\\\\\ \\\\ wI \\\\ // // wI = tokenWeightIn //| tAi *| 1 - || 1 - -- | * sF || + tBi \\\\ -- \\\\ // // tW = totalWeight pAo=|| \\\\ \\\\ \\\\\\\\ tW / // | ^ tW | * pS - pS // // tBi = tokenBalanceIn \\\\\\\\ ------------------------------------- / / // // pS = poolSupply \\\\\\\\ tBi / / // // sF = swapFee \\\\ / //*********************************************************************************************\"},\"calcSingleInGivenPoolOut(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcSingleInGivenPoolOut // // tAi = tokenAmountIn //(pS + pAo)\\\\ / 1 \\\\\\\\ // // pS = poolSupply || --------- | ^ | --------- || * bI - bI // // pAo = poolAmountOut \\\\\\\\ pS / \\\\(wI / tW)// // // bI = balanceIn tAi = -------------------------------------------- // // wI = weightIn / wI \\\\ // // tW = totalWeight | 1 - ---- | * sF // // sF = swapFee \\\\ tW / //*********************************************************************************************\"},\"calcSingleOutGivenPoolIn(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcSingleOutGivenPoolIn // // tAo = tokenAmountOut / / \\\\\\\\ // // bO = tokenBalanceOut / // pS - (pAi * (1 - eF)) \\\\ / 1 \\\\ \\\\\\\\ // // pAi = poolAmountIn | bO - || ----------------------- | ^ | --------- | * b0 || // // ps = poolSupply \\\\ \\\\\\\\ pS / \\\\(wO / tW)/ // // // wI = tokenWeightIn tAo = \\\\ \\\\ // // // tW = totalWeight / / wO \\\\ \\\\ // // sF = swapFee * | 1 - | 1 - ---- | * sF | // // eF = exitFee \\\\ \\\\ tW / / //*********************************************************************************************\"},\"calcSpotPrice(uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcSpotPrice // // sP = spotPrice // // bI = tokenBalanceIn ( bI / wI ) 1 // // bO = tokenBalanceOut sP = ----------- * ---------- // // wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BMath.sol\":\"BMath\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol\":{\"keccak256\":\"0x21675a0793e0be762a27e09ed3b0bd86e035c73ac3078dd841c38804445d5f5a\",\"urls\":[\"bzzr://47016ef4a80276f320b28a058fc92e7d9d93433bb5e4aa934668383cbefad77e\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BMath.sol\":{\"keccak256\":\"0x2e3f07713561f2a0983999255794f5741c5854633b8524675767fde35f1b98c2\",\"urls\":[\"bzzr://e8c50205e3f6bd1d37fcdf178486f9560814e28ed8467af5a4ceb30651991cf8\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol\":{\"keccak256\":\"0x84cf31d699784debbe9ec94be2086cdd2918c944473d5228c54dda10a660af8a\",\"urls\":[\"bzzr://7fcfbf954d6cdeec6709ad7543a9fa1576b788930245adc8d93030f6c72358cd\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610e40806100206000396000f3fe608060405234801561001057600080fd5b506004361061016a576000357c010000000000000000000000000000000000000000000000000000000090048063a221ee49116100e0578063bc694ea211610099578063bc694ea214610335578063c36596a614610191578063c6580d121461033d578063e4a28a521461016f578063ec09302114610345578063f8d6aed41461034d5761016a565b8063a221ee49146102a5578063b0e0d136146102da578063b7b800a4146102e2578063ba019dab146102ea578063ba9530a6146102f2578063bc063e1a1461032d5761016a565b806382f652ad1161013257806382f652ad146101dc5780638656b65314610217578063867378c514610252578063892980121461025a5780639381cd2b14610295578063992e2a921461029d5761016a565b806309a3bbe41461016f578063189d00ca14610189578063218b5382146101915780635c1bbaf71461019957806376c7a3c7146101d4575b600080fd5b610177610388565b60408051918252519081900360200190f35b610177610395565b6101776103a9565b610177600480360360c08110156101af57600080fd5b5080359060208101359060408101359060608101359060808101359060a001356103b5565b61017761046d565b610177600480360360c08110156101f257600080fd5b5080359060208101359060408101359060608101359060808101359060a0013561047f565b610177600480360360c081101561022d57600080fd5b5080359060208101359060408101359060608101359060808101359060a0013561053e565b6101776105df565b610177600480360360c081101561027057600080fd5b5080359060208101359060408101359060608101359060808101359060a001356105f3565b6101776106a3565b6101776106b0565b610177600480360360a08110156102bb57600080fd5b50803590602081013590604081013590606081013590608001356106bc565b610177610721565b610177610726565b61017761072b565b610177600480360360c081101561030857600080fd5b5080359060208101359060408101359060608101359060808101359060a00135610730565b6101776107b1565b6101776107c1565b6101776107cd565b6101776107d2565b610177600480360360c081101561036357600080fd5b5080359060208101359060408101359060608101359060808101359060a001356107e2565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b6000806103c28786610865565b905060006103d087866109ae565b905060006103de8289610865565b905060006103f4670de0b6b3a764000085610865565b905060006104028383610a12565b90506000610410828e610b35565b9050600061041e828f610c17565b9050600061043d610437670de0b6b3a76400008a610c17565b8b610b35565b905061045a82610455670de0b6b3a764000084610c17565b610865565b9f9e505050505050505050505050505050565b620f4240670de0b6b3a76400006103a5565b60008061048c8786610865565b905060006104a2670de0b6b3a764000083610c17565b905060006104b08286610b35565b905060006104ca87610455670de0b6b3a764000085610c17565b905060006104d88c83610c17565b905060006104e6828e610865565b905060006104f48288610a12565b90506000610502828e610b35565b905060006105108e83610c17565b905061052981610455670de0b6b3a76400006000610c17565b99505050505050505050509695505050505050565b60008061054b8786610865565b9050600061056a610564670de0b6b3a764000084610c17565b85610b35565b9050600061058986610584670de0b6b3a764000085610c17565b610b35565b905060006105978b836109ae565b905060006105a5828d610865565b905060006105b38287610a12565b905060006105c1828d610b35565b90506105cd818d610c17565b9e9d5050505050505050505050505050565b64e8d4a51000670de0b6b3a76400006103a5565b6000806106008786610865565b9050600061061b85610584670de0b6b3a76400006000610c17565b905060006106298883610c17565b90506000610637828a610865565b9050600061065682610651670de0b6b3a764000088610865565b610a12565b90506000610664828e610b35565b905060006106728e83610c17565b9050600061068b610437670de0b6b3a76400008a610c17565b905061045a82610584670de0b6b3a764000084610c17565b68056bc75e2d6310000081565b6704a03ce68d21555681565b6000806106c98787610865565b905060006106d78686610865565b905060006106e58383610865565b90506000610707670de0b6b3a7640000610455670de0b6b3a764000089610c17565b90506107138282610b35565b9a9950505050505050505050565b600881565b600281565b600181565b60008061073d8786610865565b90506000610753670de0b6b3a764000085610c17565b905061075f8582610b35565b905060006107718a6104558c856109ae565b9050600061077f8285610a12565b90506000610795670de0b6b3a764000083610c17565b90506107a18a82610b35565b9c9b505050505050505050505050565b600a670de0b6b3a76400006103a5565b671bc16d674ec7ffff81565b600081565b6002670de0b6b3a76400006103a5565b6000806107ef8588610865565b905060006107fd8786610c17565b9050600061080b8883610865565b905060006108198285610a12565b905061082d81670de0b6b3a7640000610c17565b9050610841670de0b6b3a764000087610c17565b94506108566108508c83610b35565b86610865565b9b9a5050505050505050505050565b6000816108bc576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f4449565f5a45524f0000000000000000000000000000000000000000604482015290519081900360640190fd5b670de0b6b3a764000083028315806108e45750670de0b6b3a76400008482816108e157fe5b04145b610938576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b60028304810181811015610996576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b60008482816109a157fe5b0493505050505b92915050565b600082820183811015610a0b576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b9392505050565b60006001831015610a6d576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42504f575f424153455f544f4f5f4c4f570000000000000000000000604482015290519081900360640190fd5b671bc16d674ec7ffff831115610acd576040805160e560020a62461bcd02815260206004820152601660248201527f4552525f42504f575f424153455f544f4f5f4849474800000000000000000000604482015290519081900360640190fd5b6000610ad883610c88565b90506000610ae68483610c17565b90506000610afc86610af785610ca3565b610cb1565b905081610b0d5792506109a8915050565b6000610b1e87846305f5e100610d11565b9050610b2a8282610b35565b979650505050505050565b6000828202831580610b4f575082848281610b4c57fe5b04145b610ba3576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6706f05b59d3b20000810181811015610c06576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6000670de0b6b3a7640000826109a1565b6000806000610c268585610def565b915091508015610c80576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b6000670de0b6b3a7640000610c9c83610ca3565b0292915050565b670de0b6b3a7640000900490565b6000828160028406610ccb57670de0b6b3a7640000610ccd565b815b90506002840493505b8315610d0957610ce68283610b35565b91506002840615610cfe57610cfb8183610b35565b90505b600284049350610cd6565b949350505050565b6000828180610d2887670de0b6b3a7640000610def565b9092509050670de0b6b3a764000080600060015b888410610de0576000670de0b6b3a764000082029050600080610d708a610d6b85670de0b6b3a7640000610c17565b610def565b91509150610d8287610584848c610b35565b9650610d8e8784610865565b965086610d9d57505050610de0565b8715610da7579315935b8015610db1579315935b8415610dc857610dc18688610c17565b9550610dd5565b610dd286886109ae565b95505b505050600101610d3c565b50909998505050505050505050565b600080828410610e055750508082036000610e0d565b505081810360015b925092905056fea165627a7a72305820529ab7c8bd4d9d4964796e707edcce7e57b272bbabfc6bea135980dfd9bada780029", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061016a576000357c010000000000000000000000000000000000000000000000000000000090048063a221ee49116100e0578063bc694ea211610099578063bc694ea214610335578063c36596a614610191578063c6580d121461033d578063e4a28a521461016f578063ec09302114610345578063f8d6aed41461034d5761016a565b8063a221ee49146102a5578063b0e0d136146102da578063b7b800a4146102e2578063ba019dab146102ea578063ba9530a6146102f2578063bc063e1a1461032d5761016a565b806382f652ad1161013257806382f652ad146101dc5780638656b65314610217578063867378c514610252578063892980121461025a5780639381cd2b14610295578063992e2a921461029d5761016a565b806309a3bbe41461016f578063189d00ca14610189578063218b5382146101915780635c1bbaf71461019957806376c7a3c7146101d4575b600080fd5b610177610388565b60408051918252519081900360200190f35b610177610395565b6101776103a9565b610177600480360360c08110156101af57600080fd5b5080359060208101359060408101359060608101359060808101359060a001356103b5565b61017761046d565b610177600480360360c08110156101f257600080fd5b5080359060208101359060408101359060608101359060808101359060a0013561047f565b610177600480360360c081101561022d57600080fd5b5080359060208101359060408101359060608101359060808101359060a0013561053e565b6101776105df565b610177600480360360c081101561027057600080fd5b5080359060208101359060408101359060608101359060808101359060a001356105f3565b6101776106a3565b6101776106b0565b610177600480360360a08110156102bb57600080fd5b50803590602081013590604081013590606081013590608001356106bc565b610177610721565b610177610726565b61017761072b565b610177600480360360c081101561030857600080fd5b5080359060208101359060408101359060608101359060808101359060a00135610730565b6101776107b1565b6101776107c1565b6101776107cd565b6101776107d2565b610177600480360360c081101561036357600080fd5b5080359060208101359060408101359060608101359060808101359060a001356107e2565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b6000806103c28786610865565b905060006103d087866109ae565b905060006103de8289610865565b905060006103f4670de0b6b3a764000085610865565b905060006104028383610a12565b90506000610410828e610b35565b9050600061041e828f610c17565b9050600061043d610437670de0b6b3a76400008a610c17565b8b610b35565b905061045a82610455670de0b6b3a764000084610c17565b610865565b9f9e505050505050505050505050505050565b620f4240670de0b6b3a76400006103a5565b60008061048c8786610865565b905060006104a2670de0b6b3a764000083610c17565b905060006104b08286610b35565b905060006104ca87610455670de0b6b3a764000085610c17565b905060006104d88c83610c17565b905060006104e6828e610865565b905060006104f48288610a12565b90506000610502828e610b35565b905060006105108e83610c17565b905061052981610455670de0b6b3a76400006000610c17565b99505050505050505050509695505050505050565b60008061054b8786610865565b9050600061056a610564670de0b6b3a764000084610c17565b85610b35565b9050600061058986610584670de0b6b3a764000085610c17565b610b35565b905060006105978b836109ae565b905060006105a5828d610865565b905060006105b38287610a12565b905060006105c1828d610b35565b90506105cd818d610c17565b9e9d5050505050505050505050505050565b64e8d4a51000670de0b6b3a76400006103a5565b6000806106008786610865565b9050600061061b85610584670de0b6b3a76400006000610c17565b905060006106298883610c17565b90506000610637828a610865565b9050600061065682610651670de0b6b3a764000088610865565b610a12565b90506000610664828e610b35565b905060006106728e83610c17565b9050600061068b610437670de0b6b3a76400008a610c17565b905061045a82610584670de0b6b3a764000084610c17565b68056bc75e2d6310000081565b6704a03ce68d21555681565b6000806106c98787610865565b905060006106d78686610865565b905060006106e58383610865565b90506000610707670de0b6b3a7640000610455670de0b6b3a764000089610c17565b90506107138282610b35565b9a9950505050505050505050565b600881565b600281565b600181565b60008061073d8786610865565b90506000610753670de0b6b3a764000085610c17565b905061075f8582610b35565b905060006107718a6104558c856109ae565b9050600061077f8285610a12565b90506000610795670de0b6b3a764000083610c17565b90506107a18a82610b35565b9c9b505050505050505050505050565b600a670de0b6b3a76400006103a5565b671bc16d674ec7ffff81565b600081565b6002670de0b6b3a76400006103a5565b6000806107ef8588610865565b905060006107fd8786610c17565b9050600061080b8883610865565b905060006108198285610a12565b905061082d81670de0b6b3a7640000610c17565b9050610841670de0b6b3a764000087610c17565b94506108566108508c83610b35565b86610865565b9b9a5050505050505050505050565b6000816108bc576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f4449565f5a45524f0000000000000000000000000000000000000000604482015290519081900360640190fd5b670de0b6b3a764000083028315806108e45750670de0b6b3a76400008482816108e157fe5b04145b610938576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b60028304810181811015610996576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b60008482816109a157fe5b0493505050505b92915050565b600082820183811015610a0b576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b9392505050565b60006001831015610a6d576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42504f575f424153455f544f4f5f4c4f570000000000000000000000604482015290519081900360640190fd5b671bc16d674ec7ffff831115610acd576040805160e560020a62461bcd02815260206004820152601660248201527f4552525f42504f575f424153455f544f4f5f4849474800000000000000000000604482015290519081900360640190fd5b6000610ad883610c88565b90506000610ae68483610c17565b90506000610afc86610af785610ca3565b610cb1565b905081610b0d5792506109a8915050565b6000610b1e87846305f5e100610d11565b9050610b2a8282610b35565b979650505050505050565b6000828202831580610b4f575082848281610b4c57fe5b04145b610ba3576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6706f05b59d3b20000810181811015610c06576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6000670de0b6b3a7640000826109a1565b6000806000610c268585610def565b915091508015610c80576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b6000670de0b6b3a7640000610c9c83610ca3565b0292915050565b670de0b6b3a7640000900490565b6000828160028406610ccb57670de0b6b3a7640000610ccd565b815b90506002840493505b8315610d0957610ce68283610b35565b91506002840615610cfe57610cfb8183610b35565b90505b600284049350610cd6565b949350505050565b6000828180610d2887670de0b6b3a7640000610def565b9092509050670de0b6b3a764000080600060015b888410610de0576000670de0b6b3a764000082029050600080610d708a610d6b85670de0b6b3a7640000610c17565b610def565b91509150610d8287610584848c610b35565b9650610d8e8784610865565b965086610d9d57505050610de0565b8715610da7579315935b8015610db1579315935b8415610dc857610dc18688610c17565b9550610dd5565b610dd286886109ae565b95505b505050600101610d3c565b50909998505050505050505050565b600080828410610e055750508082036000610e0d565b505081810360015b925092905056fea165627a7a72305820529ab7c8bd4d9d4964796e707edcce7e57b272bbabfc6bea135980dfd9bada780029", + "sourceMap": "689:13923:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;689:13923:4;;;;;;;", + "deployedSourceMap": "689:13923:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;689:13923:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1111:50:2;;;:::i;:::-;;;;;;;;;;;;;;;;1403:54;;;:::i;1004:45::-;;;:::i;8601:1167:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;8601:1167:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;840:53:2:-;;;:::i;13284:1324:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;13284:1324:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;6455:1140::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;6455:1140:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1167:54:2:-;;;:::i;10874:1304:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;10874:1304:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1228:51:2:-;;;:::i;1519:59::-;;;:::i;1626:494:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;1626:494:4;;;;;;;;;;;;;;;;;;;;;;:::i;791:42:2:-;;;:::i;743:::-;;;:::i;1286:46::-;;;:::i;3126:664:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;3126:664:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;899:50:2:-;;;:::i;1338:59::-;;;:::i;955:42::-;;;:::i;1464:49::-;;;:::i;4796:653:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;4796:653:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1111:50:2:-;1152:9;1111:50;:::o;1403:54::-;1451:6;730;1444:13;;1403:54;:::o;1004:45::-;730:6;1004:45;:::o;8601:1167:4:-;8836:18;8870:21;8894:32;8899:13;8914:11;8894:4;:32::i;:::-;8870:56;;8936:18;8957:31;8962:10;8974:13;8957:4;:31::i;:::-;8936:52;;8998:14;9015:31;9020:13;9035:10;9015:4;:31::i;:::-;8998:48;;9121:8;9132:28;730:6:2;9143:16:4;9132:4;:28::i;:::-;9121:39;;9171:17;9191:20;9196:9;9207:3;9191:4;:20::i;:::-;9171:40;;9221:22;9246:34;9251:12;9265:14;9246:4;:34::i;:::-;9221:59;;9290:26;9319:39;9324:17;9343:14;9319:4;:39::i;:::-;9290:68;;9607:8;9618:43;9623:28;730:6:2;9634:16:4;9623:4;:28::i;:::-;9653:7;9618:4;:43::i;:::-;9607:54;;9687:44;9692:21;9715:15;730:6:2;9726:3:4;9715:4;:15::i;:::-;9687:4;:44::i;:::-;9671:60;8601:1167;-1:-1:-1;;;;;;;;;;;;;;;8601:1167:4:o;840:53:2:-;888:5;730:6;881:12;;13284:1324:4;13522:17;13609:21;13633:33;13638:14;13654:11;13633:4;:33::i;:::-;13609:57;;13747:8;13758:28;730:6:2;13769:16:4;13758:4;:28::i;:::-;13747:39;;13796:8;13807:18;13812:3;13817:7;13807:4;:18::i;:::-;13796:29;;13836:32;13871:72;13889:14;13918:15;730:6:2;13929:3:4;13918:4;:15::i;13871:72::-;13836:107;;13954:23;13980:85;13998:15;14028:27;13980:4;:85::i;:::-;13954:111;;14075:18;14096:41;14101:18;14121:15;14096:4;:41::i;:::-;14075:62;;14214:14;14231:37;14236:13;14251:16;14231:4;:37::i;:::-;14214:54;;14278:18;14299:27;14304:9;14315:10;14299:4;:27::i;:::-;14278:48;;14336:29;14368:31;14373:10;14385:13;14368:4;:31::i;:::-;14336:63;;14520:52;14525:24;14551:20;730:6:2;996:1;14551:4:4;:20::i;14520:52::-;14505:67;-1:-1:-1;;;;;;;;;;13284:1324:4;;;;;;;;:::o;6455:1140::-;6690:18;6968:21;6992:32;6997:13;7012:11;6992:4;:32::i;:::-;6968:56;;7034:8;7045:43;7050:28;730:6:2;7061:16:4;7050:4;:28::i;:::-;7080:7;7045:4;:43::i;:::-;7034:54;;7099:26;7128:36;7133:13;7148:15;730:6:2;7159:3:4;7148:4;:15::i;:::-;7128:4;:36::i;:::-;7099:65;;7175:22;7200:43;7205:14;7221:21;7200:4;:43::i;:::-;7175:68;;7253:17;7273:39;7278:17;7297:14;7273:4;:39::i;:::-;7253:59;;7390:14;7407:36;7412:12;7426:16;7407:4;:36::i;:::-;7390:53;;7453:18;7474:27;7479:9;7490:10;7474:4;:27::i;:::-;7453:48;;7527:31;7532:13;7547:10;7527:4;:31::i;:::-;7511:47;6455:1140;-1:-1:-1;;;;;;;;;;;;;;6455:1140:4:o;1167:54:2:-;1215:6;730;1208:13;;10874:1304:4;11110:19;11145:21;11169:33;11174:14;11190:11;11169:4;:33::i;:::-;11145:57;;11307:29;11339:75;11357:12;11384:20;730:6:2;996:1;11384:4:4;:20::i;11339:75::-;11307:107;;11424:18;11445:42;11450:10;11462:24;11445:4;:42::i;:::-;11424:63;;11497:14;11514:31;11519:13;11534:10;11514:4;:31::i;:::-;11497:48;;11615:18;11636:45;11641:9;11652:28;730:6:2;11663:16:4;11652:4;:28::i;:::-;11636:4;:45::i;:::-;11615:66;;11691:23;11717:36;11722:13;11737:15;11717:4;:36::i;:::-;11691:62;;11764:32;11799:76;11817:15;11847:18;11799:4;:76::i;:::-;11764:111;;12008:8;12019:43;12024:28;730:6:2;12035:16:4;12024:4;:28::i;12019:43::-;12008:54;;12090:50;12095:27;12124:15;730:6:2;12135:3:4;12124:4;:15::i;1228:51:2:-;1269:10;1228:51;:::o;1519:59::-;1560:18;1519:59;:::o;1626:494:4:-;1830:14;1860:10;1873:35;1878:14;1894:13;1873:4;:35::i;:::-;1860:48;;1918:10;1931:37;1936:15;1953:14;1931:4;:37::i;:::-;1918:50;;1978:10;1991:18;1996:5;2003;1991:4;:18::i;:::-;1978:31;;2019:10;2032:31;730:6:2;2043:19:4;730:6:2;2054:7:4;2043:4;:19::i;2032:31::-;2019:44;;2094:18;2099:5;2106;2094:4;:18::i;:::-;2082:30;1626:494;-1:-1:-1;;;;;;;;;;1626:494:4:o;791:42:2:-;832:1;791:42;:::o;743:::-;784:1;743:42;:::o;1286:46::-;1327:5;1286:46;:::o;3126:664:4:-;3359:19;3394:16;3413:35;3418:13;3433:14;3413:4;:35::i;:::-;3394:54;;3458:15;3476:19;730:6:2;3487:7:4;3476:4;:19::i;:::-;3458:37;;3518:31;3523:13;3538:10;3518:4;:31::i;:::-;3505:44;;3559:6;3568:54;3573:14;3589:32;3594:14;3610:10;3589:4;:32::i;3568:54::-;3559:63;;3632:8;3643:20;3648:1;3651:11;3643:4;:20::i;:::-;3632:31;;3673:8;3684:15;730:6:2;3695:3:4;3684:4;:15::i;:::-;3673:26;;3726;3731:15;3748:3;3726:4;:26::i;:::-;3709:43;3126:664;-1:-1:-1;;;;;;;;;;;;3126:664:4:o;899:50:2:-;947:2;730:6;940:9;;1338:59;1379:18;1338:59;:::o;955:42::-;996:1;955:42;:::o;1464:49::-;1512:1;730:6;1505:8;;4796:653:4;5030:18;5064:16;5083:35;5088:14;5104:13;5083:4;:35::i;:::-;5064:54;;5128:9;5140:37;5145:15;5162:14;5140:4;:37::i;:::-;5128:49;;5187:6;5196:27;5201:15;5218:4;5196;:27::i;:::-;5187:36;;5233:8;5244:20;5249:1;5252:11;5244:4;:20::i;:::-;5233:31;;5280:15;5285:3;730:6:2;5280:4:4;:15::i;:::-;5274:21;;5321:19;730:6:2;5332:7:4;5321:4;:19::i;:::-;5305:35;;5366:46;5371:25;5376:14;5392:3;5371:4;:25::i;:::-;5398:13;5366:4;:46::i;:::-;5350:62;4796:653;-1:-1:-1;;;;;;;;;;;4796:653:4:o;1856:376:5:-;1925:4;1953:6;1945:31;;;;;-1:-1:-1;;;;;1945:31:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;730:6:2;1996:8:5;;2022:6;;;:24;;;730:6:2;2037:1:5;2032:2;:6;;;;;;:14;2022:24;2014:53;;;;;-1:-1:-1;;;;;2014:53:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;2114:1;2110:5;;2104:12;;2134:8;;;;2126:37;;;;;-1:-1:-1;;;;;2126:37:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;2190:7;2205:1;2200:2;:6;;;;;;;-1:-1:-1;;;;1856:376:5;;;;;:::o;949:173::-;1018:4;1047:5;;;1070:6;;;;1062:35;;;;;-1:-1:-1;;;;;1062:35:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1114:1;949:173;-1:-1:-1;;;949:173:5:o;2733:533::-;2807:4;1327:5:2;2835:4:5;:21;;2827:55;;;;;-1:-1:-1;;;;;2827:55:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1379:18:2;2900:21:5;;;2892:56;;;;;-1:-1:-1;;;;;2892:56:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;2959:10;2972:11;2979:3;2972:6;:11::i;:::-;2959:24;;2993:11;3007:16;3012:3;3017:5;3007:4;:16::i;:::-;2993:30;;3034:13;3050:24;3056:4;3062:11;3067:5;3062:4;:11::i;:::-;3050:5;:24::i;:::-;3034:40;-1:-1:-1;3089:11:5;3085:57;;3123:8;-1:-1:-1;3116:15:5;;-1:-1:-1;;3116:15:5;3085:57;3152:18;3173:40;3184:4;3190:6;1444:13:2;3173:10:5;:40::i;:::-;3152:61;;3230:29;3235:8;3245:13;3230:4;:29::i;:::-;3223:36;2733:533;-1:-1:-1;;;;;;;2733:533:5:o;1549:301::-;1618:4;1648:5;;;1671:6;;;:21;;;1691:1;1686;1681:2;:6;;;;;;:11;1671:21;1663:50;;;;;-1:-1:-1;;;;;1663:50:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1739:8;1733:15;;1766:8;;;;1758:37;;;;;-1:-1:-1;;;;;1758:37:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1805:7;730:6:2;1815:2:5;:9;;1128:195;1197:4;1218:6;1226:9;1239:14;1248:1;1251;1239:8;:14::i;:::-;1217:36;;;;1272:4;1271:5;1263:35;;;;;-1:-1:-1;;;;;1263:35:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1315:1:5;1128:195;-1:-1:-1;;;1128:195:5:o;832:111::-;895:4;730:6:2;922:7:5;927:1;922:4;:7::i;:::-;:14;;832:111;-1:-1:-1;;832:111:5:o;722:104::-;730:6:2;811:8:5;;;722:104::o;2257:320::-;2327:4;2356:1;2327:4;2380:1;2376;:5;:21;;730:6:2;2376:21:5;;;2389:1;2376:21;2367:30;-1:-1:-1;2418:1:5;2413:6;;;;2408:145;2421:6;;2408:145;;2455:10;2460:1;2463;2455:4;:10::i;:::-;2451:14;-1:-1:-1;2488:1:5;2484;:5;:10;2480:63;;2518:10;2523:1;2526;2518:4;:10::i;:::-;2514:14;;2480:63;2434:1;2429:6;;;;2408:145;;;2569:1;2257:320;-1:-1:-1;;;;2257:320:5:o;3272:1040::-;3368:4;3416:3;3368:4;;3451:20;3460:4;730:6:2;3451:8:5;:20::i;:::-;3429:42;;-1:-1:-1;3429:42:5;-1:-1:-1;730:6:2;;3481:9:5;3804:1;3790:495;3815:9;3807:4;:17;3790:495;;3845:9;730:6:2;3857:1:5;:8;3845:20;;3880:6;3888:9;3901:29;3910:1;3913:16;3918:4;730:6:2;3913:4:5;:16::i;:::-;3901:8;:29::i;:::-;3879:51;;;;3951:22;3956:4;3962:10;3967:1;3970;3962:4;:10::i;3951:22::-;3944:29;;3994:16;3999:4;4005;3994;:16::i;:::-;3987:23;-1:-1:-1;4028:9:5;4024:20;;4039:5;;;;;4024:20;4063:4;4059:30;;;4080:9;;;4059:30;4107:4;4103:30;;;4124:9;;;4103:30;4151:8;4147:128;;;4185:15;4190:3;4195:4;4185;:15::i;:::-;4179:21;;4147:128;;;4245:15;4250:3;4255:4;4245;:15::i;:::-;4239:21;;4147:128;-1:-1:-1;;;3826:3:5;;3790:495;;;-1:-1:-1;4302:3:5;;3272:1040;-1:-1:-1;;;;;;;;;3272:1040:5:o;1329:214::-;1402:4;1408;1437:1;1432;:6;1428:109;;-1:-1:-1;;1462:5:5;;;1469;1454:21;;1428:109;-1:-1:-1;;1514:5:5;;;1521:4;1428:109;1329:214;;;;;:::o", + "source": "// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity 0.5.7;\n\nimport './BNum.sol';\n\ncontract BMath is BConst, BNum {\n /**********************************************************************************************\n // calcSpotPrice //\n // sP = spotPrice //\n // bI = tokenBalanceIn ( bI / wI ) 1 //\n // bO = tokenBalanceOut sP = ----------- * ---------- //\n // wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) //\n // wO = tokenWeightOut //\n // sF = swapFee //\n **********************************************************************************************/\n function calcSpotPrice(\n uint tokenBalanceIn,\n uint tokenWeightIn,\n uint tokenBalanceOut,\n uint tokenWeightOut,\n uint swapFee\n )\n public pure\n returns (uint spotPrice)\n {\n uint numer = bdiv(tokenBalanceIn, tokenWeightIn);\n uint denom = bdiv(tokenBalanceOut, tokenWeightOut);\n uint ratio = bdiv(numer, denom);\n uint scale = bdiv(BONE, bsub(BONE, swapFee));\n return (spotPrice = bmul(ratio, scale));\n }\n\n /**********************************************************************************************\n // calcOutGivenIn //\n // aO = tokenAmountOut //\n // bO = tokenBalanceOut //\n // bI = tokenBalanceIn / / bI \\ (wI / wO) \\ //\n // aI = tokenAmountIn aO = bO * | 1 - | -------------------------- | ^ | //\n // wI = tokenWeightIn \\ \\ ( bI + ( aI * ( 1 - sF )) / / //\n // wO = tokenWeightOut //\n // sF = swapFee //\n **********************************************************************************************/\n function calcOutGivenIn(\n uint tokenBalanceIn,\n uint tokenWeightIn,\n uint tokenBalanceOut,\n uint tokenWeightOut,\n uint tokenAmountIn,\n uint swapFee\n )\n public pure\n returns (uint tokenAmountOut)\n {\n uint weightRatio = bdiv(tokenWeightIn, tokenWeightOut);\n uint adjustedIn = bsub(BONE, swapFee);\n adjustedIn = bmul(tokenAmountIn, adjustedIn);\n uint y = bdiv(tokenBalanceIn, badd(tokenBalanceIn, adjustedIn));\n uint foo = bpow(y, weightRatio);\n uint bar = bsub(BONE, foo);\n tokenAmountOut = bmul(tokenBalanceOut, bar);\n return tokenAmountOut;\n }\n\n /**********************************************************************************************\n // calcInGivenOut //\n // aI = tokenAmountIn //\n // bO = tokenBalanceOut / / bO \\ (wO / wI) \\ //\n // bI = tokenBalanceIn bI * | | ------------ | ^ - 1 | //\n // aO = tokenAmountOut aI = \\ \\ ( bO - aO ) / / //\n // wI = tokenWeightIn -------------------------------------------- //\n // wO = tokenWeightOut ( 1 - sF ) //\n // sF = swapFee //\n **********************************************************************************************/\n function calcInGivenOut(\n uint tokenBalanceIn,\n uint tokenWeightIn,\n uint tokenBalanceOut,\n uint tokenWeightOut,\n uint tokenAmountOut,\n uint swapFee\n )\n public pure\n returns (uint tokenAmountIn)\n {\n uint weightRatio = bdiv(tokenWeightOut, tokenWeightIn);\n uint diff = bsub(tokenBalanceOut, tokenAmountOut);\n uint y = bdiv(tokenBalanceOut, diff);\n uint foo = bpow(y, weightRatio);\n foo = bsub(foo, BONE);\n tokenAmountIn = bsub(BONE, swapFee);\n tokenAmountIn = bdiv(bmul(tokenBalanceIn, foo), tokenAmountIn);\n return tokenAmountIn;\n }\n\n /**********************************************************************************************\n // calcPoolOutGivenSingleIn //\n // pAo = poolAmountOut / \\ //\n // tAi = tokenAmountIn /// / // wI \\ \\\\ \\ wI \\ //\n // wI = tokenWeightIn //| tAi *| 1 - || 1 - -- | * sF || + tBi \\ -- \\ //\n // tW = totalWeight pAo=|| \\ \\ \\\\ tW / // | ^ tW | * pS - pS //\n // tBi = tokenBalanceIn \\\\ ------------------------------------- / / //\n // pS = poolSupply \\\\ tBi / / //\n // sF = swapFee \\ / //\n **********************************************************************************************/\n function calcPoolOutGivenSingleIn(\n uint tokenBalanceIn,\n uint tokenWeightIn,\n uint poolSupply,\n uint totalWeight,\n uint tokenAmountIn,\n uint swapFee\n )\n public pure\n returns (uint poolAmountOut)\n {\n // Charge the trading fee for the proportion of tokenAi\n /// which is implicitly traded to the other pool tokens.\n // That proportion is (1- weightTokenIn)\n // tokenAiAfterFee = tAi * (1 - (1-weightTi) * poolFee);\n uint normalizedWeight = bdiv(tokenWeightIn, totalWeight);\n uint zaz = bmul(bsub(BONE, normalizedWeight), swapFee); \n uint tokenAmountInAfterFee = bmul(tokenAmountIn, bsub(BONE, zaz));\n\n uint newTokenBalanceIn = badd(tokenBalanceIn, tokenAmountInAfterFee);\n uint tokenInRatio = bdiv(newTokenBalanceIn, tokenBalanceIn);\n\n // uint newPoolSupply = (ratioTi ^ weightTi) * poolSupply;\n uint poolRatio = bpow(tokenInRatio, normalizedWeight);\n uint newPoolSupply = bmul(poolRatio, poolSupply);\n poolAmountOut = bsub(newPoolSupply, poolSupply);\n return poolAmountOut;\n }\n\n /**********************************************************************************************\n // calcSingleInGivenPoolOut //\n // tAi = tokenAmountIn //(pS + pAo)\\ / 1 \\\\ //\n // pS = poolSupply || --------- | ^ | --------- || * bI - bI //\n // pAo = poolAmountOut \\\\ pS / \\(wI / tW)// //\n // bI = balanceIn tAi = -------------------------------------------- //\n // wI = weightIn / wI \\ //\n // tW = totalWeight | 1 - ---- | * sF //\n // sF = swapFee \\ tW / //\n **********************************************************************************************/\n function calcSingleInGivenPoolOut(\n uint tokenBalanceIn,\n uint tokenWeightIn,\n uint poolSupply,\n uint totalWeight,\n uint poolAmountOut,\n uint swapFee\n )\n public pure\n returns (uint tokenAmountIn)\n {\n uint normalizedWeight = bdiv(tokenWeightIn, totalWeight);\n uint newPoolSupply = badd(poolSupply, poolAmountOut);\n uint poolRatio = bdiv(newPoolSupply, poolSupply);\n \n //uint newBalTi = poolRatio^(1/weightTi) * balTi;\n uint boo = bdiv(BONE, normalizedWeight); \n uint tokenInRatio = bpow(poolRatio, boo);\n uint newTokenBalanceIn = bmul(tokenInRatio, tokenBalanceIn);\n uint tokenAmountInAfterFee = bsub(newTokenBalanceIn, tokenBalanceIn);\n // Do reverse order of fees charged in joinswap_ExternAmountIn, this way \n // ``` pAo == joinswap_ExternAmountIn(Ti, joinswap_PoolAmountOut(pAo, Ti)) ```\n //uint tAi = tAiAfterFee / (1 - (1-weightTi) * swapFee) ;\n uint zar = bmul(bsub(BONE, normalizedWeight), swapFee);\n tokenAmountIn = bdiv(tokenAmountInAfterFee, bsub(BONE, zar));\n return tokenAmountIn;\n }\n\n /**********************************************************************************************\n // calcSingleOutGivenPoolIn //\n // tAo = tokenAmountOut / / \\\\ //\n // bO = tokenBalanceOut / // pS - (pAi * (1 - eF)) \\ / 1 \\ \\\\ //\n // pAi = poolAmountIn | bO - || ----------------------- | ^ | --------- | * b0 || //\n // ps = poolSupply \\ \\\\ pS / \\(wO / tW)/ // //\n // wI = tokenWeightIn tAo = \\ \\ // //\n // tW = totalWeight / / wO \\ \\ //\n // sF = swapFee * | 1 - | 1 - ---- | * sF | //\n // eF = exitFee \\ \\ tW / / //\n **********************************************************************************************/\n function calcSingleOutGivenPoolIn(\n uint tokenBalanceOut,\n uint tokenWeightOut,\n uint poolSupply,\n uint totalWeight,\n uint poolAmountIn,\n uint swapFee\n )\n public pure\n returns (uint tokenAmountOut)\n {\n uint normalizedWeight = bdiv(tokenWeightOut, totalWeight);\n // charge exit fee on the pool token side\n // pAiAfterExitFee = pAi*(1-exitFee)\n uint poolAmountInAfterExitFee = bmul(\n poolAmountIn, \n bsub(BONE, EXIT_FEE)\n );\n uint newPoolSupply = bsub(poolSupply, poolAmountInAfterExitFee);\n uint poolRatio = bdiv(newPoolSupply, poolSupply);\n \n // newBalTo = poolRatio^(1/weightTo) * balTo;\n uint tokenOutRatio = bpow(poolRatio, bdiv(BONE, normalizedWeight));\n uint newTokenBalanceOut = bmul(tokenOutRatio, tokenBalanceOut);\n\n uint tokenAmountOutBeforeSwapFee = bsub(\n tokenBalanceOut, \n newTokenBalanceOut\n );\n\n // charge swap fee on the output token side \n //uint tAo = tAoBeforeSwapFee * (1 - (1-weightTo) * swapFee)\n uint zaz = bmul(bsub(BONE, normalizedWeight), swapFee); \n tokenAmountOut = bmul(tokenAmountOutBeforeSwapFee, bsub(BONE, zaz));\n return tokenAmountOut;\n }\n\n /**********************************************************************************************\n // calcPoolInGivenSingleOut //\n // pAi = poolAmountIn // / tAo \\\\ / wO \\ \\ //\n // bO = tokenBalanceOut // | bO - -------------------------- |\\ | ---- | \\ //\n // tAo = tokenAmountOut pS - || \\ 1 - ((1 - (tO / tW)) * sF)/ | ^ \\ tW / * pS | //\n // ps = poolSupply \\\\ -----------------------------------/ / //\n // wO = tokenWeightOut pAi = \\\\ bO / / //\n // tW = totalWeight ------------------------------------------------------------- //\n // sF = swapFee ( 1 - eF ) //\n // eF = exitFee //\n **********************************************************************************************/\n function calcPoolInGivenSingleOut(\n uint tokenBalanceOut,\n uint tokenWeightOut,\n uint poolSupply,\n uint totalWeight,\n uint tokenAmountOut,\n uint swapFee\n )\n public pure\n returns (uint poolAmountIn)\n {\n\n // charge swap fee on the output token side \n uint normalizedWeight = bdiv(tokenWeightOut, totalWeight);\n //uint tAoBeforeSwapFee = tAo / (1 - (1-weightTo) * swapFee) ;\n uint zoo = bsub(BONE, normalizedWeight);\n uint zar = bmul(zoo, swapFee); \n uint tokenAmountOutBeforeSwapFee = bdiv(\n tokenAmountOut, \n bsub(BONE, zar)\n );\n\n uint newTokenBalanceOut = bsub(\n tokenBalanceOut, \n tokenAmountOutBeforeSwapFee\n );\n uint tokenOutRatio = bdiv(newTokenBalanceOut, tokenBalanceOut);\n\n //uint newPoolSupply = (ratioTo ^ weightTo) * poolSupply;\n uint poolRatio = bpow(tokenOutRatio, normalizedWeight);\n uint newPoolSupply = bmul(poolRatio, poolSupply);\n uint poolAmountInAfterExitFee = bsub(poolSupply, newPoolSupply);\n\n // charge exit fee on the pool token side\n // pAi = pAiAfterExitFee/(1-exitFee)\n poolAmountIn = bdiv(poolAmountInAfterExitFee, bsub(BONE, EXIT_FEE));\n return poolAmountIn;\n }\n\n\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BMath.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BMath.sol", + "exportedSymbols": { + "BMath": [ + 945 + ] + }, + "id": 946, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 378, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "643:22:4" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol", + "file": "./BNum.sol", + "id": 379, + "nodeType": "ImportDirective", + "scope": 946, + "sourceUnit": 1423, + "src": "667:20:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 380, + "name": "BConst", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 280, + "src": "707:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BConst_$280", + "typeString": "contract BConst" + } + }, + "id": 381, + "nodeType": "InheritanceSpecifier", + "src": "707:6:4" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 382, + "name": "BNum", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1422, + "src": "715:4:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BNum_$1422", + "typeString": "contract BNum" + } + }, + "id": 383, + "nodeType": "InheritanceSpecifier", + "src": "715:4:4" + } + ], + "contractDependencies": [ + 280, + 1422 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 945, + "linearizedBaseContracts": [ + 945, + 1422, + 280 + ], + "name": "BMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 437, + "nodeType": "Block", + "src": "1850:270:4", + "statements": [ + { + "assignments": [ + 399 + ], + "declarations": [ + { + "constant": false, + "id": 399, + "name": "numer", + "nodeType": "VariableDeclaration", + "scope": 437, + "src": "1860:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 398, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1860:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 404, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 401, + "name": "tokenBalanceIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 385, + "src": "1878:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 402, + "name": "tokenWeightIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 387, + "src": "1894:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 400, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "1873:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1873:35:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1860:48:4" + }, + { + "assignments": [ + 406 + ], + "declarations": [ + { + "constant": false, + "id": 406, + "name": "denom", + "nodeType": "VariableDeclaration", + "scope": 437, + "src": "1918:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 405, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1918:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 411, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 408, + "name": "tokenBalanceOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 389, + "src": "1936:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 409, + "name": "tokenWeightOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 391, + "src": "1953:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 407, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "1931:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1931:37:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1918:50:4" + }, + { + "assignments": [ + 413 + ], + "declarations": [ + { + "constant": false, + "id": 413, + "name": "ratio", + "nodeType": "VariableDeclaration", + "scope": 437, + "src": "1978:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 412, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1978:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 418, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 415, + "name": "numer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 399, + "src": "1996:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 416, + "name": "denom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 406, + "src": "2003:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 414, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "1991:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1991:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1978:31:4" + }, + { + "assignments": [ + 420 + ], + "declarations": [ + { + "constant": false, + "id": 420, + "name": "scale", + "nodeType": "VariableDeclaration", + "scope": 437, + "src": "2019:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 419, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2019:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 428, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 422, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "2037:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 424, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "2048:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 425, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 393, + "src": "2054:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 423, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "2043:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2043:19:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 421, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "2032:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2032:31:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2019:44:4" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 429, + "name": "spotPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 396, + "src": "2082:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 431, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 413, + "src": "2099:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 432, + "name": "scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 420, + "src": "2106:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 430, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "2094:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2094:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2082:30:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 435, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2081:32:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 397, + "id": 436, + "nodeType": "Return", + "src": "2073:40:4" + } + ] + }, + "documentation": "********************************************************************************************\n// calcSpotPrice //\n// sP = spotPrice //\n// bI = tokenBalanceIn ( bI / wI ) 1 //\n// bO = tokenBalanceOut sP = ----------- * ---------- //\n// wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) //\n// wO = tokenWeightOut //\n// sF = swapFee //*********************************************************************************************", + "id": 438, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calcSpotPrice", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 394, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 385, + "name": "tokenBalanceIn", + "nodeType": "VariableDeclaration", + "scope": 438, + "src": "1658:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 384, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1658:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 387, + "name": "tokenWeightIn", + "nodeType": "VariableDeclaration", + "scope": 438, + "src": "1687:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 386, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1687:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 389, + "name": "tokenBalanceOut", + "nodeType": "VariableDeclaration", + "scope": 438, + "src": "1715:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 388, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1715:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 391, + "name": "tokenWeightOut", + "nodeType": "VariableDeclaration", + "scope": 438, + "src": "1745:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 390, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1745:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 393, + "name": "swapFee", + "nodeType": "VariableDeclaration", + "scope": 438, + "src": "1774:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 392, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1774:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1648:144:4" + }, + "returnParameters": { + "id": 397, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 396, + "name": "spotPrice", + "nodeType": "VariableDeclaration", + "scope": 438, + "src": "1830:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 395, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1830:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1829:16:4" + }, + "scope": 945, + "src": "1626:494:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 509, + "nodeType": "Block", + "src": "3384:406:4", + "statements": [ + { + "assignments": [ + 456 + ], + "declarations": [ + { + "constant": false, + "id": 456, + "name": "weightRatio", + "nodeType": "VariableDeclaration", + "scope": 509, + "src": "3394:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3394:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 461, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 458, + "name": "tokenWeightIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "3418:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 459, + "name": "tokenWeightOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 446, + "src": "3433:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 457, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "3413:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3413:35:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3394:54:4" + }, + { + "assignments": [ + 463 + ], + "declarations": [ + { + "constant": false, + "id": 463, + "name": "adjustedIn", + "nodeType": "VariableDeclaration", + "scope": 509, + "src": "3458:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 462, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3458:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 468, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 465, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "3481:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 466, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "3487:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 464, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "3476:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3476:19:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3458:37:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 469, + "name": "adjustedIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 463, + "src": "3505:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 471, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 448, + "src": "3523:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 472, + "name": "adjustedIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 463, + "src": "3538:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 470, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "3518:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3518:31:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3505:44:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 475, + "nodeType": "ExpressionStatement", + "src": "3505:44:4" + }, + { + "assignments": [ + 477 + ], + "declarations": [ + { + "constant": false, + "id": 477, + "name": "y", + "nodeType": "VariableDeclaration", + "scope": 509, + "src": "3559:6:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 476, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3559:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 485, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 479, + "name": "tokenBalanceIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 440, + "src": "3573:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 481, + "name": "tokenBalanceIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 440, + "src": "3594:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 482, + "name": "adjustedIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 463, + "src": "3610:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 480, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "3589:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3589:32:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 478, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "3568:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3568:54:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3559:63:4" + }, + { + "assignments": [ + 487 + ], + "declarations": [ + { + "constant": false, + "id": 487, + "name": "foo", + "nodeType": "VariableDeclaration", + "scope": 509, + "src": "3632:8:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 486, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3632:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 492, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 489, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 477, + "src": "3648:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 490, + "name": "weightRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "3651:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 488, + "name": "bpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1298, + "src": "3643:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3643:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3632:31:4" + }, + { + "assignments": [ + 494 + ], + "declarations": [ + { + "constant": false, + "id": 494, + "name": "bar", + "nodeType": "VariableDeclaration", + "scope": 509, + "src": "3673:8:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 493, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3673:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 499, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 496, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "3689:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 497, + "name": "foo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 487, + "src": "3695:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 495, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "3684:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3684:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3673:26:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 500, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 453, + "src": "3709:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 502, + "name": "tokenBalanceOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 444, + "src": "3731:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 503, + "name": "bar", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 494, + "src": "3748:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 501, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "3726:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3726:26:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3709:43:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 506, + "nodeType": "ExpressionStatement", + "src": "3709:43:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 507, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 453, + "src": "3769:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 454, + "id": 508, + "nodeType": "Return", + "src": "3762:21:4" + } + ] + }, + "documentation": "********************************************************************************************\n// calcOutGivenIn //\n// aO = tokenAmountOut //\n// bO = tokenBalanceOut //\n// bI = tokenBalanceIn / / bI \\ (wI / wO) \\ //\n// aI = tokenAmountIn aO = bO * | 1 - | -------------------------- | ^ | //\n// wI = tokenWeightIn \\ \\ ( bI + ( aI * ( 1 - sF )) / / //\n// wO = tokenWeightOut //\n// sF = swapFee //*********************************************************************************************", + "id": 510, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calcOutGivenIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 451, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 440, + "name": "tokenBalanceIn", + "nodeType": "VariableDeclaration", + "scope": 510, + "src": "3159:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 439, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3159:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 442, + "name": "tokenWeightIn", + "nodeType": "VariableDeclaration", + "scope": 510, + "src": "3188:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 441, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3188:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 444, + "name": "tokenBalanceOut", + "nodeType": "VariableDeclaration", + "scope": 510, + "src": "3216:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 443, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3216:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 446, + "name": "tokenWeightOut", + "nodeType": "VariableDeclaration", + "scope": 510, + "src": "3246:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 445, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3246:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 448, + "name": "tokenAmountIn", + "nodeType": "VariableDeclaration", + "scope": 510, + "src": "3275:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 447, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3275:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 450, + "name": "swapFee", + "nodeType": "VariableDeclaration", + "scope": 510, + "src": "3303:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 449, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3303:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3149:172:4" + }, + "returnParameters": { + "id": 454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 453, + "name": "tokenAmountOut", + "nodeType": "VariableDeclaration", + "scope": 510, + "src": "3359:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 452, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3359:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3358:21:4" + }, + "scope": 945, + "src": "3126:664:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 581, + "nodeType": "Block", + "src": "5054:395:4", + "statements": [ + { + "assignments": [ + 528 + ], + "declarations": [ + { + "constant": false, + "id": 528, + "name": "weightRatio", + "nodeType": "VariableDeclaration", + "scope": 581, + "src": "5064:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 527, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5064:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 533, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 530, + "name": "tokenWeightOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 518, + "src": "5088:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 531, + "name": "tokenWeightIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 514, + "src": "5104:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 529, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "5083:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5083:35:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5064:54:4" + }, + { + "assignments": [ + 535 + ], + "declarations": [ + { + "constant": false, + "id": 535, + "name": "diff", + "nodeType": "VariableDeclaration", + "scope": 581, + "src": "5128:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 534, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5128:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 540, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 537, + "name": "tokenBalanceOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "5145:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 538, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "5162:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 536, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "5140:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5140:37:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5128:49:4" + }, + { + "assignments": [ + 542 + ], + "declarations": [ + { + "constant": false, + "id": 542, + "name": "y", + "nodeType": "VariableDeclaration", + "scope": 581, + "src": "5187:6:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 541, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5187:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 547, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 544, + "name": "tokenBalanceOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "5201:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 545, + "name": "diff", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 535, + "src": "5218:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 543, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "5196:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5196:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5187:36:4" + }, + { + "assignments": [ + 549 + ], + "declarations": [ + { + "constant": false, + "id": 549, + "name": "foo", + "nodeType": "VariableDeclaration", + "scope": 581, + "src": "5233:8:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 548, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5233:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 554, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 551, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 542, + "src": "5249:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 552, + "name": "weightRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "5252:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 550, + "name": "bpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1298, + "src": "5244:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5244:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5233:31:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 555, + "name": "foo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "5274:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 557, + "name": "foo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "5285:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 558, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "5290:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 556, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "5280:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5280:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5274:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 561, + "nodeType": "ExpressionStatement", + "src": "5274:21:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 562, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "5305:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 564, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "5326:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 565, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 522, + "src": "5332:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 563, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "5321:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5321:19:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5305:35:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 568, + "nodeType": "ExpressionStatement", + "src": "5305:35:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 569, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "5350:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 572, + "name": "tokenBalanceIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 512, + "src": "5376:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 573, + "name": "foo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 549, + "src": "5392:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 571, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "5371:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5371:25:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 575, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "5398:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 570, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "5366:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5366:46:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5350:62:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 578, + "nodeType": "ExpressionStatement", + "src": "5350:62:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 579, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "5429:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 526, + "id": 580, + "nodeType": "Return", + "src": "5422:20:4" + } + ] + }, + "documentation": "********************************************************************************************\n// calcInGivenOut //\n// aI = tokenAmountIn //\n// bO = tokenBalanceOut / / bO \\ (wO / wI) \\ //\n// bI = tokenBalanceIn bI * | | ------------ | ^ - 1 | //\n// aO = tokenAmountOut aI = \\ \\ ( bO - aO ) / / //\n// wI = tokenWeightIn -------------------------------------------- //\n// wO = tokenWeightOut ( 1 - sF ) //\n// sF = swapFee //*********************************************************************************************", + "id": 582, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calcInGivenOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 523, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 512, + "name": "tokenBalanceIn", + "nodeType": "VariableDeclaration", + "scope": 582, + "src": "4829:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 511, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4829:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 514, + "name": "tokenWeightIn", + "nodeType": "VariableDeclaration", + "scope": 582, + "src": "4858:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 513, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4858:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 516, + "name": "tokenBalanceOut", + "nodeType": "VariableDeclaration", + "scope": 582, + "src": "4886:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 515, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4886:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 518, + "name": "tokenWeightOut", + "nodeType": "VariableDeclaration", + "scope": 582, + "src": "4916:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 517, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4916:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 520, + "name": "tokenAmountOut", + "nodeType": "VariableDeclaration", + "scope": 582, + "src": "4945:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 519, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4945:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 522, + "name": "swapFee", + "nodeType": "VariableDeclaration", + "scope": 582, + "src": "4974:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 521, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4974:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4819:173:4" + }, + "returnParameters": { + "id": 526, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 525, + "name": "tokenAmountIn", + "nodeType": "VariableDeclaration", + "scope": 582, + "src": "5030:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 524, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5030:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5029:20:4" + }, + "scope": 945, + "src": "4796:653:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 663, + "nodeType": "Block", + "src": "6714:881:4", + "statements": [ + { + "assignments": [ + 600 + ], + "declarations": [ + { + "constant": false, + "id": 600, + "name": "normalizedWeight", + "nodeType": "VariableDeclaration", + "scope": 663, + "src": "6968:21:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 599, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6968:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 605, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 602, + "name": "tokenWeightIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 586, + "src": "6997:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 603, + "name": "totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 590, + "src": "7012:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 601, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "6992:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6992:32:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6968:56:4" + }, + { + "assignments": [ + 607 + ], + "declarations": [ + { + "constant": false, + "id": 607, + "name": "zaz", + "nodeType": "VariableDeclaration", + "scope": 663, + "src": "7034:8:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 606, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7034:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 615, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 610, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "7055:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 611, + "name": "normalizedWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 600, + "src": "7061:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 609, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "7050:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7050:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 613, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "7080:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 608, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "7045:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7045:43:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7034:54:4" + }, + { + "assignments": [ + 617 + ], + "declarations": [ + { + "constant": false, + "id": 617, + "name": "tokenAmountInAfterFee", + "nodeType": "VariableDeclaration", + "scope": 663, + "src": "7099:26:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 616, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7099:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 625, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 619, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 592, + "src": "7133:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 621, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "7153:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "zaz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 607, + "src": "7159:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 620, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "7148:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7148:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 618, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "7128:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7128:36:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7099:65:4" + }, + { + "assignments": [ + 627 + ], + "declarations": [ + { + "constant": false, + "id": 627, + "name": "newTokenBalanceIn", + "nodeType": "VariableDeclaration", + "scope": 663, + "src": "7175:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 626, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7175:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 632, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 629, + "name": "tokenBalanceIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 584, + "src": "7205:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 630, + "name": "tokenAmountInAfterFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 617, + "src": "7221:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 628, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "7200:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7200:43:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7175:68:4" + }, + { + "assignments": [ + 634 + ], + "declarations": [ + { + "constant": false, + "id": 634, + "name": "tokenInRatio", + "nodeType": "VariableDeclaration", + "scope": 663, + "src": "7253:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 633, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7253:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 639, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 636, + "name": "newTokenBalanceIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 627, + "src": "7278:17:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 637, + "name": "tokenBalanceIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 584, + "src": "7297:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 635, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "7273:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7273:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7253:59:4" + }, + { + "assignments": [ + 641 + ], + "declarations": [ + { + "constant": false, + "id": 641, + "name": "poolRatio", + "nodeType": "VariableDeclaration", + "scope": 663, + "src": "7390:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 640, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7390:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 646, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 643, + "name": "tokenInRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 634, + "src": "7412:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 644, + "name": "normalizedWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 600, + "src": "7426:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 642, + "name": "bpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1298, + "src": "7407:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7407:36:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7390:53:4" + }, + { + "assignments": [ + 648 + ], + "declarations": [ + { + "constant": false, + "id": 648, + "name": "newPoolSupply", + "nodeType": "VariableDeclaration", + "scope": 663, + "src": "7453:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 647, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7453:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 653, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 650, + "name": "poolRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 641, + "src": "7479:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 651, + "name": "poolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 588, + "src": "7490:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 649, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "7474:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7474:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7453:48:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 654, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 597, + "src": "7511:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 656, + "name": "newPoolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 648, + "src": "7532:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 657, + "name": "poolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 588, + "src": "7547:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 655, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "7527:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7527:31:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7511:47:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 660, + "nodeType": "ExpressionStatement", + "src": "7511:47:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 661, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 597, + "src": "7575:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 598, + "id": 662, + "nodeType": "Return", + "src": "7568:20:4" + } + ] + }, + "documentation": "********************************************************************************************\n// calcPoolOutGivenSingleIn //\n// pAo = poolAmountOut / \\ //\n// tAi = tokenAmountIn /// / // wI \\ \\\\ \\ wI \\ //\n// wI = tokenWeightIn //| tAi *| 1 - || 1 - -- | * sF || + tBi \\ -- \\ //\n// tW = totalWeight pAo=|| \\ \\ \\\\ tW / // | ^ tW | * pS - pS //\n// tBi = tokenBalanceIn \\\\ ------------------------------------- / / //\n// pS = poolSupply \\\\ tBi / / //\n// sF = swapFee \\ / //*********************************************************************************************", + "id": 664, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calcPoolOutGivenSingleIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 595, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 584, + "name": "tokenBalanceIn", + "nodeType": "VariableDeclaration", + "scope": 664, + "src": "6498:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 583, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6498:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 586, + "name": "tokenWeightIn", + "nodeType": "VariableDeclaration", + "scope": 664, + "src": "6527:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 585, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6527:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 588, + "name": "poolSupply", + "nodeType": "VariableDeclaration", + "scope": 664, + "src": "6555:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 587, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6555:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 590, + "name": "totalWeight", + "nodeType": "VariableDeclaration", + "scope": 664, + "src": "6580:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 589, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6580:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 592, + "name": "tokenAmountIn", + "nodeType": "VariableDeclaration", + "scope": 664, + "src": "6606:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 591, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6606:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 594, + "name": "swapFee", + "nodeType": "VariableDeclaration", + "scope": 664, + "src": "6634:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 593, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6634:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6488:164:4" + }, + "returnParameters": { + "id": 598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 597, + "name": "poolAmountOut", + "nodeType": "VariableDeclaration", + "scope": 664, + "src": "6690:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 596, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6690:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6689:20:4" + }, + "scope": 945, + "src": "6455:1140:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 752, + "nodeType": "Block", + "src": "8860:908:4", + "statements": [ + { + "assignments": [ + 682 + ], + "declarations": [ + { + "constant": false, + "id": 682, + "name": "normalizedWeight", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "8870:21:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 681, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8870:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 687, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 684, + "name": "tokenWeightIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 668, + "src": "8899:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 685, + "name": "totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 672, + "src": "8914:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 683, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "8894:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8894:32:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8870:56:4" + }, + { + "assignments": [ + 689 + ], + "declarations": [ + { + "constant": false, + "id": 689, + "name": "newPoolSupply", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "8936:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 688, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8936:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 694, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 691, + "name": "poolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 670, + "src": "8962:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 692, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 674, + "src": "8974:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 690, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "8957:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8957:31:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8936:52:4" + }, + { + "assignments": [ + 696 + ], + "declarations": [ + { + "constant": false, + "id": 696, + "name": "poolRatio", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "8998:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 695, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8998:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 701, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 698, + "name": "newPoolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "9020:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 699, + "name": "poolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 670, + "src": "9035:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 697, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "9015:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9015:31:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8998:48:4" + }, + { + "assignments": [ + 703 + ], + "declarations": [ + { + "constant": false, + "id": 703, + "name": "boo", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "9121:8:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 702, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9121:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 708, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 705, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "9137:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 706, + "name": "normalizedWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 682, + "src": "9143:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 704, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "9132:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9132:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9121:39:4" + }, + { + "assignments": [ + 710 + ], + "declarations": [ + { + "constant": false, + "id": 710, + "name": "tokenInRatio", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "9171:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 709, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9171:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 715, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 712, + "name": "poolRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 696, + "src": "9196:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 713, + "name": "boo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 703, + "src": "9207:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 711, + "name": "bpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1298, + "src": "9191:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9191:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9171:40:4" + }, + { + "assignments": [ + 717 + ], + "declarations": [ + { + "constant": false, + "id": 717, + "name": "newTokenBalanceIn", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "9221:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 716, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9221:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 722, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 719, + "name": "tokenInRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 710, + "src": "9251:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 720, + "name": "tokenBalanceIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 666, + "src": "9265:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 718, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "9246:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9246:34:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9221:59:4" + }, + { + "assignments": [ + 724 + ], + "declarations": [ + { + "constant": false, + "id": 724, + "name": "tokenAmountInAfterFee", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "9290:26:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 723, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9290:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 729, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 726, + "name": "newTokenBalanceIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 717, + "src": "9324:17:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 727, + "name": "tokenBalanceIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 666, + "src": "9343:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 725, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "9319:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9319:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9290:68:4" + }, + { + "assignments": [ + 731 + ], + "declarations": [ + { + "constant": false, + "id": 731, + "name": "zar", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "9607:8:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 730, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9607:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 739, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 734, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "9628:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 735, + "name": "normalizedWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 682, + "src": "9634:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 733, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "9623:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9623:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 737, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 676, + "src": "9653:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 732, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "9618:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9618:43:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9607:54:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 740, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "9671:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 742, + "name": "tokenAmountInAfterFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 724, + "src": "9692:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 744, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "9720:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 745, + "name": "zar", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 731, + "src": "9726:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 743, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "9715:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9715:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 741, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "9687:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9687:44:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9671:60:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 749, + "nodeType": "ExpressionStatement", + "src": "9671:60:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 750, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "9748:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 680, + "id": 751, + "nodeType": "Return", + "src": "9741:20:4" + } + ] + }, + "documentation": "********************************************************************************************\n// calcSingleInGivenPoolOut //\n// tAi = tokenAmountIn //(pS + pAo)\\ / 1 \\\\ //\n// pS = poolSupply || --------- | ^ | --------- || * bI - bI //\n// pAo = poolAmountOut \\\\ pS / \\(wI / tW)// //\n// bI = balanceIn tAi = -------------------------------------------- //\n// wI = weightIn / wI \\ //\n// tW = totalWeight | 1 - ---- | * sF //\n// sF = swapFee \\ tW / //*********************************************************************************************", + "id": 753, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calcSingleInGivenPoolOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 677, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 666, + "name": "tokenBalanceIn", + "nodeType": "VariableDeclaration", + "scope": 753, + "src": "8644:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 665, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8644:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 668, + "name": "tokenWeightIn", + "nodeType": "VariableDeclaration", + "scope": 753, + "src": "8673:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 667, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8673:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 670, + "name": "poolSupply", + "nodeType": "VariableDeclaration", + "scope": 753, + "src": "8701:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 669, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8701:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 672, + "name": "totalWeight", + "nodeType": "VariableDeclaration", + "scope": 753, + "src": "8726:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 671, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8726:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 674, + "name": "poolAmountOut", + "nodeType": "VariableDeclaration", + "scope": 753, + "src": "8752:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 673, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8752:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 676, + "name": "swapFee", + "nodeType": "VariableDeclaration", + "scope": 753, + "src": "8780:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 675, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8780:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8634:164:4" + }, + "returnParameters": { + "id": 680, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 679, + "name": "tokenAmountIn", + "nodeType": "VariableDeclaration", + "scope": 753, + "src": "8836:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 678, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8836:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8835:20:4" + }, + "scope": 945, + "src": "8601:1167:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 847, + "nodeType": "Block", + "src": "11135:1043:4", + "statements": [ + { + "assignments": [ + 771 + ], + "declarations": [ + { + "constant": false, + "id": 771, + "name": "normalizedWeight", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "11145:21:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 770, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11145:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 776, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 773, + "name": "tokenWeightOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 757, + "src": "11174:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 774, + "name": "totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "11190:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 772, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "11169:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11169:33:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11145:57:4" + }, + { + "assignments": [ + 778 + ], + "declarations": [ + { + "constant": false, + "id": 778, + "name": "poolAmountInAfterExitFee", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "11307:29:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 777, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11307:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 786, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 780, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 763, + "src": "11357:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 782, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "11389:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 783, + "name": "EXIT_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "11395:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 781, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "11384:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11384:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 779, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "11339:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11339:75:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11307:107:4" + }, + { + "assignments": [ + 788 + ], + "declarations": [ + { + "constant": false, + "id": 788, + "name": "newPoolSupply", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "11424:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 787, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11424:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 793, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 790, + "name": "poolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 759, + "src": "11450:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 791, + "name": "poolAmountInAfterExitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 778, + "src": "11462:24:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 789, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "11445:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11445:42:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11424:63:4" + }, + { + "assignments": [ + 795 + ], + "declarations": [ + { + "constant": false, + "id": 795, + "name": "poolRatio", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "11497:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 794, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11497:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 800, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 797, + "name": "newPoolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 788, + "src": "11519:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 798, + "name": "poolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 759, + "src": "11534:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 796, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "11514:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11514:31:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11497:48:4" + }, + { + "assignments": [ + 802 + ], + "declarations": [ + { + "constant": false, + "id": 802, + "name": "tokenOutRatio", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "11615:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 801, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11615:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 810, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 804, + "name": "poolRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 795, + "src": "11641:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 806, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "11657:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 807, + "name": "normalizedWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 771, + "src": "11663:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 805, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "11652:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11652:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 803, + "name": "bpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1298, + "src": "11636:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11636:45:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11615:66:4" + }, + { + "assignments": [ + 812 + ], + "declarations": [ + { + "constant": false, + "id": 812, + "name": "newTokenBalanceOut", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "11691:23:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 811, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11691:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 817, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 814, + "name": "tokenOutRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 802, + "src": "11722:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 815, + "name": "tokenBalanceOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 755, + "src": "11737:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 813, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "11717:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11717:36:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11691:62:4" + }, + { + "assignments": [ + 819 + ], + "declarations": [ + { + "constant": false, + "id": 819, + "name": "tokenAmountOutBeforeSwapFee", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "11764:32:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 818, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11764:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 824, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 821, + "name": "tokenBalanceOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 755, + "src": "11817:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 822, + "name": "newTokenBalanceOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 812, + "src": "11847:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 820, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "11799:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11799:76:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11764:111:4" + }, + { + "assignments": [ + 826 + ], + "declarations": [ + { + "constant": false, + "id": 826, + "name": "zaz", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "12008:8:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 825, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12008:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 834, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "12029:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 830, + "name": "normalizedWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 771, + "src": "12035:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 828, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "12024:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12024:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 832, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 765, + "src": "12054:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 827, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "12019:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12019:43:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12008:54:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 835, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "12073:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 837, + "name": "tokenAmountOutBeforeSwapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 819, + "src": "12095:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 839, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "12129:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 840, + "name": "zaz", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 826, + "src": "12135:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 838, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "12124:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12124:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 836, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "12090:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12090:50:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12073:67:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 844, + "nodeType": "ExpressionStatement", + "src": "12073:67:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 845, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "12157:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 769, + "id": 846, + "nodeType": "Return", + "src": "12150:21:4" + } + ] + }, + "documentation": "********************************************************************************************\n// calcSingleOutGivenPoolIn //\n// tAo = tokenAmountOut / / \\\\ //\n// bO = tokenBalanceOut / // pS - (pAi * (1 - eF)) \\ / 1 \\ \\\\ //\n// pAi = poolAmountIn | bO - || ----------------------- | ^ | --------- | * b0 || //\n// ps = poolSupply \\ \\\\ pS / \\(wO / tW)/ // //\n// wI = tokenWeightIn tAo = \\ \\ // //\n// tW = totalWeight / / wO \\ \\ //\n// sF = swapFee * | 1 - | 1 - ---- | * sF | //\n// eF = exitFee \\ \\ tW / / //*********************************************************************************************", + "id": 848, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calcSingleOutGivenPoolIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 766, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 755, + "name": "tokenBalanceOut", + "nodeType": "VariableDeclaration", + "scope": 848, + "src": "10917:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 754, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10917:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 757, + "name": "tokenWeightOut", + "nodeType": "VariableDeclaration", + "scope": 848, + "src": "10947:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 756, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10947:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 759, + "name": "poolSupply", + "nodeType": "VariableDeclaration", + "scope": 848, + "src": "10976:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 758, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10976:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 761, + "name": "totalWeight", + "nodeType": "VariableDeclaration", + "scope": 848, + "src": "11001:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 760, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11001:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 763, + "name": "poolAmountIn", + "nodeType": "VariableDeclaration", + "scope": 848, + "src": "11027:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 762, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11027:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 765, + "name": "swapFee", + "nodeType": "VariableDeclaration", + "scope": 848, + "src": "11054:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 764, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11054:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10907:165:4" + }, + "returnParameters": { + "id": 769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 768, + "name": "tokenAmountOut", + "nodeType": "VariableDeclaration", + "scope": 848, + "src": "11110:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 767, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11110:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11109:21:4" + }, + "scope": 945, + "src": "10874:1304:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 943, + "nodeType": "Block", + "src": "13545:1063:4", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "name": "normalizedWeight", + "nodeType": "VariableDeclaration", + "scope": 943, + "src": "13609:21:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13609:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 871, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 868, + "name": "tokenWeightOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 852, + "src": "13638:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 869, + "name": "totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "13654:11:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 867, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "13633:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13633:33:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13609:57:4" + }, + { + "assignments": [ + 873 + ], + "declarations": [ + { + "constant": false, + "id": 873, + "name": "zoo", + "nodeType": "VariableDeclaration", + "scope": 943, + "src": "13747:8:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 872, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13747:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 878, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 875, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "13763:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 876, + "name": "normalizedWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "13769:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 874, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "13758:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13758:28:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13747:39:4" + }, + { + "assignments": [ + 880 + ], + "declarations": [ + { + "constant": false, + "id": 880, + "name": "zar", + "nodeType": "VariableDeclaration", + "scope": 943, + "src": "13796:8:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 879, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13796:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 885, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 882, + "name": "zoo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 873, + "src": "13812:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 883, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 860, + "src": "13817:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 881, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "13807:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13807:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13796:29:4" + }, + { + "assignments": [ + 887 + ], + "declarations": [ + { + "constant": false, + "id": 887, + "name": "tokenAmountOutBeforeSwapFee", + "nodeType": "VariableDeclaration", + "scope": 943, + "src": "13836:32:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 886, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13836:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 895, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 889, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "13889:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 891, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "13923:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 892, + "name": "zar", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 880, + "src": "13929:3:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 890, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "13918:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13918:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 888, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "13871:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13871:72:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13836:107:4" + }, + { + "assignments": [ + 897 + ], + "declarations": [ + { + "constant": false, + "id": 897, + "name": "newTokenBalanceOut", + "nodeType": "VariableDeclaration", + "scope": 943, + "src": "13954:23:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 896, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13954:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 902, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 899, + "name": "tokenBalanceOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 850, + "src": "13998:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 900, + "name": "tokenAmountOutBeforeSwapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 887, + "src": "14028:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 898, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "13980:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13980:85:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13954:111:4" + }, + { + "assignments": [ + 904 + ], + "declarations": [ + { + "constant": false, + "id": 904, + "name": "tokenOutRatio", + "nodeType": "VariableDeclaration", + "scope": 943, + "src": "14075:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 903, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14075:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 909, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 906, + "name": "newTokenBalanceOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "14101:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 907, + "name": "tokenBalanceOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 850, + "src": "14121:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 905, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "14096:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14096:41:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14075:62:4" + }, + { + "assignments": [ + 911 + ], + "declarations": [ + { + "constant": false, + "id": 911, + "name": "poolRatio", + "nodeType": "VariableDeclaration", + "scope": 943, + "src": "14214:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 910, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14214:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 916, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "tokenOutRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 904, + "src": "14236:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 914, + "name": "normalizedWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "14251:16:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 912, + "name": "bpow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1298, + "src": "14231:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14231:37:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14214:54:4" + }, + { + "assignments": [ + 918 + ], + "declarations": [ + { + "constant": false, + "id": 918, + "name": "newPoolSupply", + "nodeType": "VariableDeclaration", + "scope": 943, + "src": "14278:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 917, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14278:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 923, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 920, + "name": "poolRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 911, + "src": "14304:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 921, + "name": "poolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 854, + "src": "14315:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 919, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "14299:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14299:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14278:48:4" + }, + { + "assignments": [ + 925 + ], + "declarations": [ + { + "constant": false, + "id": 925, + "name": "poolAmountInAfterExitFee", + "nodeType": "VariableDeclaration", + "scope": 943, + "src": "14336:29:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 924, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14336:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 930, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 927, + "name": "poolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 854, + "src": "14373:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 928, + "name": "newPoolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "14385:13:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 926, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "14368:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14368:31:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14336:63:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 931, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 863, + "src": "14505:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 933, + "name": "poolAmountInAfterExitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 925, + "src": "14525:24:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 935, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "14556:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 936, + "name": "EXIT_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "14562:8:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 934, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "14551:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14551:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 932, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "14520:4:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14520:52:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14505:67:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 940, + "nodeType": "ExpressionStatement", + "src": "14505:67:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 941, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 863, + "src": "14589:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 864, + "id": 942, + "nodeType": "Return", + "src": "14582:19:4" + } + ] + }, + "documentation": "********************************************************************************************\n// calcPoolInGivenSingleOut //\n// pAi = poolAmountIn // / tAo \\\\ / wO \\ \\ //\n// bO = tokenBalanceOut // | bO - -------------------------- |\\ | ---- | \\ //\n// tAo = tokenAmountOut pS - || \\ 1 - ((1 - (tO / tW)) * sF)/ | ^ \\ tW / * pS | //\n// ps = poolSupply \\\\ -----------------------------------/ / //\n// wO = tokenWeightOut pAi = \\\\ bO / / //\n// tW = totalWeight ------------------------------------------------------------- //\n// sF = swapFee ( 1 - eF ) //\n// eF = exitFee //*********************************************************************************************", + "id": 944, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calcPoolInGivenSingleOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 861, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 850, + "name": "tokenBalanceOut", + "nodeType": "VariableDeclaration", + "scope": 944, + "src": "13327:20:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 849, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13327:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 852, + "name": "tokenWeightOut", + "nodeType": "VariableDeclaration", + "scope": 944, + "src": "13357:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 851, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13357:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 854, + "name": "poolSupply", + "nodeType": "VariableDeclaration", + "scope": 944, + "src": "13386:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 853, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13386:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 856, + "name": "totalWeight", + "nodeType": "VariableDeclaration", + "scope": 944, + "src": "13411:16:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 855, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13411:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 858, + "name": "tokenAmountOut", + "nodeType": "VariableDeclaration", + "scope": 944, + "src": "13437:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13437:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 860, + "name": "swapFee", + "nodeType": "VariableDeclaration", + "scope": 944, + "src": "13466:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 859, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13466:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13317:167:4" + }, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 863, + "name": "poolAmountIn", + "nodeType": "VariableDeclaration", + "scope": 944, + "src": "13522:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 862, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13522:4:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13521:19:4" + }, + "scope": 945, + "src": "13284:1324:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 946, + "src": "689:13923:4" + } + ], + "src": "643:13970:4" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BMath.sol", + "exportedSymbols": { + "BMath": [ + 945 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 378, + "name": "PragmaDirective", + "src": "643:22:4" + }, + { + "attributes": { + "SourceUnit": 1423, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol", + "file": "./BNum.sol", + "scope": 946, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 379, + "name": "ImportDirective", + "src": "667:20:4" + }, + { + "attributes": { + "contractDependencies": [ + 280, + 1422 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 945, + 1422, + 280 + ], + "name": "BMath", + "scope": 946 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BConst", + "referencedDeclaration": 280, + "type": "contract BConst" + }, + "id": 380, + "name": "UserDefinedTypeName", + "src": "707:6:4" + } + ], + "id": 381, + "name": "InheritanceSpecifier", + "src": "707:6:4" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BNum", + "referencedDeclaration": 1422, + "type": "contract BNum" + }, + "id": 382, + "name": "UserDefinedTypeName", + "src": "715:4:4" + } + ], + "id": 383, + "name": "InheritanceSpecifier", + "src": "715:4:4" + }, + { + "attributes": { + "documentation": "********************************************************************************************\n// calcSpotPrice //\n// sP = spotPrice //\n// bI = tokenBalanceIn ( bI / wI ) 1 //\n// bO = tokenBalanceOut sP = ----------- * ---------- //\n// wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) //\n// wO = tokenWeightOut //\n// sF = swapFee //*********************************************************************************************", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "calcSpotPrice", + "scope": 945, + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenBalanceIn", + "scope": 438, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 384, + "name": "ElementaryTypeName", + "src": "1658:4:4" + } + ], + "id": 385, + "name": "VariableDeclaration", + "src": "1658:19:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenWeightIn", + "scope": 438, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 386, + "name": "ElementaryTypeName", + "src": "1687:4:4" + } + ], + "id": 387, + "name": "VariableDeclaration", + "src": "1687:18:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenBalanceOut", + "scope": 438, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 388, + "name": "ElementaryTypeName", + "src": "1715:4:4" + } + ], + "id": 389, + "name": "VariableDeclaration", + "src": "1715:20:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenWeightOut", + "scope": 438, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 390, + "name": "ElementaryTypeName", + "src": "1745:4:4" + } + ], + "id": 391, + "name": "VariableDeclaration", + "src": "1745:19:4" + }, + { + "attributes": { + "constant": false, + "name": "swapFee", + "scope": 438, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 392, + "name": "ElementaryTypeName", + "src": "1774:4:4" + } + ], + "id": 393, + "name": "VariableDeclaration", + "src": "1774:12:4" + } + ], + "id": 394, + "name": "ParameterList", + "src": "1648:144:4" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "spotPrice", + "scope": 438, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 395, + "name": "ElementaryTypeName", + "src": "1830:4:4" + } + ], + "id": 396, + "name": "VariableDeclaration", + "src": "1830:14:4" + } + ], + "id": 397, + "name": "ParameterList", + "src": "1829:16:4" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 399 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "numer", + "scope": 437, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 398, + "name": "ElementaryTypeName", + "src": "1860:4:4" + } + ], + "id": 399, + "name": "VariableDeclaration", + "src": "1860:10:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 400, + "name": "Identifier", + "src": "1873:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 385, + "type": "uint256", + "value": "tokenBalanceIn" + }, + "id": 401, + "name": "Identifier", + "src": "1878:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 387, + "type": "uint256", + "value": "tokenWeightIn" + }, + "id": 402, + "name": "Identifier", + "src": "1894:13:4" + } + ], + "id": 403, + "name": "FunctionCall", + "src": "1873:35:4" + } + ], + "id": 404, + "name": "VariableDeclarationStatement", + "src": "1860:48:4" + }, + { + "attributes": { + "assignments": [ + 406 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "denom", + "scope": 437, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 405, + "name": "ElementaryTypeName", + "src": "1918:4:4" + } + ], + "id": 406, + "name": "VariableDeclaration", + "src": "1918:10:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 407, + "name": "Identifier", + "src": "1931:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 389, + "type": "uint256", + "value": "tokenBalanceOut" + }, + "id": 408, + "name": "Identifier", + "src": "1936:15:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 391, + "type": "uint256", + "value": "tokenWeightOut" + }, + "id": 409, + "name": "Identifier", + "src": "1953:14:4" + } + ], + "id": 410, + "name": "FunctionCall", + "src": "1931:37:4" + } + ], + "id": 411, + "name": "VariableDeclarationStatement", + "src": "1918:50:4" + }, + { + "attributes": { + "assignments": [ + 413 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "ratio", + "scope": 437, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 412, + "name": "ElementaryTypeName", + "src": "1978:4:4" + } + ], + "id": 413, + "name": "VariableDeclaration", + "src": "1978:10:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 414, + "name": "Identifier", + "src": "1991:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 399, + "type": "uint256", + "value": "numer" + }, + "id": 415, + "name": "Identifier", + "src": "1996:5:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 406, + "type": "uint256", + "value": "denom" + }, + "id": 416, + "name": "Identifier", + "src": "2003:5:4" + } + ], + "id": 417, + "name": "FunctionCall", + "src": "1991:18:4" + } + ], + "id": 418, + "name": "VariableDeclarationStatement", + "src": "1978:31:4" + }, + { + "attributes": { + "assignments": [ + 420 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "scale", + "scope": 437, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 419, + "name": "ElementaryTypeName", + "src": "2019:4:4" + } + ], + "id": 420, + "name": "VariableDeclaration", + "src": "2019:10:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 421, + "name": "Identifier", + "src": "2032:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 422, + "name": "Identifier", + "src": "2037:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 423, + "name": "Identifier", + "src": "2043:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 424, + "name": "Identifier", + "src": "2048:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 393, + "type": "uint256", + "value": "swapFee" + }, + "id": 425, + "name": "Identifier", + "src": "2054:7:4" + } + ], + "id": 426, + "name": "FunctionCall", + "src": "2043:19:4" + } + ], + "id": 427, + "name": "FunctionCall", + "src": "2032:31:4" + } + ], + "id": 428, + "name": "VariableDeclarationStatement", + "src": "2019:44:4" + }, + { + "attributes": { + "functionReturnParameters": 397 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 396, + "type": "uint256", + "value": "spotPrice" + }, + "id": 429, + "name": "Identifier", + "src": "2082:9:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 430, + "name": "Identifier", + "src": "2094:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 413, + "type": "uint256", + "value": "ratio" + }, + "id": 431, + "name": "Identifier", + "src": "2099:5:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 420, + "type": "uint256", + "value": "scale" + }, + "id": 432, + "name": "Identifier", + "src": "2106:5:4" + } + ], + "id": 433, + "name": "FunctionCall", + "src": "2094:18:4" + } + ], + "id": 434, + "name": "Assignment", + "src": "2082:30:4" + } + ], + "id": 435, + "name": "TupleExpression", + "src": "2081:32:4" + } + ], + "id": 436, + "name": "Return", + "src": "2073:40:4" + } + ], + "id": 437, + "name": "Block", + "src": "1850:270:4" + } + ], + "id": 438, + "name": "FunctionDefinition", + "src": "1626:494:4" + }, + { + "attributes": { + "documentation": "********************************************************************************************\n// calcOutGivenIn //\n// aO = tokenAmountOut //\n// bO = tokenBalanceOut //\n// bI = tokenBalanceIn / / bI \\ (wI / wO) \\ //\n// aI = tokenAmountIn aO = bO * | 1 - | -------------------------- | ^ | //\n// wI = tokenWeightIn \\ \\ ( bI + ( aI * ( 1 - sF )) / / //\n// wO = tokenWeightOut //\n// sF = swapFee //*********************************************************************************************", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "calcOutGivenIn", + "scope": 945, + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenBalanceIn", + "scope": 510, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 439, + "name": "ElementaryTypeName", + "src": "3159:4:4" + } + ], + "id": 440, + "name": "VariableDeclaration", + "src": "3159:19:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenWeightIn", + "scope": 510, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 441, + "name": "ElementaryTypeName", + "src": "3188:4:4" + } + ], + "id": 442, + "name": "VariableDeclaration", + "src": "3188:18:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenBalanceOut", + "scope": 510, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 443, + "name": "ElementaryTypeName", + "src": "3216:4:4" + } + ], + "id": 444, + "name": "VariableDeclaration", + "src": "3216:20:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenWeightOut", + "scope": 510, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 445, + "name": "ElementaryTypeName", + "src": "3246:4:4" + } + ], + "id": 446, + "name": "VariableDeclaration", + "src": "3246:19:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenAmountIn", + "scope": 510, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 447, + "name": "ElementaryTypeName", + "src": "3275:4:4" + } + ], + "id": 448, + "name": "VariableDeclaration", + "src": "3275:18:4" + }, + { + "attributes": { + "constant": false, + "name": "swapFee", + "scope": 510, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 449, + "name": "ElementaryTypeName", + "src": "3303:4:4" + } + ], + "id": 450, + "name": "VariableDeclaration", + "src": "3303:12:4" + } + ], + "id": 451, + "name": "ParameterList", + "src": "3149:172:4" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountOut", + "scope": 510, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 452, + "name": "ElementaryTypeName", + "src": "3359:4:4" + } + ], + "id": 453, + "name": "VariableDeclaration", + "src": "3359:19:4" + } + ], + "id": 454, + "name": "ParameterList", + "src": "3358:21:4" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 456 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "weightRatio", + "scope": 509, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 455, + "name": "ElementaryTypeName", + "src": "3394:4:4" + } + ], + "id": 456, + "name": "VariableDeclaration", + "src": "3394:16:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 457, + "name": "Identifier", + "src": "3413:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 442, + "type": "uint256", + "value": "tokenWeightIn" + }, + "id": 458, + "name": "Identifier", + "src": "3418:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 446, + "type": "uint256", + "value": "tokenWeightOut" + }, + "id": 459, + "name": "Identifier", + "src": "3433:14:4" + } + ], + "id": 460, + "name": "FunctionCall", + "src": "3413:35:4" + } + ], + "id": 461, + "name": "VariableDeclarationStatement", + "src": "3394:54:4" + }, + { + "attributes": { + "assignments": [ + 463 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "adjustedIn", + "scope": 509, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 462, + "name": "ElementaryTypeName", + "src": "3458:4:4" + } + ], + "id": 463, + "name": "VariableDeclaration", + "src": "3458:15:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 464, + "name": "Identifier", + "src": "3476:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 465, + "name": "Identifier", + "src": "3481:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 450, + "type": "uint256", + "value": "swapFee" + }, + "id": 466, + "name": "Identifier", + "src": "3487:7:4" + } + ], + "id": 467, + "name": "FunctionCall", + "src": "3476:19:4" + } + ], + "id": 468, + "name": "VariableDeclarationStatement", + "src": "3458:37:4" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 463, + "type": "uint256", + "value": "adjustedIn" + }, + "id": 469, + "name": "Identifier", + "src": "3505:10:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 470, + "name": "Identifier", + "src": "3518:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 448, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 471, + "name": "Identifier", + "src": "3523:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 463, + "type": "uint256", + "value": "adjustedIn" + }, + "id": 472, + "name": "Identifier", + "src": "3538:10:4" + } + ], + "id": 473, + "name": "FunctionCall", + "src": "3518:31:4" + } + ], + "id": 474, + "name": "Assignment", + "src": "3505:44:4" + } + ], + "id": 475, + "name": "ExpressionStatement", + "src": "3505:44:4" + }, + { + "attributes": { + "assignments": [ + 477 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "y", + "scope": 509, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 476, + "name": "ElementaryTypeName", + "src": "3559:4:4" + } + ], + "id": 477, + "name": "VariableDeclaration", + "src": "3559:6:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 478, + "name": "Identifier", + "src": "3568:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 440, + "type": "uint256", + "value": "tokenBalanceIn" + }, + "id": 479, + "name": "Identifier", + "src": "3573:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 480, + "name": "Identifier", + "src": "3589:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 440, + "type": "uint256", + "value": "tokenBalanceIn" + }, + "id": 481, + "name": "Identifier", + "src": "3594:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 463, + "type": "uint256", + "value": "adjustedIn" + }, + "id": 482, + "name": "Identifier", + "src": "3610:10:4" + } + ], + "id": 483, + "name": "FunctionCall", + "src": "3589:32:4" + } + ], + "id": 484, + "name": "FunctionCall", + "src": "3568:54:4" + } + ], + "id": 485, + "name": "VariableDeclarationStatement", + "src": "3559:63:4" + }, + { + "attributes": { + "assignments": [ + 487 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "foo", + "scope": 509, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 486, + "name": "ElementaryTypeName", + "src": "3632:4:4" + } + ], + "id": 487, + "name": "VariableDeclaration", + "src": "3632:8:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1298, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bpow" + }, + "id": 488, + "name": "Identifier", + "src": "3643:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 477, + "type": "uint256", + "value": "y" + }, + "id": 489, + "name": "Identifier", + "src": "3648:1:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 456, + "type": "uint256", + "value": "weightRatio" + }, + "id": 490, + "name": "Identifier", + "src": "3651:11:4" + } + ], + "id": 491, + "name": "FunctionCall", + "src": "3643:20:4" + } + ], + "id": 492, + "name": "VariableDeclarationStatement", + "src": "3632:31:4" + }, + { + "attributes": { + "assignments": [ + 494 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "bar", + "scope": 509, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 493, + "name": "ElementaryTypeName", + "src": "3673:4:4" + } + ], + "id": 494, + "name": "VariableDeclaration", + "src": "3673:8:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 495, + "name": "Identifier", + "src": "3684:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 496, + "name": "Identifier", + "src": "3689:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 487, + "type": "uint256", + "value": "foo" + }, + "id": 497, + "name": "Identifier", + "src": "3695:3:4" + } + ], + "id": 498, + "name": "FunctionCall", + "src": "3684:15:4" + } + ], + "id": 499, + "name": "VariableDeclarationStatement", + "src": "3673:26:4" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 453, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 500, + "name": "Identifier", + "src": "3709:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 501, + "name": "Identifier", + "src": "3726:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 444, + "type": "uint256", + "value": "tokenBalanceOut" + }, + "id": 502, + "name": "Identifier", + "src": "3731:15:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 494, + "type": "uint256", + "value": "bar" + }, + "id": 503, + "name": "Identifier", + "src": "3748:3:4" + } + ], + "id": 504, + "name": "FunctionCall", + "src": "3726:26:4" + } + ], + "id": 505, + "name": "Assignment", + "src": "3709:43:4" + } + ], + "id": 506, + "name": "ExpressionStatement", + "src": "3709:43:4" + }, + { + "attributes": { + "functionReturnParameters": 454 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 453, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 507, + "name": "Identifier", + "src": "3769:14:4" + } + ], + "id": 508, + "name": "Return", + "src": "3762:21:4" + } + ], + "id": 509, + "name": "Block", + "src": "3384:406:4" + } + ], + "id": 510, + "name": "FunctionDefinition", + "src": "3126:664:4" + }, + { + "attributes": { + "documentation": "********************************************************************************************\n// calcInGivenOut //\n// aI = tokenAmountIn //\n// bO = tokenBalanceOut / / bO \\ (wO / wI) \\ //\n// bI = tokenBalanceIn bI * | | ------------ | ^ - 1 | //\n// aO = tokenAmountOut aI = \\ \\ ( bO - aO ) / / //\n// wI = tokenWeightIn -------------------------------------------- //\n// wO = tokenWeightOut ( 1 - sF ) //\n// sF = swapFee //*********************************************************************************************", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "calcInGivenOut", + "scope": 945, + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenBalanceIn", + "scope": 582, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 511, + "name": "ElementaryTypeName", + "src": "4829:4:4" + } + ], + "id": 512, + "name": "VariableDeclaration", + "src": "4829:19:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenWeightIn", + "scope": 582, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 513, + "name": "ElementaryTypeName", + "src": "4858:4:4" + } + ], + "id": 514, + "name": "VariableDeclaration", + "src": "4858:18:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenBalanceOut", + "scope": 582, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 515, + "name": "ElementaryTypeName", + "src": "4886:4:4" + } + ], + "id": 516, + "name": "VariableDeclaration", + "src": "4886:20:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenWeightOut", + "scope": 582, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 517, + "name": "ElementaryTypeName", + "src": "4916:4:4" + } + ], + "id": 518, + "name": "VariableDeclaration", + "src": "4916:19:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenAmountOut", + "scope": 582, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 519, + "name": "ElementaryTypeName", + "src": "4945:4:4" + } + ], + "id": 520, + "name": "VariableDeclaration", + "src": "4945:19:4" + }, + { + "attributes": { + "constant": false, + "name": "swapFee", + "scope": 582, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 521, + "name": "ElementaryTypeName", + "src": "4974:4:4" + } + ], + "id": 522, + "name": "VariableDeclaration", + "src": "4974:12:4" + } + ], + "id": 523, + "name": "ParameterList", + "src": "4819:173:4" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountIn", + "scope": 582, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 524, + "name": "ElementaryTypeName", + "src": "5030:4:4" + } + ], + "id": 525, + "name": "VariableDeclaration", + "src": "5030:18:4" + } + ], + "id": 526, + "name": "ParameterList", + "src": "5029:20:4" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 528 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "weightRatio", + "scope": 581, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 527, + "name": "ElementaryTypeName", + "src": "5064:4:4" + } + ], + "id": 528, + "name": "VariableDeclaration", + "src": "5064:16:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 529, + "name": "Identifier", + "src": "5083:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 518, + "type": "uint256", + "value": "tokenWeightOut" + }, + "id": 530, + "name": "Identifier", + "src": "5088:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 514, + "type": "uint256", + "value": "tokenWeightIn" + }, + "id": 531, + "name": "Identifier", + "src": "5104:13:4" + } + ], + "id": 532, + "name": "FunctionCall", + "src": "5083:35:4" + } + ], + "id": 533, + "name": "VariableDeclarationStatement", + "src": "5064:54:4" + }, + { + "attributes": { + "assignments": [ + 535 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "diff", + "scope": 581, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 534, + "name": "ElementaryTypeName", + "src": "5128:4:4" + } + ], + "id": 535, + "name": "VariableDeclaration", + "src": "5128:9:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 536, + "name": "Identifier", + "src": "5140:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 516, + "type": "uint256", + "value": "tokenBalanceOut" + }, + "id": 537, + "name": "Identifier", + "src": "5145:15:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 520, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 538, + "name": "Identifier", + "src": "5162:14:4" + } + ], + "id": 539, + "name": "FunctionCall", + "src": "5140:37:4" + } + ], + "id": 540, + "name": "VariableDeclarationStatement", + "src": "5128:49:4" + }, + { + "attributes": { + "assignments": [ + 542 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "y", + "scope": 581, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 541, + "name": "ElementaryTypeName", + "src": "5187:4:4" + } + ], + "id": 542, + "name": "VariableDeclaration", + "src": "5187:6:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 543, + "name": "Identifier", + "src": "5196:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 516, + "type": "uint256", + "value": "tokenBalanceOut" + }, + "id": 544, + "name": "Identifier", + "src": "5201:15:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 535, + "type": "uint256", + "value": "diff" + }, + "id": 545, + "name": "Identifier", + "src": "5218:4:4" + } + ], + "id": 546, + "name": "FunctionCall", + "src": "5196:27:4" + } + ], + "id": 547, + "name": "VariableDeclarationStatement", + "src": "5187:36:4" + }, + { + "attributes": { + "assignments": [ + 549 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "foo", + "scope": 581, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 548, + "name": "ElementaryTypeName", + "src": "5233:4:4" + } + ], + "id": 549, + "name": "VariableDeclaration", + "src": "5233:8:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1298, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bpow" + }, + "id": 550, + "name": "Identifier", + "src": "5244:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 542, + "type": "uint256", + "value": "y" + }, + "id": 551, + "name": "Identifier", + "src": "5249:1:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 528, + "type": "uint256", + "value": "weightRatio" + }, + "id": 552, + "name": "Identifier", + "src": "5252:11:4" + } + ], + "id": 553, + "name": "FunctionCall", + "src": "5244:20:4" + } + ], + "id": 554, + "name": "VariableDeclarationStatement", + "src": "5233:31:4" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 549, + "type": "uint256", + "value": "foo" + }, + "id": 555, + "name": "Identifier", + "src": "5274:3:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 556, + "name": "Identifier", + "src": "5280:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 549, + "type": "uint256", + "value": "foo" + }, + "id": 557, + "name": "Identifier", + "src": "5285:3:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 558, + "name": "Identifier", + "src": "5290:4:4" + } + ], + "id": 559, + "name": "FunctionCall", + "src": "5280:15:4" + } + ], + "id": 560, + "name": "Assignment", + "src": "5274:21:4" + } + ], + "id": 561, + "name": "ExpressionStatement", + "src": "5274:21:4" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 525, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 562, + "name": "Identifier", + "src": "5305:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 563, + "name": "Identifier", + "src": "5321:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 564, + "name": "Identifier", + "src": "5326:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 522, + "type": "uint256", + "value": "swapFee" + }, + "id": 565, + "name": "Identifier", + "src": "5332:7:4" + } + ], + "id": 566, + "name": "FunctionCall", + "src": "5321:19:4" + } + ], + "id": 567, + "name": "Assignment", + "src": "5305:35:4" + } + ], + "id": 568, + "name": "ExpressionStatement", + "src": "5305:35:4" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 525, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 569, + "name": "Identifier", + "src": "5350:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 570, + "name": "Identifier", + "src": "5366:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 571, + "name": "Identifier", + "src": "5371:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 512, + "type": "uint256", + "value": "tokenBalanceIn" + }, + "id": 572, + "name": "Identifier", + "src": "5376:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 549, + "type": "uint256", + "value": "foo" + }, + "id": 573, + "name": "Identifier", + "src": "5392:3:4" + } + ], + "id": 574, + "name": "FunctionCall", + "src": "5371:25:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 525, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 575, + "name": "Identifier", + "src": "5398:13:4" + } + ], + "id": 576, + "name": "FunctionCall", + "src": "5366:46:4" + } + ], + "id": 577, + "name": "Assignment", + "src": "5350:62:4" + } + ], + "id": 578, + "name": "ExpressionStatement", + "src": "5350:62:4" + }, + { + "attributes": { + "functionReturnParameters": 526 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 525, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 579, + "name": "Identifier", + "src": "5429:13:4" + } + ], + "id": 580, + "name": "Return", + "src": "5422:20:4" + } + ], + "id": 581, + "name": "Block", + "src": "5054:395:4" + } + ], + "id": 582, + "name": "FunctionDefinition", + "src": "4796:653:4" + }, + { + "attributes": { + "documentation": "********************************************************************************************\n// calcPoolOutGivenSingleIn //\n// pAo = poolAmountOut / \\ //\n// tAi = tokenAmountIn /// / // wI \\ \\\\ \\ wI \\ //\n// wI = tokenWeightIn //| tAi *| 1 - || 1 - -- | * sF || + tBi \\ -- \\ //\n// tW = totalWeight pAo=|| \\ \\ \\\\ tW / // | ^ tW | * pS - pS //\n// tBi = tokenBalanceIn \\\\ ------------------------------------- / / //\n// pS = poolSupply \\\\ tBi / / //\n// sF = swapFee \\ / //*********************************************************************************************", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "calcPoolOutGivenSingleIn", + "scope": 945, + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenBalanceIn", + "scope": 664, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 583, + "name": "ElementaryTypeName", + "src": "6498:4:4" + } + ], + "id": 584, + "name": "VariableDeclaration", + "src": "6498:19:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenWeightIn", + "scope": 664, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 585, + "name": "ElementaryTypeName", + "src": "6527:4:4" + } + ], + "id": 586, + "name": "VariableDeclaration", + "src": "6527:18:4" + }, + { + "attributes": { + "constant": false, + "name": "poolSupply", + "scope": 664, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 587, + "name": "ElementaryTypeName", + "src": "6555:4:4" + } + ], + "id": 588, + "name": "VariableDeclaration", + "src": "6555:15:4" + }, + { + "attributes": { + "constant": false, + "name": "totalWeight", + "scope": 664, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 589, + "name": "ElementaryTypeName", + "src": "6580:4:4" + } + ], + "id": 590, + "name": "VariableDeclaration", + "src": "6580:16:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenAmountIn", + "scope": 664, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 591, + "name": "ElementaryTypeName", + "src": "6606:4:4" + } + ], + "id": 592, + "name": "VariableDeclaration", + "src": "6606:18:4" + }, + { + "attributes": { + "constant": false, + "name": "swapFee", + "scope": 664, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 593, + "name": "ElementaryTypeName", + "src": "6634:4:4" + } + ], + "id": 594, + "name": "VariableDeclaration", + "src": "6634:12:4" + } + ], + "id": 595, + "name": "ParameterList", + "src": "6488:164:4" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "poolAmountOut", + "scope": 664, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 596, + "name": "ElementaryTypeName", + "src": "6690:4:4" + } + ], + "id": 597, + "name": "VariableDeclaration", + "src": "6690:18:4" + } + ], + "id": 598, + "name": "ParameterList", + "src": "6689:20:4" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 600 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "normalizedWeight", + "scope": 663, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 599, + "name": "ElementaryTypeName", + "src": "6968:4:4" + } + ], + "id": 600, + "name": "VariableDeclaration", + "src": "6968:21:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 601, + "name": "Identifier", + "src": "6992:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 586, + "type": "uint256", + "value": "tokenWeightIn" + }, + "id": 602, + "name": "Identifier", + "src": "6997:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 590, + "type": "uint256", + "value": "totalWeight" + }, + "id": 603, + "name": "Identifier", + "src": "7012:11:4" + } + ], + "id": 604, + "name": "FunctionCall", + "src": "6992:32:4" + } + ], + "id": 605, + "name": "VariableDeclarationStatement", + "src": "6968:56:4" + }, + { + "attributes": { + "assignments": [ + 607 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "zaz", + "scope": 663, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 606, + "name": "ElementaryTypeName", + "src": "7034:4:4" + } + ], + "id": 607, + "name": "VariableDeclaration", + "src": "7034:8:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 608, + "name": "Identifier", + "src": "7045:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 609, + "name": "Identifier", + "src": "7050:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 610, + "name": "Identifier", + "src": "7055:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 600, + "type": "uint256", + "value": "normalizedWeight" + }, + "id": 611, + "name": "Identifier", + "src": "7061:16:4" + } + ], + "id": 612, + "name": "FunctionCall", + "src": "7050:28:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 594, + "type": "uint256", + "value": "swapFee" + }, + "id": 613, + "name": "Identifier", + "src": "7080:7:4" + } + ], + "id": 614, + "name": "FunctionCall", + "src": "7045:43:4" + } + ], + "id": 615, + "name": "VariableDeclarationStatement", + "src": "7034:54:4" + }, + { + "attributes": { + "assignments": [ + 617 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountInAfterFee", + "scope": 663, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 616, + "name": "ElementaryTypeName", + "src": "7099:4:4" + } + ], + "id": 617, + "name": "VariableDeclaration", + "src": "7099:26:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 618, + "name": "Identifier", + "src": "7128:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 592, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 619, + "name": "Identifier", + "src": "7133:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 620, + "name": "Identifier", + "src": "7148:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 621, + "name": "Identifier", + "src": "7153:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 607, + "type": "uint256", + "value": "zaz" + }, + "id": 622, + "name": "Identifier", + "src": "7159:3:4" + } + ], + "id": 623, + "name": "FunctionCall", + "src": "7148:15:4" + } + ], + "id": 624, + "name": "FunctionCall", + "src": "7128:36:4" + } + ], + "id": 625, + "name": "VariableDeclarationStatement", + "src": "7099:65:4" + }, + { + "attributes": { + "assignments": [ + 627 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "newTokenBalanceIn", + "scope": 663, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 626, + "name": "ElementaryTypeName", + "src": "7175:4:4" + } + ], + "id": 627, + "name": "VariableDeclaration", + "src": "7175:22:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 628, + "name": "Identifier", + "src": "7200:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "uint256", + "value": "tokenBalanceIn" + }, + "id": 629, + "name": "Identifier", + "src": "7205:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 617, + "type": "uint256", + "value": "tokenAmountInAfterFee" + }, + "id": 630, + "name": "Identifier", + "src": "7221:21:4" + } + ], + "id": 631, + "name": "FunctionCall", + "src": "7200:43:4" + } + ], + "id": 632, + "name": "VariableDeclarationStatement", + "src": "7175:68:4" + }, + { + "attributes": { + "assignments": [ + 634 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenInRatio", + "scope": 663, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 633, + "name": "ElementaryTypeName", + "src": "7253:4:4" + } + ], + "id": 634, + "name": "VariableDeclaration", + "src": "7253:17:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 635, + "name": "Identifier", + "src": "7273:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 627, + "type": "uint256", + "value": "newTokenBalanceIn" + }, + "id": 636, + "name": "Identifier", + "src": "7278:17:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "uint256", + "value": "tokenBalanceIn" + }, + "id": 637, + "name": "Identifier", + "src": "7297:14:4" + } + ], + "id": 638, + "name": "FunctionCall", + "src": "7273:39:4" + } + ], + "id": 639, + "name": "VariableDeclarationStatement", + "src": "7253:59:4" + }, + { + "attributes": { + "assignments": [ + 641 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "poolRatio", + "scope": 663, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 640, + "name": "ElementaryTypeName", + "src": "7390:4:4" + } + ], + "id": 641, + "name": "VariableDeclaration", + "src": "7390:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1298, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bpow" + }, + "id": 642, + "name": "Identifier", + "src": "7407:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 634, + "type": "uint256", + "value": "tokenInRatio" + }, + "id": 643, + "name": "Identifier", + "src": "7412:12:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 600, + "type": "uint256", + "value": "normalizedWeight" + }, + "id": 644, + "name": "Identifier", + "src": "7426:16:4" + } + ], + "id": 645, + "name": "FunctionCall", + "src": "7407:36:4" + } + ], + "id": 646, + "name": "VariableDeclarationStatement", + "src": "7390:53:4" + }, + { + "attributes": { + "assignments": [ + 648 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "newPoolSupply", + "scope": 663, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 647, + "name": "ElementaryTypeName", + "src": "7453:4:4" + } + ], + "id": 648, + "name": "VariableDeclaration", + "src": "7453:18:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 649, + "name": "Identifier", + "src": "7474:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 641, + "type": "uint256", + "value": "poolRatio" + }, + "id": 650, + "name": "Identifier", + "src": "7479:9:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 588, + "type": "uint256", + "value": "poolSupply" + }, + "id": 651, + "name": "Identifier", + "src": "7490:10:4" + } + ], + "id": 652, + "name": "FunctionCall", + "src": "7474:27:4" + } + ], + "id": 653, + "name": "VariableDeclarationStatement", + "src": "7453:48:4" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 597, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 654, + "name": "Identifier", + "src": "7511:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 655, + "name": "Identifier", + "src": "7527:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 648, + "type": "uint256", + "value": "newPoolSupply" + }, + "id": 656, + "name": "Identifier", + "src": "7532:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 588, + "type": "uint256", + "value": "poolSupply" + }, + "id": 657, + "name": "Identifier", + "src": "7547:10:4" + } + ], + "id": 658, + "name": "FunctionCall", + "src": "7527:31:4" + } + ], + "id": 659, + "name": "Assignment", + "src": "7511:47:4" + } + ], + "id": 660, + "name": "ExpressionStatement", + "src": "7511:47:4" + }, + { + "attributes": { + "functionReturnParameters": 598 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 597, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 661, + "name": "Identifier", + "src": "7575:13:4" + } + ], + "id": 662, + "name": "Return", + "src": "7568:20:4" + } + ], + "id": 663, + "name": "Block", + "src": "6714:881:4" + } + ], + "id": 664, + "name": "FunctionDefinition", + "src": "6455:1140:4" + }, + { + "attributes": { + "documentation": "********************************************************************************************\n// calcSingleInGivenPoolOut //\n// tAi = tokenAmountIn //(pS + pAo)\\ / 1 \\\\ //\n// pS = poolSupply || --------- | ^ | --------- || * bI - bI //\n// pAo = poolAmountOut \\\\ pS / \\(wI / tW)// //\n// bI = balanceIn tAi = -------------------------------------------- //\n// wI = weightIn / wI \\ //\n// tW = totalWeight | 1 - ---- | * sF //\n// sF = swapFee \\ tW / //*********************************************************************************************", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "calcSingleInGivenPoolOut", + "scope": 945, + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenBalanceIn", + "scope": 753, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 665, + "name": "ElementaryTypeName", + "src": "8644:4:4" + } + ], + "id": 666, + "name": "VariableDeclaration", + "src": "8644:19:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenWeightIn", + "scope": 753, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 667, + "name": "ElementaryTypeName", + "src": "8673:4:4" + } + ], + "id": 668, + "name": "VariableDeclaration", + "src": "8673:18:4" + }, + { + "attributes": { + "constant": false, + "name": "poolSupply", + "scope": 753, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 669, + "name": "ElementaryTypeName", + "src": "8701:4:4" + } + ], + "id": 670, + "name": "VariableDeclaration", + "src": "8701:15:4" + }, + { + "attributes": { + "constant": false, + "name": "totalWeight", + "scope": 753, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 671, + "name": "ElementaryTypeName", + "src": "8726:4:4" + } + ], + "id": 672, + "name": "VariableDeclaration", + "src": "8726:16:4" + }, + { + "attributes": { + "constant": false, + "name": "poolAmountOut", + "scope": 753, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 673, + "name": "ElementaryTypeName", + "src": "8752:4:4" + } + ], + "id": 674, + "name": "VariableDeclaration", + "src": "8752:18:4" + }, + { + "attributes": { + "constant": false, + "name": "swapFee", + "scope": 753, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 675, + "name": "ElementaryTypeName", + "src": "8780:4:4" + } + ], + "id": 676, + "name": "VariableDeclaration", + "src": "8780:12:4" + } + ], + "id": 677, + "name": "ParameterList", + "src": "8634:164:4" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountIn", + "scope": 753, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 678, + "name": "ElementaryTypeName", + "src": "8836:4:4" + } + ], + "id": 679, + "name": "VariableDeclaration", + "src": "8836:18:4" + } + ], + "id": 680, + "name": "ParameterList", + "src": "8835:20:4" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 682 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "normalizedWeight", + "scope": 752, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 681, + "name": "ElementaryTypeName", + "src": "8870:4:4" + } + ], + "id": 682, + "name": "VariableDeclaration", + "src": "8870:21:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 683, + "name": "Identifier", + "src": "8894:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 668, + "type": "uint256", + "value": "tokenWeightIn" + }, + "id": 684, + "name": "Identifier", + "src": "8899:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 672, + "type": "uint256", + "value": "totalWeight" + }, + "id": 685, + "name": "Identifier", + "src": "8914:11:4" + } + ], + "id": 686, + "name": "FunctionCall", + "src": "8894:32:4" + } + ], + "id": 687, + "name": "VariableDeclarationStatement", + "src": "8870:56:4" + }, + { + "attributes": { + "assignments": [ + 689 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "newPoolSupply", + "scope": 752, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 688, + "name": "ElementaryTypeName", + "src": "8936:4:4" + } + ], + "id": 689, + "name": "VariableDeclaration", + "src": "8936:18:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 690, + "name": "Identifier", + "src": "8957:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 670, + "type": "uint256", + "value": "poolSupply" + }, + "id": 691, + "name": "Identifier", + "src": "8962:10:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 674, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 692, + "name": "Identifier", + "src": "8974:13:4" + } + ], + "id": 693, + "name": "FunctionCall", + "src": "8957:31:4" + } + ], + "id": 694, + "name": "VariableDeclarationStatement", + "src": "8936:52:4" + }, + { + "attributes": { + "assignments": [ + 696 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "poolRatio", + "scope": 752, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 695, + "name": "ElementaryTypeName", + "src": "8998:4:4" + } + ], + "id": 696, + "name": "VariableDeclaration", + "src": "8998:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 697, + "name": "Identifier", + "src": "9015:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 689, + "type": "uint256", + "value": "newPoolSupply" + }, + "id": 698, + "name": "Identifier", + "src": "9020:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 670, + "type": "uint256", + "value": "poolSupply" + }, + "id": 699, + "name": "Identifier", + "src": "9035:10:4" + } + ], + "id": 700, + "name": "FunctionCall", + "src": "9015:31:4" + } + ], + "id": 701, + "name": "VariableDeclarationStatement", + "src": "8998:48:4" + }, + { + "attributes": { + "assignments": [ + 703 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "boo", + "scope": 752, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 702, + "name": "ElementaryTypeName", + "src": "9121:4:4" + } + ], + "id": 703, + "name": "VariableDeclaration", + "src": "9121:8:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 704, + "name": "Identifier", + "src": "9132:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 705, + "name": "Identifier", + "src": "9137:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 682, + "type": "uint256", + "value": "normalizedWeight" + }, + "id": 706, + "name": "Identifier", + "src": "9143:16:4" + } + ], + "id": 707, + "name": "FunctionCall", + "src": "9132:28:4" + } + ], + "id": 708, + "name": "VariableDeclarationStatement", + "src": "9121:39:4" + }, + { + "attributes": { + "assignments": [ + 710 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenInRatio", + "scope": 752, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 709, + "name": "ElementaryTypeName", + "src": "9171:4:4" + } + ], + "id": 710, + "name": "VariableDeclaration", + "src": "9171:17:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1298, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bpow" + }, + "id": 711, + "name": "Identifier", + "src": "9191:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 696, + "type": "uint256", + "value": "poolRatio" + }, + "id": 712, + "name": "Identifier", + "src": "9196:9:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 703, + "type": "uint256", + "value": "boo" + }, + "id": 713, + "name": "Identifier", + "src": "9207:3:4" + } + ], + "id": 714, + "name": "FunctionCall", + "src": "9191:20:4" + } + ], + "id": 715, + "name": "VariableDeclarationStatement", + "src": "9171:40:4" + }, + { + "attributes": { + "assignments": [ + 717 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "newTokenBalanceIn", + "scope": 752, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 716, + "name": "ElementaryTypeName", + "src": "9221:4:4" + } + ], + "id": 717, + "name": "VariableDeclaration", + "src": "9221:22:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 718, + "name": "Identifier", + "src": "9246:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 710, + "type": "uint256", + "value": "tokenInRatio" + }, + "id": 719, + "name": "Identifier", + "src": "9251:12:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 666, + "type": "uint256", + "value": "tokenBalanceIn" + }, + "id": 720, + "name": "Identifier", + "src": "9265:14:4" + } + ], + "id": 721, + "name": "FunctionCall", + "src": "9246:34:4" + } + ], + "id": 722, + "name": "VariableDeclarationStatement", + "src": "9221:59:4" + }, + { + "attributes": { + "assignments": [ + 724 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountInAfterFee", + "scope": 752, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 723, + "name": "ElementaryTypeName", + "src": "9290:4:4" + } + ], + "id": 724, + "name": "VariableDeclaration", + "src": "9290:26:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 725, + "name": "Identifier", + "src": "9319:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 717, + "type": "uint256", + "value": "newTokenBalanceIn" + }, + "id": 726, + "name": "Identifier", + "src": "9324:17:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 666, + "type": "uint256", + "value": "tokenBalanceIn" + }, + "id": 727, + "name": "Identifier", + "src": "9343:14:4" + } + ], + "id": 728, + "name": "FunctionCall", + "src": "9319:39:4" + } + ], + "id": 729, + "name": "VariableDeclarationStatement", + "src": "9290:68:4" + }, + { + "attributes": { + "assignments": [ + 731 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "zar", + "scope": 752, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 730, + "name": "ElementaryTypeName", + "src": "9607:4:4" + } + ], + "id": 731, + "name": "VariableDeclaration", + "src": "9607:8:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 732, + "name": "Identifier", + "src": "9618:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 733, + "name": "Identifier", + "src": "9623:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 734, + "name": "Identifier", + "src": "9628:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 682, + "type": "uint256", + "value": "normalizedWeight" + }, + "id": 735, + "name": "Identifier", + "src": "9634:16:4" + } + ], + "id": 736, + "name": "FunctionCall", + "src": "9623:28:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 676, + "type": "uint256", + "value": "swapFee" + }, + "id": 737, + "name": "Identifier", + "src": "9653:7:4" + } + ], + "id": 738, + "name": "FunctionCall", + "src": "9618:43:4" + } + ], + "id": 739, + "name": "VariableDeclarationStatement", + "src": "9607:54:4" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 679, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 740, + "name": "Identifier", + "src": "9671:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 741, + "name": "Identifier", + "src": "9687:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 724, + "type": "uint256", + "value": "tokenAmountInAfterFee" + }, + "id": 742, + "name": "Identifier", + "src": "9692:21:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 743, + "name": "Identifier", + "src": "9715:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 744, + "name": "Identifier", + "src": "9720:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 731, + "type": "uint256", + "value": "zar" + }, + "id": 745, + "name": "Identifier", + "src": "9726:3:4" + } + ], + "id": 746, + "name": "FunctionCall", + "src": "9715:15:4" + } + ], + "id": 747, + "name": "FunctionCall", + "src": "9687:44:4" + } + ], + "id": 748, + "name": "Assignment", + "src": "9671:60:4" + } + ], + "id": 749, + "name": "ExpressionStatement", + "src": "9671:60:4" + }, + { + "attributes": { + "functionReturnParameters": 680 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 679, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 750, + "name": "Identifier", + "src": "9748:13:4" + } + ], + "id": 751, + "name": "Return", + "src": "9741:20:4" + } + ], + "id": 752, + "name": "Block", + "src": "8860:908:4" + } + ], + "id": 753, + "name": "FunctionDefinition", + "src": "8601:1167:4" + }, + { + "attributes": { + "documentation": "********************************************************************************************\n// calcSingleOutGivenPoolIn //\n// tAo = tokenAmountOut / / \\\\ //\n// bO = tokenBalanceOut / // pS - (pAi * (1 - eF)) \\ / 1 \\ \\\\ //\n// pAi = poolAmountIn | bO - || ----------------------- | ^ | --------- | * b0 || //\n// ps = poolSupply \\ \\\\ pS / \\(wO / tW)/ // //\n// wI = tokenWeightIn tAo = \\ \\ // //\n// tW = totalWeight / / wO \\ \\ //\n// sF = swapFee * | 1 - | 1 - ---- | * sF | //\n// eF = exitFee \\ \\ tW / / //*********************************************************************************************", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "calcSingleOutGivenPoolIn", + "scope": 945, + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenBalanceOut", + "scope": 848, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 754, + "name": "ElementaryTypeName", + "src": "10917:4:4" + } + ], + "id": 755, + "name": "VariableDeclaration", + "src": "10917:20:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenWeightOut", + "scope": 848, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 756, + "name": "ElementaryTypeName", + "src": "10947:4:4" + } + ], + "id": 757, + "name": "VariableDeclaration", + "src": "10947:19:4" + }, + { + "attributes": { + "constant": false, + "name": "poolSupply", + "scope": 848, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 758, + "name": "ElementaryTypeName", + "src": "10976:4:4" + } + ], + "id": 759, + "name": "VariableDeclaration", + "src": "10976:15:4" + }, + { + "attributes": { + "constant": false, + "name": "totalWeight", + "scope": 848, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 760, + "name": "ElementaryTypeName", + "src": "11001:4:4" + } + ], + "id": 761, + "name": "VariableDeclaration", + "src": "11001:16:4" + }, + { + "attributes": { + "constant": false, + "name": "poolAmountIn", + "scope": 848, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 762, + "name": "ElementaryTypeName", + "src": "11027:4:4" + } + ], + "id": 763, + "name": "VariableDeclaration", + "src": "11027:17:4" + }, + { + "attributes": { + "constant": false, + "name": "swapFee", + "scope": 848, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 764, + "name": "ElementaryTypeName", + "src": "11054:4:4" + } + ], + "id": 765, + "name": "VariableDeclaration", + "src": "11054:12:4" + } + ], + "id": 766, + "name": "ParameterList", + "src": "10907:165:4" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountOut", + "scope": 848, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 767, + "name": "ElementaryTypeName", + "src": "11110:4:4" + } + ], + "id": 768, + "name": "VariableDeclaration", + "src": "11110:19:4" + } + ], + "id": 769, + "name": "ParameterList", + "src": "11109:21:4" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 771 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "normalizedWeight", + "scope": 847, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 770, + "name": "ElementaryTypeName", + "src": "11145:4:4" + } + ], + "id": 771, + "name": "VariableDeclaration", + "src": "11145:21:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 772, + "name": "Identifier", + "src": "11169:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 757, + "type": "uint256", + "value": "tokenWeightOut" + }, + "id": 773, + "name": "Identifier", + "src": "11174:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 761, + "type": "uint256", + "value": "totalWeight" + }, + "id": 774, + "name": "Identifier", + "src": "11190:11:4" + } + ], + "id": 775, + "name": "FunctionCall", + "src": "11169:33:4" + } + ], + "id": 776, + "name": "VariableDeclarationStatement", + "src": "11145:57:4" + }, + { + "attributes": { + "assignments": [ + 778 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "poolAmountInAfterExitFee", + "scope": 847, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 777, + "name": "ElementaryTypeName", + "src": "11307:4:4" + } + ], + "id": 778, + "name": "VariableDeclaration", + "src": "11307:29:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 779, + "name": "Identifier", + "src": "11339:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 763, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 780, + "name": "Identifier", + "src": "11357:12:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 781, + "name": "Identifier", + "src": "11384:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 782, + "name": "Identifier", + "src": "11389:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 223, + "type": "uint256", + "value": "EXIT_FEE" + }, + "id": 783, + "name": "Identifier", + "src": "11395:8:4" + } + ], + "id": 784, + "name": "FunctionCall", + "src": "11384:20:4" + } + ], + "id": 785, + "name": "FunctionCall", + "src": "11339:75:4" + } + ], + "id": 786, + "name": "VariableDeclarationStatement", + "src": "11307:107:4" + }, + { + "attributes": { + "assignments": [ + 788 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "newPoolSupply", + "scope": 847, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 787, + "name": "ElementaryTypeName", + "src": "11424:4:4" + } + ], + "id": 788, + "name": "VariableDeclaration", + "src": "11424:18:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 789, + "name": "Identifier", + "src": "11445:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 759, + "type": "uint256", + "value": "poolSupply" + }, + "id": 790, + "name": "Identifier", + "src": "11450:10:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 778, + "type": "uint256", + "value": "poolAmountInAfterExitFee" + }, + "id": 791, + "name": "Identifier", + "src": "11462:24:4" + } + ], + "id": 792, + "name": "FunctionCall", + "src": "11445:42:4" + } + ], + "id": 793, + "name": "VariableDeclarationStatement", + "src": "11424:63:4" + }, + { + "attributes": { + "assignments": [ + 795 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "poolRatio", + "scope": 847, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 794, + "name": "ElementaryTypeName", + "src": "11497:4:4" + } + ], + "id": 795, + "name": "VariableDeclaration", + "src": "11497:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 796, + "name": "Identifier", + "src": "11514:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 788, + "type": "uint256", + "value": "newPoolSupply" + }, + "id": 797, + "name": "Identifier", + "src": "11519:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 759, + "type": "uint256", + "value": "poolSupply" + }, + "id": 798, + "name": "Identifier", + "src": "11534:10:4" + } + ], + "id": 799, + "name": "FunctionCall", + "src": "11514:31:4" + } + ], + "id": 800, + "name": "VariableDeclarationStatement", + "src": "11497:48:4" + }, + { + "attributes": { + "assignments": [ + 802 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenOutRatio", + "scope": 847, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 801, + "name": "ElementaryTypeName", + "src": "11615:4:4" + } + ], + "id": 802, + "name": "VariableDeclaration", + "src": "11615:18:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1298, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bpow" + }, + "id": 803, + "name": "Identifier", + "src": "11636:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 795, + "type": "uint256", + "value": "poolRatio" + }, + "id": 804, + "name": "Identifier", + "src": "11641:9:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 805, + "name": "Identifier", + "src": "11652:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 806, + "name": "Identifier", + "src": "11657:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 771, + "type": "uint256", + "value": "normalizedWeight" + }, + "id": 807, + "name": "Identifier", + "src": "11663:16:4" + } + ], + "id": 808, + "name": "FunctionCall", + "src": "11652:28:4" + } + ], + "id": 809, + "name": "FunctionCall", + "src": "11636:45:4" + } + ], + "id": 810, + "name": "VariableDeclarationStatement", + "src": "11615:66:4" + }, + { + "attributes": { + "assignments": [ + 812 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "newTokenBalanceOut", + "scope": 847, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 811, + "name": "ElementaryTypeName", + "src": "11691:4:4" + } + ], + "id": 812, + "name": "VariableDeclaration", + "src": "11691:23:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 813, + "name": "Identifier", + "src": "11717:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 802, + "type": "uint256", + "value": "tokenOutRatio" + }, + "id": 814, + "name": "Identifier", + "src": "11722:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 755, + "type": "uint256", + "value": "tokenBalanceOut" + }, + "id": 815, + "name": "Identifier", + "src": "11737:15:4" + } + ], + "id": 816, + "name": "FunctionCall", + "src": "11717:36:4" + } + ], + "id": 817, + "name": "VariableDeclarationStatement", + "src": "11691:62:4" + }, + { + "attributes": { + "assignments": [ + 819 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountOutBeforeSwapFee", + "scope": 847, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 818, + "name": "ElementaryTypeName", + "src": "11764:4:4" + } + ], + "id": 819, + "name": "VariableDeclaration", + "src": "11764:32:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 820, + "name": "Identifier", + "src": "11799:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 755, + "type": "uint256", + "value": "tokenBalanceOut" + }, + "id": 821, + "name": "Identifier", + "src": "11817:15:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 812, + "type": "uint256", + "value": "newTokenBalanceOut" + }, + "id": 822, + "name": "Identifier", + "src": "11847:18:4" + } + ], + "id": 823, + "name": "FunctionCall", + "src": "11799:76:4" + } + ], + "id": 824, + "name": "VariableDeclarationStatement", + "src": "11764:111:4" + }, + { + "attributes": { + "assignments": [ + 826 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "zaz", + "scope": 847, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 825, + "name": "ElementaryTypeName", + "src": "12008:4:4" + } + ], + "id": 826, + "name": "VariableDeclaration", + "src": "12008:8:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 827, + "name": "Identifier", + "src": "12019:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 828, + "name": "Identifier", + "src": "12024:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 829, + "name": "Identifier", + "src": "12029:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 771, + "type": "uint256", + "value": "normalizedWeight" + }, + "id": 830, + "name": "Identifier", + "src": "12035:16:4" + } + ], + "id": 831, + "name": "FunctionCall", + "src": "12024:28:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 765, + "type": "uint256", + "value": "swapFee" + }, + "id": 832, + "name": "Identifier", + "src": "12054:7:4" + } + ], + "id": 833, + "name": "FunctionCall", + "src": "12019:43:4" + } + ], + "id": 834, + "name": "VariableDeclarationStatement", + "src": "12008:54:4" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 768, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 835, + "name": "Identifier", + "src": "12073:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 836, + "name": "Identifier", + "src": "12090:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 819, + "type": "uint256", + "value": "tokenAmountOutBeforeSwapFee" + }, + "id": 837, + "name": "Identifier", + "src": "12095:27:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 838, + "name": "Identifier", + "src": "12124:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 839, + "name": "Identifier", + "src": "12129:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 826, + "type": "uint256", + "value": "zaz" + }, + "id": 840, + "name": "Identifier", + "src": "12135:3:4" + } + ], + "id": 841, + "name": "FunctionCall", + "src": "12124:15:4" + } + ], + "id": 842, + "name": "FunctionCall", + "src": "12090:50:4" + } + ], + "id": 843, + "name": "Assignment", + "src": "12073:67:4" + } + ], + "id": 844, + "name": "ExpressionStatement", + "src": "12073:67:4" + }, + { + "attributes": { + "functionReturnParameters": 769 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 768, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 845, + "name": "Identifier", + "src": "12157:14:4" + } + ], + "id": 846, + "name": "Return", + "src": "12150:21:4" + } + ], + "id": 847, + "name": "Block", + "src": "11135:1043:4" + } + ], + "id": 848, + "name": "FunctionDefinition", + "src": "10874:1304:4" + }, + { + "attributes": { + "documentation": "********************************************************************************************\n// calcPoolInGivenSingleOut //\n// pAi = poolAmountIn // / tAo \\\\ / wO \\ \\ //\n// bO = tokenBalanceOut // | bO - -------------------------- |\\ | ---- | \\ //\n// tAo = tokenAmountOut pS - || \\ 1 - ((1 - (tO / tW)) * sF)/ | ^ \\ tW / * pS | //\n// ps = poolSupply \\\\ -----------------------------------/ / //\n// wO = tokenWeightOut pAi = \\\\ bO / / //\n// tW = totalWeight ------------------------------------------------------------- //\n// sF = swapFee ( 1 - eF ) //\n// eF = exitFee //*********************************************************************************************", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "calcPoolInGivenSingleOut", + "scope": 945, + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenBalanceOut", + "scope": 944, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 849, + "name": "ElementaryTypeName", + "src": "13327:4:4" + } + ], + "id": 850, + "name": "VariableDeclaration", + "src": "13327:20:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenWeightOut", + "scope": 944, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 851, + "name": "ElementaryTypeName", + "src": "13357:4:4" + } + ], + "id": 852, + "name": "VariableDeclaration", + "src": "13357:19:4" + }, + { + "attributes": { + "constant": false, + "name": "poolSupply", + "scope": 944, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 853, + "name": "ElementaryTypeName", + "src": "13386:4:4" + } + ], + "id": 854, + "name": "VariableDeclaration", + "src": "13386:15:4" + }, + { + "attributes": { + "constant": false, + "name": "totalWeight", + "scope": 944, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 855, + "name": "ElementaryTypeName", + "src": "13411:4:4" + } + ], + "id": 856, + "name": "VariableDeclaration", + "src": "13411:16:4" + }, + { + "attributes": { + "constant": false, + "name": "tokenAmountOut", + "scope": 944, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 857, + "name": "ElementaryTypeName", + "src": "13437:4:4" + } + ], + "id": 858, + "name": "VariableDeclaration", + "src": "13437:19:4" + }, + { + "attributes": { + "constant": false, + "name": "swapFee", + "scope": 944, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 859, + "name": "ElementaryTypeName", + "src": "13466:4:4" + } + ], + "id": 860, + "name": "VariableDeclaration", + "src": "13466:12:4" + } + ], + "id": 861, + "name": "ParameterList", + "src": "13317:167:4" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "poolAmountIn", + "scope": 944, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 862, + "name": "ElementaryTypeName", + "src": "13522:4:4" + } + ], + "id": 863, + "name": "VariableDeclaration", + "src": "13522:17:4" + } + ], + "id": 864, + "name": "ParameterList", + "src": "13521:19:4" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 866 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "normalizedWeight", + "scope": 943, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 865, + "name": "ElementaryTypeName", + "src": "13609:4:4" + } + ], + "id": 866, + "name": "VariableDeclaration", + "src": "13609:21:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 867, + "name": "Identifier", + "src": "13633:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 852, + "type": "uint256", + "value": "tokenWeightOut" + }, + "id": 868, + "name": "Identifier", + "src": "13638:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 856, + "type": "uint256", + "value": "totalWeight" + }, + "id": 869, + "name": "Identifier", + "src": "13654:11:4" + } + ], + "id": 870, + "name": "FunctionCall", + "src": "13633:33:4" + } + ], + "id": 871, + "name": "VariableDeclarationStatement", + "src": "13609:57:4" + }, + { + "attributes": { + "assignments": [ + 873 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "zoo", + "scope": 943, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 872, + "name": "ElementaryTypeName", + "src": "13747:4:4" + } + ], + "id": 873, + "name": "VariableDeclaration", + "src": "13747:8:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 874, + "name": "Identifier", + "src": "13758:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 875, + "name": "Identifier", + "src": "13763:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 866, + "type": "uint256", + "value": "normalizedWeight" + }, + "id": 876, + "name": "Identifier", + "src": "13769:16:4" + } + ], + "id": 877, + "name": "FunctionCall", + "src": "13758:28:4" + } + ], + "id": 878, + "name": "VariableDeclarationStatement", + "src": "13747:39:4" + }, + { + "attributes": { + "assignments": [ + 880 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "zar", + "scope": 943, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 879, + "name": "ElementaryTypeName", + "src": "13796:4:4" + } + ], + "id": 880, + "name": "VariableDeclaration", + "src": "13796:8:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 881, + "name": "Identifier", + "src": "13807:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 873, + "type": "uint256", + "value": "zoo" + }, + "id": 882, + "name": "Identifier", + "src": "13812:3:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 860, + "type": "uint256", + "value": "swapFee" + }, + "id": 883, + "name": "Identifier", + "src": "13817:7:4" + } + ], + "id": 884, + "name": "FunctionCall", + "src": "13807:18:4" + } + ], + "id": 885, + "name": "VariableDeclarationStatement", + "src": "13796:29:4" + }, + { + "attributes": { + "assignments": [ + 887 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountOutBeforeSwapFee", + "scope": 943, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 886, + "name": "ElementaryTypeName", + "src": "13836:4:4" + } + ], + "id": 887, + "name": "VariableDeclaration", + "src": "13836:32:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 888, + "name": "Identifier", + "src": "13871:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 858, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 889, + "name": "Identifier", + "src": "13889:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 890, + "name": "Identifier", + "src": "13918:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 891, + "name": "Identifier", + "src": "13923:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 880, + "type": "uint256", + "value": "zar" + }, + "id": 892, + "name": "Identifier", + "src": "13929:3:4" + } + ], + "id": 893, + "name": "FunctionCall", + "src": "13918:15:4" + } + ], + "id": 894, + "name": "FunctionCall", + "src": "13871:72:4" + } + ], + "id": 895, + "name": "VariableDeclarationStatement", + "src": "13836:107:4" + }, + { + "attributes": { + "assignments": [ + 897 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "newTokenBalanceOut", + "scope": 943, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 896, + "name": "ElementaryTypeName", + "src": "13954:4:4" + } + ], + "id": 897, + "name": "VariableDeclaration", + "src": "13954:23:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 898, + "name": "Identifier", + "src": "13980:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 850, + "type": "uint256", + "value": "tokenBalanceOut" + }, + "id": 899, + "name": "Identifier", + "src": "13998:15:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 887, + "type": "uint256", + "value": "tokenAmountOutBeforeSwapFee" + }, + "id": 900, + "name": "Identifier", + "src": "14028:27:4" + } + ], + "id": 901, + "name": "FunctionCall", + "src": "13980:85:4" + } + ], + "id": 902, + "name": "VariableDeclarationStatement", + "src": "13954:111:4" + }, + { + "attributes": { + "assignments": [ + 904 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenOutRatio", + "scope": 943, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 903, + "name": "ElementaryTypeName", + "src": "14075:4:4" + } + ], + "id": 904, + "name": "VariableDeclaration", + "src": "14075:18:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 905, + "name": "Identifier", + "src": "14096:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 897, + "type": "uint256", + "value": "newTokenBalanceOut" + }, + "id": 906, + "name": "Identifier", + "src": "14101:18:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 850, + "type": "uint256", + "value": "tokenBalanceOut" + }, + "id": 907, + "name": "Identifier", + "src": "14121:15:4" + } + ], + "id": 908, + "name": "FunctionCall", + "src": "14096:41:4" + } + ], + "id": 909, + "name": "VariableDeclarationStatement", + "src": "14075:62:4" + }, + { + "attributes": { + "assignments": [ + 911 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "poolRatio", + "scope": 943, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 910, + "name": "ElementaryTypeName", + "src": "14214:4:4" + } + ], + "id": 911, + "name": "VariableDeclaration", + "src": "14214:14:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1298, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bpow" + }, + "id": 912, + "name": "Identifier", + "src": "14231:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 904, + "type": "uint256", + "value": "tokenOutRatio" + }, + "id": 913, + "name": "Identifier", + "src": "14236:13:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 866, + "type": "uint256", + "value": "normalizedWeight" + }, + "id": 914, + "name": "Identifier", + "src": "14251:16:4" + } + ], + "id": 915, + "name": "FunctionCall", + "src": "14231:37:4" + } + ], + "id": 916, + "name": "VariableDeclarationStatement", + "src": "14214:54:4" + }, + { + "attributes": { + "assignments": [ + 918 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "newPoolSupply", + "scope": 943, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 917, + "name": "ElementaryTypeName", + "src": "14278:4:4" + } + ], + "id": 918, + "name": "VariableDeclaration", + "src": "14278:18:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 919, + "name": "Identifier", + "src": "14299:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 911, + "type": "uint256", + "value": "poolRatio" + }, + "id": 920, + "name": "Identifier", + "src": "14304:9:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 854, + "type": "uint256", + "value": "poolSupply" + }, + "id": 921, + "name": "Identifier", + "src": "14315:10:4" + } + ], + "id": 922, + "name": "FunctionCall", + "src": "14299:27:4" + } + ], + "id": 923, + "name": "VariableDeclarationStatement", + "src": "14278:48:4" + }, + { + "attributes": { + "assignments": [ + 925 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "poolAmountInAfterExitFee", + "scope": 943, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 924, + "name": "ElementaryTypeName", + "src": "14336:4:4" + } + ], + "id": 925, + "name": "VariableDeclaration", + "src": "14336:29:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 926, + "name": "Identifier", + "src": "14368:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 854, + "type": "uint256", + "value": "poolSupply" + }, + "id": 927, + "name": "Identifier", + "src": "14373:10:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 918, + "type": "uint256", + "value": "newPoolSupply" + }, + "id": 928, + "name": "Identifier", + "src": "14385:13:4" + } + ], + "id": 929, + "name": "FunctionCall", + "src": "14368:31:4" + } + ], + "id": 930, + "name": "VariableDeclarationStatement", + "src": "14336:63:4" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 863, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 931, + "name": "Identifier", + "src": "14505:12:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 932, + "name": "Identifier", + "src": "14520:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 925, + "type": "uint256", + "value": "poolAmountInAfterExitFee" + }, + "id": 933, + "name": "Identifier", + "src": "14525:24:4" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 934, + "name": "Identifier", + "src": "14551:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 935, + "name": "Identifier", + "src": "14556:4:4" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 223, + "type": "uint256", + "value": "EXIT_FEE" + }, + "id": 936, + "name": "Identifier", + "src": "14562:8:4" + } + ], + "id": 937, + "name": "FunctionCall", + "src": "14551:20:4" + } + ], + "id": 938, + "name": "FunctionCall", + "src": "14520:52:4" + } + ], + "id": 939, + "name": "Assignment", + "src": "14505:67:4" + } + ], + "id": 940, + "name": "ExpressionStatement", + "src": "14505:67:4" + }, + { + "attributes": { + "functionReturnParameters": 864 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 863, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 941, + "name": "Identifier", + "src": "14589:12:4" + } + ], + "id": 942, + "name": "Return", + "src": "14582:19:4" + } + ], + "id": 943, + "name": "Block", + "src": "13545:1063:4" + } + ], + "id": 944, + "name": "FunctionDefinition", + "src": "13284:1324:4" + } + ], + "id": 945, + "name": "ContractDefinition", + "src": "689:13923:4" + } + ], + "id": 946, + "name": "SourceUnit", + "src": "643:13970:4" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.760Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": { + "calcInGivenOut(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcInGivenOut // // aI = tokenAmountIn // // bO = tokenBalanceOut / / bO \\ (wO / wI) \\ // // bI = tokenBalanceIn bI * | | ------------ | ^ - 1 | // // aO = tokenAmountOut aI = \\ \\ ( bO - aO ) / / // // wI = tokenWeightIn -------------------------------------------- // // wO = tokenWeightOut ( 1 - sF ) // // sF = swapFee //*********************************************************************************************" + }, + "calcOutGivenIn(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcOutGivenIn // // aO = tokenAmountOut // // bO = tokenBalanceOut // // bI = tokenBalanceIn / / bI \\ (wI / wO) \\ // // aI = tokenAmountIn aO = bO * | 1 - | -------------------------- | ^ | // // wI = tokenWeightIn \\ \\ ( bI + ( aI * ( 1 - sF )) / / // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************" + }, + "calcPoolInGivenSingleOut(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcPoolInGivenSingleOut // // pAi = poolAmountIn // / tAo \\\\ / wO \\ \\ // // bO = tokenBalanceOut // | bO - -------------------------- |\\ | ---- | \\ // // tAo = tokenAmountOut pS - || \\ 1 - ((1 - (tO / tW)) * sF)/ | ^ \\ tW / * pS | // // ps = poolSupply \\\\ -----------------------------------/ / // // wO = tokenWeightOut pAi = \\\\ bO / / // // tW = totalWeight ------------------------------------------------------------- // // sF = swapFee ( 1 - eF ) // // eF = exitFee //*********************************************************************************************" + }, + "calcPoolOutGivenSingleIn(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcPoolOutGivenSingleIn // // pAo = poolAmountOut / \\ // // tAi = tokenAmountIn /// / // wI \\ \\\\ \\ wI \\ // // wI = tokenWeightIn //| tAi *| 1 - || 1 - -- | * sF || + tBi \\ -- \\ // // tW = totalWeight pAo=|| \\ \\ \\\\ tW / // | ^ tW | * pS - pS // // tBi = tokenBalanceIn \\\\ ------------------------------------- / / // // pS = poolSupply \\\\ tBi / / // // sF = swapFee \\ / //*********************************************************************************************" + }, + "calcSingleInGivenPoolOut(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcSingleInGivenPoolOut // // tAi = tokenAmountIn //(pS + pAo)\\ / 1 \\\\ // // pS = poolSupply || --------- | ^ | --------- || * bI - bI // // pAo = poolAmountOut \\\\ pS / \\(wI / tW)// // // bI = balanceIn tAi = -------------------------------------------- // // wI = weightIn / wI \\ // // tW = totalWeight | 1 - ---- | * sF // // sF = swapFee \\ tW / //*********************************************************************************************" + }, + "calcSingleOutGivenPoolIn(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcSingleOutGivenPoolIn // // tAo = tokenAmountOut / / \\\\ // // bO = tokenBalanceOut / // pS - (pAi * (1 - eF)) \\ / 1 \\ \\\\ // // pAi = poolAmountIn | bO - || ----------------------- | ^ | --------- | * b0 || // // ps = poolSupply \\ \\\\ pS / \\(wO / tW)/ // // // wI = tokenWeightIn tAo = \\ \\ // // // tW = totalWeight / / wO \\ \\ // // sF = swapFee * | 1 - | 1 - ---- | * sF | // // eF = exitFee \\ \\ tW / / //*********************************************************************************************" + }, + "calcSpotPrice(uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcSpotPrice // // sP = spotPrice // // bI = tokenBalanceIn ( bI / wI ) 1 // // bO = tokenBalanceOut sP = ----------- * ---------- // // wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************" + } + } + } +} \ No newline at end of file diff --git a/artifacts/BNum.json b/artifacts/BNum.json new file mode 100644 index 000000000..eecda2023 --- /dev/null +++ b/artifacts/BNum.json @@ -0,0 +1,13484 @@ +{ + "contractName": "BNum", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "MAX_TOTAL_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BPOW_PRECISION", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BALANCE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "INIT_POOL_SUPPLY", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_OUT_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BONE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EXIT_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_IN_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"MAX_TOTAL_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BPOW_PRECISION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BALANCE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"INIT_POOL_SUPPLY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_OUT_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BONE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EXIT_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_IN_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol\":\"BNum\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol\":{\"keccak256\":\"0x21675a0793e0be762a27e09ed3b0bd86e035c73ac3078dd841c38804445d5f5a\",\"urls\":[\"bzzr://47016ef4a80276f320b28a058fc92e7d9d93433bb5e4aa934668383cbefad77e\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol\":{\"keccak256\":\"0x84cf31d699784debbe9ec94be2086cdd2918c944473d5228c54dda10a660af8a\",\"urls\":[\"bzzr://7fcfbf954d6cdeec6709ad7543a9fa1576b788930245adc8d93030f6c72358cd\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061027c806100206000396000f3fe608060405234801561001057600080fd5b506004361061011d576000357c010000000000000000000000000000000000000000000000000000000090048063b7b800a4116100b4578063c36596a611610083578063c36596a614610144578063c6580d1214610194578063e4a28a5214610122578063ec0930211461019c5761011d565b8063b7b800a414610174578063ba019dab1461017c578063bc063e1a14610184578063bc694ea21461018c5761011d565b8063867378c5116100f0578063867378c5146101545780639381cd2b1461015c578063992e2a9214610164578063b0e0d1361461016c5761011d565b806309a3bbe414610122578063189d00ca1461013c578063218b53821461014457806376c7a3c71461014c575b600080fd5b61012a6101a4565b60408051918252519081900360200190f35b61012a6101b1565b61012a6101c5565b61012a6101d1565b61012a6101e3565b61012a6101f7565b61012a610204565b61012a610210565b61012a610215565b61012a61021a565b61012a61021f565b61012a61022f565b61012a61023b565b61012a610240565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b620f4240670de0b6b3a76400006101c1565b64e8d4a51000670de0b6b3a76400006101c1565b68056bc75e2d6310000081565b6704a03ce68d21555681565b600881565b600281565b600181565b600a670de0b6b3a76400006101c1565b671bc16d674ec7ffff81565b600081565b6002670de0b6b3a76400006101c156fea165627a7a72305820964e755c9f454776cdd5f9dc76b648468d114379b2bf7317f6273dfa2cbc595d0029", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061011d576000357c010000000000000000000000000000000000000000000000000000000090048063b7b800a4116100b4578063c36596a611610083578063c36596a614610144578063c6580d1214610194578063e4a28a5214610122578063ec0930211461019c5761011d565b8063b7b800a414610174578063ba019dab1461017c578063bc063e1a14610184578063bc694ea21461018c5761011d565b8063867378c5116100f0578063867378c5146101545780639381cd2b1461015c578063992e2a9214610164578063b0e0d1361461016c5761011d565b806309a3bbe414610122578063189d00ca1461013c578063218b53821461014457806376c7a3c71461014c575b600080fd5b61012a6101a4565b60408051918252519081900360200190f35b61012a6101b1565b61012a6101c5565b61012a6101d1565b61012a6101e3565b61012a6101f7565b61012a610204565b61012a610210565b61012a610215565b61012a61021a565b61012a61021f565b61012a61022f565b61012a61023b565b61012a610240565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b620f4240670de0b6b3a76400006101c1565b64e8d4a51000670de0b6b3a76400006101c1565b68056bc75e2d6310000081565b6704a03ce68d21555681565b600881565b600281565b600181565b600a670de0b6b3a76400006101c1565b671bc16d674ec7ffff81565b600081565b6002670de0b6b3a76400006101c156fea165627a7a72305820964e755c9f454776cdd5f9dc76b648468d114379b2bf7317f6273dfa2cbc595d0029", + "sourceMap": "691:3624:5:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;691:3624:5;;;;;;;", + "deployedSourceMap": "691:3624:5:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;691:3624:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1111:50:2;;;:::i;:::-;;;;;;;;;;;;;;;;1403:54;;;:::i;1004:45::-;;;:::i;840:53::-;;;:::i;1167:54::-;;;:::i;1228:51::-;;;:::i;1519:59::-;;;:::i;791:42::-;;;:::i;743:::-;;;:::i;1286:46::-;;;:::i;899:50::-;;;:::i;1338:59::-;;;:::i;955:42::-;;;:::i;1464:49::-;;;:::i;1111:50::-;1152:9;1111:50;:::o;1403:54::-;1451:6;730;1444:13;;1403:54;:::o;1004:45::-;730:6;1004:45;:::o;840:53::-;888:5;730:6;881:12;;1167:54;1215:6;730;1208:13;;1228:51;1269:10;1228:51;:::o;1519:59::-;1560:18;1519:59;:::o;791:42::-;832:1;791:42;:::o;743:::-;784:1;743:42;:::o;1286:46::-;1327:5;1286:46;:::o;899:50::-;947:2;730:6;940:9;;1338:59;1379:18;1338:59;:::o;955:42::-;996:1;955:42;:::o;1464:49::-;1512:1;730:6;1505:8;", + "source": "// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity 0.5.7;\n\nimport './BConst.sol';\n\ncontract BNum is BConst {\n\n function btoi(uint a)\n internal pure \n returns (uint)\n {\n return a / BONE;\n }\n\n function bfloor(uint a)\n internal pure\n returns (uint)\n {\n return btoi(a) * BONE;\n }\n\n function badd(uint a, uint b)\n internal pure\n returns (uint)\n {\n uint c = a + b;\n require(c >= a, 'ERR_ADD_OVERFLOW');\n return c;\n }\n\n function bsub(uint a, uint b)\n internal pure\n returns (uint)\n {\n (uint c, bool flag) = bsubSign(a, b);\n require(!flag, 'ERR_SUB_UNDERFLOW');\n return c;\n }\n\n function bsubSign(uint a, uint b)\n internal pure\n returns (uint, bool)\n {\n if (a >= b) {\n return (a - b, false);\n } else {\n return (b - a, true);\n }\n }\n\n function bmul(uint a, uint b)\n internal pure\n returns (uint)\n {\n uint c0 = a * b;\n require(a == 0 || c0 / a == b, 'ERR_MUL_OVERFLOW');\n uint c1 = c0 + (BONE / 2);\n require(c1 >= c0, 'ERR_MUL_OVERFLOW');\n uint c2 = c1 / BONE;\n return c2;\n }\n\n function bdiv(uint a, uint b)\n internal pure\n returns (uint)\n {\n require(b != 0, 'ERR_DIV_ZERO');\n uint c0 = a * BONE;\n require(a == 0 || c0 / a == BONE, 'ERR_DIV_INTERNAL'); // bmul overflow\n uint c1 = c0 + (b / 2);\n require(c1 >= c0, 'ERR_DIV_INTERNAL'); // badd require\n uint c2 = c1 / b;\n return c2;\n }\n\n // DSMath.wpow\n function bpowi(uint a, uint n)\n internal pure\n returns (uint)\n {\n uint b = a;\n uint z = n % 2 != 0 ? b : BONE;\n\n for (n /= 2; n != 0; n /= 2) {\n b = bmul(b, b);\n\n if (n % 2 != 0) {\n z = bmul(z, b);\n }\n }\n return z;\n }\n\n // Compute b^(e.w) by splitting it into (b^e)*(b^0.w).\n // Use `bpowi` for `b^e` and `bpowK` for k iterations\n // of approximation of b^0.w\n function bpow(uint base, uint exp)\n internal pure\n returns (uint)\n {\n require(base >= MIN_BPOW_BASE, 'ERR_BPOW_BASE_TOO_LOW');\n require(base <= MAX_BPOW_BASE, 'ERR_BPOW_BASE_TOO_HIGH');\n\n uint whole = bfloor(exp);\n uint remain = bsub(exp, whole);\n\n uint wholePow = bpowi(base, btoi(whole));\n\n if (remain == 0) {\n return wholePow;\n }\n\n uint partialResult = bpowApprox(base, remain, BPOW_PRECISION);\n return bmul(wholePow, partialResult);\n }\n\n function bpowApprox(uint base, uint exp, uint precision)\n internal pure\n returns (uint)\n {\n // term 0:\n uint a = exp;\n (uint x, bool xneg) = bsubSign(base, BONE);\n uint term = BONE;\n uint sum = term;\n bool negative = false;\n\n\n // term(k) = numer / denom \n // = (product(a - i - 1, i=1-->k) * x^k) / (k!)\n // each iteration, multiply previous term by (a-(k-1)) * x / k\n // continue until term is less than precision\n for (uint i = 1; term >= precision; i++) {\n uint bigK = i * BONE;\n (uint c, bool cneg) = bsubSign(a, bsub(bigK, BONE));\n term = bmul(term, bmul(c, x));\n term = bdiv(term, bigK);\n if (term == 0) break;\n\n if (xneg) negative = !negative;\n if (cneg) negative = !negative;\n if (negative) {\n sum = bsub(sum, term);\n } else {\n sum = badd(sum, term);\n }\n }\n\n return sum;\n }\n\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol", + "exportedSymbols": { + "BNum": [ + 1422 + ] + }, + "id": 1423, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 947, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "643:22:5" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol", + "file": "./BConst.sol", + "id": 948, + "nodeType": "ImportDirective", + "scope": 1423, + "sourceUnit": 281, + "src": "667:22:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 949, + "name": "BConst", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 280, + "src": "708:6:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BConst_$280", + "typeString": "contract BConst" + } + }, + "id": 950, + "nodeType": "InheritanceSpecifier", + "src": "708:6:5" + } + ], + "contractDependencies": [ + 280 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1422, + "linearizedBaseContracts": [ + 1422, + 280 + ], + "name": "BNum", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 961, + "nodeType": "Block", + "src": "794:32:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 957, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 952, + "src": "811:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 958, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "815:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "811:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 956, + "id": 960, + "nodeType": "Return", + "src": "804:15:5" + } + ] + }, + "documentation": null, + "id": 962, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "btoi", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 953, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 952, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 962, + "src": "736:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 951, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "736:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "735:8:5" + }, + "returnParameters": { + "id": 956, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 955, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 962, + "src": "784:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 954, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "784:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "783:6:5" + }, + "scope": 1422, + "src": "722:104:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 975, + "nodeType": "Block", + "src": "905:38:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 970, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 964, + "src": "927:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 969, + "name": "btoi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 962, + "src": "922:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "922:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 972, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "932:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "922:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 968, + "id": 974, + "nodeType": "Return", + "src": "915:21:5" + } + ] + }, + "documentation": null, + "id": 976, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "bfloor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 965, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 964, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 976, + "src": "848:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 963, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "848:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "847:8:5" + }, + "returnParameters": { + "id": 968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 967, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 976, + "src": "895:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 966, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "895:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "894:6:5" + }, + "scope": 1422, + "src": "832:111:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1000, + "nodeType": "Block", + "src": "1028:94:5", + "statements": [ + { + "assignments": [ + 986 + ], + "declarations": [ + { + "constant": false, + "id": 986, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1000, + "src": "1038:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 985, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1038:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 990, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 987, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 978, + "src": "1047:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 988, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 980, + "src": "1051:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1047:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1038:14:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 992, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 986, + "src": "1070:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 993, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 978, + "src": "1075:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1070:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4144445f4f564552464c4f57", + "id": 995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1078:18:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_de342110f18fc973afca32abdc8a7df5b7ed8442b65372631902c416e6d73b0c", + "typeString": "literal_string \"ERR_ADD_OVERFLOW\"" + }, + "value": "ERR_ADD_OVERFLOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_de342110f18fc973afca32abdc8a7df5b7ed8442b65372631902c416e6d73b0c", + "typeString": "literal_string \"ERR_ADD_OVERFLOW\"" + } + ], + "id": 991, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1062:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1062:35:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 997, + "nodeType": "ExpressionStatement", + "src": "1062:35:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 998, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 986, + "src": "1114:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 984, + "id": 999, + "nodeType": "Return", + "src": "1107:8:5" + } + ] + }, + "documentation": null, + "id": 1001, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "badd", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 981, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 978, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1001, + "src": "963:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 977, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "963:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 980, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1001, + "src": "971:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 979, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "971:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "962:16:5" + }, + "returnParameters": { + "id": 984, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 983, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1001, + "src": "1018:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 982, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1018:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1017:6:5" + }, + "scope": 1422, + "src": "949:173:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1027, + "nodeType": "Block", + "src": "1207:116:5", + "statements": [ + { + "assignments": [ + 1011, + 1013 + ], + "declarations": [ + { + "constant": false, + "id": 1011, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1027, + "src": "1218:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1010, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1218:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1013, + "name": "flag", + "nodeType": "VariableDeclaration", + "scope": 1027, + "src": "1226:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1012, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1226:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1018, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1015, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1003, + "src": "1248:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1016, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "1251:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1014, + "name": "bsubSign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1058, + "src": "1239:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_bool_$", + "typeString": "function (uint256,uint256) pure returns (uint256,bool)" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1239:14:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", + "typeString": "tuple(uint256,bool)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1217:36:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1271:5:5", + "subExpression": { + "argumentTypes": null, + "id": 1020, + "name": "flag", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1013, + "src": "1272:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5355425f554e444552464c4f57", + "id": 1022, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1278:19:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_dac2cbcd49a571b8a3e692e2763650776bed03103610305e021243e4b192a687", + "typeString": "literal_string \"ERR_SUB_UNDERFLOW\"" + }, + "value": "ERR_SUB_UNDERFLOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_dac2cbcd49a571b8a3e692e2763650776bed03103610305e021243e4b192a687", + "typeString": "literal_string \"ERR_SUB_UNDERFLOW\"" + } + ], + "id": 1019, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1263:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1263:35:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1024, + "nodeType": "ExpressionStatement", + "src": "1263:35:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1025, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1011, + "src": "1315:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1009, + "id": 1026, + "nodeType": "Return", + "src": "1308:8:5" + } + ] + }, + "documentation": null, + "id": 1028, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "bsub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1003, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1028, + "src": "1142:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1002, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1142:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1005, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1028, + "src": "1150:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1004, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1150:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1141:16:5" + }, + "returnParameters": { + "id": 1009, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1008, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1028, + "src": "1197:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1007, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1197:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1196:6:5" + }, + "scope": 1422, + "src": "1128:195:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1057, + "nodeType": "Block", + "src": "1418:125:5", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1039, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1030, + "src": "1432:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1040, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "1437:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1432:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1055, + "nodeType": "Block", + "src": "1492:45:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1049, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "1514:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1050, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1030, + "src": "1518:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1514:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1052, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1521:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "id": 1053, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1513:13:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", + "typeString": "tuple(uint256,bool)" + } + }, + "functionReturnParameters": 1038, + "id": 1054, + "nodeType": "Return", + "src": "1506:20:5" + } + ] + }, + "id": 1056, + "nodeType": "IfStatement", + "src": "1428:109:5", + "trueBody": { + "id": 1048, + "nodeType": "Block", + "src": "1440:46:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1042, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1030, + "src": "1462:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1043, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "1466:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1462:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1045, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1469:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "id": 1046, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1461:14:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", + "typeString": "tuple(uint256,bool)" + } + }, + "functionReturnParameters": 1038, + "id": 1047, + "nodeType": "Return", + "src": "1454:21:5" + } + ] + } + } + ] + }, + "documentation": null, + "id": 1058, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "bsubSign", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1030, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "1347:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1029, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1347:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1032, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "1355:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1031, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1355:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1346:16:5" + }, + "returnParameters": { + "id": 1038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1035, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "1402:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1034, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1402:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1037, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "1408:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1036, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1408:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1401:12:5" + }, + "scope": 1422, + "src": "1329:214:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1110, + "nodeType": "Block", + "src": "1628:222:5", + "statements": [ + { + "assignments": [ + 1068 + ], + "declarations": [ + { + "constant": false, + "id": 1068, + "name": "c0", + "nodeType": "VariableDeclaration", + "scope": 1110, + "src": "1638:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1067, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1638:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1072, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1069, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "1648:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1070, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "1652:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1648:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1638:15:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1074, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "1671:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1075, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1676:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1671:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1077, + "name": "c0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1068, + "src": "1681:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1078, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "1686:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1681:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1080, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "1691:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1681:11:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1671:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d554c5f4f564552464c4f57", + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1694:18:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_aa158ef700dfe53f1ea66be55a14e10c48fd667bb2e5b5d00214c58598497d7c", + "typeString": "literal_string \"ERR_MUL_OVERFLOW\"" + }, + "value": "ERR_MUL_OVERFLOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_aa158ef700dfe53f1ea66be55a14e10c48fd667bb2e5b5d00214c58598497d7c", + "typeString": "literal_string \"ERR_MUL_OVERFLOW\"" + } + ], + "id": 1073, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1663:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1663:50:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1085, + "nodeType": "ExpressionStatement", + "src": "1663:50:5" + }, + { + "assignments": [ + 1087 + ], + "declarations": [ + { + "constant": false, + "id": 1087, + "name": "c1", + "nodeType": "VariableDeclaration", + "scope": 1110, + "src": "1723:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1086, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1723:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1094, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1088, + "name": "c0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1068, + "src": "1733:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1091, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1089, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1739:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1746:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "1739:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1092, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1738:10:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1733:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1723:25:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1096, + "name": "c1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1087, + "src": "1766:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1097, + "name": "c0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1068, + "src": "1772:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1766:8:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d554c5f4f564552464c4f57", + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1776:18:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_aa158ef700dfe53f1ea66be55a14e10c48fd667bb2e5b5d00214c58598497d7c", + "typeString": "literal_string \"ERR_MUL_OVERFLOW\"" + }, + "value": "ERR_MUL_OVERFLOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_aa158ef700dfe53f1ea66be55a14e10c48fd667bb2e5b5d00214c58598497d7c", + "typeString": "literal_string \"ERR_MUL_OVERFLOW\"" + } + ], + "id": 1095, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1758:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1758:37:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1101, + "nodeType": "ExpressionStatement", + "src": "1758:37:5" + }, + { + "assignments": [ + 1103 + ], + "declarations": [ + { + "constant": false, + "id": 1103, + "name": "c2", + "nodeType": "VariableDeclaration", + "scope": 1110, + "src": "1805:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1102, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1805:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1107, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1104, + "name": "c1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1087, + "src": "1815:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1105, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1820:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1815:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1805:19:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1108, + "name": "c2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1103, + "src": "1841:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1066, + "id": 1109, + "nodeType": "Return", + "src": "1834:9:5" + } + ] + }, + "documentation": null, + "id": 1111, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "bmul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1063, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1060, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1111, + "src": "1563:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1059, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1563:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1062, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1111, + "src": "1571:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1571:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1562:16:5" + }, + "returnParameters": { + "id": 1066, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1065, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1111, + "src": "1618:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1064, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1618:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1617:6:5" + }, + "scope": 1422, + "src": "1549:301:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1170, + "nodeType": "Block", + "src": "1935:297:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1121, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "1953:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1958:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1953:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4449565f5a45524f", + "id": 1124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1961:14:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b991f14436c8a6c8e4a1be4516702e33284b5463d2b720d5d2b1084f857b5d11", + "typeString": "literal_string \"ERR_DIV_ZERO\"" + }, + "value": "ERR_DIV_ZERO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b991f14436c8a6c8e4a1be4516702e33284b5463d2b720d5d2b1084f857b5d11", + "typeString": "literal_string \"ERR_DIV_ZERO\"" + } + ], + "id": 1120, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1945:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:31:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1126, + "nodeType": "ExpressionStatement", + "src": "1945:31:5" + }, + { + "assignments": [ + 1128 + ], + "declarations": [ + { + "constant": false, + "id": 1128, + "name": "c0", + "nodeType": "VariableDeclaration", + "scope": 1170, + "src": "1986:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1127, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1986:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1132, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1129, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "1996:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1130, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "2000:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1996:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1986:18:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1134, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "2022:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2027:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2022:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1137, + "name": "c0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "2032:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1138, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "2037:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2032:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1140, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "2042:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2032:14:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2022:24:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4449565f494e5445524e414c", + "id": 1143, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2048:18:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7bb2cd205e4c8c10985e7a8998fb4ecbc62c821542a86b1082a507fd8e2bac71", + "typeString": "literal_string \"ERR_DIV_INTERNAL\"" + }, + "value": "ERR_DIV_INTERNAL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7bb2cd205e4c8c10985e7a8998fb4ecbc62c821542a86b1082a507fd8e2bac71", + "typeString": "literal_string \"ERR_DIV_INTERNAL\"" + } + ], + "id": 1133, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2014:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2014:53:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1145, + "nodeType": "ExpressionStatement", + "src": "2014:53:5" + }, + { + "assignments": [ + 1147 + ], + "declarations": [ + { + "constant": false, + "id": 1147, + "name": "c1", + "nodeType": "VariableDeclaration", + "scope": 1170, + "src": "2094:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1146, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2094:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1154, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1148, + "name": "c0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "2104:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1149, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "2110:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2114:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "2110:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1152, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2109:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2104:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2094:22:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1156, + "name": "c1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1147, + "src": "2134:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1157, + "name": "c0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "2140:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2134:8:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4449565f494e5445524e414c", + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2144:18:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7bb2cd205e4c8c10985e7a8998fb4ecbc62c821542a86b1082a507fd8e2bac71", + "typeString": "literal_string \"ERR_DIV_INTERNAL\"" + }, + "value": "ERR_DIV_INTERNAL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7bb2cd205e4c8c10985e7a8998fb4ecbc62c821542a86b1082a507fd8e2bac71", + "typeString": "literal_string \"ERR_DIV_INTERNAL\"" + } + ], + "id": 1155, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2126:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:37:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1161, + "nodeType": "ExpressionStatement", + "src": "2126:37:5" + }, + { + "assignments": [ + 1163 + ], + "declarations": [ + { + "constant": false, + "id": 1163, + "name": "c2", + "nodeType": "VariableDeclaration", + "scope": 1170, + "src": "2190:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1162, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2190:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1167, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1164, + "name": "c1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1147, + "src": "2200:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1165, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "2205:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2200:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2190:16:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1168, + "name": "c2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1163, + "src": "2223:2:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1119, + "id": 1169, + "nodeType": "Return", + "src": "2216:9:5" + } + ] + }, + "documentation": null, + "id": 1171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "bdiv", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1116, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1113, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1171, + "src": "1870:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1112, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1870:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1115, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1171, + "src": "1878:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1114, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1878:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1869:16:5" + }, + "returnParameters": { + "id": 1119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1118, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1171, + "src": "1925:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1117, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1925:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1924:6:5" + }, + "scope": 1422, + "src": "1856:376:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1231, + "nodeType": "Block", + "src": "2337:240:5", + "statements": [ + { + "assignments": [ + 1181 + ], + "declarations": [ + { + "constant": false, + "id": 1181, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1231, + "src": "2347:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2347:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1183, + "initialValue": { + "argumentTypes": null, + "id": 1182, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "2356:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2347:10:5" + }, + { + "assignments": [ + 1185 + ], + "declarations": [ + { + "constant": false, + "id": 1185, + "name": "z", + "nodeType": "VariableDeclaration", + "scope": 1231, + "src": "2367:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1184, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2367:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1194, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1186, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "2376:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2380:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "2376:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2385:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2376:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 1192, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "2393:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "2376:21:5", + "trueExpression": { + "argumentTypes": null, + "id": 1191, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "2389:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2367:30:5" + }, + { + "body": { + "id": 1227, + "nodeType": "Block", + "src": "2437:116:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1206, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "2451:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1208, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "2460:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1209, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "2463:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1207, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "2455:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2455:10:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2451:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1212, + "nodeType": "ExpressionStatement", + "src": "2451:14:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1213, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "2484:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2488:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "2484:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1216, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2493:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2484:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1226, + "nodeType": "IfStatement", + "src": "2480:63:5", + "trueBody": { + "id": 1225, + "nodeType": "Block", + "src": "2496:47:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1218, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "2514:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1220, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "2523:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1221, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "2526:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1219, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "2518:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2518:10:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2514:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1224, + "nodeType": "ExpressionStatement", + "src": "2514:14:5" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1199, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "2421:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2426:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2421:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1228, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 1197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1195, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "2413:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 1196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2418:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "2413:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1198, + "nodeType": "ExpressionStatement", + "src": "2413:6:5" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1202, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "2429:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 1203, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2434:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "2429:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1205, + "nodeType": "ExpressionStatement", + "src": "2429:6:5" + }, + "nodeType": "ForStatement", + "src": "2408:145:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1229, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "2569:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1179, + "id": 1230, + "nodeType": "Return", + "src": "2562:8:5" + } + ] + }, + "documentation": null, + "id": 1232, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "bpowi", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1173, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "2272:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1172, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2272:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1175, + "name": "n", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "2280:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1174, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2280:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2271:16:5" + }, + "returnParameters": { + "id": 1179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1178, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "2327:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1177, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2327:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2326:6:5" + }, + "scope": 1422, + "src": "2257:320:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1297, + "nodeType": "Block", + "src": "2817:449:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1242, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1234, + "src": "2835:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1243, + "name": "MIN_BPOW_BASE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "2843:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2835:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f42504f575f424153455f544f4f5f4c4f57", + "id": 1245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2858:23:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c3c6d86eb18220ce6fabad4730713483274140acdfd45cb0464b732f664f22a2", + "typeString": "literal_string \"ERR_BPOW_BASE_TOO_LOW\"" + }, + "value": "ERR_BPOW_BASE_TOO_LOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3c6d86eb18220ce6fabad4730713483274140acdfd45cb0464b732f664f22a2", + "typeString": "literal_string \"ERR_BPOW_BASE_TOO_LOW\"" + } + ], + "id": 1241, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2827:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2827:55:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1247, + "nodeType": "ExpressionStatement", + "src": "2827:55:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1249, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1234, + "src": "2900:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1250, + "name": "MAX_BPOW_BASE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "2908:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2900:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f42504f575f424153455f544f4f5f48494748", + "id": 1252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2923:24:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fae8d286b68d43b79d9a68b43f60ff4a50d029bf671f8f7bc816beced90009f1", + "typeString": "literal_string \"ERR_BPOW_BASE_TOO_HIGH\"" + }, + "value": "ERR_BPOW_BASE_TOO_HIGH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fae8d286b68d43b79d9a68b43f60ff4a50d029bf671f8f7bc816beced90009f1", + "typeString": "literal_string \"ERR_BPOW_BASE_TOO_HIGH\"" + } + ], + "id": 1248, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2892:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2892:56:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1254, + "nodeType": "ExpressionStatement", + "src": "2892:56:5" + }, + { + "assignments": [ + 1256 + ], + "declarations": [ + { + "constant": false, + "id": 1256, + "name": "whole", + "nodeType": "VariableDeclaration", + "scope": 1297, + "src": "2959:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1255, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2959:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1260, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1258, + "name": "exp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1236, + "src": "2979:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1257, + "name": "bfloor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "2972:6:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 1259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2972:11:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2959:24:5" + }, + { + "assignments": [ + 1262 + ], + "declarations": [ + { + "constant": false, + "id": 1262, + "name": "remain", + "nodeType": "VariableDeclaration", + "scope": 1297, + "src": "2993:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1261, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2993:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1267, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1264, + "name": "exp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1236, + "src": "3012:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1265, + "name": "whole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "3017:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1263, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "3007:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3007:16:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2993:30:5" + }, + { + "assignments": [ + 1269 + ], + "declarations": [ + { + "constant": false, + "id": 1269, + "name": "wholePow", + "nodeType": "VariableDeclaration", + "scope": 1297, + "src": "3034:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1268, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3034:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1276, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1271, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1234, + "src": "3056:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1273, + "name": "whole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "3067:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1272, + "name": "btoi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 962, + "src": "3062:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3062:11:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1270, + "name": "bpowi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1232, + "src": "3050:5:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3050:24:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3034:40:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1277, + "name": "remain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "3089:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3099:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3089:11:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1283, + "nodeType": "IfStatement", + "src": "3085:57:5", + "trueBody": { + "id": 1282, + "nodeType": "Block", + "src": "3102:40:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1280, + "name": "wholePow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "3123:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1240, + "id": 1281, + "nodeType": "Return", + "src": "3116:15:5" + } + ] + } + }, + { + "assignments": [ + 1285 + ], + "declarations": [ + { + "constant": false, + "id": 1285, + "name": "partialResult", + "nodeType": "VariableDeclaration", + "scope": 1297, + "src": "3152:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1284, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3152:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1291, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1287, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1234, + "src": "3184:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1288, + "name": "remain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "3190:6:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1289, + "name": "BPOW_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 266, + "src": "3198:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1286, + "name": "bpowApprox", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1421, + "src": "3173:10:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3173:40:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3152:61:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1293, + "name": "wholePow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1269, + "src": "3235:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1294, + "name": "partialResult", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "3245:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1292, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "3230:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3230:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1240, + "id": 1296, + "nodeType": "Return", + "src": "3223:36:5" + } + ] + }, + "documentation": null, + "id": 1298, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "bpow", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1234, + "name": "base", + "nodeType": "VariableDeclaration", + "scope": 1298, + "src": "2747:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2747:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1236, + "name": "exp", + "nodeType": "VariableDeclaration", + "scope": 1298, + "src": "2758:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1235, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2758:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2746:21:5" + }, + "returnParameters": { + "id": 1240, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1239, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1298, + "src": "2807:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1238, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2807:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2806:6:5" + }, + "scope": 1422, + "src": "2733:533:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1420, + "nodeType": "Block", + "src": "3378:934:5", + "statements": [ + { + "assignments": [ + 1310 + ], + "declarations": [ + { + "constant": false, + "id": 1310, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "3407:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1309, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3407:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1312, + "initialValue": { + "argumentTypes": null, + "id": 1311, + "name": "exp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1302, + "src": "3416:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3407:12:5" + }, + { + "assignments": [ + 1314, + 1316 + ], + "declarations": [ + { + "constant": false, + "id": 1314, + "name": "x", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "3430:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1313, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3430:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1316, + "name": "xneg", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "3438:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1315, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3438:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1321, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1318, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1300, + "src": "3460:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1319, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "3466:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1317, + "name": "bsubSign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1058, + "src": "3451:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_bool_$", + "typeString": "function (uint256,uint256) pure returns (uint256,bool)" + } + }, + "id": 1320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3451:20:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", + "typeString": "tuple(uint256,bool)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3429:42:5" + }, + { + "assignments": [ + 1323 + ], + "declarations": [ + { + "constant": false, + "id": 1323, + "name": "term", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "3481:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1322, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3481:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1325, + "initialValue": { + "argumentTypes": null, + "id": 1324, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "3493:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3481:16:5" + }, + { + "assignments": [ + 1327 + ], + "declarations": [ + { + "constant": false, + "id": 1327, + "name": "sum", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "3507:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1326, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3507:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1329, + "initialValue": { + "argumentTypes": null, + "id": 1328, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "3518:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3507:15:5" + }, + { + "assignments": [ + 1331 + ], + "declarations": [ + { + "constant": false, + "id": 1331, + "name": "negative", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "3532:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1330, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3532:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1333, + "initialValue": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3548:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3532:21:5" + }, + { + "body": { + "id": 1416, + "nodeType": "Block", + "src": "3831:454:5", + "statements": [ + { + "assignments": [ + 1345 + ], + "declarations": [ + { + "constant": false, + "id": 1345, + "name": "bigK", + "nodeType": "VariableDeclaration", + "scope": 1416, + "src": "3845:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1344, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3845:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1349, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1346, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1335, + "src": "3857:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1347, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "3861:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3857:8:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3845:20:5" + }, + { + "assignments": [ + 1351, + 1353 + ], + "declarations": [ + { + "constant": false, + "id": 1351, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1416, + "src": "3880:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1350, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3880:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1353, + "name": "cneg", + "nodeType": "VariableDeclaration", + "scope": 1416, + "src": "3888:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1352, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3888:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1361, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1355, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "3910:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1357, + "name": "bigK", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "3918:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1358, + "name": "BONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "3924:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1356, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "3913:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3913:16:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1354, + "name": "bsubSign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1058, + "src": "3901:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_bool_$", + "typeString": "function (uint256,uint256) pure returns (uint256,bool)" + } + }, + "id": 1360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3901:29:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_bool_$", + "typeString": "tuple(uint256,bool)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3879:51:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1362, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "3944:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1364, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "3956:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1366, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1351, + "src": "3967:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1367, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1314, + "src": "3970:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1365, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "3962:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3962:10:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1363, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "3951:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3951:22:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3944:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1371, + "nodeType": "ExpressionStatement", + "src": "3944:29:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1372, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "3987:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1374, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "3999:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1375, + "name": "bigK", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "4005:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1373, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "3994:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3994:16:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3987:23:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1378, + "nodeType": "ExpressionStatement", + "src": "3987:23:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1379, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "4028:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4036:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4028:9:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1383, + "nodeType": "IfStatement", + "src": "4024:20:5", + "trueBody": { + "id": 1382, + "nodeType": "Break", + "src": "4039:5:5" + } + }, + { + "condition": { + "argumentTypes": null, + "id": 1384, + "name": "xneg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1316, + "src": "4063:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1390, + "nodeType": "IfStatement", + "src": "4059:30:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1385, + "name": "negative", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "4069:8:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4080:9:5", + "subExpression": { + "argumentTypes": null, + "id": 1386, + "name": "negative", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "4081:8:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4069:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1389, + "nodeType": "ExpressionStatement", + "src": "4069:20:5" + } + }, + { + "condition": { + "argumentTypes": null, + "id": 1391, + "name": "cneg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "4107:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1397, + "nodeType": "IfStatement", + "src": "4103:30:5", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1392, + "name": "negative", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "4113:8:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4124:9:5", + "subExpression": { + "argumentTypes": null, + "id": 1393, + "name": "negative", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "4125:8:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4113:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1396, + "nodeType": "ExpressionStatement", + "src": "4113:20:5" + } + }, + { + "condition": { + "argumentTypes": null, + "id": 1398, + "name": "negative", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "4151:8:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1414, + "nodeType": "Block", + "src": "4221:54:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1407, + "name": "sum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "4239:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1409, + "name": "sum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "4250:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1410, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "4255:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1408, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "4245:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4245:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4239:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1413, + "nodeType": "ExpressionStatement", + "src": "4239:21:5" + } + ] + }, + "id": 1415, + "nodeType": "IfStatement", + "src": "4147:128:5", + "trueBody": { + "id": 1406, + "nodeType": "Block", + "src": "4161:54:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1399, + "name": "sum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "4179:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1401, + "name": "sum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "4190:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1402, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "4195:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1400, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "4185:4:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4185:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4179:21:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1405, + "nodeType": "ExpressionStatement", + "src": "4179:21:5" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1338, + "name": "term", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "3807:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1339, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1304, + "src": "3815:9:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3807:17:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1417, + "initializationExpression": { + "assignments": [ + 1335 + ], + "declarations": [ + { + "constant": false, + "id": 1335, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 1417, + "src": "3795:6:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1334, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3795:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1337, + "initialValue": { + "argumentTypes": null, + "hexValue": "31", + "id": 1336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3804:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3795:10:5" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3826:3:5", + "subExpression": { + "argumentTypes": null, + "id": 1341, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1335, + "src": "3826:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1343, + "nodeType": "ExpressionStatement", + "src": "3826:3:5" + }, + "nodeType": "ForStatement", + "src": "3790:495:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 1418, + "name": "sum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "4302:3:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1308, + "id": 1419, + "nodeType": "Return", + "src": "4295:10:5" + } + ] + }, + "documentation": null, + "id": 1421, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "bpowApprox", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1305, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1300, + "name": "base", + "nodeType": "VariableDeclaration", + "scope": 1421, + "src": "3292:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1299, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3292:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1302, + "name": "exp", + "nodeType": "VariableDeclaration", + "scope": 1421, + "src": "3303:8:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1301, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3303:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1304, + "name": "precision", + "nodeType": "VariableDeclaration", + "scope": 1421, + "src": "3313:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1303, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3313:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3291:37:5" + }, + "returnParameters": { + "id": 1308, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1307, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1421, + "src": "3368:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1306, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3368:4:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3367:6:5" + }, + "scope": 1422, + "src": "3272:1040:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1423, + "src": "691:3624:5" + } + ], + "src": "643:3673:5" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol", + "exportedSymbols": { + "BNum": [ + 1422 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 947, + "name": "PragmaDirective", + "src": "643:22:5" + }, + { + "attributes": { + "SourceUnit": 281, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol", + "file": "./BConst.sol", + "scope": 1423, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 948, + "name": "ImportDirective", + "src": "667:22:5" + }, + { + "attributes": { + "contractDependencies": [ + 280 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 1422, + 280 + ], + "name": "BNum", + "scope": 1423 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BConst", + "referencedDeclaration": 280, + "type": "contract BConst" + }, + "id": 949, + "name": "UserDefinedTypeName", + "src": "708:6:5" + } + ], + "id": 950, + "name": "InheritanceSpecifier", + "src": "708:6:5" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "btoi", + "scope": 1422, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 962, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 951, + "name": "ElementaryTypeName", + "src": "736:4:5" + } + ], + "id": 952, + "name": "VariableDeclaration", + "src": "736:6:5" + } + ], + "id": 953, + "name": "ParameterList", + "src": "735:8:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 962, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 954, + "name": "ElementaryTypeName", + "src": "784:4:5" + } + ], + "id": 955, + "name": "VariableDeclaration", + "src": "784:4:5" + } + ], + "id": 956, + "name": "ParameterList", + "src": "783:6:5" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 956 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 952, + "type": "uint256", + "value": "a" + }, + "id": 957, + "name": "Identifier", + "src": "811:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 958, + "name": "Identifier", + "src": "815:4:5" + } + ], + "id": 959, + "name": "BinaryOperation", + "src": "811:8:5" + } + ], + "id": 960, + "name": "Return", + "src": "804:15:5" + } + ], + "id": 961, + "name": "Block", + "src": "794:32:5" + } + ], + "id": 962, + "name": "FunctionDefinition", + "src": "722:104:5" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "bfloor", + "scope": 1422, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 976, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 963, + "name": "ElementaryTypeName", + "src": "848:4:5" + } + ], + "id": 964, + "name": "VariableDeclaration", + "src": "848:6:5" + } + ], + "id": 965, + "name": "ParameterList", + "src": "847:8:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 976, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 966, + "name": "ElementaryTypeName", + "src": "895:4:5" + } + ], + "id": 967, + "name": "VariableDeclaration", + "src": "895:4:5" + } + ], + "id": 968, + "name": "ParameterList", + "src": "894:6:5" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 968 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 962, + "type": "function (uint256) pure returns (uint256)", + "value": "btoi" + }, + "id": 969, + "name": "Identifier", + "src": "922:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 964, + "type": "uint256", + "value": "a" + }, + "id": 970, + "name": "Identifier", + "src": "927:1:5" + } + ], + "id": 971, + "name": "FunctionCall", + "src": "922:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 972, + "name": "Identifier", + "src": "932:4:5" + } + ], + "id": 973, + "name": "BinaryOperation", + "src": "922:14:5" + } + ], + "id": 974, + "name": "Return", + "src": "915:21:5" + } + ], + "id": 975, + "name": "Block", + "src": "905:38:5" + } + ], + "id": 976, + "name": "FunctionDefinition", + "src": "832:111:5" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "badd", + "scope": 1422, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 1001, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 977, + "name": "ElementaryTypeName", + "src": "963:4:5" + } + ], + "id": 978, + "name": "VariableDeclaration", + "src": "963:6:5" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 1001, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 979, + "name": "ElementaryTypeName", + "src": "971:4:5" + } + ], + "id": 980, + "name": "VariableDeclaration", + "src": "971:6:5" + } + ], + "id": 981, + "name": "ParameterList", + "src": "962:16:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1001, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 982, + "name": "ElementaryTypeName", + "src": "1018:4:5" + } + ], + "id": 983, + "name": "VariableDeclaration", + "src": "1018:4:5" + } + ], + "id": 984, + "name": "ParameterList", + "src": "1017:6:5" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 986 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 1000, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 985, + "name": "ElementaryTypeName", + "src": "1038:4:5" + } + ], + "id": 986, + "name": "VariableDeclaration", + "src": "1038:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 978, + "type": "uint256", + "value": "a" + }, + "id": 987, + "name": "Identifier", + "src": "1047:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 980, + "type": "uint256", + "value": "b" + }, + "id": 988, + "name": "Identifier", + "src": "1051:1:5" + } + ], + "id": 989, + "name": "BinaryOperation", + "src": "1047:5:5" + } + ], + "id": 990, + "name": "VariableDeclarationStatement", + "src": "1038:14:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_de342110f18fc973afca32abdc8a7df5b7ed8442b65372631902c416e6d73b0c", + "typeString": "literal_string \"ERR_ADD_OVERFLOW\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 991, + "name": "Identifier", + "src": "1062:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 986, + "type": "uint256", + "value": "c" + }, + "id": 992, + "name": "Identifier", + "src": "1070:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 978, + "type": "uint256", + "value": "a" + }, + "id": 993, + "name": "Identifier", + "src": "1075:1:5" + } + ], + "id": 994, + "name": "BinaryOperation", + "src": "1070:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4144445f4f564552464c4f57", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_ADD_OVERFLOW\"", + "value": "ERR_ADD_OVERFLOW" + }, + "id": 995, + "name": "Literal", + "src": "1078:18:5" + } + ], + "id": 996, + "name": "FunctionCall", + "src": "1062:35:5" + } + ], + "id": 997, + "name": "ExpressionStatement", + "src": "1062:35:5" + }, + { + "attributes": { + "functionReturnParameters": 984 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 986, + "type": "uint256", + "value": "c" + }, + "id": 998, + "name": "Identifier", + "src": "1114:1:5" + } + ], + "id": 999, + "name": "Return", + "src": "1107:8:5" + } + ], + "id": 1000, + "name": "Block", + "src": "1028:94:5" + } + ], + "id": 1001, + "name": "FunctionDefinition", + "src": "949:173:5" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "bsub", + "scope": 1422, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 1028, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1002, + "name": "ElementaryTypeName", + "src": "1142:4:5" + } + ], + "id": 1003, + "name": "VariableDeclaration", + "src": "1142:6:5" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 1028, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1004, + "name": "ElementaryTypeName", + "src": "1150:4:5" + } + ], + "id": 1005, + "name": "VariableDeclaration", + "src": "1150:6:5" + } + ], + "id": 1006, + "name": "ParameterList", + "src": "1141:16:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1028, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1007, + "name": "ElementaryTypeName", + "src": "1197:4:5" + } + ], + "id": 1008, + "name": "VariableDeclaration", + "src": "1197:4:5" + } + ], + "id": 1009, + "name": "ParameterList", + "src": "1196:6:5" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 1011, + 1013 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 1027, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1010, + "name": "ElementaryTypeName", + "src": "1218:4:5" + } + ], + "id": 1011, + "name": "VariableDeclaration", + "src": "1218:6:5" + }, + { + "attributes": { + "constant": false, + "name": "flag", + "scope": 1027, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1012, + "name": "ElementaryTypeName", + "src": "1226:4:5" + } + ], + "id": 1013, + "name": "VariableDeclaration", + "src": "1226:9:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple(uint256,bool)", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1058, + "type": "function (uint256,uint256) pure returns (uint256,bool)", + "value": "bsubSign" + }, + "id": 1014, + "name": "Identifier", + "src": "1239:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1003, + "type": "uint256", + "value": "a" + }, + "id": 1015, + "name": "Identifier", + "src": "1248:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1005, + "type": "uint256", + "value": "b" + }, + "id": 1016, + "name": "Identifier", + "src": "1251:1:5" + } + ], + "id": 1017, + "name": "FunctionCall", + "src": "1239:14:5" + } + ], + "id": 1018, + "name": "VariableDeclarationStatement", + "src": "1217:36:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_dac2cbcd49a571b8a3e692e2763650776bed03103610305e021243e4b192a687", + "typeString": "literal_string \"ERR_SUB_UNDERFLOW\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1019, + "name": "Identifier", + "src": "1263:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1013, + "type": "bool", + "value": "flag" + }, + "id": 1020, + "name": "Identifier", + "src": "1272:4:5" + } + ], + "id": 1021, + "name": "UnaryOperation", + "src": "1271:5:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f5355425f554e444552464c4f57", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_SUB_UNDERFLOW\"", + "value": "ERR_SUB_UNDERFLOW" + }, + "id": 1022, + "name": "Literal", + "src": "1278:19:5" + } + ], + "id": 1023, + "name": "FunctionCall", + "src": "1263:35:5" + } + ], + "id": 1024, + "name": "ExpressionStatement", + "src": "1263:35:5" + }, + { + "attributes": { + "functionReturnParameters": 1009 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1011, + "type": "uint256", + "value": "c" + }, + "id": 1025, + "name": "Identifier", + "src": "1315:1:5" + } + ], + "id": 1026, + "name": "Return", + "src": "1308:8:5" + } + ], + "id": 1027, + "name": "Block", + "src": "1207:116:5" + } + ], + "id": 1028, + "name": "FunctionDefinition", + "src": "1128:195:5" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "bsubSign", + "scope": 1422, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 1058, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1029, + "name": "ElementaryTypeName", + "src": "1347:4:5" + } + ], + "id": 1030, + "name": "VariableDeclaration", + "src": "1347:6:5" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 1058, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1031, + "name": "ElementaryTypeName", + "src": "1355:4:5" + } + ], + "id": 1032, + "name": "VariableDeclaration", + "src": "1355:6:5" + } + ], + "id": 1033, + "name": "ParameterList", + "src": "1346:16:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1058, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1034, + "name": "ElementaryTypeName", + "src": "1402:4:5" + } + ], + "id": 1035, + "name": "VariableDeclaration", + "src": "1402:4:5" + }, + { + "attributes": { + "constant": false, + "name": "", + "scope": 1058, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1036, + "name": "ElementaryTypeName", + "src": "1408:4:5" + } + ], + "id": 1037, + "name": "VariableDeclaration", + "src": "1408:4:5" + } + ], + "id": 1038, + "name": "ParameterList", + "src": "1401:12:5" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1030, + "type": "uint256", + "value": "a" + }, + "id": 1039, + "name": "Identifier", + "src": "1432:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1032, + "type": "uint256", + "value": "b" + }, + "id": 1040, + "name": "Identifier", + "src": "1437:1:5" + } + ], + "id": 1041, + "name": "BinaryOperation", + "src": "1432:6:5" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1038 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "tuple(uint256,bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "-", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1030, + "type": "uint256", + "value": "a" + }, + "id": 1042, + "name": "Identifier", + "src": "1462:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1032, + "type": "uint256", + "value": "b" + }, + "id": 1043, + "name": "Identifier", + "src": "1466:1:5" + } + ], + "id": 1044, + "name": "BinaryOperation", + "src": "1462:5:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 1045, + "name": "Literal", + "src": "1469:5:5" + } + ], + "id": 1046, + "name": "TupleExpression", + "src": "1461:14:5" + } + ], + "id": 1047, + "name": "Return", + "src": "1454:21:5" + } + ], + "id": 1048, + "name": "Block", + "src": "1440:46:5" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1038 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "tuple(uint256,bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "-", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1032, + "type": "uint256", + "value": "b" + }, + "id": 1049, + "name": "Identifier", + "src": "1514:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1030, + "type": "uint256", + "value": "a" + }, + "id": 1050, + "name": "Identifier", + "src": "1518:1:5" + } + ], + "id": 1051, + "name": "BinaryOperation", + "src": "1514:5:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 1052, + "name": "Literal", + "src": "1521:4:5" + } + ], + "id": 1053, + "name": "TupleExpression", + "src": "1513:13:5" + } + ], + "id": 1054, + "name": "Return", + "src": "1506:20:5" + } + ], + "id": 1055, + "name": "Block", + "src": "1492:45:5" + } + ], + "id": 1056, + "name": "IfStatement", + "src": "1428:109:5" + } + ], + "id": 1057, + "name": "Block", + "src": "1418:125:5" + } + ], + "id": 1058, + "name": "FunctionDefinition", + "src": "1329:214:5" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "bmul", + "scope": 1422, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 1111, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1059, + "name": "ElementaryTypeName", + "src": "1563:4:5" + } + ], + "id": 1060, + "name": "VariableDeclaration", + "src": "1563:6:5" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 1111, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1061, + "name": "ElementaryTypeName", + "src": "1571:4:5" + } + ], + "id": 1062, + "name": "VariableDeclaration", + "src": "1571:6:5" + } + ], + "id": 1063, + "name": "ParameterList", + "src": "1562:16:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1111, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1064, + "name": "ElementaryTypeName", + "src": "1618:4:5" + } + ], + "id": 1065, + "name": "VariableDeclaration", + "src": "1618:4:5" + } + ], + "id": 1066, + "name": "ParameterList", + "src": "1617:6:5" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 1068 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c0", + "scope": 1110, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1067, + "name": "ElementaryTypeName", + "src": "1638:4:5" + } + ], + "id": 1068, + "name": "VariableDeclaration", + "src": "1638:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1060, + "type": "uint256", + "value": "a" + }, + "id": 1069, + "name": "Identifier", + "src": "1648:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1062, + "type": "uint256", + "value": "b" + }, + "id": 1070, + "name": "Identifier", + "src": "1652:1:5" + } + ], + "id": 1071, + "name": "BinaryOperation", + "src": "1648:5:5" + } + ], + "id": 1072, + "name": "VariableDeclarationStatement", + "src": "1638:15:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_aa158ef700dfe53f1ea66be55a14e10c48fd667bb2e5b5d00214c58598497d7c", + "typeString": "literal_string \"ERR_MUL_OVERFLOW\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1073, + "name": "Identifier", + "src": "1663:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "||", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1060, + "type": "uint256", + "value": "a" + }, + "id": 1074, + "name": "Identifier", + "src": "1671:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1075, + "name": "Literal", + "src": "1676:1:5" + } + ], + "id": 1076, + "name": "BinaryOperation", + "src": "1671:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1068, + "type": "uint256", + "value": "c0" + }, + "id": 1077, + "name": "Identifier", + "src": "1681:2:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1060, + "type": "uint256", + "value": "a" + }, + "id": 1078, + "name": "Identifier", + "src": "1686:1:5" + } + ], + "id": 1079, + "name": "BinaryOperation", + "src": "1681:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1062, + "type": "uint256", + "value": "b" + }, + "id": 1080, + "name": "Identifier", + "src": "1691:1:5" + } + ], + "id": 1081, + "name": "BinaryOperation", + "src": "1681:11:5" + } + ], + "id": 1082, + "name": "BinaryOperation", + "src": "1671:21:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d554c5f4f564552464c4f57", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MUL_OVERFLOW\"", + "value": "ERR_MUL_OVERFLOW" + }, + "id": 1083, + "name": "Literal", + "src": "1694:18:5" + } + ], + "id": 1084, + "name": "FunctionCall", + "src": "1663:50:5" + } + ], + "id": 1085, + "name": "ExpressionStatement", + "src": "1663:50:5" + }, + { + "attributes": { + "assignments": [ + 1087 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c1", + "scope": 1110, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1086, + "name": "ElementaryTypeName", + "src": "1723:4:5" + } + ], + "id": 1087, + "name": "VariableDeclaration", + "src": "1723:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1068, + "type": "uint256", + "value": "c0" + }, + "id": 1088, + "name": "Identifier", + "src": "1733:2:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 1089, + "name": "Identifier", + "src": "1739:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "32", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2", + "value": "2" + }, + "id": 1090, + "name": "Literal", + "src": "1746:1:5" + } + ], + "id": 1091, + "name": "BinaryOperation", + "src": "1739:8:5" + } + ], + "id": 1092, + "name": "TupleExpression", + "src": "1738:10:5" + } + ], + "id": 1093, + "name": "BinaryOperation", + "src": "1733:15:5" + } + ], + "id": 1094, + "name": "VariableDeclarationStatement", + "src": "1723:25:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_aa158ef700dfe53f1ea66be55a14e10c48fd667bb2e5b5d00214c58598497d7c", + "typeString": "literal_string \"ERR_MUL_OVERFLOW\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1095, + "name": "Identifier", + "src": "1758:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1087, + "type": "uint256", + "value": "c1" + }, + "id": 1096, + "name": "Identifier", + "src": "1766:2:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1068, + "type": "uint256", + "value": "c0" + }, + "id": 1097, + "name": "Identifier", + "src": "1772:2:5" + } + ], + "id": 1098, + "name": "BinaryOperation", + "src": "1766:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d554c5f4f564552464c4f57", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MUL_OVERFLOW\"", + "value": "ERR_MUL_OVERFLOW" + }, + "id": 1099, + "name": "Literal", + "src": "1776:18:5" + } + ], + "id": 1100, + "name": "FunctionCall", + "src": "1758:37:5" + } + ], + "id": 1101, + "name": "ExpressionStatement", + "src": "1758:37:5" + }, + { + "attributes": { + "assignments": [ + 1103 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c2", + "scope": 1110, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1102, + "name": "ElementaryTypeName", + "src": "1805:4:5" + } + ], + "id": 1103, + "name": "VariableDeclaration", + "src": "1805:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1087, + "type": "uint256", + "value": "c1" + }, + "id": 1104, + "name": "Identifier", + "src": "1815:2:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 1105, + "name": "Identifier", + "src": "1820:4:5" + } + ], + "id": 1106, + "name": "BinaryOperation", + "src": "1815:9:5" + } + ], + "id": 1107, + "name": "VariableDeclarationStatement", + "src": "1805:19:5" + }, + { + "attributes": { + "functionReturnParameters": 1066 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1103, + "type": "uint256", + "value": "c2" + }, + "id": 1108, + "name": "Identifier", + "src": "1841:2:5" + } + ], + "id": 1109, + "name": "Return", + "src": "1834:9:5" + } + ], + "id": 1110, + "name": "Block", + "src": "1628:222:5" + } + ], + "id": 1111, + "name": "FunctionDefinition", + "src": "1549:301:5" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "bdiv", + "scope": 1422, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 1171, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1112, + "name": "ElementaryTypeName", + "src": "1870:4:5" + } + ], + "id": 1113, + "name": "VariableDeclaration", + "src": "1870:6:5" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 1171, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1114, + "name": "ElementaryTypeName", + "src": "1878:4:5" + } + ], + "id": 1115, + "name": "VariableDeclaration", + "src": "1878:6:5" + } + ], + "id": 1116, + "name": "ParameterList", + "src": "1869:16:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1171, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1117, + "name": "ElementaryTypeName", + "src": "1925:4:5" + } + ], + "id": 1118, + "name": "VariableDeclaration", + "src": "1925:4:5" + } + ], + "id": 1119, + "name": "ParameterList", + "src": "1924:6:5" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b991f14436c8a6c8e4a1be4516702e33284b5463d2b720d5d2b1084f857b5d11", + "typeString": "literal_string \"ERR_DIV_ZERO\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1120, + "name": "Identifier", + "src": "1945:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1115, + "type": "uint256", + "value": "b" + }, + "id": 1121, + "name": "Identifier", + "src": "1953:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1122, + "name": "Literal", + "src": "1958:1:5" + } + ], + "id": 1123, + "name": "BinaryOperation", + "src": "1953:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4449565f5a45524f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_DIV_ZERO\"", + "value": "ERR_DIV_ZERO" + }, + "id": 1124, + "name": "Literal", + "src": "1961:14:5" + } + ], + "id": 1125, + "name": "FunctionCall", + "src": "1945:31:5" + } + ], + "id": 1126, + "name": "ExpressionStatement", + "src": "1945:31:5" + }, + { + "attributes": { + "assignments": [ + 1128 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c0", + "scope": 1170, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1127, + "name": "ElementaryTypeName", + "src": "1986:4:5" + } + ], + "id": 1128, + "name": "VariableDeclaration", + "src": "1986:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1113, + "type": "uint256", + "value": "a" + }, + "id": 1129, + "name": "Identifier", + "src": "1996:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 1130, + "name": "Identifier", + "src": "2000:4:5" + } + ], + "id": 1131, + "name": "BinaryOperation", + "src": "1996:8:5" + } + ], + "id": 1132, + "name": "VariableDeclarationStatement", + "src": "1986:18:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7bb2cd205e4c8c10985e7a8998fb4ecbc62c821542a86b1082a507fd8e2bac71", + "typeString": "literal_string \"ERR_DIV_INTERNAL\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1133, + "name": "Identifier", + "src": "2014:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "||", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1113, + "type": "uint256", + "value": "a" + }, + "id": 1134, + "name": "Identifier", + "src": "2022:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1135, + "name": "Literal", + "src": "2027:1:5" + } + ], + "id": 1136, + "name": "BinaryOperation", + "src": "2022:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1128, + "type": "uint256", + "value": "c0" + }, + "id": 1137, + "name": "Identifier", + "src": "2032:2:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1113, + "type": "uint256", + "value": "a" + }, + "id": 1138, + "name": "Identifier", + "src": "2037:1:5" + } + ], + "id": 1139, + "name": "BinaryOperation", + "src": "2032:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 1140, + "name": "Identifier", + "src": "2042:4:5" + } + ], + "id": 1141, + "name": "BinaryOperation", + "src": "2032:14:5" + } + ], + "id": 1142, + "name": "BinaryOperation", + "src": "2022:24:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4449565f494e5445524e414c", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_DIV_INTERNAL\"", + "value": "ERR_DIV_INTERNAL" + }, + "id": 1143, + "name": "Literal", + "src": "2048:18:5" + } + ], + "id": 1144, + "name": "FunctionCall", + "src": "2014:53:5" + } + ], + "id": 1145, + "name": "ExpressionStatement", + "src": "2014:53:5" + }, + { + "attributes": { + "assignments": [ + 1147 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c1", + "scope": 1170, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1146, + "name": "ElementaryTypeName", + "src": "2094:4:5" + } + ], + "id": 1147, + "name": "VariableDeclaration", + "src": "2094:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1128, + "type": "uint256", + "value": "c0" + }, + "id": 1148, + "name": "Identifier", + "src": "2104:2:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1115, + "type": "uint256", + "value": "b" + }, + "id": 1149, + "name": "Identifier", + "src": "2110:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "32", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2", + "value": "2" + }, + "id": 1150, + "name": "Literal", + "src": "2114:1:5" + } + ], + "id": 1151, + "name": "BinaryOperation", + "src": "2110:5:5" + } + ], + "id": 1152, + "name": "TupleExpression", + "src": "2109:7:5" + } + ], + "id": 1153, + "name": "BinaryOperation", + "src": "2104:12:5" + } + ], + "id": 1154, + "name": "VariableDeclarationStatement", + "src": "2094:22:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7bb2cd205e4c8c10985e7a8998fb4ecbc62c821542a86b1082a507fd8e2bac71", + "typeString": "literal_string \"ERR_DIV_INTERNAL\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1155, + "name": "Identifier", + "src": "2126:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1147, + "type": "uint256", + "value": "c1" + }, + "id": 1156, + "name": "Identifier", + "src": "2134:2:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1128, + "type": "uint256", + "value": "c0" + }, + "id": 1157, + "name": "Identifier", + "src": "2140:2:5" + } + ], + "id": 1158, + "name": "BinaryOperation", + "src": "2134:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4449565f494e5445524e414c", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_DIV_INTERNAL\"", + "value": "ERR_DIV_INTERNAL" + }, + "id": 1159, + "name": "Literal", + "src": "2144:18:5" + } + ], + "id": 1160, + "name": "FunctionCall", + "src": "2126:37:5" + } + ], + "id": 1161, + "name": "ExpressionStatement", + "src": "2126:37:5" + }, + { + "attributes": { + "assignments": [ + 1163 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c2", + "scope": 1170, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1162, + "name": "ElementaryTypeName", + "src": "2190:4:5" + } + ], + "id": 1163, + "name": "VariableDeclaration", + "src": "2190:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1147, + "type": "uint256", + "value": "c1" + }, + "id": 1164, + "name": "Identifier", + "src": "2200:2:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1115, + "type": "uint256", + "value": "b" + }, + "id": 1165, + "name": "Identifier", + "src": "2205:1:5" + } + ], + "id": 1166, + "name": "BinaryOperation", + "src": "2200:6:5" + } + ], + "id": 1167, + "name": "VariableDeclarationStatement", + "src": "2190:16:5" + }, + { + "attributes": { + "functionReturnParameters": 1119 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1163, + "type": "uint256", + "value": "c2" + }, + "id": 1168, + "name": "Identifier", + "src": "2223:2:5" + } + ], + "id": 1169, + "name": "Return", + "src": "2216:9:5" + } + ], + "id": 1170, + "name": "Block", + "src": "1935:297:5" + } + ], + "id": 1171, + "name": "FunctionDefinition", + "src": "1856:376:5" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "bpowi", + "scope": 1422, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 1232, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1172, + "name": "ElementaryTypeName", + "src": "2272:4:5" + } + ], + "id": 1173, + "name": "VariableDeclaration", + "src": "2272:6:5" + }, + { + "attributes": { + "constant": false, + "name": "n", + "scope": 1232, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1174, + "name": "ElementaryTypeName", + "src": "2280:4:5" + } + ], + "id": 1175, + "name": "VariableDeclaration", + "src": "2280:6:5" + } + ], + "id": 1176, + "name": "ParameterList", + "src": "2271:16:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1232, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1177, + "name": "ElementaryTypeName", + "src": "2327:4:5" + } + ], + "id": 1178, + "name": "VariableDeclaration", + "src": "2327:4:5" + } + ], + "id": 1179, + "name": "ParameterList", + "src": "2326:6:5" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 1181 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "b", + "scope": 1231, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1180, + "name": "ElementaryTypeName", + "src": "2347:4:5" + } + ], + "id": 1181, + "name": "VariableDeclaration", + "src": "2347:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1173, + "type": "uint256", + "value": "a" + }, + "id": 1182, + "name": "Identifier", + "src": "2356:1:5" + } + ], + "id": 1183, + "name": "VariableDeclarationStatement", + "src": "2347:10:5" + }, + { + "attributes": { + "assignments": [ + 1185 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "z", + "scope": 1231, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1184, + "name": "ElementaryTypeName", + "src": "2367:4:5" + } + ], + "id": 1185, + "name": "VariableDeclaration", + "src": "2367:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "%", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1175, + "type": "uint256", + "value": "n" + }, + "id": 1186, + "name": "Identifier", + "src": "2376:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "32", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2", + "value": "2" + }, + "id": 1187, + "name": "Literal", + "src": "2380:1:5" + } + ], + "id": 1188, + "name": "BinaryOperation", + "src": "2376:5:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1189, + "name": "Literal", + "src": "2385:1:5" + } + ], + "id": 1190, + "name": "BinaryOperation", + "src": "2376:10:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1181, + "type": "uint256", + "value": "b" + }, + "id": 1191, + "name": "Identifier", + "src": "2389:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 1192, + "name": "Identifier", + "src": "2393:4:5" + } + ], + "id": 1193, + "name": "Conditional", + "src": "2376:21:5" + } + ], + "id": 1194, + "name": "VariableDeclarationStatement", + "src": "2367:30:5" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1175, + "type": "uint256", + "value": "n" + }, + "id": 1195, + "name": "Identifier", + "src": "2413:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "32", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2", + "value": "2" + }, + "id": 1196, + "name": "Literal", + "src": "2418:1:5" + } + ], + "id": 1197, + "name": "Assignment", + "src": "2413:6:5" + } + ], + "id": 1198, + "name": "ExpressionStatement", + "src": "2413:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1175, + "type": "uint256", + "value": "n" + }, + "id": 1199, + "name": "Identifier", + "src": "2421:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1200, + "name": "Literal", + "src": "2426:1:5" + } + ], + "id": 1201, + "name": "BinaryOperation", + "src": "2421:6:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1175, + "type": "uint256", + "value": "n" + }, + "id": 1202, + "name": "Identifier", + "src": "2429:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "32", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2", + "value": "2" + }, + "id": 1203, + "name": "Literal", + "src": "2434:1:5" + } + ], + "id": 1204, + "name": "Assignment", + "src": "2429:6:5" + } + ], + "id": 1205, + "name": "ExpressionStatement", + "src": "2429:6:5" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1181, + "type": "uint256", + "value": "b" + }, + "id": 1206, + "name": "Identifier", + "src": "2451:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 1207, + "name": "Identifier", + "src": "2455:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1181, + "type": "uint256", + "value": "b" + }, + "id": 1208, + "name": "Identifier", + "src": "2460:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1181, + "type": "uint256", + "value": "b" + }, + "id": 1209, + "name": "Identifier", + "src": "2463:1:5" + } + ], + "id": 1210, + "name": "FunctionCall", + "src": "2455:10:5" + } + ], + "id": 1211, + "name": "Assignment", + "src": "2451:14:5" + } + ], + "id": 1212, + "name": "ExpressionStatement", + "src": "2451:14:5" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "%", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1175, + "type": "uint256", + "value": "n" + }, + "id": 1213, + "name": "Identifier", + "src": "2484:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "32", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 2", + "value": "2" + }, + "id": 1214, + "name": "Literal", + "src": "2488:1:5" + } + ], + "id": 1215, + "name": "BinaryOperation", + "src": "2484:5:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1216, + "name": "Literal", + "src": "2493:1:5" + } + ], + "id": 1217, + "name": "BinaryOperation", + "src": "2484:10:5" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1185, + "type": "uint256", + "value": "z" + }, + "id": 1218, + "name": "Identifier", + "src": "2514:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 1219, + "name": "Identifier", + "src": "2518:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1185, + "type": "uint256", + "value": "z" + }, + "id": 1220, + "name": "Identifier", + "src": "2523:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1181, + "type": "uint256", + "value": "b" + }, + "id": 1221, + "name": "Identifier", + "src": "2526:1:5" + } + ], + "id": 1222, + "name": "FunctionCall", + "src": "2518:10:5" + } + ], + "id": 1223, + "name": "Assignment", + "src": "2514:14:5" + } + ], + "id": 1224, + "name": "ExpressionStatement", + "src": "2514:14:5" + } + ], + "id": 1225, + "name": "Block", + "src": "2496:47:5" + } + ], + "id": 1226, + "name": "IfStatement", + "src": "2480:63:5" + } + ], + "id": 1227, + "name": "Block", + "src": "2437:116:5" + } + ], + "id": 1228, + "name": "ForStatement", + "src": "2408:145:5" + }, + { + "attributes": { + "functionReturnParameters": 1179 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1185, + "type": "uint256", + "value": "z" + }, + "id": 1229, + "name": "Identifier", + "src": "2569:1:5" + } + ], + "id": 1230, + "name": "Return", + "src": "2562:8:5" + } + ], + "id": 1231, + "name": "Block", + "src": "2337:240:5" + } + ], + "id": 1232, + "name": "FunctionDefinition", + "src": "2257:320:5" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "bpow", + "scope": 1422, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "base", + "scope": 1298, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1233, + "name": "ElementaryTypeName", + "src": "2747:4:5" + } + ], + "id": 1234, + "name": "VariableDeclaration", + "src": "2747:9:5" + }, + { + "attributes": { + "constant": false, + "name": "exp", + "scope": 1298, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1235, + "name": "ElementaryTypeName", + "src": "2758:4:5" + } + ], + "id": 1236, + "name": "VariableDeclaration", + "src": "2758:8:5" + } + ], + "id": 1237, + "name": "ParameterList", + "src": "2746:21:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1298, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1238, + "name": "ElementaryTypeName", + "src": "2807:4:5" + } + ], + "id": 1239, + "name": "VariableDeclaration", + "src": "2807:4:5" + } + ], + "id": 1240, + "name": "ParameterList", + "src": "2806:6:5" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3c6d86eb18220ce6fabad4730713483274140acdfd45cb0464b732f664f22a2", + "typeString": "literal_string \"ERR_BPOW_BASE_TOO_LOW\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1241, + "name": "Identifier", + "src": "2827:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1234, + "type": "uint256", + "value": "base" + }, + "id": 1242, + "name": "Identifier", + "src": "2835:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 251, + "type": "uint256", + "value": "MIN_BPOW_BASE" + }, + "id": 1243, + "name": "Identifier", + "src": "2843:13:5" + } + ], + "id": 1244, + "name": "BinaryOperation", + "src": "2835:21:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f42504f575f424153455f544f4f5f4c4f57", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_BPOW_BASE_TOO_LOW\"", + "value": "ERR_BPOW_BASE_TOO_LOW" + }, + "id": 1245, + "name": "Literal", + "src": "2858:23:5" + } + ], + "id": 1246, + "name": "FunctionCall", + "src": "2827:55:5" + } + ], + "id": 1247, + "name": "ExpressionStatement", + "src": "2827:55:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fae8d286b68d43b79d9a68b43f60ff4a50d029bf671f8f7bc816beced90009f1", + "typeString": "literal_string \"ERR_BPOW_BASE_TOO_HIGH\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1248, + "name": "Identifier", + "src": "2892:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1234, + "type": "uint256", + "value": "base" + }, + "id": 1249, + "name": "Identifier", + "src": "2900:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 259, + "type": "uint256", + "value": "MAX_BPOW_BASE" + }, + "id": 1250, + "name": "Identifier", + "src": "2908:13:5" + } + ], + "id": 1251, + "name": "BinaryOperation", + "src": "2900:21:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f42504f575f424153455f544f4f5f48494748", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_BPOW_BASE_TOO_HIGH\"", + "value": "ERR_BPOW_BASE_TOO_HIGH" + }, + "id": 1252, + "name": "Literal", + "src": "2923:24:5" + } + ], + "id": 1253, + "name": "FunctionCall", + "src": "2892:56:5" + } + ], + "id": 1254, + "name": "ExpressionStatement", + "src": "2892:56:5" + }, + { + "attributes": { + "assignments": [ + 1256 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "whole", + "scope": 1297, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1255, + "name": "ElementaryTypeName", + "src": "2959:4:5" + } + ], + "id": 1256, + "name": "VariableDeclaration", + "src": "2959:10:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 976, + "type": "function (uint256) pure returns (uint256)", + "value": "bfloor" + }, + "id": 1257, + "name": "Identifier", + "src": "2972:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1236, + "type": "uint256", + "value": "exp" + }, + "id": 1258, + "name": "Identifier", + "src": "2979:3:5" + } + ], + "id": 1259, + "name": "FunctionCall", + "src": "2972:11:5" + } + ], + "id": 1260, + "name": "VariableDeclarationStatement", + "src": "2959:24:5" + }, + { + "attributes": { + "assignments": [ + 1262 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "remain", + "scope": 1297, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1261, + "name": "ElementaryTypeName", + "src": "2993:4:5" + } + ], + "id": 1262, + "name": "VariableDeclaration", + "src": "2993:11:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 1263, + "name": "Identifier", + "src": "3007:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1236, + "type": "uint256", + "value": "exp" + }, + "id": 1264, + "name": "Identifier", + "src": "3012:3:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "uint256", + "value": "whole" + }, + "id": 1265, + "name": "Identifier", + "src": "3017:5:5" + } + ], + "id": 1266, + "name": "FunctionCall", + "src": "3007:16:5" + } + ], + "id": 1267, + "name": "VariableDeclarationStatement", + "src": "2993:30:5" + }, + { + "attributes": { + "assignments": [ + 1269 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "wholePow", + "scope": 1297, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1268, + "name": "ElementaryTypeName", + "src": "3034:4:5" + } + ], + "id": 1269, + "name": "VariableDeclaration", + "src": "3034:13:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1232, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bpowi" + }, + "id": 1270, + "name": "Identifier", + "src": "3050:5:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1234, + "type": "uint256", + "value": "base" + }, + "id": 1271, + "name": "Identifier", + "src": "3056:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 962, + "type": "function (uint256) pure returns (uint256)", + "value": "btoi" + }, + "id": 1272, + "name": "Identifier", + "src": "3062:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1256, + "type": "uint256", + "value": "whole" + }, + "id": 1273, + "name": "Identifier", + "src": "3067:5:5" + } + ], + "id": 1274, + "name": "FunctionCall", + "src": "3062:11:5" + } + ], + "id": 1275, + "name": "FunctionCall", + "src": "3050:24:5" + } + ], + "id": 1276, + "name": "VariableDeclarationStatement", + "src": "3034:40:5" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1262, + "type": "uint256", + "value": "remain" + }, + "id": 1277, + "name": "Identifier", + "src": "3089:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1278, + "name": "Literal", + "src": "3099:1:5" + } + ], + "id": 1279, + "name": "BinaryOperation", + "src": "3089:11:5" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1240 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1269, + "type": "uint256", + "value": "wholePow" + }, + "id": 1280, + "name": "Identifier", + "src": "3123:8:5" + } + ], + "id": 1281, + "name": "Return", + "src": "3116:15:5" + } + ], + "id": 1282, + "name": "Block", + "src": "3102:40:5" + } + ], + "id": 1283, + "name": "IfStatement", + "src": "3085:57:5" + }, + { + "attributes": { + "assignments": [ + 1285 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "partialResult", + "scope": 1297, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1284, + "name": "ElementaryTypeName", + "src": "3152:4:5" + } + ], + "id": 1285, + "name": "VariableDeclaration", + "src": "3152:18:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1421, + "type": "function (uint256,uint256,uint256) pure returns (uint256)", + "value": "bpowApprox" + }, + "id": 1286, + "name": "Identifier", + "src": "3173:10:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1234, + "type": "uint256", + "value": "base" + }, + "id": 1287, + "name": "Identifier", + "src": "3184:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1262, + "type": "uint256", + "value": "remain" + }, + "id": 1288, + "name": "Identifier", + "src": "3190:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 266, + "type": "uint256", + "value": "BPOW_PRECISION" + }, + "id": 1289, + "name": "Identifier", + "src": "3198:14:5" + } + ], + "id": 1290, + "name": "FunctionCall", + "src": "3173:40:5" + } + ], + "id": 1291, + "name": "VariableDeclarationStatement", + "src": "3152:61:5" + }, + { + "attributes": { + "functionReturnParameters": 1240 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 1292, + "name": "Identifier", + "src": "3230:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1269, + "type": "uint256", + "value": "wholePow" + }, + "id": 1293, + "name": "Identifier", + "src": "3235:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1285, + "type": "uint256", + "value": "partialResult" + }, + "id": 1294, + "name": "Identifier", + "src": "3245:13:5" + } + ], + "id": 1295, + "name": "FunctionCall", + "src": "3230:29:5" + } + ], + "id": 1296, + "name": "Return", + "src": "3223:36:5" + } + ], + "id": 1297, + "name": "Block", + "src": "2817:449:5" + } + ], + "id": 1298, + "name": "FunctionDefinition", + "src": "2733:533:5" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "bpowApprox", + "scope": 1422, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "base", + "scope": 1421, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1299, + "name": "ElementaryTypeName", + "src": "3292:4:5" + } + ], + "id": 1300, + "name": "VariableDeclaration", + "src": "3292:9:5" + }, + { + "attributes": { + "constant": false, + "name": "exp", + "scope": 1421, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1301, + "name": "ElementaryTypeName", + "src": "3303:4:5" + } + ], + "id": 1302, + "name": "VariableDeclaration", + "src": "3303:8:5" + }, + { + "attributes": { + "constant": false, + "name": "precision", + "scope": 1421, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1303, + "name": "ElementaryTypeName", + "src": "3313:4:5" + } + ], + "id": 1304, + "name": "VariableDeclaration", + "src": "3313:14:5" + } + ], + "id": 1305, + "name": "ParameterList", + "src": "3291:37:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1421, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1306, + "name": "ElementaryTypeName", + "src": "3368:4:5" + } + ], + "id": 1307, + "name": "VariableDeclaration", + "src": "3368:4:5" + } + ], + "id": 1308, + "name": "ParameterList", + "src": "3367:6:5" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 1310 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 1420, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1309, + "name": "ElementaryTypeName", + "src": "3407:4:5" + } + ], + "id": 1310, + "name": "VariableDeclaration", + "src": "3407:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1302, + "type": "uint256", + "value": "exp" + }, + "id": 1311, + "name": "Identifier", + "src": "3416:3:5" + } + ], + "id": 1312, + "name": "VariableDeclarationStatement", + "src": "3407:12:5" + }, + { + "attributes": { + "assignments": [ + 1314, + 1316 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "x", + "scope": 1420, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1313, + "name": "ElementaryTypeName", + "src": "3430:4:5" + } + ], + "id": 1314, + "name": "VariableDeclaration", + "src": "3430:6:5" + }, + { + "attributes": { + "constant": false, + "name": "xneg", + "scope": 1420, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1315, + "name": "ElementaryTypeName", + "src": "3438:4:5" + } + ], + "id": 1316, + "name": "VariableDeclaration", + "src": "3438:9:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple(uint256,bool)", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1058, + "type": "function (uint256,uint256) pure returns (uint256,bool)", + "value": "bsubSign" + }, + "id": 1317, + "name": "Identifier", + "src": "3451:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1300, + "type": "uint256", + "value": "base" + }, + "id": 1318, + "name": "Identifier", + "src": "3460:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 1319, + "name": "Identifier", + "src": "3466:4:5" + } + ], + "id": 1320, + "name": "FunctionCall", + "src": "3451:20:5" + } + ], + "id": 1321, + "name": "VariableDeclarationStatement", + "src": "3429:42:5" + }, + { + "attributes": { + "assignments": [ + 1323 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "term", + "scope": 1420, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1322, + "name": "ElementaryTypeName", + "src": "3481:4:5" + } + ], + "id": 1323, + "name": "VariableDeclaration", + "src": "3481:9:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 1324, + "name": "Identifier", + "src": "3493:4:5" + } + ], + "id": 1325, + "name": "VariableDeclarationStatement", + "src": "3481:16:5" + }, + { + "attributes": { + "assignments": [ + 1327 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "sum", + "scope": 1420, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1326, + "name": "ElementaryTypeName", + "src": "3507:4:5" + } + ], + "id": 1327, + "name": "VariableDeclaration", + "src": "3507:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1323, + "type": "uint256", + "value": "term" + }, + "id": 1328, + "name": "Identifier", + "src": "3518:4:5" + } + ], + "id": 1329, + "name": "VariableDeclarationStatement", + "src": "3507:15:5" + }, + { + "attributes": { + "assignments": [ + 1331 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "negative", + "scope": 1420, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1330, + "name": "ElementaryTypeName", + "src": "3532:4:5" + } + ], + "id": 1331, + "name": "VariableDeclaration", + "src": "3532:13:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 1332, + "name": "Literal", + "src": "3548:5:5" + } + ], + "id": 1333, + "name": "VariableDeclarationStatement", + "src": "3532:21:5" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 1335 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "i", + "scope": 1417, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1334, + "name": "ElementaryTypeName", + "src": "3795:4:5" + } + ], + "id": 1335, + "name": "VariableDeclaration", + "src": "3795:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 1336, + "name": "Literal", + "src": "3804:1:5" + } + ], + "id": 1337, + "name": "VariableDeclarationStatement", + "src": "3795:10:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1323, + "type": "uint256", + "value": "term" + }, + "id": 1338, + "name": "Identifier", + "src": "3807:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1304, + "type": "uint256", + "value": "precision" + }, + "id": 1339, + "name": "Identifier", + "src": "3815:9:5" + } + ], + "id": 1340, + "name": "BinaryOperation", + "src": "3807:17:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "++", + "prefix": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1335, + "type": "uint256", + "value": "i" + }, + "id": 1341, + "name": "Identifier", + "src": "3826:1:5" + } + ], + "id": 1342, + "name": "UnaryOperation", + "src": "3826:3:5" + } + ], + "id": 1343, + "name": "ExpressionStatement", + "src": "3826:3:5" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 1345 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "bigK", + "scope": 1416, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1344, + "name": "ElementaryTypeName", + "src": "3845:4:5" + } + ], + "id": 1345, + "name": "VariableDeclaration", + "src": "3845:9:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1335, + "type": "uint256", + "value": "i" + }, + "id": 1346, + "name": "Identifier", + "src": "3857:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 1347, + "name": "Identifier", + "src": "3861:4:5" + } + ], + "id": 1348, + "name": "BinaryOperation", + "src": "3857:8:5" + } + ], + "id": 1349, + "name": "VariableDeclarationStatement", + "src": "3845:20:5" + }, + { + "attributes": { + "assignments": [ + 1351, + 1353 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 1416, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1350, + "name": "ElementaryTypeName", + "src": "3880:4:5" + } + ], + "id": 1351, + "name": "VariableDeclaration", + "src": "3880:6:5" + }, + { + "attributes": { + "constant": false, + "name": "cneg", + "scope": 1416, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1352, + "name": "ElementaryTypeName", + "src": "3888:4:5" + } + ], + "id": 1353, + "name": "VariableDeclaration", + "src": "3888:9:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple(uint256,bool)", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1058, + "type": "function (uint256,uint256) pure returns (uint256,bool)", + "value": "bsubSign" + }, + "id": 1354, + "name": "Identifier", + "src": "3901:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1310, + "type": "uint256", + "value": "a" + }, + "id": 1355, + "name": "Identifier", + "src": "3910:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 1356, + "name": "Identifier", + "src": "3913:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1345, + "type": "uint256", + "value": "bigK" + }, + "id": 1357, + "name": "Identifier", + "src": "3918:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 202, + "type": "uint256", + "value": "BONE" + }, + "id": 1358, + "name": "Identifier", + "src": "3924:4:5" + } + ], + "id": 1359, + "name": "FunctionCall", + "src": "3913:16:5" + } + ], + "id": 1360, + "name": "FunctionCall", + "src": "3901:29:5" + } + ], + "id": 1361, + "name": "VariableDeclarationStatement", + "src": "3879:51:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1323, + "type": "uint256", + "value": "term" + }, + "id": 1362, + "name": "Identifier", + "src": "3944:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 1363, + "name": "Identifier", + "src": "3951:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1323, + "type": "uint256", + "value": "term" + }, + "id": 1364, + "name": "Identifier", + "src": "3956:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 1365, + "name": "Identifier", + "src": "3962:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1351, + "type": "uint256", + "value": "c" + }, + "id": 1366, + "name": "Identifier", + "src": "3967:1:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1314, + "type": "uint256", + "value": "x" + }, + "id": 1367, + "name": "Identifier", + "src": "3970:1:5" + } + ], + "id": 1368, + "name": "FunctionCall", + "src": "3962:10:5" + } + ], + "id": 1369, + "name": "FunctionCall", + "src": "3951:22:5" + } + ], + "id": 1370, + "name": "Assignment", + "src": "3944:29:5" + } + ], + "id": 1371, + "name": "ExpressionStatement", + "src": "3944:29:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1323, + "type": "uint256", + "value": "term" + }, + "id": 1372, + "name": "Identifier", + "src": "3987:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 1373, + "name": "Identifier", + "src": "3994:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1323, + "type": "uint256", + "value": "term" + }, + "id": 1374, + "name": "Identifier", + "src": "3999:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1345, + "type": "uint256", + "value": "bigK" + }, + "id": 1375, + "name": "Identifier", + "src": "4005:4:5" + } + ], + "id": 1376, + "name": "FunctionCall", + "src": "3994:16:5" + } + ], + "id": 1377, + "name": "Assignment", + "src": "3987:23:5" + } + ], + "id": 1378, + "name": "ExpressionStatement", + "src": "3987:23:5" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1323, + "type": "uint256", + "value": "term" + }, + "id": 1379, + "name": "Identifier", + "src": "4028:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1380, + "name": "Literal", + "src": "4036:1:5" + } + ], + "id": 1381, + "name": "BinaryOperation", + "src": "4028:9:5" + }, + { + "id": 1382, + "name": "Break", + "src": "4039:5:5" + } + ], + "id": 1383, + "name": "IfStatement", + "src": "4024:20:5" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1316, + "type": "bool", + "value": "xneg" + }, + "id": 1384, + "name": "Identifier", + "src": "4063:4:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1331, + "type": "bool", + "value": "negative" + }, + "id": 1385, + "name": "Identifier", + "src": "4069:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1331, + "type": "bool", + "value": "negative" + }, + "id": 1386, + "name": "Identifier", + "src": "4081:8:5" + } + ], + "id": 1387, + "name": "UnaryOperation", + "src": "4080:9:5" + } + ], + "id": 1388, + "name": "Assignment", + "src": "4069:20:5" + } + ], + "id": 1389, + "name": "ExpressionStatement", + "src": "4069:20:5" + } + ], + "id": 1390, + "name": "IfStatement", + "src": "4059:30:5" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1353, + "type": "bool", + "value": "cneg" + }, + "id": 1391, + "name": "Identifier", + "src": "4107:4:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1331, + "type": "bool", + "value": "negative" + }, + "id": 1392, + "name": "Identifier", + "src": "4113:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1331, + "type": "bool", + "value": "negative" + }, + "id": 1393, + "name": "Identifier", + "src": "4125:8:5" + } + ], + "id": 1394, + "name": "UnaryOperation", + "src": "4124:9:5" + } + ], + "id": 1395, + "name": "Assignment", + "src": "4113:20:5" + } + ], + "id": 1396, + "name": "ExpressionStatement", + "src": "4113:20:5" + } + ], + "id": 1397, + "name": "IfStatement", + "src": "4103:30:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1331, + "type": "bool", + "value": "negative" + }, + "id": 1398, + "name": "Identifier", + "src": "4151:8:5" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1327, + "type": "uint256", + "value": "sum" + }, + "id": 1399, + "name": "Identifier", + "src": "4179:3:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 1400, + "name": "Identifier", + "src": "4185:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1327, + "type": "uint256", + "value": "sum" + }, + "id": 1401, + "name": "Identifier", + "src": "4190:3:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1323, + "type": "uint256", + "value": "term" + }, + "id": 1402, + "name": "Identifier", + "src": "4195:4:5" + } + ], + "id": 1403, + "name": "FunctionCall", + "src": "4185:15:5" + } + ], + "id": 1404, + "name": "Assignment", + "src": "4179:21:5" + } + ], + "id": 1405, + "name": "ExpressionStatement", + "src": "4179:21:5" + } + ], + "id": 1406, + "name": "Block", + "src": "4161:54:5" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1327, + "type": "uint256", + "value": "sum" + }, + "id": 1407, + "name": "Identifier", + "src": "4239:3:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 1408, + "name": "Identifier", + "src": "4245:4:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1327, + "type": "uint256", + "value": "sum" + }, + "id": 1409, + "name": "Identifier", + "src": "4250:3:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1323, + "type": "uint256", + "value": "term" + }, + "id": 1410, + "name": "Identifier", + "src": "4255:4:5" + } + ], + "id": 1411, + "name": "FunctionCall", + "src": "4245:15:5" + } + ], + "id": 1412, + "name": "Assignment", + "src": "4239:21:5" + } + ], + "id": 1413, + "name": "ExpressionStatement", + "src": "4239:21:5" + } + ], + "id": 1414, + "name": "Block", + "src": "4221:54:5" + } + ], + "id": 1415, + "name": "IfStatement", + "src": "4147:128:5" + } + ], + "id": 1416, + "name": "Block", + "src": "3831:454:5" + } + ], + "id": 1417, + "name": "ForStatement", + "src": "3790:495:5" + }, + { + "attributes": { + "functionReturnParameters": 1308 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1327, + "type": "uint256", + "value": "sum" + }, + "id": 1418, + "name": "Identifier", + "src": "4302:3:5" + } + ], + "id": 1419, + "name": "Return", + "src": "4295:10:5" + } + ], + "id": 1420, + "name": "Block", + "src": "3378:934:5" + } + ], + "id": 1421, + "name": "FunctionDefinition", + "src": "3272:1040:5" + } + ], + "id": 1422, + "name": "ContractDefinition", + "src": "691:3624:5" + } + ], + "id": 1423, + "name": "SourceUnit", + "src": "643:3673:5" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.768Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/BPool.json b/artifacts/BPool.json new file mode 100644 index 000000000..facad9c7e --- /dev/null +++ b/artifacts/BPool.json @@ -0,0 +1,69377 @@ +{ + "contractName": "BPool", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "amt", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_TOTAL_WEIGHT", + "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" + }, + { + "constant": true, + "inputs": [], + "name": "BPOW_PRECISION", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "dst", + "type": "address" + }, + { + "name": "amt", + "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": "tokenBalanceIn", + "type": "uint256" + }, + { + "name": "tokenWeightIn", + "type": "uint256" + }, + { + "name": "poolSupply", + "type": "uint256" + }, + { + "name": "totalWeight", + "type": "uint256" + }, + { + "name": "poolAmountOut", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcSingleInGivenPoolOut", + "outputs": [ + { + "name": "tokenAmountIn", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "amt", + "type": "uint256" + } + ], + "name": "decreaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "whom", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceOut", + "type": "uint256" + }, + { + "name": "tokenWeightOut", + "type": "uint256" + }, + { + "name": "poolSupply", + "type": "uint256" + }, + { + "name": "totalWeight", + "type": "uint256" + }, + { + "name": "tokenAmountOut", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcPoolInGivenSingleOut", + "outputs": [ + { + "name": "poolAmountIn", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceIn", + "type": "uint256" + }, + { + "name": "tokenWeightIn", + "type": "uint256" + }, + { + "name": "poolSupply", + "type": "uint256" + }, + { + "name": "totalWeight", + "type": "uint256" + }, + { + "name": "tokenAmountIn", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcPoolOutGivenSingleIn", + "outputs": [ + { + "name": "poolAmountOut", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BALANCE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceOut", + "type": "uint256" + }, + { + "name": "tokenWeightOut", + "type": "uint256" + }, + { + "name": "poolSupply", + "type": "uint256" + }, + { + "name": "totalWeight", + "type": "uint256" + }, + { + "name": "poolAmountIn", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcSingleOutGivenPoolIn", + "outputs": [ + { + "name": "tokenAmountOut", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "INIT_POOL_SUPPLY", + "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": true, + "inputs": [], + "name": "MAX_OUT_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceIn", + "type": "uint256" + }, + { + "name": "tokenWeightIn", + "type": "uint256" + }, + { + "name": "tokenBalanceOut", + "type": "uint256" + }, + { + "name": "tokenWeightOut", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcSpotPrice", + "outputs": [ + { + "name": "spotPrice", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "amt", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceIn", + "type": "uint256" + }, + { + "name": "tokenWeightIn", + "type": "uint256" + }, + { + "name": "tokenBalanceOut", + "type": "uint256" + }, + { + "name": "tokenWeightOut", + "type": "uint256" + }, + { + "name": "tokenAmountIn", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcOutGivenIn", + "outputs": [ + { + "name": "tokenAmountOut", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BONE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EXIT_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "amt", + "type": "uint256" + } + ], + "name": "increaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "dst", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_IN_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenBalanceIn", + "type": "uint256" + }, + { + "name": "tokenWeightIn", + "type": "uint256" + }, + { + "name": "tokenBalanceOut", + "type": "uint256" + }, + { + "name": "tokenWeightOut", + "type": "uint256" + }, + { + "name": "tokenAmountOut", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "calcInGivenOut", + "outputs": [ + { + "name": "tokenAmountIn", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "name": "tokenIn", + "type": "address" + }, + { + "indexed": true, + "name": "tokenOut", + "type": "address" + }, + { + "indexed": false, + "name": "tokenAmountIn", + "type": "uint256" + }, + { + "indexed": false, + "name": "tokenAmountOut", + "type": "uint256" + } + ], + "name": "LOG_SWAP", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "name": "tokenIn", + "type": "address" + }, + { + "indexed": false, + "name": "tokenAmountIn", + "type": "uint256" + } + ], + "name": "LOG_JOIN", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "name": "tokenOut", + "type": "address" + }, + { + "indexed": false, + "name": "tokenAmountOut", + "type": "uint256" + } + ], + "name": "LOG_EXIT", + "type": "event" + }, + { + "anonymous": true, + "inputs": [ + { + "indexed": true, + "name": "sig", + "type": "bytes4" + }, + { + "indexed": true, + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "name": "data", + "type": "bytes" + } + ], + "name": "LOG_CALL", + "type": "event" + }, + { + "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": true, + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "controller", + "type": "address" + }, + { + "name": "factory", + "type": "address" + }, + { + "name": "swapFee", + "type": "uint256" + }, + { + "name": "publicSwap", + "type": "bool" + }, + { + "name": "finalized", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dataTokenAaddress", + "type": "address" + }, + { + "name": "dataTokenAmount", + "type": "uint256" + }, + { + "name": "dataTokenWeight", + "type": "uint256" + }, + { + "name": "baseTokenAddress", + "type": "address" + }, + { + "name": "baseTokenAmount", + "type": "uint256" + }, + { + "name": "baseTokenWeight", + "type": "uint256" + }, + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "setup", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isPublicSwap", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isFinalized", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "t", + "type": "address" + } + ], + "name": "isBound", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getNumTokens", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCurrentTokens", + "outputs": [ + { + "name": "tokens", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getFinalTokens", + "outputs": [ + { + "name": "tokens", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "token", + "type": "address" + } + ], + "name": "getDenormalizedWeight", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getTotalDenormalizedWeight", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "token", + "type": "address" + } + ], + "name": "getNormalizedWeight", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "token", + "type": "address" + } + ], + "name": "getBalance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getSwapFee", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getController", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "swapFee", + "type": "uint256" + } + ], + "name": "setSwapFee", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "manager", + "type": "address" + } + ], + "name": "setController", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "public_", + "type": "bool" + } + ], + "name": "setPublicSwap", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "finalize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "token", + "type": "address" + }, + { + "name": "balance", + "type": "uint256" + }, + { + "name": "denorm", + "type": "uint256" + } + ], + "name": "bind", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "token", + "type": "address" + }, + { + "name": "balance", + "type": "uint256" + }, + { + "name": "denorm", + "type": "uint256" + } + ], + "name": "rebind", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "token", + "type": "address" + } + ], + "name": "unbind", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "token", + "type": "address" + } + ], + "name": "gulp", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenIn", + "type": "address" + }, + { + "name": "tokenOut", + "type": "address" + } + ], + "name": "getSpotPrice", + "outputs": [ + { + "name": "spotPrice", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenIn", + "type": "address" + }, + { + "name": "tokenOut", + "type": "address" + } + ], + "name": "getSpotPriceSansFee", + "outputs": [ + { + "name": "spotPrice", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "poolAmountOut", + "type": "uint256" + }, + { + "name": "maxAmountsIn", + "type": "uint256[]" + } + ], + "name": "joinPool", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "poolAmountIn", + "type": "uint256" + }, + { + "name": "minAmountsOut", + "type": "uint256[]" + } + ], + "name": "exitPool", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "tokenIn", + "type": "address" + }, + { + "name": "tokenAmountIn", + "type": "uint256" + }, + { + "name": "tokenOut", + "type": "address" + }, + { + "name": "minAmountOut", + "type": "uint256" + }, + { + "name": "maxPrice", + "type": "uint256" + } + ], + "name": "swapExactAmountIn", + "outputs": [ + { + "name": "tokenAmountOut", + "type": "uint256" + }, + { + "name": "spotPriceAfter", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "tokenIn", + "type": "address" + }, + { + "name": "maxAmountIn", + "type": "uint256" + }, + { + "name": "tokenOut", + "type": "address" + }, + { + "name": "tokenAmountOut", + "type": "uint256" + }, + { + "name": "maxPrice", + "type": "uint256" + } + ], + "name": "swapExactAmountOut", + "outputs": [ + { + "name": "tokenAmountIn", + "type": "uint256" + }, + { + "name": "spotPriceAfter", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "tokenIn", + "type": "address" + }, + { + "name": "tokenAmountIn", + "type": "uint256" + }, + { + "name": "minPoolAmountOut", + "type": "uint256" + } + ], + "name": "joinswapExternAmountIn", + "outputs": [ + { + "name": "poolAmountOut", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "tokenIn", + "type": "address" + }, + { + "name": "poolAmountOut", + "type": "uint256" + }, + { + "name": "maxAmountIn", + "type": "uint256" + } + ], + "name": "joinswapPoolAmountOut", + "outputs": [ + { + "name": "tokenAmountIn", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "tokenOut", + "type": "address" + }, + { + "name": "poolAmountIn", + "type": "uint256" + }, + { + "name": "minAmountOut", + "type": "uint256" + } + ], + "name": "exitswapPoolAmountIn", + "outputs": [ + { + "name": "tokenAmountOut", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "tokenOut", + "type": "address" + }, + { + "name": "tokenAmountOut", + "type": "uint256" + }, + { + "name": "maxPoolAmountIn", + "type": "uint256" + } + ], + "name": "exitswapExternAmountOut", + "outputs": [ + { + "name": "poolAmountIn", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"tokenOut\",\"type\":\"address\"},{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"maxPoolAmountIn\",\"type\":\"uint256\"}],\"name\":\"exitswapExternAmountOut\",\"outputs\":[{\"name\":\"poolAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_TOTAL_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"tokenOut\",\"type\":\"address\"}],\"name\":\"getSpotPriceSansFee\",\"outputs\":[{\"name\":\"spotPrice\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"tokenOut\",\"type\":\"address\"}],\"name\":\"getSpotPrice\",\"outputs\":[{\"name\":\"spotPrice\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BPOW_PRECISION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"},{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"t\",\"type\":\"address\"}],\"name\":\"isBound\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getController\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"setSwapFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\"},{\"name\":\"denorm\",\"type\":\"uint256\"}],\"name\":\"rebind\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenOut\",\"type\":\"address\"},{\"name\":\"poolAmountIn\",\"type\":\"uint256\"},{\"name\":\"minAmountOut\",\"type\":\"uint256\"}],\"name\":\"exitswapPoolAmountIn\",\"outputs\":[{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"public_\",\"type\":\"bool\"}],\"name\":\"setPublicSwap\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"finalize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"poolAmountOut\",\"type\":\"uint256\"},{\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"}],\"name\":\"joinPool\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"controller\",\"type\":\"address\"},{\"name\":\"factory\",\"type\":\"address\"},{\"name\":\"swapFee\",\"type\":\"uint256\"},{\"name\":\"publicSwap\",\"type\":\"bool\"},{\"name\":\"finalized\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"poolAmountOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcSingleInGivenPoolOut\",\"outputs\":[{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"minPoolAmountOut\",\"type\":\"uint256\"}],\"name\":\"joinswapExternAmountIn\",\"outputs\":[{\"name\":\"poolAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"poolAmountOut\",\"type\":\"uint256\"},{\"name\":\"maxAmountIn\",\"type\":\"uint256\"}],\"name\":\"joinswapPoolAmountOut\",\"outputs\":[{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"whom\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"maxAmountIn\",\"type\":\"uint256\"},{\"name\":\"tokenOut\",\"type\":\"address\"},{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"maxPrice\",\"type\":\"uint256\"}],\"name\":\"swapExactAmountOut\",\"outputs\":[{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"spotPriceAfter\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"tokenOut\",\"type\":\"address\"},{\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"name\":\"maxPrice\",\"type\":\"uint256\"}],\"name\":\"swapExactAmountIn\",\"outputs\":[{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"spotPriceAfter\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcPoolInGivenSingleOut\",\"outputs\":[{\"name\":\"poolAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcPoolOutGivenSingleIn\",\"outputs\":[{\"name\":\"poolAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BALANCE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"poolAmountIn\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcSingleOutGivenPoolIn\",\"outputs\":[{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"gulp\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isFinalized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"manager\",\"type\":\"address\"}],\"name\":\"setController\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getTotalDenormalizedWeight\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"INIT_POOL_SUPPLY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getDenormalizedWeight\",\"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\":true,\"inputs\":[],\"name\":\"MAX_OUT_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcSpotPrice\",\"outputs\":[{\"name\":\"spotPrice\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"poolAmountIn\",\"type\":\"uint256\"},{\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"}],\"name\":\"exitPool\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcOutGivenIn\",\"outputs\":[{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getFinalTokens\",\"outputs\":[{\"name\":\"tokens\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BONE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EXIT_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentTokens\",\"outputs\":[{\"name\":\"tokens\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNumTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"unbind\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dataTokenAaddress\",\"type\":\"address\"},{\"name\":\"dataTokenAmount\",\"type\":\"uint256\"},{\"name\":\"dataTokenWeight\",\"type\":\"uint256\"},{\"name\":\"baseTokenAddress\",\"type\":\"address\"},{\"name\":\"baseTokenAmount\",\"type\":\"uint256\"},{\"name\":\"baseTokenWeight\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"setup\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getSwapFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"},{\"name\":\"dst\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\"},{\"name\":\"denorm\",\"type\":\"uint256\"}],\"name\":\"bind\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_IN_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getNormalizedWeight\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcInGivenOut\",\"outputs\":[{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isPublicSwap\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"name\":\"LOG_SWAP\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenAmountIn\",\"type\":\"uint256\"}],\"name\":\"LOG_JOIN\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"name\":\"LOG_EXIT\",\"type\":\"event\"},{\"anonymous\":true,\"inputs\":[{\"indexed\":true,\"name\":\"sig\",\"type\":\"bytes4\"},{\"indexed\":true,\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"LOG_CALL\",\"type\":\"event\"},{\"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\":{\"details\":\"Used by the (Ocean version) BFactory contract as a bytecode reference to deploy new BPools. * This contract is is nearly identical to the BPool.sol contract at [1] The only difference is the \\\"Proxy contract functionality\\\" section given below. We'd inherit from BPool if we could, for simplicity. But we can't, because the proxy section needs to access private variables declared in BPool, and Solidity disallows this. Therefore the best we can do for now is clearly demarcate the proxy section. * [1] https://github.com/balancer-labs/balancer-core/contracts/.\",\"methods\":{},\"title\":\"BPool \"},\"userdoc\":{\"methods\":{\"calcInGivenOut(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcInGivenOut // // aI = tokenAmountIn // // bO = tokenBalanceOut / / bO \\\\ (wO / wI) \\\\ // // bI = tokenBalanceIn bI * | | ------------ | ^ - 1 | // // aO = tokenAmountOut aI = \\\\ \\\\ ( bO - aO ) / / // // wI = tokenWeightIn -------------------------------------------- // // wO = tokenWeightOut ( 1 - sF ) // // sF = swapFee //*********************************************************************************************\"},\"calcOutGivenIn(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcOutGivenIn // // aO = tokenAmountOut // // bO = tokenBalanceOut // // bI = tokenBalanceIn / / bI \\\\ (wI / wO) \\\\ // // aI = tokenAmountIn aO = bO * | 1 - | -------------------------- | ^ | // // wI = tokenWeightIn \\\\ \\\\ ( bI + ( aI * ( 1 - sF )) / / // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************\"},\"calcPoolInGivenSingleOut(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcPoolInGivenSingleOut // // pAi = poolAmountIn // / tAo \\\\\\\\ / wO \\\\ \\\\ // // bO = tokenBalanceOut // | bO - -------------------------- |\\\\ | ---- | \\\\ // // tAo = tokenAmountOut pS - || \\\\ 1 - ((1 - (tO / tW)) * sF)/ | ^ \\\\ tW / * pS | // // ps = poolSupply \\\\\\\\ -----------------------------------/ / // // wO = tokenWeightOut pAi = \\\\\\\\ bO / / // // tW = totalWeight ------------------------------------------------------------- // // sF = swapFee ( 1 - eF ) // // eF = exitFee //*********************************************************************************************\"},\"calcPoolOutGivenSingleIn(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcPoolOutGivenSingleIn // // pAo = poolAmountOut / \\\\ // // tAi = tokenAmountIn /// / // wI \\\\ \\\\\\\\ \\\\ wI \\\\ // // wI = tokenWeightIn //| tAi *| 1 - || 1 - -- | * sF || + tBi \\\\ -- \\\\ // // tW = totalWeight pAo=|| \\\\ \\\\ \\\\\\\\ tW / // | ^ tW | * pS - pS // // tBi = tokenBalanceIn \\\\\\\\ ------------------------------------- / / // // pS = poolSupply \\\\\\\\ tBi / / // // sF = swapFee \\\\ / //*********************************************************************************************\"},\"calcSingleInGivenPoolOut(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcSingleInGivenPoolOut // // tAi = tokenAmountIn //(pS + pAo)\\\\ / 1 \\\\\\\\ // // pS = poolSupply || --------- | ^ | --------- || * bI - bI // // pAo = poolAmountOut \\\\\\\\ pS / \\\\(wI / tW)// // // bI = balanceIn tAi = -------------------------------------------- // // wI = weightIn / wI \\\\ // // tW = totalWeight | 1 - ---- | * sF // // sF = swapFee \\\\ tW / //*********************************************************************************************\"},\"calcSingleOutGivenPoolIn(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcSingleOutGivenPoolIn // // tAo = tokenAmountOut / / \\\\\\\\ // // bO = tokenBalanceOut / // pS - (pAi * (1 - eF)) \\\\ / 1 \\\\ \\\\\\\\ // // pAi = poolAmountIn | bO - || ----------------------- | ^ | --------- | * b0 || // // ps = poolSupply \\\\ \\\\\\\\ pS / \\\\(wO / tW)/ // // // wI = tokenWeightIn tAo = \\\\ \\\\ // // // tW = totalWeight / / wO \\\\ \\\\ // // sF = swapFee * | 1 - | 1 - ---- | * sF | // // eF = exitFee \\\\ \\\\ tW / / //*********************************************************************************************\"},\"calcSpotPrice(uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcSpotPrice // // sP = spotPrice // // bI = tokenBalanceIn ( bI / wI ) 1 // // bO = tokenBalanceOut sP = ----------- * ---------- // // wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BPool.sol\":\"BPool\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol\":{\"keccak256\":\"0x21675a0793e0be762a27e09ed3b0bd86e035c73ac3078dd841c38804445d5f5a\",\"urls\":[\"bzzr://47016ef4a80276f320b28a058fc92e7d9d93433bb5e4aa934668383cbefad77e\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BMath.sol\":{\"keccak256\":\"0x2e3f07713561f2a0983999255794f5741c5854633b8524675767fde35f1b98c2\",\"urls\":[\"bzzr://e8c50205e3f6bd1d37fcdf178486f9560814e28ed8467af5a4ceb30651991cf8\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol\":{\"keccak256\":\"0x84cf31d699784debbe9ec94be2086cdd2918c944473d5228c54dda10a660af8a\",\"urls\":[\"bzzr://7fcfbf954d6cdeec6709ad7543a9fa1576b788930245adc8d93030f6c72358cd\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BPool.sol\":{\"keccak256\":\"0x5317eb03e13ef8512444d550ce4811c67610fef0ece0d45f583fc14658bb2d92\",\"urls\":[\"bzzr://0557c64a1179384e994a9675724430e4db5b2dd15fdc7e59b9b6fdfa65f12dcb\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol\":{\"keccak256\":\"0xad046b7ad912f72a90330abb3abddc3aa711077c0021d6a9d0dba2c99534e51b\",\"urls\":[\"bzzr://159aed1b631f2af168fd17235b6827859cb5d6cb7e95abeff3cc3d8079710f41\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062\"]}},\"version\":1}", + "bytecode": "0x60c0604052601360808190527f42616c616e63657220506f6f6c20546f6b656e0000000000000000000000000060a090815262000040916003919062000169565b506040805180820190915260038082527f42505400000000000000000000000000000000000000000000000000000000006020909201918252620000879160049162000169565b506005805460ff19908116601217909155600c80549091169055348015620000ae57600080fd5b50620000cd338064e8d4a51000600080640100000000620000d4810204565b506200020e565b6006805460058054600160a060020a0397881662010000026201000060b060020a0319909116179055600794909455911515740100000000000000000000000000000000000000000260a060020a60ff021995909416600160a060020a03199093169290921793909316919091179091556008805491151560ff19928316179055600c80549091166001179081905560ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001ac57805160ff1916838001178555620001dc565b82800160010185558215620001dc579182015b82811115620001dc578251825591602001919060010190620001bf565b50620001ea929150620001ee565b5090565b6200020b91905b80821115620001ea5760008155600101620001f5565b90565b615e7a806200021e6000396000f3fe608060405234801561001057600080fd5b506004361061040e576000357c0100000000000000000000000000000000000000000000000000000000900480638c28cbe811610232578063be3bbd2e11610142578063d73dd623116100d5578063ec093021116100a4578063ec09302114610d35578063f1b8a9b714610d3d578063f8b2cb4f14610d63578063f8d6aed414610d89578063fde924f714610dc45761040e565b8063d73dd62314610ca9578063dd62ed3e14610cd5578063e4a28a5214610514578063e4e1e53814610d035761040e565b8063cd2ed8fb11610111578063cd2ed8fb14610c25578063cf5e7bd314610c2d578063d1d7bc9114610c53578063d4cadf6814610ca15761040e565b8063be3bbd2e14610bbd578063c36596a614610588578063c6580d1214610c15578063cc77828d14610c1d5761040e565b8063a221ee49116101c5578063b7b800a411610194578063b7b800a414610b62578063ba019dab14610b6a578063ba9530a614610b72578063bc063e1a14610bad578063bc694ea214610bb55761040e565b8063a221ee4914610a82578063a9059cbb14610ab7578063b02f0b7314610ae3578063b0e0d13614610b5a5761040e565b80639381cd2b116102015780639381cd2b14610a44578063948d8ce614610a4c57806395d89b4114610a72578063992e2a9214610a7a5761040e565b80638c28cbe8146109e85780638d4e408314610a0e57806392eefe9b14610a16578063936c347714610a3c5761040e565b806346ab38f11161032d5780636d06dfa0116102c05780638201aa3f1161028f5780638201aa3f146108ef57806382f652ad1461092f5780638656b6531461096a578063867378c5146109a557806389298012146109ad5761040e565b80636d06dfa01461083657806370a082311461086857806376c7a3c71461088e5780637c5e9ea4146108965761040e565b8063506de974116102fc578063506de974146107575780635c1bbaf71461079d5780635db34277146107d8578063661884631461080a5761040e565b806346ab38f11461068757806349b59552146106b95780634bb278f3146106d85780634f69c0d4146106e05761040e565b8063218b5382116103a5578063313ce56711610374578063313ce5671461061057806334e199071461062e578063392e53cd1461064d5780633fdddaa2146106555761040e565b8063218b53821461058857806323b872dd146105905780632f37b624146105c65780633018205f146105ec5761040e565b80631446a7ff116103e15780631446a7ff1461051c57806315e84af91461054a57806318160ddd14610578578063189d00ca146105805761040e565b806302c967481461041357806306fdde0314610457578063095ea7b3146104d457806309a3bbe414610514575b600080fd5b6104456004803603606081101561042957600080fd5b50600160a060020a038135169060208101359060400135610dcc565b60408051918252519081900360200190f35b61045f61113d565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610499578181015183820152602001610481565b50505050905090810190601f1680156104c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610500600480360360408110156104ea57600080fd5b50600160a060020a0381351690602001356111d3565b604080519115158252519081900360200190f35b610445611228565b6104456004803603604081101561053257600080fd5b50600160a060020a0381358116916020013516611235565b6104456004803603604081101561056057600080fd5b50600160a060020a038135811691602001351661138f565b6104456114e0565b6104456114e6565b6104456114fa565b610500600480360360608110156105a657600080fd5b50600160a060020a03813581169160208101359091169060400135611506565b610500600480360360208110156105dc57600080fd5b5035600160a060020a031661166b565b6105f4611689565b60408051600160a060020a039092168252519081900360200190f35b6106186116ea565b6040805160ff9092168252519081900360200190f35b61064b6004803603602081101561064457600080fd5b50356116f3565b005b610500611917565b61064b6004803603606081101561066b57600080fd5b50600160a060020a038135169060208101359060400135611920565b6104456004803603606081101561069d57600080fd5b50600160a060020a038135169060208101359060400135611d6c565b61064b600480360360208110156106cf57600080fd5b5035151561207c565b61064b61220d565b61064b600480360360408110156106f657600080fd5b8135919081019060408101602082013564010000000081111561071857600080fd5b82018360208201111561072a57600080fd5b8035906020019184602083028401116401000000008311171561074c57600080fd5b509092509050612424565b610500600480360360a081101561076d57600080fd5b50600160a060020a038135811691602081013590911690604081013590606081013515159060800135151561270b565b610445600480360360c08110156107b357600080fd5b5080359060208101359060408101359060608101359060808101359060a001356128f9565b610445600480360360608110156107ee57600080fd5b50600160a060020a0381351690602081013590604001356129b1565b6105006004803603604081101561082057600080fd5b50600160a060020a038135169060200135612c94565b6104456004803603606081101561084c57600080fd5b50600160a060020a038135169060208101359060400135612d6c565b6104456004803603602081101561087e57600080fd5b5035600160a060020a031661307d565b610445613098565b6108d6600480360360a08110156108ac57600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356130aa565b6040805192835260208301919091528051918290030190f35b6108d6600480360360a081101561090557600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356135ac565b610445600480360360c081101561094557600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613a95565b610445600480360360c081101561098057600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613b54565b610445613bf5565b610445600480360360c08110156109c357600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613c09565b61064b600480360360208110156109fe57600080fd5b5035600160a060020a0316613cb9565b610500613e8a565b61064b60048036036020811015610a2c57600080fd5b5035600160a060020a0316613e93565b610445614039565b610445614091565b61044560048036036020811015610a6257600080fd5b5035600160a060020a031661409e565b61045f61416c565b6104456141cd565b610445600480360360a0811015610a9857600080fd5b50803590602081013590604081013590606081013590608001356141d9565b61050060048036036040811015610acd57600080fd5b50600160a060020a03813516906020013561423e565b61064b60048036036040811015610af957600080fd5b81359190810190604081016020820135640100000000811115610b1b57600080fd5b820183602082011115610b2d57600080fd5b80359060200191846020830284011164010000000083111715610b4f57600080fd5b509092509050614254565b61044561459a565b61044561459f565b6104456145a4565b610445600480360360c0811015610b8857600080fd5b5080359060208101359060408101359060608101359060808101359060a001356145a9565b61044561462a565b61044561463a565b610bc5614646565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610c01578181015183820152602001610be9565b505050509050019250505060405180910390f35b61044561473e565b610bc5614743565b610445614794565b61064b60048036036020811015610c4357600080fd5b5035600160a060020a031661479a565b61064b600480360360e0811015610c6957600080fd5b50600160a060020a03813581169160208101359160408201359160608101359091169060808101359060a08101359060c00135614b27565b610445614cd0565b61050060048036036040811015610cbf57600080fd5b50600160a060020a038135169060200135614d28565b61044560048036036040811015610ceb57600080fd5b50600160a060020a0381358116916020013516614da9565b61064b60048036036060811015610d1957600080fd5b50600160a060020a038135169060208101359060400135614dd4565b610445615058565b61044560048036036020811015610d5357600080fd5b5035600160a060020a0316615068565b61044560048036036020811015610d7957600080fd5b5035600160a060020a0316615148565b610445600480360360c0811015610d9f57600080fd5b5080359060208101359060408101359060608101359060808101359060a00135615216565b610500615299565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615610e7d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16610ed4576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16610f32576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a60205260409020600390810154610f6791670de0b6b3a76400005b046001016152a9565b831115610fbe576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754610ff894939291908990613a95565b91508161103d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115611083576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b611091816003015485615392565b600382015560006110a283826152a9565b604080518781529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36110f03384615403565b6111026110fd8483615392565b615411565b60055461111e90620100009004600160a060020a03168261541d565b611129863387615427565b50506005805461ff00191690559392505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b820191906000526020600020905b8154815290600101906020018083116111ac57829003601f168201915b5050505050905090565b336000818152600160209081526040808320600160a060020a03871680855290835281842086905581518681529151939490939092600080516020615dcf833981519152928290030190a35060015b92915050565b6802b5e3af16b188000081565b600554600090610100900460ff1615611286576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff166112e4576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16611342576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825281206003808401546002808601549284015490840154939461138694929392906141d9565b95945050505050565b600554600090610100900460ff16156113e0576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1661143e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661149c576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825290206003808301546002808501549284015490840154600754611386949291906141d9565b60025490565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600033600160a060020a03851614806115425750600160a060020a03841660009081526001602090815260408083203384529091529020548211155b611596576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42544f4b454e5f4241445f43414c4c45520000000000000000000000604482015290519081900360640190fd5b6115a184848461551c565b33600160a060020a038516148015906115df5750600160a060020a038416600090815260016020908152604080832033845290915290205460001914155b1561166157600160a060020a03841660009081526001602090815260408083203384529091529020546116129083615392565b600160a060020a0385811660009081526001602090815260408083203380855290835292819020859055805194855251928716939192600080516020615dcf8339815191529281900390910190a35b5060019392505050565b600160a060020a03166000908152600a602052604090205460ff1690565b600554600090610100900460ff16156116da576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600654600160a060020a031690565b60055460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156117a2576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16156117fa576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a0316331461184a576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b64e8d4a510008110156118a7576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a0000811115611907576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6007556005805461ff0019169055565b600c5460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156119cf576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a0390911614611a30576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff16611a8e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615611ad7576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b670de0b6b3a7640000811015611b37576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b6802b5e3af16b1880000811115611b98576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b620f4240821015611bf3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4d494e5f42414c414e43450000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206002015480821115611c9657611c2c600b54611c278484615392565b615638565b600b8190556802b5e3af16b18800001015611c91576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f4d41585f544f54414c5f574549474854000000000000000000000000604482015290519081900360640190fd5b611cb7565b80821015611cb757611cb3600b54611cae8385615392565b615392565b600b555b600160a060020a0384166000908152600a602052604090206002810183905560030180549084905580841115611d0057611cfb8533611cf68785615392565b615695565b611d5a565b80841015611d5a576000611d148286615392565b90506000611d238260006152a9565b9050611d398733611d348585615392565b615427565b600554611d57908890620100009004600160a060020a031683615427565b50505b50506005805461ff0019169055505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615611e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16611e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16611ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754611f0c94939291908990613c09565b915082821015611f54576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a60205260409020600390810154611f8491670de0b6b3a7640000610f5e565b821115611fdb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b611fe9816003015483615392565b60038201556000611ffa85826152a9565b604080518581529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36120483386615403565b6120556110fd8683615392565b60055461207190620100009004600160a060020a03168261541d565b611129863385615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561212b576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1615612183576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a031633146121d3576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805491151560a060020a0274ff0000000000000000000000000000000000000000199092169190911790556005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156122bc576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a039091161461231d576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b60085460ff1615612366576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600211156123c1576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b6008805460ff191660011790556006805474ff0000000000000000000000000000000000000000191660a060020a17905561240468056bc75e2d63100000615707565b6124173368056bc75e2d6310000061541d565b6005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156124d3576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661252a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006125346114e0565b905060006125428583615710565b905080612587576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b60005b6009548110156126f7576000600982815481106125a357fe5b6000918252602080832090910154600160a060020a0316808352600a9091526040822060030154909250906125d885836152a9565b90508061261d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87878581811061262957fe5b90506020020135811115612675576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206003015461269b9082615638565b600160a060020a0384166000818152600a6020908152604091829020600301939093558051848152905191923392600080516020615d6f8339815191529281900390910190a36126ec833383615695565b50505060010161258a565b5061270185615707565b611d5a338661541d565b600c5460009060ff1615612769576040805160e560020a62461bcd02815260206004820152601760248201527f4552525f414c52454144595f494e495449414c495a4544000000000000000000604482015290519081900360640190fd5b600160a060020a0386166127c7576040805160e560020a62461bcd02815260206004820152601e60248201527f4552525f494e56414c49445f434f4e54524f4c4c45525f414444524553530000604482015290519081900360640190fd5b600160a060020a038516612825576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f464143544f52595f414444524553530000000000604482015290519081900360640190fd5b64e8d4a51000841015612882576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a00008411156128e2576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6128ef868686868661584c565b9695505050505050565b6000806129068786615710565b905060006129148786615638565b905060006129228289615710565b90506000612938670de0b6b3a764000085615710565b9050600061294683836158f8565b90506000612954828e6152a9565b90506000612962828f615392565b9050600061298161297b670de0b6b3a76400008a615392565b8b6152a9565b905061299e82612999670de0b6b3a764000084615392565b615710565b9f9e505050505050505050505050505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612a62576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612ab9576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612b17576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060030154612b49906002670de0b6b3a76400005b046152a9565b831115612ba0576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612bda94939291908990613b54565b915082821015612c22576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b612c30816003015485615638565b6003820155604080518581529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a3612c6c82615707565b612c76338361541d565b612c81853386615695565b506005805461ff00191690559392505050565b336000908152600160209081526040808320600160a060020a038616845290915281205480831115612ce957336000908152600160209081526040808320600160a060020a0388168452909152812055612d18565b612cf38184615392565b336000908152600160209081526040808320600160a060020a03891684529091529020555b336000818152600160209081526040808320600160a060020a038916808552908352928190205481519081529051929392600080516020615dcf833981519152929181900390910190a35060019392505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612f0c949392919089906128f9565b915081612f51576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115612f97576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a6020526040902060030154612fc7906002670de0b6b3a7640000612b43565b82111561301e576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b61302c816003015483615638565b6003820155604080518381529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a361306884615707565b613072338561541d565b612c81853384615695565b600160a060020a031660009081526020819052604090205490565b620f4240670de0b6b3a76400006114f6565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561314a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166131b7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613215576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613276576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a6020526040808220928816825290206003808201546132af91670de0b6b3a7640000610f5e565b861115613306576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600061332783600301548460020154846003015485600201546007546141d9565b905085811115613381576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6133a183600301548460020154846003015485600201548b600754615216565b9450888511156133e9576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b6133f7836003015486615638565b836003018190555061340d826003015488615392565b6003808401829055840154600280860154908501546007546134309491906141d9565b935080841015613478576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156134d0576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6134da8588615710565b81111561351f576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d43378888b604051808381526020018281526020019250505060405180910390a46135878a3387615695565b613592883389615427565b5050506005805461ff001916905590969095509350505050565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561364c576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166136b9576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613717576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613778576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a60205260408082209288168252902060038201546137b2906002670de0b6b3a7640000612b43565b881115613809576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600061382a83600301548460020154846003015485600201546007546141d9565b905085811115613884576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6138a483600301548460020154846003015485600201548d6007546145a9565b9450868510156138ec576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b6138fa83600301548a615638565b8360030181905550613910826003015486615392565b6003808401829055840154600280860154908501546007546139339491906141d9565b93508084101561397b576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156139d3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6139dd8986615710565b811115613a22576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d433788c89604051808381526020018281526020019250505060405180910390a4613a8a8a338b615695565b613592883387615427565b600080613aa28786615710565b90506000613ab8670de0b6b3a764000083615392565b90506000613ac682866152a9565b90506000613ae087612999670de0b6b3a764000085615392565b90506000613aee8c83615392565b90506000613afc828e615710565b90506000613b0a82886158f8565b90506000613b18828e6152a9565b90506000613b268e83615392565b9050613b3f81612999670de0b6b3a76400006000615392565b99505050505050505050509695505050505050565b600080613b618786615710565b90506000613b80613b7a670de0b6b3a764000084615392565b856152a9565b90506000613b9f86613b9a670de0b6b3a764000085615392565b6152a9565b90506000613bad8b83615638565b90506000613bbb828d615710565b90506000613bc982876158f8565b90506000613bd7828d6152a9565b9050613be3818d615392565b9e9d5050505050505050505050505050565b64e8d4a51000670de0b6b3a76400006114f6565b600080613c168786615710565b90506000613c3185613b9a670de0b6b3a76400006000615392565b90506000613c3f8883615392565b90506000613c4d828a615710565b90506000613c6c82613c67670de0b6b3a764000088615710565b6158f8565b90506000613c7a828e6152a9565b90506000613c888e83615392565b90506000613ca161297b670de0b6b3a76400008a615392565b905061299e82613b9a670de0b6b3a764000084615392565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613d68576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0381166000908152600a602052604090205460ff16613dd5576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038316916370a08231916024808301926020929190829003018186803b158015613e3457600080fd5b505afa158015613e48573d6000803e3d6000fd5b505050506040513d6020811015613e5e57600080fd5b5051600160a060020a039091166000908152600a60205260409020600301556005805461ff0019169055565b60085460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613f42576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a038116613faf576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f4d414e414745525f414444524553530000000000604482015290519081900360640190fd5b600654600160a060020a03163314613fff576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790556005805461ff0019169055565b600554600090610100900460ff161561408a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600b5490565b68056bc75e2d6310000081565b600554600090610100900460ff16156140ef576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661414d576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206002015490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b6704a03ce68d21555681565b6000806141e68787615710565b905060006141f48686615710565b905060006142028383615710565b90506000614224670de0b6b3a7640000612999670de0b6b3a764000089615392565b905061423082826152a9565b9a9950505050505050505050565b600061424b33848461551c565b50600192915050565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614303576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661435a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006143646114e0565b905060006143738560006152a9565b905060006143818683615392565b9050600061438f8285615710565b9050806143d4576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b6143de3388615403565b6005546143fa90620100009004600160a060020a03168461541d565b61440382615411565b60005b6009548110156145855760006009828154811061441f57fe5b6000918252602080832090910154600160a060020a0316808352600a90915260408220600301549092509061445485836152a9565b905080614499576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b8989858181106144a557fe5b905060200201358110156144f1576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a60205260409020600301546145179082615392565b600160a060020a0384166000818152600a60209081526040918290206003019390935580518481529051919233927fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed9281900390910190a361457a833383615427565b505050600101614406565b50506005805461ff0019169055505050505050565b600881565b600281565b600181565b6000806145b68786615710565b905060006145cc670de0b6b3a764000085615392565b90506145d885826152a9565b905060006145ea8a6129998c85615638565b905060006145f882856158f8565b9050600061460e670de0b6b3a764000083615392565b905061461a8a826152a9565b9c9b505050505050505050505050565b600a670de0b6b3a76400006114f6565b671bc16d674ec7ffff81565b600554606090610100900460ff1615614697576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60085460ff166146df576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60098054806020026020016040519081016040528092919081815260200182805480156111c957602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311614717575050505050905090565b600081565b600554606090610100900460ff16156146df576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60095490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614849576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a03909116146148aa576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a602052604090205460ff16614908576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615614951576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a60205260408120600301549061497882826152a9565b600b54600160a060020a0385166000908152600a60205260409020600201549192506149a391615392565b600b55600160a060020a0383166000908152600a60205260409020600101546009805460001981019190829081106149d757fe5b60009182526020909120015460098054600160a060020a0390921691849081106149fd57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555081600a600060098581548110614a3d57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600101556009805480614a7057fe5b600082815260208082206000199084018101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556040805160808101825283815280830184815281830185815260608301868152600160a060020a038c168752600a909552929094209051815460ff19169015151781559251600184015551600283015551600390910155614b098533611d348787615392565b600554611d5a908690620100009004600160a060020a031685615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600160a060020a038716614be6576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f44415441544f4b454e5f41444452455353000000604482015290519081900360640190fd5b600160a060020a038416614c44576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f42415345544f4b454e5f41444452455353000000604482015290519081900360640190fd5b614c4f878787614dd4565b604080518781529051600160a060020a038916913391600080516020615d6f8339815191529181900360200190a3614c88848484614dd4565b604080518481529051600160a060020a038616913391600080516020615d6f8339815191529181900360200190a3614cbf816116f3565b614cc761220d565b50505050505050565b600554600090610100900460ff1615614d21576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b5060075490565b336000908152600160209081526040808320600160a060020a0386168452909152812054614d569083615638565b336000818152600160209081526040808320600160a060020a038916808552908352928190208590558051948552519193600080516020615dcf833981519152929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600654600160a060020a03163314614e85576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1615614ef6576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f49535f424f554e440000000000000000000000000000000000000000604482015290519081900360640190fd5b60085460ff1615614f3f576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600811614f99576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b604080516080810182526001808252600980546020808501918252600085870181815260608701828152600160a060020a038c16808452600a9094529782209651875460ff1916901515178755925186860155915160028601559451600390940193909355805491820181559091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805473ffffffffffffffffffffffffffffffffffffffff19169091179055615053838383611920565b505050565b6002670de0b6b3a76400006114f6565b600554600090610100900460ff16156150b9576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16615117576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a6020526040902060020154600b54615141908290615710565b9392505050565b600554600090610100900460ff1615615199576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff166151f7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206003015490565b6000806152238588615710565b905060006152318786615392565b9050600061523f8883615710565b9050600061524d82856158f8565b905061526181670de0b6b3a7640000615392565b9050615275670de0b6b3a764000087615392565b945061528a6152848c836152a9565b86615710565b9b9a5050505050505050505050565b60065460a060020a900460ff1690565b60008282028315806152c35750828482816152c057fe5b04145b615317576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6706f05b59d3b2000081018181101561537a576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6000670de0b6b3a7640000825b049695505050505050565b60008060006153a18585615a1b565b9150915080156153fb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b61540d8282615a40565b5050565b61541a81615a4b565b50565b61540d8282615b27565b604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03848116600483015260248201849052915160009286169163a9059cbb91604480830192602092919082900301818787803b15801561549357600080fd5b505af11580156154a7573d6000803e3d6000fd5b505050506040513d60208110156154bd57600080fd5b5051905080615516576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f45524332305f46414c53450000000000000000000000000000000000604482015290519081900360640190fd5b50505050565b600160a060020a03831660009081526020819052604090205481111561558c576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152602081905260409020546155af9082615392565b600160a060020a0380851660009081526020819052604080822093909355908416815220546155de9082615638565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082820183811015615141576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301523060248301526044820184905291516000928616916323b872dd91606480830192602092919082900301818787803b15801561549357600080fd5b61541a81615b32565b600081615767576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f4449565f5a45524f0000000000000000000000000000000000000000604482015290519081900360640190fd5b670de0b6b3a7640000830283158061578f5750670de0b6b3a764000084828161578c57fe5b04145b6157e3576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b60028304810181811015615841576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b600084828161538757fe5b6006805460058054600160a060020a03978816620100000275ffffffffffffffffffffffffffffffffffffffff00001990911617905560079490945591151560a060020a0274ff0000000000000000000000000000000000000000199590941673ffffffffffffffffffffffffffffffffffffffff199093169290921793909316919091179091556008805491151560ff19928316179055600c80549091166001179081905560ff1690565b60006001831015615953576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42504f575f424153455f544f4f5f4c4f570000000000000000000000604482015290519081900360640190fd5b671bc16d674ec7ffff8311156159b3576040805160e560020a62461bcd02815260206004820152601660248201527f4552525f42504f575f424153455f544f4f5f4849474800000000000000000000604482015290519081900360640190fd5b60006159be83615ba7565b905060006159cc8483615392565b905060006159e2866159dd85615bc2565b615bd0565b9050816159f3579250611222915050565b6000615a0487846305f5e100615c30565b9050615a1082826152a9565b979650505050505050565b600080828410615a315750508082036000615a39565b505081810360015b9250929050565b61540d82308361551c565b30600090815260208190526040902054811115615ab2576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b30600090815260208190526040902054615acc9082615392565b30600090815260208190526040902055600254615ae99082615392565b60025560408051828152905160009130917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b61540d30838361551c565b30600090815260208190526040902054615b4c9082615638565b30600090815260208190526040902055600254615b699082615638565b60025560408051828152905130916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b6000670de0b6b3a7640000615bbb83615bc2565b0292915050565b670de0b6b3a7640000900490565b6000828160028406615bea57670de0b6b3a7640000615bec565b815b90506002840493505b8315615c2857615c0582836152a9565b91506002840615615c1d57615c1a81836152a9565b90505b600284049350615bf5565b949350505050565b6000828180615c4787670de0b6b3a7640000615a1b565b9092509050670de0b6b3a764000080600060015b888410615cff576000670de0b6b3a764000082029050600080615c8f8a615c8a85670de0b6b3a7640000615392565b615a1b565b91509150615ca187613b9a848c6152a9565b9650615cad8784615710565b965086615cbc57505050615cff565b8715615cc6579315935b8015615cd0579315935b8415615ce757615ce08688615392565b9550615cf4565b615cf18688615638565b95505b505050600101615c5b565b5090999850505050505050505056fe4552525f4e4f545f46494e414c495a45440000000000000000000000000000004552525f5245454e5452590000000000000000000000000000000000000000004552525f4c494d49545f494e000000000000000000000000000000000000000063982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a4552525f4e4f545f434f4e54524f4c4c455200000000000000000000000000004552525f4e4f545f424f554e44000000000000000000000000000000000000008c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9254552525f49535f46494e414c495a4544000000000000000000000000000000004552525f4c494d49545f4f5554000000000000000000000000000000000000004552525f4d4154485f415050524f580000000000000000000000000000000000a165627a7a72305820e84ce9b74e5c77479e9a2e9ab4064d5807954a4d7492ee0c042870e33dd59a260029", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061040e576000357c0100000000000000000000000000000000000000000000000000000000900480638c28cbe811610232578063be3bbd2e11610142578063d73dd623116100d5578063ec093021116100a4578063ec09302114610d35578063f1b8a9b714610d3d578063f8b2cb4f14610d63578063f8d6aed414610d89578063fde924f714610dc45761040e565b8063d73dd62314610ca9578063dd62ed3e14610cd5578063e4a28a5214610514578063e4e1e53814610d035761040e565b8063cd2ed8fb11610111578063cd2ed8fb14610c25578063cf5e7bd314610c2d578063d1d7bc9114610c53578063d4cadf6814610ca15761040e565b8063be3bbd2e14610bbd578063c36596a614610588578063c6580d1214610c15578063cc77828d14610c1d5761040e565b8063a221ee49116101c5578063b7b800a411610194578063b7b800a414610b62578063ba019dab14610b6a578063ba9530a614610b72578063bc063e1a14610bad578063bc694ea214610bb55761040e565b8063a221ee4914610a82578063a9059cbb14610ab7578063b02f0b7314610ae3578063b0e0d13614610b5a5761040e565b80639381cd2b116102015780639381cd2b14610a44578063948d8ce614610a4c57806395d89b4114610a72578063992e2a9214610a7a5761040e565b80638c28cbe8146109e85780638d4e408314610a0e57806392eefe9b14610a16578063936c347714610a3c5761040e565b806346ab38f11161032d5780636d06dfa0116102c05780638201aa3f1161028f5780638201aa3f146108ef57806382f652ad1461092f5780638656b6531461096a578063867378c5146109a557806389298012146109ad5761040e565b80636d06dfa01461083657806370a082311461086857806376c7a3c71461088e5780637c5e9ea4146108965761040e565b8063506de974116102fc578063506de974146107575780635c1bbaf71461079d5780635db34277146107d8578063661884631461080a5761040e565b806346ab38f11461068757806349b59552146106b95780634bb278f3146106d85780634f69c0d4146106e05761040e565b8063218b5382116103a5578063313ce56711610374578063313ce5671461061057806334e199071461062e578063392e53cd1461064d5780633fdddaa2146106555761040e565b8063218b53821461058857806323b872dd146105905780632f37b624146105c65780633018205f146105ec5761040e565b80631446a7ff116103e15780631446a7ff1461051c57806315e84af91461054a57806318160ddd14610578578063189d00ca146105805761040e565b806302c967481461041357806306fdde0314610457578063095ea7b3146104d457806309a3bbe414610514575b600080fd5b6104456004803603606081101561042957600080fd5b50600160a060020a038135169060208101359060400135610dcc565b60408051918252519081900360200190f35b61045f61113d565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610499578181015183820152602001610481565b50505050905090810190601f1680156104c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610500600480360360408110156104ea57600080fd5b50600160a060020a0381351690602001356111d3565b604080519115158252519081900360200190f35b610445611228565b6104456004803603604081101561053257600080fd5b50600160a060020a0381358116916020013516611235565b6104456004803603604081101561056057600080fd5b50600160a060020a038135811691602001351661138f565b6104456114e0565b6104456114e6565b6104456114fa565b610500600480360360608110156105a657600080fd5b50600160a060020a03813581169160208101359091169060400135611506565b610500600480360360208110156105dc57600080fd5b5035600160a060020a031661166b565b6105f4611689565b60408051600160a060020a039092168252519081900360200190f35b6106186116ea565b6040805160ff9092168252519081900360200190f35b61064b6004803603602081101561064457600080fd5b50356116f3565b005b610500611917565b61064b6004803603606081101561066b57600080fd5b50600160a060020a038135169060208101359060400135611920565b6104456004803603606081101561069d57600080fd5b50600160a060020a038135169060208101359060400135611d6c565b61064b600480360360208110156106cf57600080fd5b5035151561207c565b61064b61220d565b61064b600480360360408110156106f657600080fd5b8135919081019060408101602082013564010000000081111561071857600080fd5b82018360208201111561072a57600080fd5b8035906020019184602083028401116401000000008311171561074c57600080fd5b509092509050612424565b610500600480360360a081101561076d57600080fd5b50600160a060020a038135811691602081013590911690604081013590606081013515159060800135151561270b565b610445600480360360c08110156107b357600080fd5b5080359060208101359060408101359060608101359060808101359060a001356128f9565b610445600480360360608110156107ee57600080fd5b50600160a060020a0381351690602081013590604001356129b1565b6105006004803603604081101561082057600080fd5b50600160a060020a038135169060200135612c94565b6104456004803603606081101561084c57600080fd5b50600160a060020a038135169060208101359060400135612d6c565b6104456004803603602081101561087e57600080fd5b5035600160a060020a031661307d565b610445613098565b6108d6600480360360a08110156108ac57600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356130aa565b6040805192835260208301919091528051918290030190f35b6108d6600480360360a081101561090557600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356135ac565b610445600480360360c081101561094557600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613a95565b610445600480360360c081101561098057600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613b54565b610445613bf5565b610445600480360360c08110156109c357600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613c09565b61064b600480360360208110156109fe57600080fd5b5035600160a060020a0316613cb9565b610500613e8a565b61064b60048036036020811015610a2c57600080fd5b5035600160a060020a0316613e93565b610445614039565b610445614091565b61044560048036036020811015610a6257600080fd5b5035600160a060020a031661409e565b61045f61416c565b6104456141cd565b610445600480360360a0811015610a9857600080fd5b50803590602081013590604081013590606081013590608001356141d9565b61050060048036036040811015610acd57600080fd5b50600160a060020a03813516906020013561423e565b61064b60048036036040811015610af957600080fd5b81359190810190604081016020820135640100000000811115610b1b57600080fd5b820183602082011115610b2d57600080fd5b80359060200191846020830284011164010000000083111715610b4f57600080fd5b509092509050614254565b61044561459a565b61044561459f565b6104456145a4565b610445600480360360c0811015610b8857600080fd5b5080359060208101359060408101359060608101359060808101359060a001356145a9565b61044561462a565b61044561463a565b610bc5614646565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610c01578181015183820152602001610be9565b505050509050019250505060405180910390f35b61044561473e565b610bc5614743565b610445614794565b61064b60048036036020811015610c4357600080fd5b5035600160a060020a031661479a565b61064b600480360360e0811015610c6957600080fd5b50600160a060020a03813581169160208101359160408201359160608101359091169060808101359060a08101359060c00135614b27565b610445614cd0565b61050060048036036040811015610cbf57600080fd5b50600160a060020a038135169060200135614d28565b61044560048036036040811015610ceb57600080fd5b50600160a060020a0381358116916020013516614da9565b61064b60048036036060811015610d1957600080fd5b50600160a060020a038135169060208101359060400135614dd4565b610445615058565b61044560048036036020811015610d5357600080fd5b5035600160a060020a0316615068565b61044560048036036020811015610d7957600080fd5b5035600160a060020a0316615148565b610445600480360360c0811015610d9f57600080fd5b5080359060208101359060408101359060608101359060808101359060a00135615216565b610500615299565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615610e7d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16610ed4576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16610f32576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a60205260409020600390810154610f6791670de0b6b3a76400005b046001016152a9565b831115610fbe576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754610ff894939291908990613a95565b91508161103d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115611083576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b611091816003015485615392565b600382015560006110a283826152a9565b604080518781529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36110f03384615403565b6111026110fd8483615392565b615411565b60055461111e90620100009004600160a060020a03168261541d565b611129863387615427565b50506005805461ff00191690559392505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b820191906000526020600020905b8154815290600101906020018083116111ac57829003601f168201915b5050505050905090565b336000818152600160209081526040808320600160a060020a03871680855290835281842086905581518681529151939490939092600080516020615dcf833981519152928290030190a35060015b92915050565b6802b5e3af16b188000081565b600554600090610100900460ff1615611286576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff166112e4576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16611342576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825281206003808401546002808601549284015490840154939461138694929392906141d9565b95945050505050565b600554600090610100900460ff16156113e0576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1661143e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661149c576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825290206003808301546002808501549284015490840154600754611386949291906141d9565b60025490565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600033600160a060020a03851614806115425750600160a060020a03841660009081526001602090815260408083203384529091529020548211155b611596576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42544f4b454e5f4241445f43414c4c45520000000000000000000000604482015290519081900360640190fd5b6115a184848461551c565b33600160a060020a038516148015906115df5750600160a060020a038416600090815260016020908152604080832033845290915290205460001914155b1561166157600160a060020a03841660009081526001602090815260408083203384529091529020546116129083615392565b600160a060020a0385811660009081526001602090815260408083203380855290835292819020859055805194855251928716939192600080516020615dcf8339815191529281900390910190a35b5060019392505050565b600160a060020a03166000908152600a602052604090205460ff1690565b600554600090610100900460ff16156116da576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600654600160a060020a031690565b60055460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156117a2576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16156117fa576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a0316331461184a576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b64e8d4a510008110156118a7576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a0000811115611907576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6007556005805461ff0019169055565b600c5460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156119cf576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a0390911614611a30576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff16611a8e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615611ad7576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b670de0b6b3a7640000811015611b37576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b6802b5e3af16b1880000811115611b98576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b620f4240821015611bf3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4d494e5f42414c414e43450000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206002015480821115611c9657611c2c600b54611c278484615392565b615638565b600b8190556802b5e3af16b18800001015611c91576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f4d41585f544f54414c5f574549474854000000000000000000000000604482015290519081900360640190fd5b611cb7565b80821015611cb757611cb3600b54611cae8385615392565b615392565b600b555b600160a060020a0384166000908152600a602052604090206002810183905560030180549084905580841115611d0057611cfb8533611cf68785615392565b615695565b611d5a565b80841015611d5a576000611d148286615392565b90506000611d238260006152a9565b9050611d398733611d348585615392565b615427565b600554611d57908890620100009004600160a060020a031683615427565b50505b50506005805461ff0019169055505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615611e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16611e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16611ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754611f0c94939291908990613c09565b915082821015611f54576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a60205260409020600390810154611f8491670de0b6b3a7640000610f5e565b821115611fdb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b611fe9816003015483615392565b60038201556000611ffa85826152a9565b604080518581529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36120483386615403565b6120556110fd8683615392565b60055461207190620100009004600160a060020a03168261541d565b611129863385615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561212b576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1615612183576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a031633146121d3576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805491151560a060020a0274ff0000000000000000000000000000000000000000199092169190911790556005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156122bc576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a039091161461231d576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b60085460ff1615612366576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600211156123c1576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b6008805460ff191660011790556006805474ff0000000000000000000000000000000000000000191660a060020a17905561240468056bc75e2d63100000615707565b6124173368056bc75e2d6310000061541d565b6005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156124d3576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661252a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006125346114e0565b905060006125428583615710565b905080612587576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b60005b6009548110156126f7576000600982815481106125a357fe5b6000918252602080832090910154600160a060020a0316808352600a9091526040822060030154909250906125d885836152a9565b90508061261d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87878581811061262957fe5b90506020020135811115612675576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206003015461269b9082615638565b600160a060020a0384166000818152600a6020908152604091829020600301939093558051848152905191923392600080516020615d6f8339815191529281900390910190a36126ec833383615695565b50505060010161258a565b5061270185615707565b611d5a338661541d565b600c5460009060ff1615612769576040805160e560020a62461bcd02815260206004820152601760248201527f4552525f414c52454144595f494e495449414c495a4544000000000000000000604482015290519081900360640190fd5b600160a060020a0386166127c7576040805160e560020a62461bcd02815260206004820152601e60248201527f4552525f494e56414c49445f434f4e54524f4c4c45525f414444524553530000604482015290519081900360640190fd5b600160a060020a038516612825576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f464143544f52595f414444524553530000000000604482015290519081900360640190fd5b64e8d4a51000841015612882576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a00008411156128e2576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6128ef868686868661584c565b9695505050505050565b6000806129068786615710565b905060006129148786615638565b905060006129228289615710565b90506000612938670de0b6b3a764000085615710565b9050600061294683836158f8565b90506000612954828e6152a9565b90506000612962828f615392565b9050600061298161297b670de0b6b3a76400008a615392565b8b6152a9565b905061299e82612999670de0b6b3a764000084615392565b615710565b9f9e505050505050505050505050505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612a62576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612ab9576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612b17576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060030154612b49906002670de0b6b3a76400005b046152a9565b831115612ba0576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612bda94939291908990613b54565b915082821015612c22576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b612c30816003015485615638565b6003820155604080518581529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a3612c6c82615707565b612c76338361541d565b612c81853386615695565b506005805461ff00191690559392505050565b336000908152600160209081526040808320600160a060020a038616845290915281205480831115612ce957336000908152600160209081526040808320600160a060020a0388168452909152812055612d18565b612cf38184615392565b336000908152600160209081526040808320600160a060020a03891684529091529020555b336000818152600160209081526040808320600160a060020a038916808552908352928190205481519081529051929392600080516020615dcf833981519152929181900390910190a35060019392505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612f0c949392919089906128f9565b915081612f51576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115612f97576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a6020526040902060030154612fc7906002670de0b6b3a7640000612b43565b82111561301e576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b61302c816003015483615638565b6003820155604080518381529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a361306884615707565b613072338561541d565b612c81853384615695565b600160a060020a031660009081526020819052604090205490565b620f4240670de0b6b3a76400006114f6565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561314a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166131b7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613215576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613276576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a6020526040808220928816825290206003808201546132af91670de0b6b3a7640000610f5e565b861115613306576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600061332783600301548460020154846003015485600201546007546141d9565b905085811115613381576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6133a183600301548460020154846003015485600201548b600754615216565b9450888511156133e9576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b6133f7836003015486615638565b836003018190555061340d826003015488615392565b6003808401829055840154600280860154908501546007546134309491906141d9565b935080841015613478576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156134d0576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6134da8588615710565b81111561351f576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d43378888b604051808381526020018281526020019250505060405180910390a46135878a3387615695565b613592883389615427565b5050506005805461ff001916905590969095509350505050565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561364c576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166136b9576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613717576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613778576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a60205260408082209288168252902060038201546137b2906002670de0b6b3a7640000612b43565b881115613809576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600061382a83600301548460020154846003015485600201546007546141d9565b905085811115613884576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6138a483600301548460020154846003015485600201548d6007546145a9565b9450868510156138ec576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b6138fa83600301548a615638565b8360030181905550613910826003015486615392565b6003808401829055840154600280860154908501546007546139339491906141d9565b93508084101561397b576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156139d3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6139dd8986615710565b811115613a22576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d433788c89604051808381526020018281526020019250505060405180910390a4613a8a8a338b615695565b613592883387615427565b600080613aa28786615710565b90506000613ab8670de0b6b3a764000083615392565b90506000613ac682866152a9565b90506000613ae087612999670de0b6b3a764000085615392565b90506000613aee8c83615392565b90506000613afc828e615710565b90506000613b0a82886158f8565b90506000613b18828e6152a9565b90506000613b268e83615392565b9050613b3f81612999670de0b6b3a76400006000615392565b99505050505050505050509695505050505050565b600080613b618786615710565b90506000613b80613b7a670de0b6b3a764000084615392565b856152a9565b90506000613b9f86613b9a670de0b6b3a764000085615392565b6152a9565b90506000613bad8b83615638565b90506000613bbb828d615710565b90506000613bc982876158f8565b90506000613bd7828d6152a9565b9050613be3818d615392565b9e9d5050505050505050505050505050565b64e8d4a51000670de0b6b3a76400006114f6565b600080613c168786615710565b90506000613c3185613b9a670de0b6b3a76400006000615392565b90506000613c3f8883615392565b90506000613c4d828a615710565b90506000613c6c82613c67670de0b6b3a764000088615710565b6158f8565b90506000613c7a828e6152a9565b90506000613c888e83615392565b90506000613ca161297b670de0b6b3a76400008a615392565b905061299e82613b9a670de0b6b3a764000084615392565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613d68576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0381166000908152600a602052604090205460ff16613dd5576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038316916370a08231916024808301926020929190829003018186803b158015613e3457600080fd5b505afa158015613e48573d6000803e3d6000fd5b505050506040513d6020811015613e5e57600080fd5b5051600160a060020a039091166000908152600a60205260409020600301556005805461ff0019169055565b60085460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613f42576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a038116613faf576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f4d414e414745525f414444524553530000000000604482015290519081900360640190fd5b600654600160a060020a03163314613fff576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790556005805461ff0019169055565b600554600090610100900460ff161561408a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600b5490565b68056bc75e2d6310000081565b600554600090610100900460ff16156140ef576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661414d576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206002015490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b6704a03ce68d21555681565b6000806141e68787615710565b905060006141f48686615710565b905060006142028383615710565b90506000614224670de0b6b3a7640000612999670de0b6b3a764000089615392565b905061423082826152a9565b9a9950505050505050505050565b600061424b33848461551c565b50600192915050565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614303576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661435a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006143646114e0565b905060006143738560006152a9565b905060006143818683615392565b9050600061438f8285615710565b9050806143d4576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b6143de3388615403565b6005546143fa90620100009004600160a060020a03168461541d565b61440382615411565b60005b6009548110156145855760006009828154811061441f57fe5b6000918252602080832090910154600160a060020a0316808352600a90915260408220600301549092509061445485836152a9565b905080614499576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b8989858181106144a557fe5b905060200201358110156144f1576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a60205260409020600301546145179082615392565b600160a060020a0384166000818152600a60209081526040918290206003019390935580518481529051919233927fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed9281900390910190a361457a833383615427565b505050600101614406565b50506005805461ff0019169055505050505050565b600881565b600281565b600181565b6000806145b68786615710565b905060006145cc670de0b6b3a764000085615392565b90506145d885826152a9565b905060006145ea8a6129998c85615638565b905060006145f882856158f8565b9050600061460e670de0b6b3a764000083615392565b905061461a8a826152a9565b9c9b505050505050505050505050565b600a670de0b6b3a76400006114f6565b671bc16d674ec7ffff81565b600554606090610100900460ff1615614697576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60085460ff166146df576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60098054806020026020016040519081016040528092919081815260200182805480156111c957602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311614717575050505050905090565b600081565b600554606090610100900460ff16156146df576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60095490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614849576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a03909116146148aa576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a602052604090205460ff16614908576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615614951576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a60205260408120600301549061497882826152a9565b600b54600160a060020a0385166000908152600a60205260409020600201549192506149a391615392565b600b55600160a060020a0383166000908152600a60205260409020600101546009805460001981019190829081106149d757fe5b60009182526020909120015460098054600160a060020a0390921691849081106149fd57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555081600a600060098581548110614a3d57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600101556009805480614a7057fe5b600082815260208082206000199084018101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556040805160808101825283815280830184815281830185815260608301868152600160a060020a038c168752600a909552929094209051815460ff19169015151781559251600184015551600283015551600390910155614b098533611d348787615392565b600554611d5a908690620100009004600160a060020a031685615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600160a060020a038716614be6576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f44415441544f4b454e5f41444452455353000000604482015290519081900360640190fd5b600160a060020a038416614c44576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f42415345544f4b454e5f41444452455353000000604482015290519081900360640190fd5b614c4f878787614dd4565b604080518781529051600160a060020a038916913391600080516020615d6f8339815191529181900360200190a3614c88848484614dd4565b604080518481529051600160a060020a038616913391600080516020615d6f8339815191529181900360200190a3614cbf816116f3565b614cc761220d565b50505050505050565b600554600090610100900460ff1615614d21576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b5060075490565b336000908152600160209081526040808320600160a060020a0386168452909152812054614d569083615638565b336000818152600160209081526040808320600160a060020a038916808552908352928190208590558051948552519193600080516020615dcf833981519152929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600654600160a060020a03163314614e85576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1615614ef6576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f49535f424f554e440000000000000000000000000000000000000000604482015290519081900360640190fd5b60085460ff1615614f3f576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600811614f99576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b604080516080810182526001808252600980546020808501918252600085870181815260608701828152600160a060020a038c16808452600a9094529782209651875460ff1916901515178755925186860155915160028601559451600390940193909355805491820181559091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805473ffffffffffffffffffffffffffffffffffffffff19169091179055615053838383611920565b505050565b6002670de0b6b3a76400006114f6565b600554600090610100900460ff16156150b9576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16615117576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a6020526040902060020154600b54615141908290615710565b9392505050565b600554600090610100900460ff1615615199576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff166151f7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206003015490565b6000806152238588615710565b905060006152318786615392565b9050600061523f8883615710565b9050600061524d82856158f8565b905061526181670de0b6b3a7640000615392565b9050615275670de0b6b3a764000087615392565b945061528a6152848c836152a9565b86615710565b9b9a5050505050505050505050565b60065460a060020a900460ff1690565b60008282028315806152c35750828482816152c057fe5b04145b615317576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6706f05b59d3b2000081018181101561537a576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6000670de0b6b3a7640000825b049695505050505050565b60008060006153a18585615a1b565b9150915080156153fb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b61540d8282615a40565b5050565b61541a81615a4b565b50565b61540d8282615b27565b604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03848116600483015260248201849052915160009286169163a9059cbb91604480830192602092919082900301818787803b15801561549357600080fd5b505af11580156154a7573d6000803e3d6000fd5b505050506040513d60208110156154bd57600080fd5b5051905080615516576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f45524332305f46414c53450000000000000000000000000000000000604482015290519081900360640190fd5b50505050565b600160a060020a03831660009081526020819052604090205481111561558c576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152602081905260409020546155af9082615392565b600160a060020a0380851660009081526020819052604080822093909355908416815220546155de9082615638565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082820183811015615141576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301523060248301526044820184905291516000928616916323b872dd91606480830192602092919082900301818787803b15801561549357600080fd5b61541a81615b32565b600081615767576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f4449565f5a45524f0000000000000000000000000000000000000000604482015290519081900360640190fd5b670de0b6b3a7640000830283158061578f5750670de0b6b3a764000084828161578c57fe5b04145b6157e3576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b60028304810181811015615841576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b600084828161538757fe5b6006805460058054600160a060020a03978816620100000275ffffffffffffffffffffffffffffffffffffffff00001990911617905560079490945591151560a060020a0274ff0000000000000000000000000000000000000000199590941673ffffffffffffffffffffffffffffffffffffffff199093169290921793909316919091179091556008805491151560ff19928316179055600c80549091166001179081905560ff1690565b60006001831015615953576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42504f575f424153455f544f4f5f4c4f570000000000000000000000604482015290519081900360640190fd5b671bc16d674ec7ffff8311156159b3576040805160e560020a62461bcd02815260206004820152601660248201527f4552525f42504f575f424153455f544f4f5f4849474800000000000000000000604482015290519081900360640190fd5b60006159be83615ba7565b905060006159cc8483615392565b905060006159e2866159dd85615bc2565b615bd0565b9050816159f3579250611222915050565b6000615a0487846305f5e100615c30565b9050615a1082826152a9565b979650505050505050565b600080828410615a315750508082036000615a39565b505081810360015b9250929050565b61540d82308361551c565b30600090815260208190526040902054811115615ab2576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b30600090815260208190526040902054615acc9082615392565b30600090815260208190526040902055600254615ae99082615392565b60025560408051828152905160009130917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b61540d30838361551c565b30600090815260208190526040902054615b4c9082615638565b30600090815260208190526040902055600254615b699082615638565b60025560408051828152905130916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b6000670de0b6b3a7640000615bbb83615bc2565b0292915050565b670de0b6b3a7640000900490565b6000828160028406615bea57670de0b6b3a7640000615bec565b815b90506002840493505b8315615c2857615c0582836152a9565b91506002840615615c1d57615c1a81836152a9565b90505b600284049350615bf5565b949350505050565b6000828180615c4787670de0b6b3a7640000615a1b565b9092509050670de0b6b3a764000080600060015b888410615cff576000670de0b6b3a764000082029050600080615c8f8a615c8a85670de0b6b3a7640000615392565b615a1b565b91509150615ca187613b9a848c6152a9565b9650615cad8784615710565b965086615cbc57505050615cff565b8715615cc6579315935b8015615cd0579315935b8415615ce757615ce08688615392565b9550615cf4565b615cf18688615638565b95505b505050600101615c5b565b5090999850505050505050505056fe4552525f4e4f545f46494e414c495a45440000000000000000000000000000004552525f5245454e5452590000000000000000000000000000000000000000004552525f4c494d49545f494e000000000000000000000000000000000000000063982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a4552525f4e4f545f434f4e54524f4c4c455200000000000000000000000000004552525f4e4f545f424f554e44000000000000000000000000000000000000008c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9254552525f49535f46494e414c495a4544000000000000000000000000000000004552525f4c494d49545f4f5554000000000000000000000000000000000000004552525f4d4154485f415050524f580000000000000000000000000000000000a165627a7a72305820e84ce9b74e5c77479e9a2e9ab4064d5807954a4d7492ee0c042870e33dd59a260029", + "sourceMap": "2857:49:7:-;854:25060:6;2857:49:7;;854:25060:6;2857:49:7;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2912:33:7;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2951:30:7;;;-1:-1:-1;;2951:30:7;;;2979:2;2951:30;;;;2646:32:6;;;;;;;;2972:96;5:2:-1;;;;30:1;27;20:12;5:2;-1:-1;3003:58:6;3015:10;;881:12:2;3048:5:6;;3003:11;;;;:58;:::i;:::-;;854:25060;;3935:417;4141:11;:24;;4175:8;:18;;-1:-1:-1;;;;;4175:18:6;;;;;-1:-1:-1;;;;;;4175:18:6;;;;;;4203:8;:18;;;;4231:24;;;;;-1:-1:-1;;;;;;4141:24:6;;;;-1:-1:-1;;;;;;4141:24:6;;;;;;;4231;;;;;;;;;;;4265:10;:22;;;;;-1:-1:-1;;4265:22:6;;;;;;4299:11;:18;;;;;-1:-1:-1;4299:18:6;;;;;4231:24;4334:11;;3935:417::o;854:25060::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;854:25060:6;;;-1:-1:-1;854:25060:6;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "854:25060:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;854:25060:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23617:1305;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;23617:1305:6;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2988:81:7;;;:::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;2988:81:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3574:180;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3574:180:7;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1111:50:2;;;:::i;13056:555:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;13056:555:6;;;;;;;;;;:::i;12495:::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;12495:555:6;;;;;;;;;;:::i;3482:86:7:-;;;:::i;1403:54:2:-;;;:::i;1004:45::-;;;:::i;4544:565:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4544:565:7;;;;;;;;;;;;;;;;;:::i;5814:118:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5814:118:6;-1:-1:-1;;;;;5814:118:6;;:::i;7386:131::-;;;:::i;:::-;;;;-1:-1:-1;;;;;7386:131:6;;;;;;;;;;;;;;3166:80:7;;;:::i;:::-;;;;;;;;;;;;;;;;;;;7523:339:6;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7523:339:6;;:::i;:::-;;2831:88;;;:::i;9570:1603::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;9570:1603:6;;;;;;;;;;;;;:::i;22364:1247::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;22364:1247:6;;;;;;;;;;;;;:::i;8175:240::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8175:240:6;;;;:::i;8421:416::-;;;:::i;13617:925::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;13617:925:6;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;13617:925:6;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;13617:925:6;;;;;;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;-1:-1;13617:925:6;;-1:-1:-1;13617:925:6;-1:-1:-1;13617:925:6;:::i;3239:630::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;3239:630:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;8601:1167:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;8601:1167:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;20052:1128:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;20052:1128:6;;;;;;;;;;;;;:::i;4014:388:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4014:388:7;;;;;;;;:::i;21186:1172:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;21186:1172:6;;;;;;;;;;;;;:::i;3376:100:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3376:100:7;-1:-1:-1;;;;;3376:100:7;;:::i;840:53:2:-;;;:::i;17848:2197:6:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;17848:2197:6;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;15649:2193;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;15649:2193:6;;;;;;;;;;;;;;;;;;;;;;;;;:::i;13284:1324:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;13284:1324:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;6455:1140::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;6455:1140:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1167:54:2:-;;;:::i;10874:1304:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;10874:1304:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;12271:218:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12271:218:6;-1:-1:-1;;;;;12271:218:6;;:::i;5702:106::-;;;:::i;7868:300::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7868:300:6;-1:-1:-1;;;;;7868:300:6;;:::i;6624:142::-;;;:::i;1228:51:2:-;;;:::i;6400:218:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6400:218:6;-1:-1:-1;;;;;6400:218:6;;:::i;3075:85:7:-;;;:::i;1519:59:2:-;;;:::i;1626:494:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;1626:494:4;;;;;;;;;;;;;;;;;;;;;;:::i;4408:130:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4408:130:7;;;;;;;;:::i;14548:1094:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;14548:1094:6;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;14548:1094:6;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;14548:1094:6;;;;;;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;-1:-1;14548:1094:6;;-1:-1:-1;14548:1094:6;-1:-1:-1;14548:1094:6;:::i;791:42:2:-;;;:::i;743:::-;;;:::i;1286:46::-;;;:::i;3126:664:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;3126:664:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;899:50:2:-;;;:::i;1338:59::-;;;:::i;6200:194:6:-;;;:::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;6200:194:6;;;;;;;;;;;;;;;;;955:42:2;;;:::i;6056:138:6:-;;;:::i;5938:112::-;;;:::i;11179:1010::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11179:1010:6;-1:-1:-1;;;;;11179:1010:6;;:::i;4358:1101::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;4358:1101:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;7258:122::-;;;:::i;3760:248:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3760:248:7;;;;;;;;:::i;3252:118::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3252:118:7;;;;;;;;;;:::i;8844:720:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;8844:720:6;;;;;;;;;;;;;:::i;1464:49:2:-;;;:::i;6772:266:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6772:266:6;-1:-1:-1;;;;;6772:266:6;;:::i;7044:208::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7044:208:6;-1:-1:-1;;;;;7044:208:6;;:::i;4796:653:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;4796:653:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;5588:108:6:-;;;:::i;23617:1305::-;23807:17;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;23848:10;;1865:13;23848:10;23840:40;;;;;-1:-1:-1;;;;;23840:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;23840:40:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;23898:18:6;;;;;;:8;:18;;;;;:24;;;23890:50;;;;;-1:-1:-1;;;;;23890:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;23890:50:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;23994:18:6;;;;;;:8;:18;;;;;:26;;;;;23989:47;;730:6:2;1561:8;;1573:5;1560:18;23989:4:6;:47::i;:::-;23971:14;:65;;23950:130;;;;;-1:-1:-1;;;;;23950:130:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24118:18:6;;24091:24;24118:18;;;:8;:18;;;;;24200:17;;;;24231:16;;;;;24261:12;;24287;;24341:8;;24162:197;;24200:17;24231:16;24261:12;24287;24313:14;;24162:24;:197::i;:::-;24147:212;-1:-1:-1;24378:17:6;24370:45;;;;;-1:-1:-1;;;;;24370:45:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;24370:45:6;;;;;;;;;;;;;;;24449:15;24433:12;:31;;24425:56;;;;;-1:-1:-1;;;;;24425:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;24425:56:6;;;;;;;;;;;;;;;24512:39;24517:9;:17;;;24536:14;24512:4;:39::i;:::-;24492:17;;;:59;24562:12;24577:28;24582:12;24562;24577:4;:28::i;:::-;24621:46;;;;;;;;24562:43;;-1:-1:-1;;;;;;24621:46:6;;;24630:10;;24621:46;;;;;;;;;;24678:40;24693:10;24705:12;24678:14;:40::i;:::-;24728:43;24743:27;24748:12;24762:7;24743:4;:27::i;:::-;24728:14;:43::i;:::-;24796:8;;24781:33;;24796:8;;;-1:-1:-1;;;;;24796:8:6;24806:7;24781:14;:33::i;:::-;24824:53;24840:8;24850:10;24862:14;24824:15;:53::i;:::-;-1:-1:-1;;1899:6:6;:14;;-1:-1:-1;;1899:14:6;;;23617:1305;;-1:-1:-1;;;23617:1305:6:o;2988:81:7:-;3057:5;3050:12;;;;;;;;-1:-1:-1;;3050:12:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3025:13;;3050:12;;3057:5;;3050:12;;3057:5;3050:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2988:81;:::o;3574:180::-;3659:10;3632:4;3648:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3648:27:7;;;;;;;;;;;:33;;;3696:30;;;;;;;3632:4;;3648:27;;3659:10;;-1:-1:-1;;;;;;;;;;;3696:30:7;;;;;;;-1:-1:-1;3743:4:7;3574:180;;;;;:::o;1111:50:2:-;1152:9;1111:50;:::o;13056:555:6:-;1967:6;;13178:14;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;13216:17:6;;;;;;:8;:17;;;;;:23;;;13208:49;;;;;-1:-1:-1;;;;;13208:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13208:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;13275:18:6;;;;;;:8;:18;;;;;:24;;;13267:50;;;;;-1:-1:-1;;;;;13267:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13267:50:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;13353:17:6;;;13327:23;13353:17;;;:8;:17;;;;;;13407:18;;;;;;;13469:16;;;;;13500:15;;;;;13530:17;;;;13562:16;;;;13407:18;;13442:162;;13469:16;;13500:15;13562:16;13442:13;:162::i;:::-;13435:169;13056:555;-1:-1:-1;;;;;13056:555:6:o;12495:::-;1967:6;;12610:14;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;12648:17:6;;;;;;:8;:17;;;;;:23;;;12640:49;;;;;-1:-1:-1;;;;;12640:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12640:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;12707:18:6;;;;;;:8;:18;;;;;:24;;;12699:50;;;;;-1:-1:-1;;;;;12699:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12699:50:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;12785:17:6;;;12759:23;12785:17;;;:8;:17;;;;;;12839:18;;;;;;;12901:16;;;;;12932:15;;;;;12962:17;;;;12994:16;;;;13025:8;;12874:169;;12932:15;12962:17;12994:16;12874:13;:169::i;3482:86:7:-;3549:12;;3482:86;:::o;1403:54:2:-;1451:6;730;1444:13;;1403:54;:::o;1004:45::-;730:6;1004:45;:::o;4544:565:7:-;4662:4;4704:10;-1:-1:-1;;;;;4704:17:7;;;;:55;;-1:-1:-1;;;;;;4732:15:7;;;;;;:10;:15;;;;;;;;4748:10;4732:27;;;;;;;;4725:34;;;4704:55;4683:124;;;;;-1:-1:-1;;;;;4683:124:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;4817:20;4823:3;4828;4833;4817:5;:20::i;:::-;4851:10;-1:-1:-1;;;;;4851:17:7;;;;;;:63;;-1:-1:-1;;;;;;4872:15:7;;;;;;:10;:15;;;;;;;;4888:10;4872:27;;;;;;;;-1:-1:-1;;4872:42:7;;4851:63;4847:235;;;-1:-1:-1;;;;;4965:15:7;;;;;;:10;:15;;;;;;;;4981:10;4965:27;;;;;;;;4960:38;;4994:3;4960:4;:38::i;:::-;-1:-1:-1;;;;;4930:15:7;;;;;;;:10;:15;;;;;;;;4946:10;4930:27;;;;;;;;;;:68;;;5017:54;;;;;;;;;;4946:10;;-1:-1:-1;;;;;;;;;;;5017:54:7;;;;;;;;;4847:235;-1:-1:-1;5098:4:7;4544:565;;;;;:::o;5814:118:6:-;-1:-1:-1;;;;;5908:11:6;5881:4;5908:11;;;:8;:11;;;;;:17;;;;5814:118::o;7386:131::-;1967:6;;7469:7;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;7499:11:6;;-1:-1:-1;;;;;7499:11:6;7386:131;:::o;3166:80:7:-;3230:9;;;;3166:80;:::o;7523:339:6:-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;7626:10;;1865:13;7626:10;7625:11;7617:40;;;;;-1:-1:-1;;;;;7617:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7617:40:6;;;;;;;;;;;;;;;7689:11;;-1:-1:-1;;;;;7689:11:6;7675:10;:25;7667:56;;;;;-1:-1:-1;;;;;7667:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7667:56:6;;;;;;;;;;;;;;;881:12:2;7741:18:6;;;7733:42;;;;;-1:-1:-1;;;;;7733:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;940:9:2;7793:18:6;;;7785:42;;;;;-1:-1:-1;;;;;7785:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;7837:8;:18;1899:6;:14;;-1:-1:-1;;1899:14:6;;;7523:339::o;2831:88::-;2901:11;;;;2831:88;:::o;9570:1603::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;9710:11;;9696:10;-1:-1:-1;;;;;9710:11:6;;;9696:25;9688:56;;;;;-1:-1:-1;;;;;9688:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9688:56:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;9762:15:6;;;;;;:8;:15;;;;;:21;;;9754:47;;;;;-1:-1:-1;;;;;9754:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9754:47:6;;;;;;;;;;;;;;;9820:10;;;;9819:11;9811:40;;;;;-1:-1:-1;;;;;9811:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9811:40:6;;;;;;;;;;;;;;;730:6:2;9870::6;:20;;9862:47;;;;;-1:-1:-1;;;;;9862:47:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;1096:9:2;9927:20:6;;;9919:47;;;;;-1:-1:-1;;;;;9919:47:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;1208:13:2;9984:22:6;;;9976:50;;;;;-1:-1:-1;;;;;9976:50:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;10099:15:6;;10082:14;10099:15;;;:8;:15;;;;;:22;;;10135:18;;;10131:299;;;10184:43;10189:12;;10203:23;10208:6;10216:9;10203:4;:23::i;:::-;10184:4;:43::i;:::-;10169:12;:58;;;1152:9:2;-1:-1:-1;10249:32:6;10241:65;;;;;-1:-1:-1;;;;;10241:65:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;10131:299;;;10336:9;10327:6;:18;10323:107;;;10376:43;10381:12;;10395:23;10400:9;10411:6;10395:4;:23::i;:::-;10376:4;:43::i;:::-;10361:12;:58;10323:107;-1:-1:-1;;;;;10447:15:6;;;;;;:8;:15;;;;;:22;;;:31;;;10569:23;;;;10602:33;;;;10649:20;;;10645:522;;;10685:61;10701:5;10708:10;10720:25;10725:7;10734:10;10720:4;:25::i;:::-;10685:15;:61::i;:::-;10645:522;;;10777:10;10767:7;:20;10763:404;;;10880:26;10909:25;10914:10;10926:7;10909:4;:25::i;:::-;10880:54;;10948:17;10968:37;10973:21;996:1:2;10968:4:6;:37::i;:::-;10948:57;;11019:77;11035:5;11042:10;11054:41;11059:21;11082:12;11054:4;:41::i;:::-;11019:15;:77::i;:::-;11133:8;;11110:46;;11126:5;;11133:8;;;-1:-1:-1;;;;;11133:8:6;11143:12;11110:15;:46::i;:::-;10763:404;;;-1:-1:-1;;1899:6:6;:14;;-1:-1:-1;;1899:14:6;;;-1:-1:-1;;;9570:1603:6:o;22364:1247::-;22546:19;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;22589:10;;1865:13;22589:10;22581:40;;;;;-1:-1:-1;;;;;22581:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;22581:40:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;22639:18:6;;;;;;:8;:18;;;;;:24;;;22631:50;;;;;-1:-1:-1;;;;;22631:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;22631:50:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;22719:18:6;;22692:24;22719:18;;;:8;:18;;;;;22803:17;;;;22834:16;;;;;22864:12;;22890;;22942:8;;22765:195;;22803:17;22834:16;22864:12;22890;22916;;22765:24;:195::i;:::-;22748:212;;22997:12;22979:14;:30;;22971:56;;;;;-1:-1:-1;;;;;22971:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;22971:56:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;23090:18:6;;;;;;:8;:18;;;;;:26;;;;;23085:47;;730:6:2;1561:8;;23085:47:6;23067:14;:65;;23046:130;;;;;-1:-1:-1;;;;;23046:130:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;23207:39;23212:9;:17;;;23231:14;23207:4;:39::i;:::-;23187:17;;;:59;23257:12;23272:28;23277:12;23257;23272:4;:28::i;:::-;23316:46;;;;;;;;23257:43;;-1:-1:-1;;;;;;23316:46:6;;;23325:10;;23316:46;;;;;;;;;;23373:40;23388:10;23400:12;23373:14;:40::i;:::-;23423:43;23438:27;23443:12;23457:7;23438:4;:27::i;23423:43::-;23491:8;;23476:33;;23491:8;;;-1:-1:-1;;;;;23491:8:6;23501:7;23476:14;:33::i;:::-;23519:53;23535:8;23545:10;23557:14;23519:15;:53::i;8175:240::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;8280:10;;1865:13;8280:10;8279:11;8271:40;;;;;-1:-1:-1;;;;;8271:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8271:40:6;;;;;;;;;;;;;;;8343:11;;-1:-1:-1;;;;;8343:11:6;8329:10;:25;8321:56;;;;;-1:-1:-1;;;;;8321:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8321:56:6;;;;;;;;;;;;;;;8387:11;:21;;;;;-1:-1:-1;;;8387:21:6;-1:-1:-1;;8387:21:6;;;;;;;;;1899:6;:14;;-1:-1:-1;;1899:14:6;;;8175:240::o;8421:416::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;8522:11;;8508:10;-1:-1:-1;;;;;8522:11:6;;;8508:25;8500:56;;;;;-1:-1:-1;;;;;8500:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8500:56:6;;;;;;;;;;;;;;;8575:10;;;;8574:11;8566:40;;;;;-1:-1:-1;;;;;8566:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8566:40:6;;;;;;;;;;;;;;;8624:7;:14;784:1:2;-1:-1:-1;8624:34:6;8616:61;;;;;-1:-1:-1;;;;;8616:61:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;8688:10;:17;;-1:-1:-1;;8688:17:6;8701:4;8688:17;;;8715:11;:18;;-1:-1:-1;;8715:18:6;-1:-1:-1;;;8715:18:6;;;8744:32;1269:10:2;8744:14:6;:32::i;:::-;8786:44;8801:10;1269::2;8786:14:6;:44::i;:::-;1899:6;:14;;-1:-1:-1;;1899:14:6;;;8421:416::o;13617:925::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;13754:10;;1865:13;13754:10;13746:40;;;;;-1:-1:-1;;;;;13746:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13746:40:6;;;;;;;;;;;;;;;13797:14;13814:13;:11;:13::i;:::-;13797:30;;13837:10;13850:30;13855:13;13870:9;13850:4;:30::i;:::-;13837:43;-1:-1:-1;13898:10:6;13890:38;;;;;-1:-1:-1;;;;;13890:38:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13890:38:6;;;;;;;;;;;;;;;13944:6;13939:507;13960:7;:14;13956:18;;13939:507;;;13995:9;14007:7;14015:1;14007:10;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14007:10:6;14042:11;;;:8;:11;;;;;;:19;;;14007:10;;-1:-1:-1;14042:19:6;14096:16;14101:5;14042:19;14096:4;:16::i;:::-;14075:37;-1:-1:-1;14134:18:6;14126:46;;;;;-1:-1:-1;;;;;14126:46:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;14126:46:6;;;;;;;;;;;;;;;14211:12;;14224:1;14211:15;;;;;;;;;;;;;14194:13;:32;;14186:57;;;;;-1:-1:-1;;;;;14186:57:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;14186:57:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;14284:11:6;;;;;;:8;:11;;;;;:19;;;14279:40;;14305:13;14279:4;:40::i;:::-;-1:-1:-1;;;;;14257:11:6;;;;;;:8;:11;;;;;;;;;:19;;:62;;;;14338:38;;;;;;;14257:11;;14347:10;;-1:-1:-1;;;;;;;;;;;14338:38:6;;;;;;;;;14390:45;14406:1;14409:10;14421:13;14390:15;:45::i;:::-;-1:-1:-1;;;13976:3:6;;13939:507;;;;14455:29;14470:13;14455:14;:29::i;:::-;14494:41;14509:10;14521:13;14494:14;:41::i;3239:630::-;2747:11;;3451:4;;2747:11;;2746:12;2725:83;;;;;-1:-1:-1;;;;;2725:83:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3492:24:6;;3471:101;;;;;-1:-1:-1;;;;;3471:101:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3603:21:6;;3582:95;;;;;-1:-1:-1;;;;;3582:95:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;881:12:2;3695:18:6;;;3687:42;;;;;-1:-1:-1;;;;;3687:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;940:9:2;3747:18:6;;;3739:42;;;;;-1:-1:-1;;;;;3739:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;3798:64;3810:10;3822:7;3831;3840:10;3852:9;3798:11;:64::i;:::-;3791:71;3239:630;-1:-1:-1;;;;;;3239:630:6:o;8601:1167:4:-;8836:18;8870:21;8894:32;8899:13;8914:11;8894:4;:32::i;:::-;8870:56;;8936:18;8957:31;8962:10;8974:13;8957:4;:31::i;:::-;8936:52;;8998:14;9015:31;9020:13;9035:10;9015:4;:31::i;:::-;8998:48;;9121:8;9132:28;730:6:2;9143:16:4;9132:4;:28::i;:::-;9121:39;;9171:17;9191:20;9196:9;9207:3;9191:4;:20::i;:::-;9171:40;;9221:22;9246:34;9251:12;9265:14;9246:4;:34::i;:::-;9221:59;;9290:26;9319:39;9324:17;9343:14;9319:4;:39::i;:::-;9290:68;;9607:8;9618:43;9623:28;730:6:2;9634:16:4;9623:4;:28::i;:::-;9653:7;9618:4;:43::i;:::-;9607:54;;9687:44;9692:21;9715:15;730:6:2;9726:3:4;9715:4;:15::i;:::-;9687:4;:44::i;:::-;9671:60;8601:1167;-1:-1:-1;;;;;;;;;;;;;;;8601:1167:4:o;20052:1128:6:-;20240:18;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;20291:10;;1865:13;20291:10;20283:40;;;;;-1:-1:-1;;;;;20283:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20283:40:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;20341:17:6;;;;;;:8;:17;;;;;:23;;;20333:49;;;;;-1:-1:-1;;;;;20333:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20333:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;20435:17:6;;;;;;:8;:17;;;;;:25;;;20430:45;;1512:1:2;730:6;1505:8;;20430:4:6;:45::i;:::-;20413:13;:62;;20392:126;;;;;-1:-1:-1;;;;;20392:126:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20555:17:6;;20529:23;20555:17;;;:8;:17;;;;;20637:16;;;;20667:15;;;;;20696:12;;20722;;20775:8;;20599:194;;20637:16;20667:15;20696:12;20722;20748:13;;20599:24;:194::i;:::-;20583:210;;20829:16;20812:13;:33;;20804:59;;;;;-1:-1:-1;;;;;20804:59:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20804:59:6;;;;;;;;;;;;;;;20893:37;20898:8;:16;;;20916:13;20893:4;:37::i;:::-;20874:16;;;:56;20946:44;;;;;;;;-1:-1:-1;;;;;20946:44:6;;;20955:10;;-1:-1:-1;;;;;;;;;;;20946:44:6;;;;;;;;21001:29;21016:13;21001:14;:29::i;:::-;21040:41;21055:10;21067:13;21040:14;:41::i;:::-;21091:51;21107:7;21116:10;21128:13;21091:15;:51::i;:::-;-1:-1:-1;1899:6:6;:14;;-1:-1:-1;;1899:14:6;;;20052:1128;;-1:-1:-1;;;20052:1128:6:o;4014:388:7:-;4124:10;4081:4;4113:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4113:27:7;;;;;;;;;;4154:14;;;4150:156;;;4195:10;4214:1;4184:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4184:27:7;;;;;;;;;:31;4150:156;;;4276:19;4281:8;4291:3;4276:4;:19::i;:::-;4257:10;4246:22;;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4246:27:7;;;;;;;;;:49;4150:156;4329:10;4346:22;;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4320:54:7;;4346:27;;;;;;;;;;;4320:54;;;;;;;;;4329:10;-1:-1:-1;;;;;;;;;;;4320:54:7;;;;;;;;;;-1:-1:-1;4391:4:7;;4014:388;-1:-1:-1;;;4014:388:7:o;21186:1172:6:-;21368:18;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;21410:10;;1865:13;21410:10;21402:40;;;;;-1:-1:-1;;;;;21402:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21402:40:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;21460:17:6;;;;;;:8;:17;;;;;:23;;;21452:49;;;;;-1:-1:-1;;;;;21452:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21452:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;21538:17:6;;21512:23;21538:17;;;:8;:17;;;;;21620:16;;;;21650:15;;;;;21679:12;;21705;;21758:8;;21582:194;;21620:16;21650:15;21679:12;21705;21731:13;;21582:24;:194::i;:::-;21566:210;-1:-1:-1;21795:18:6;21787:46;;;;;-1:-1:-1;;;;;21787:46:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21787:46:6;;;;;;;;;;;;;;;21868:11;21851:13;:28;;21843:53;;;;;-1:-1:-1;;;;;21843:53:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21843:53:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;21958:17:6;;;;;;:8;:17;;;;;:25;;;21953:45;;1512:1:2;730:6;1505:8;;21953:45:6;21936:13;:62;;21915:126;;;;;-1:-1:-1;;;;;21915:126:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;22071:37;22076:8;:16;;;22094:13;22071:4;:37::i;:::-;22052:16;;;:56;22124:44;;;;;;;;-1:-1:-1;;;;;22124:44:6;;;22133:10;;-1:-1:-1;;;;;;;;;;;22124:44:6;;;;;;;;22179:29;22194:13;22179:14;:29::i;:::-;22218:41;22233:10;22245:13;22218:14;:41::i;:::-;22269:51;22285:7;22294:10;22306:13;22269:15;:51::i;3376:100:7:-;-1:-1:-1;;;;;3455:14:7;3432:4;3455:14;;;;;;;;;;;;3376:100::o;840:53:2:-;888:5;730:6;881:12;;17848:2197:6;1698:39;;;;;;;1728:8;1698:39;;;;;;18076:18;;;;1716:10;;-1:-1:-1;;;;;;1707:7:6;;;;18076:18;;1698:39;;;;;18076:18;1728:8;;18076:18;1698:39;1:33:-1;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;-1:-1:-1;;;;;18139:17:6;;1865:13;18139:17;;;:8;:17;;;;;:23;1865:13;18139:23;18131:49;;;;;-1:-1:-1;;;;;18131:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;18131:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;18198:18:6;;;;;;:8;:18;;;;;:24;;;18190:50;;;;;-1:-1:-1;;;;;18190:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;18190:50:6;;;;;;;;;;;;;;;18258:11;;-1:-1:-1;;;18258:11:6;;;;18250:43;;;;;-1:-1:-1;;;;;18250:43:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18330:26:6;;;18304:23;18330:26;;;:8;:26;;;;;;18393:27;;;;;;;18475:17;;;;;18470:38;;730:6:2;1561:8;;18470:38:6;18452:14;:56;;18431:121;;;;;-1:-1:-1;;;;;18431:121:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;18563:20;18586:165;18613:8;:16;;;18643:8;:15;;;18672:9;:17;;;18703:9;:16;;;18733:8;;18586:13;:165::i;:::-;18563:188;;18797:8;18778:15;:27;;18770:59;;;;;-1:-1:-1;;;;;18770:59:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;18856:194;18884:8;:16;;;18914:8;:15;;;18943:9;:17;;;18974:9;:16;;;19004:14;19032:8;;18856:14;:194::i;:::-;18840:210;;19085:11;19068:13;:28;;19060:53;;;;;-1:-1:-1;;;;;19060:53:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;19060:53:6;;;;;;;;;;;;;;;19143:37;19148:8;:16;;;19166:13;19143:4;:37::i;:::-;19124:8;:16;;:56;;;;19210:39;19215:9;:17;;;19234:14;19210:4;:39::i;:::-;19190:17;;;;:59;;;19304:16;;;19334:15;;;;;19394:16;;;;19424:8;;19277:165;;19190:59;19394:16;19277:13;:165::i;:::-;19260:182;;19478:15;19460:14;:33;;19452:61;;;;;-1:-1:-1;;;;;19452:61:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;19452:61:6;;;;;;;;;;;;;;;19549:8;19531:14;:26;;19523:54;;;;;-1:-1:-1;;;;;19523:54:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;19627:35;19632:13;19647:14;19627:4;:35::i;:::-;19608:15;:54;;19587:117;;;;;-1:-1:-1;;;;;19587:117:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;19587:117:6;;;;;;;;;;;;;;;19789:8;-1:-1:-1;;;;;19720:144:6;19767:7;-1:-1:-1;;;;;19720:144:6;19742:10;-1:-1:-1;;;;;19720:144:6;;19812:13;19840:14;19720:144;;;;;;;;;;;;;;;;;;;;;;;;19875:51;19891:7;19900:10;19912:13;19875:15;:51::i;:::-;19936:53;19952:8;19962:10;19974:14;19936:15;:53::i;:::-;-1:-1:-1;;;1899:6:6;:14;;-1:-1:-1;;1899:14:6;;;17848:2197;;;;-1:-1:-1;17848:2197:6;-1:-1:-1;;;;17848:2197:6:o;15649:2193::-;1698:39;;;;;;;1728:8;1698:39;;;;;;15875:19;;;;1716:10;;-1:-1:-1;;;;;;1707:7:6;;;;15875:19;;1698:39;;;;;15875:19;1728:8;;15875:19;1698:39;1:33:-1;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;-1:-1:-1;;;;;15940:17:6;;1865:13;15940:17;;;:8;:17;;;;;:23;1865:13;15940:23;15932:49;;;;;-1:-1:-1;;;;;15932:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;15932:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;15999:18:6;;;;;;:8;:18;;;;;:24;;;15991:50;;;;;-1:-1:-1;;;;;15991:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;15991:50:6;;;;;;;;;;;;;;;16059:11;;-1:-1:-1;;;16059:11:6;;;;16051:43;;;;;-1:-1:-1;;;;;16051:43:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16131:26:6;;;16105:23;16131:26;;;:8;:26;;;;;;16194:27;;;;;;;16275:16;;;;16270:36;;1512:1:2;730:6;1505:8;;16270:36:6;16253:13;:53;;16232:117;;;;;-1:-1:-1;;;;;16232:117:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;16360:20;16383:165;16410:8;:16;;;16440:8;:15;;;16469:9;:17;;;16500:9;:16;;;16530:8;;16383:13;:165::i;:::-;16360:188;;16585:8;16566:15;:27;;16558:59;;;;;-1:-1:-1;;;;;16558:59:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;16645:193;16673:8;:16;;;16703:8;:15;;;16732:9;:17;;;16763:9;:16;;;16793:13;16820:8;;16645:14;:193::i;:::-;16628:210;;16874:12;16856:14;:30;;16848:56;;;;;-1:-1:-1;;;;;16848:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;16848:56:6;;;;;;;;;;;;;;;16934:37;16939:8;:16;;;16957:13;16934:4;:37::i;:::-;16915:8;:16;;:56;;;;17001:39;17006:9;:17;;;17025:14;17001:4;:39::i;:::-;16981:17;;;;:59;;;17095:16;;;17125:15;;;;;17185:16;;;;17215:8;;17068:165;;16981:59;17185:16;17068:13;:165::i;:::-;17051:182;;17269:15;17251:14;:33;;17243:61;;;;;-1:-1:-1;;;;;17243:61:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;17243:61:6;;;;;;;;;;;;;;;17345:8;17327:14;:26;;17319:54;;;;;-1:-1:-1;;;;;17319:54:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;17423:35;17428:13;17443:14;17423:4;:35::i;:::-;17404:15;:54;;17383:117;;;;;-1:-1:-1;;;;;17383:117:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;17383:117:6;;;;;;;;;;;;;;;17585:8;-1:-1:-1;;;;;17516:144:6;17563:7;-1:-1:-1;;;;;17516:144:6;17538:10;-1:-1:-1;;;;;17516:144:6;;17608:13;17636:14;17516:144;;;;;;;;;;;;;;;;;;;;;;;;17671:51;17687:7;17696:10;17708:13;17671:15;:51::i;:::-;17732:53;17748:8;17758:10;17770:14;17732:15;:53::i;13284:1324:4:-;13522:17;13609:21;13633:33;13638:14;13654:11;13633:4;:33::i;:::-;13609:57;;13747:8;13758:28;730:6:2;13769:16:4;13758:4;:28::i;:::-;13747:39;;13796:8;13807:18;13812:3;13817:7;13807:4;:18::i;:::-;13796:29;;13836:32;13871:72;13889:14;13918:15;730:6:2;13929:3:4;13918:4;:15::i;13871:72::-;13836:107;;13954:23;13980:85;13998:15;14028:27;13980:4;:85::i;:::-;13954:111;;14075:18;14096:41;14101:18;14121:15;14096:4;:41::i;:::-;14075:62;;14214:14;14231:37;14236:13;14251:16;14231:4;:37::i;:::-;14214:54;;14278:18;14299:27;14304:9;14315:10;14299:4;:27::i;:::-;14278:48;;14336:29;14368:31;14373:10;14385:13;14368:4;:31::i;:::-;14336:63;;14520:52;14525:24;14551:20;730:6:2;996:1;14551:4:4;:20::i;14520:52::-;14505:67;-1:-1:-1;;;;;;;;;;13284:1324:4;;;;;;;;:::o;6455:1140::-;6690:18;6968:21;6992:32;6997:13;7012:11;6992:4;:32::i;:::-;6968:56;;7034:8;7045:43;7050:28;730:6:2;7061:16:4;7050:4;:28::i;:::-;7080:7;7045:4;:43::i;:::-;7034:54;;7099:26;7128:36;7133:13;7148:15;730:6:2;7159:3:4;7148:4;:15::i;:::-;7128:4;:36::i;:::-;7099:65;;7175:22;7200:43;7205:14;7221:21;7200:4;:43::i;:::-;7175:68;;7253:17;7273:39;7278:17;7297:14;7273:4;:39::i;:::-;7253:59;;7390:14;7407:36;7412:12;7426:16;7407:4;:36::i;:::-;7390:53;;7453:18;7474:27;7479:9;7490:10;7474:4;:27::i;:::-;7453:48;;7527:31;7532:13;7547:10;7527:4;:31::i;:::-;7511:47;6455:1140;-1:-1:-1;;;;;;;;;;;;;;6455:1140:4:o;1167:54:2:-;1215:6;730;1208:13;;10874:1304:4;11110:19;11145:21;11169:33;11174:14;11190:11;11169:4;:33::i;:::-;11145:57;;11307:29;11339:75;11357:12;11384:20;730:6:2;996:1;11384:4:4;:20::i;11339:75::-;11307:107;;11424:18;11445:42;11450:10;11462:24;11445:4;:42::i;:::-;11424:63;;11497:14;11514:31;11519:13;11534:10;11514:4;:31::i;:::-;11497:48;;11615:18;11636:45;11641:9;11652:28;730:6:2;11663:16:4;11652:4;:28::i;:::-;11636:4;:45::i;:::-;11615:66;;11691:23;11717:36;11722:13;11737:15;11717:4;:36::i;:::-;11691:62;;11764:32;11799:76;11817:15;11847:18;11799:4;:76::i;:::-;11764:111;;12008:8;12019:43;12024:28;730:6:2;12035:16:4;12024:4;:28::i;12019:43::-;12008:54;;12090:50;12095:27;12124:15;730:6:2;12135:3:4;12124:4;:15::i;12271:218:6:-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;-1:-1:-1;;;;;12369:15:6;;1865:13;12369:15;;;:8;:15;;;;;:21;1865:13;12369:21;12361:47;;;;;-1:-1:-1;;;;;12361:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12361:47:6;;;;;;;;;;;;;;;12444:38;;;;;;12476:4;12444:38;;;;;;-1:-1:-1;;;;;12444:23:6;;;;;:38;;;;;;;;;;;;;;:23;:38;;;5:2:-1;;;;30:1;27;20:12;5:2;12444:38:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12444:38:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12444:38:6;-1:-1:-1;;;;;12418:15:6;;;;;;;:8;12444:38;12418:15;;;;:23;;:64;1899:6;:14;;-1:-1:-1;;1899:14:6;;;12271:218::o;5702:106::-;5791:10;;;;5702:106;:::o;7868:300::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;-1:-1:-1;;;;;7990:21:6;;7969:95;;;;;-1:-1:-1;;;;;7969:95:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;8096:11;;-1:-1:-1;;;;;8096:11:6;8082:10;:25;8074:56;;;;;-1:-1:-1;;;;;8074:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8074:56:6;;;;;;;;;;;;;;;8140:11;:21;;-1:-1:-1;;8140:21:6;-1:-1:-1;;;;;8140:21:6;;;;;;;;;;1899:6;:14;;-1:-1:-1;;1899:14:6;;;7868:300::o;6624:142::-;1967:6;;6720:4;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;6747:12:6;;6624:142;:::o;1228:51:2:-;1269:10;1228:51;:::o;6400:218:6:-;1967:6;;6504:4;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;6533:15:6;;;;;;:8;:15;;;;;:21;;;6525:47;;;;;-1:-1:-1;;;;;6525:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;6525:47:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6589:15:6;;;;;:8;:15;;;;;:22;;;;6400:218::o;3075:85:7:-;3146:7;3139:14;;;;;;;;-1:-1:-1;;3139:14:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3114:13;;3139:14;;3146:7;;3139:14;;3146:7;3139:14;;;;;;;;;;;;;;;;;;;;;;;;1519:59:2;1560:18;1519:59;:::o;1626:494:4:-;1830:14;1860:10;1873:35;1878:14;1894:13;1873:4;:35::i;:::-;1860:48;;1918:10;1931:37;1936:15;1953:14;1931:4;:37::i;:::-;1918:50;;1978:10;1991:18;1996:5;2003;1991:4;:18::i;:::-;1978:31;;2019:10;2032:31;730:6:2;2043:19:4;730:6:2;2054:7:4;2043:4;:19::i;2032:31::-;2019:44;;2094:18;2099:5;2106;2094:4;:18::i;:::-;2082:30;1626:494;-1:-1:-1;;;;;;;;;;1626:494:4:o;4408:130:7:-;4467:4;4483:27;4489:10;4501:3;4506;4483:5;:27::i;:::-;-1:-1:-1;4527:4:7;4408:130;;;;:::o;14548:1094:6:-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;14685:10;;1865:13;14685:10;14677:40;;;;;-1:-1:-1;;;;;14677:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;14677:40:6;;;;;;;;;;;;;;;14728:14;14745:13;:11;:13::i;:::-;14728:30;;14768:12;14783:28;14788:12;996:1:2;14783:4:6;:28::i;:::-;14768:43;;14821:20;14844:27;14849:12;14863:7;14844:4;:27::i;:::-;14821:50;;14881:10;14894:32;14899:15;14916:9;14894:4;:32::i;:::-;14881:45;-1:-1:-1;14944:10:6;14936:38;;;;;-1:-1:-1;;;;;14936:38:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;14936:38:6;;;;;;;;;;;;;;;14985:40;15000:10;15012:12;14985:14;:40::i;:::-;15050:8;;15035:33;;15050:8;;;-1:-1:-1;;;;;15050:8:6;15060:7;15035:14;:33::i;:::-;15078:31;15093:15;15078:14;:31::i;:::-;15125:6;15120:515;15141:7;:14;15137:18;;15120:515;;;15176:9;15188:7;15196:1;15188:10;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15188:10:6;15223:11;;;:8;:11;;;;;;:19;;;15188:10;;-1:-1:-1;15223:19:6;15278:16;15283:5;15223:19;15278:4;:16::i;:::-;15256:38;-1:-1:-1;15316:19:6;15308:47;;;;;-1:-1:-1;;;;;15308:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;15308:47:6;;;;;;;;;;;;;;;15395:13;;15409:1;15395:16;;;;;;;;;;;;;15377:14;:34;;15369:60;;;;;-1:-1:-1;;;;;15369:60:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;15369:60:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;15470:11:6;;;;;;:8;:11;;;;;:19;;;15465:41;;15491:14;15465:4;:41::i;:::-;-1:-1:-1;;;;;15443:11:6;;;;;;:8;:11;;;;;;;;;:19;;:63;;;;15525:39;;;;;;;15443:11;;15534:10;;15525:39;;;;;;;;;;15578:46;15594:1;15597:10;15609:14;15578:15;:46::i;:::-;-1:-1:-1;;;15157:3:6;;15120:515;;;-1:-1:-1;;1899:6:6;:14;;-1:-1:-1;;1899:14:6;;;-1:-1:-1;;;;;;14548:1094:6:o;791:42:2:-;832:1;791:42;:::o;743:::-;784:1;743:42;:::o;1286:46::-;1327:5;1286:46;:::o;3126:664:4:-;3359:19;3394:16;3413:35;3418:13;3433:14;3413:4;:35::i;:::-;3394:54;;3458:15;3476:19;730:6:2;3487:7:4;3476:4;:19::i;:::-;3458:37;;3518:31;3523:13;3538:10;3518:4;:31::i;:::-;3505:44;;3559:6;3568:54;3573:14;3589:32;3594:14;3610:10;3589:4;:32::i;3568:54::-;3559:63;;3632:8;3643:20;3648:1;3651:11;3643:4;:20::i;:::-;3632:31;;3673:8;3684:15;730:6:2;3695:3:4;3684:4;:15::i;:::-;3673:26;;3726;3731:15;3748:3;3726:4;:26::i;:::-;3709:43;3126:664;-1:-1:-1;;;;;;;;;;;;3126:664:4:o;899:50:2:-;947:2;730:6;940:9;;1338:59;1379:18;1338:59;:::o;6200:194:6:-;1967:6;;6284:23;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;6331:10;;;;6323:40;;;;;-1:-1:-1;;;;;6323:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;6323:40:6;;;;;;;;;;;;;;;6380:7;6373:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6373:14:6;;;;;;;;;;;;;;;;;;;;;;6200:194;:::o;955:42:2:-;996:1;955:42;:::o;6056:138:6:-;1967:6;;6134:23;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;5938:112;6029:7;:14;5938:112;:::o;11179:1010::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;11294:11;;11280:10;-1:-1:-1;;;;;11294:11:6;;;11280:25;11272:56;;;;;-1:-1:-1;;;;;11272:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11272:56:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;11346:15:6;;;;;;:8;:15;;;;;:21;;;11338:47;;;;;-1:-1:-1;;;;;11338:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11338:47:6;;;;;;;;;;;;;;;11404:10;;;;11403:11;11395:40;;;;;-1:-1:-1;;;;;11395:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11395:40:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;11466:15:6;;11446:17;11466:15;;;:8;:15;;;;;:23;;;;11519:28;11466:23;11446:17;11519:4;:28::i;:::-;11578:12;;-1:-1:-1;;;;;11592:15:6;;;;;;:8;:15;;;;;:22;;;11499:48;;-1:-1:-1;11573:42:6;;:4;:42::i;:::-;11558:12;:57;-1:-1:-1;;;;;11734:15:6;;11721:10;11734:15;;;:8;:15;;;;;:21;;;11777:7;:14;;-1:-1:-1;;11777:18:6;;;:7;:18;;11822:13;;;;;;;;;;;;;;;;11805:7;:14;;-1:-1:-1;;;;;11822:13:6;;;;11813:5;;11805:14;;;;;;;;;;;;;;:30;;;;;-1:-1:-1;;;;;11805:30:6;;;;;-1:-1:-1;;;;;11805:30:6;;;;;;11878:5;11845:8;:24;11854:7;11862:5;11854:14;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11854:14:6;11845:24;;;;;;;;;;;;11854:14;11845:30;:38;11893:7;:13;;;;;;;;;;;;;;;-1:-1:-1;;11893:13:6;;;;;;;-1:-1:-1;;11893:13:6;;;;;;;;;11934:113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11916:15:6;;;;:8;:15;;;;;;;:131;;;;-1:-1:-1;;11916:131:6;;;;;;;;;-1:-1:-1;11916:131:6;;;;;;;;;;;;;;12058:68;11916:15;12081:10;12093:32;12098:12;12112;12093:4;:32::i;12058:68::-;12159:8;;12136:46;;12152:5;;12159:8;;;-1:-1:-1;;;;;12159:8:6;12169:12;12136:15;:46::i;4358:1101::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;-1:-1:-1;;;;;4674:31:6;;4653:107;;;;;-1:-1:-1;;;;;4653:107:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4791:30:6;;4770:106;;;;;-1:-1:-1;;;;;4770:106:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;5000:103;5018:17;5049:15;5078;5000:4;:103::i;:::-;5118:56;;;;;;;;-1:-1:-1;;;;;5118:56:6;;;5127:10;;-1:-1:-1;;;;;;;;;;;5118:56:6;;;;;;;;5211:102;5229:16;5259:15;5288;5211:4;:102::i;:::-;5328:55;;;;;;;;-1:-1:-1;;;;;5328:55:6;;;5337:10;;-1:-1:-1;;;;;;;;;;;5328:55:6;;;;;;;;5393:19;5404:7;5393:10;:19::i;:::-;5442:10;:8;:10::i;:::-;4358:1101;;;;;;;:::o;7258:122::-;1967:6;;7338:4;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;7365:8:6;;7258:122;:::o;3760:248:7:-;3889:10;3827:4;3878:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3878:27:7;;;;;;;;;;3873:38;;3907:3;3873:4;:38::i;:::-;3854:10;3843:22;;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3843:27:7;;;;;;;;;;;;:68;;;3926:54;;;;;;3843:27;;-1:-1:-1;;;;;;;;;;;3926:54:7;;;;;;;;;;-1:-1:-1;3997:4:7;3760:248;;;;:::o;3252:118::-;-1:-1:-1;;;;;3343:15:7;;;3320:4;3343:15;;;:10;:15;;;;;;;;:20;;;;;;;;;;;;;3252:118::o;8844:720:6:-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;9045:11;;-1:-1:-1;;;;;9045:11:6;9031:10;:25;9023:56;;;;;-1:-1:-1;;;;;9023:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9023:56:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;9098:15:6;;;;;;:8;:15;;;;;:21;;;9097:22;9089:47;;;;;-1:-1:-1;;;;;9089:47:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;9155:10;;;;9154:11;9146:40;;;;;-1:-1:-1;;;;;9146:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9146:40:6;;;;;;;;;;;;;;;9205:7;:14;832:1:2;-1:-1:-1;9197:60:6;;;;;-1:-1:-1;;;;;9197:60:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;9286:202;;;;;;;;9314:4;9286:202;;;9339:7;:14;;9286:202;;;;;;;-1:-1:-1;9286:202:6;;;;;;;;;;;;-1:-1:-1;;;;;9268:15:6;;;;;:8;:15;;;;;;:220;;;;-1:-1:-1;;9268:220:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;23:18;;;45:23;;9498:19:6;;;;;;;-1:-1:-1;;9498:19:6;;;;;;9527:30;9268:15;9541:7;9550:6;9527;:30::i;:::-;8844:720;;;:::o;1464:49:2:-;1512:1;730:6;1505:8;;6772:266:6;1967:6;;6874:4;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;6903:15:6;;;;;;:8;:15;;;;;:21;;;6895:47;;;;;-1:-1:-1;;;;;6895:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;6895:47:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;6966:15:6;;6952:11;6966:15;;;:8;:15;;;;;:22;;;7018:12;;7005:26;;6966:22;;7005:4;:26::i;:::-;6998:33;6772:266;-1:-1:-1;;;6772:266:6:o;7044:208::-;1967:6;;7137:4;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;7166:15:6;;;;;;:8;:15;;;;;:21;;;7158:47;;;;;-1:-1:-1;;;;;7158:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7158:47:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;;7222:15:6;;;;;:8;:15;;;;;:23;;;;7044:208::o;4796:653:4:-;5030:18;5064:16;5083:35;5088:14;5104:13;5083:4;:35::i;:::-;5064:54;;5128:9;5140:37;5145:15;5162:14;5140:4;:37::i;:::-;5128:49;;5187:6;5196:27;5201:15;5218:4;5196;:27::i;:::-;5187:36;;5233:8;5244:20;5249:1;5252:11;5244:4;:20::i;:::-;5233:31;;5280:15;5285:3;730:6:2;5280:4:4;:15::i;:::-;5274:21;;5321:19;730:6:2;5332:7:4;5321:4;:19::i;:::-;5305:35;;5366:46;5371:25;5376:14;5392:3;5371:4;:25::i;:::-;5398:13;5366:4;:46::i;:::-;5350:62;4796:653;-1:-1:-1;;;;;;;;;;;4796:653:4:o;5588:108:6:-;5678:11;;-1:-1:-1;;;5678:11:6;;;;;5588:108::o;1549:301:5:-;1618:4;1648:5;;;1671:6;;;:21;;;1691:1;1686;1681:2;:6;;;;;;:11;1671:21;1663:50;;;;;-1:-1:-1;;;;;1663:50:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1739:8;1733:15;;1766:8;;;;1758:37;;;;;-1:-1:-1;;;;;1758:37:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1805:7;730:6:2;1815:2:5;:9;;;1549:301;-1:-1:-1;;;;;;1549:301:5:o;1128:195::-;1197:4;1218:6;1226:9;1239:14;1248:1;1251;1239:8;:14::i;:::-;1217:36;;;;1272:4;1271:5;1263:35;;;;;-1:-1:-1;;;;;1263:35:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1315:1:5;1128:195;-1:-1:-1;;;1128:195:5:o;25505:108:6:-;25587:19;25593:4;25599:6;25587:5;:19::i;:::-;25505:108;;:::o;25823:88::-;25891:13;25897:6;25891:5;:13::i;:::-;25823:88;:::o;25619:104::-;25699:17;25705:2;25709:6;25699:5;:17::i;25308:191::-;25416:34;;;;;;-1:-1:-1;;;;;25416:34:6;;;;;;;;;;;;;;;25404:9;;25416:22;;;;;:34;;;;;;;;;;;;;;25404:9;25416:22;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;25416:34:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25416:34:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25416:34:6;;-1:-1:-1;25416:34:6;25460:32;;;;;-1:-1:-1;;;;;25460:32:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;25308:191;;;;:::o;2340:268:7:-;-1:-1:-1;;;;;2418:13:7;;:8;:13;;;;;;;;;;;:20;-1:-1:-1;2418:20:7;2410:53;;;;;-1:-1:-1;;;;;2410:53:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2494:13:7;;:8;:13;;;;;;;;;;;2489:24;;2509:3;2489:4;:24::i;:::-;-1:-1:-1;;;;;2473:13:7;;;:8;:13;;;;;;;;;;;:40;;;;2544:13;;;;;;;2539:24;;2559:3;2539:4;:24::i;:::-;-1:-1:-1;;;;;2523:13:7;;;:8;:13;;;;;;;;;;;;:40;;;;2578:23;;;;;;;2523:13;;2578:23;;;;;;;;;;;;;2340:268;;;:::o;949:173:5:-;1018:4;1047:5;;;1070:6;;;;1062:35;;;;;-1:-1:-1;;;;;1062:35:5;;;;;;;;;;;;;;;;;;;;;;;;;;;25088:214:6;25198:55;;;;;;-1:-1:-1;;;;;25198:55:6;;;;;;;25239:4;25198:55;;;;;;;;;;;;25186:9;;25198:26;;;;;:55;;;;;;;;;;;;;;25186:9;25198:26;:55;;;5:2:-1;;;;30:1;27;20:12;25729:88:6;25797:13;25803:6;25797:5;:13::i;1856:376:5:-;1925:4;1953:6;1945:31;;;;;-1:-1:-1;;;;;1945:31:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;730:6:2;1996:8:5;;2022:6;;;:24;;;730:6:2;2037:1:5;2032:2;:6;;;;;;:14;2022:24;2014:53;;;;;-1:-1:-1;;;;;2014:53:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;2114:1;2110:5;;2104:12;;2134:8;;;;2126:37;;;;;-1:-1:-1;;;;;2126:37:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;2190:7;2205:1;2200:2;:6;;;;3935:417:6;4141:11;:24;;4175:8;:18;;-1:-1:-1;;;;;4175:18:6;;;;;-1:-1:-1;;4175:18:6;;;;;;4203:8;:18;;;;4231:24;;;-1:-1:-1;;;4231:24:6;-1:-1:-1;;4141:24:6;;;;-1:-1:-1;;4141:24:6;;;;;;;4231;;;;;;;;;;;4265:10;:22;;;;;-1:-1:-1;;4265:22:6;;;;;;4299:11;:18;;;;;-1:-1:-1;4299:18:6;;;;;4231:24;4334:11;;3935:417::o;2733:533:5:-;2807:4;1327:5:2;2835:4:5;:21;;2827:55;;;;;-1:-1:-1;;;;;2827:55:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1379:18:2;2900:21:5;;;2892:56;;;;;-1:-1:-1;;;;;2892:56:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;2959:10;2972:11;2979:3;2972:6;:11::i;:::-;2959:24;;2993:11;3007:16;3012:3;3017:5;3007:4;:16::i;:::-;2993:30;;3034:13;3050:24;3056:4;3062:11;3067:5;3062:4;:11::i;:::-;3050:5;:24::i;:::-;3034:40;-1:-1:-1;3089:11:5;3085:57;;3123:8;-1:-1:-1;3116:15:5;;-1:-1:-1;;3116:15:5;3085:57;3152:18;3173:40;3184:4;3190:6;1444:13:2;3173:10:5;:40::i;:::-;3152:61;;3230:29;3235:8;3245:13;3230:4;:29::i;:::-;3223:36;2733:533;-1:-1:-1;;;;;;;2733:533:5:o;1329:214::-;1402:4;1408;1437:1;1432;:6;1428:109;;-1:-1:-1;;1462:5:5;;;1469;1454:21;;1428:109;-1:-1:-1;;1514:5:5;;;1521:4;1428:109;1329:214;;;;;:::o;2712:96:7:-;2770:31;2776:4;2790;2797:3;2770:5;:31::i;2012:322::-;2094:4;2077:8;:23;;;;;;;;;;;:30;-1:-1:-1;2077:30:7;2056:98;;;;;-1:-1:-1;;;;;2056:98:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;2212:4;2195:8;:23;;;;;;;;;;;2190:34;;2220:3;2190:4;:34::i;:::-;2181:4;2164:8;:23;;;;;;;;;;:60;2254:12;;2249:23;;2268:3;2249:4;:23::i;:::-;2234:12;:38;2287:40;;;;;;;;2319:1;;2304:4;;2287:40;;;;;;;;;2012:322;:::o;2614:92::-;2670:29;2684:4;2691:2;2695:3;2670:5;:29::i;1792:214::-;1884:4;1867:8;:23;;;;;;;;;;;1862:34;;1892:3;1862:4;:34::i;:::-;1853:4;1836:8;:23;;;;;;;;;;:60;1926:12;;1921:23;;1940:3;1921:4;:23::i;:::-;1906:12;:38;1959:40;;;;;;;;1988:4;;1976:1;;1959:40;;;;;;;;;1792:214;:::o;832:111:5:-;895:4;730:6:2;922:7:5;927:1;922:4;:7::i;:::-;:14;;832:111;-1:-1:-1;;832:111:5:o;722:104::-;730:6:2;811:8:5;;;722:104::o;2257:320::-;2327:4;2356:1;2327:4;2380:1;2376;:5;:21;;730:6:2;2376:21:5;;;2389:1;2376:21;2367:30;-1:-1:-1;2418:1:5;2413:6;;;;2408:145;2421:6;;2408:145;;2455:10;2460:1;2463;2455:4;:10::i;:::-;2451:14;-1:-1:-1;2488:1:5;2484;:5;:10;2480:63;;2518:10;2523:1;2526;2518:4;:10::i;:::-;2514:14;;2480:63;2434:1;2429:6;;;;2408:145;;;2569:1;2257:320;-1:-1:-1;;;;2257:320:5:o;3272:1040::-;3368:4;3416:3;3368:4;;3451:20;3460:4;730:6:2;3451:8:5;:20::i;:::-;3429:42;;-1:-1:-1;3429:42:5;-1:-1:-1;730:6:2;;3481:9:5;3804:1;3790:495;3815:9;3807:4;:17;3790:495;;3845:9;730:6:2;3857:1:5;:8;3845:20;;3880:6;3888:9;3901:29;3910:1;3913:16;3918:4;730:6:2;3913:4:5;:16::i;:::-;3901:8;:29::i;:::-;3879:51;;;;3951:22;3956:4;3962:10;3967:1;3970;3962:4;:10::i;3951:22::-;3944:29;;3994:16;3999:4;4005;3994;:16::i;:::-;3987:23;-1:-1:-1;4028:9:5;4024:20;;4039:5;;;;;4024:20;4063:4;4059:30;;;4080:9;;;4059:30;4107:4;4103:30;;;4124:9;;;4103:30;4151:8;4147:128;;;4185:15;4190:3;4195:4;4185;:15::i;:::-;4179:21;;4147:128;;;4245:15;4250:3;4255:4;4245;:15::i;:::-;4239:21;;4147:128;-1:-1:-1;;;3826:3:5;;3790:495;;;-1:-1:-1;4302:3:5;;3272:1040;-1:-1:-1;;;;;;;;;3272:1040:5:o", + "source": "pragma solidity ^0.5.7;\n// Copyright BigchainDB GmbH and Ocean Protocol contributors\n// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)\n// Code is Apache-2.0 and docs are CC-BY-4.0\n\nimport './BToken.sol';\nimport './BMath.sol';\n\n/**\n* @title BPool\n* \n* @dev Used by the (Ocean version) BFactory contract as a bytecode reference to\n* deploy new BPools.\n*\n* This contract is is nearly identical to the BPool.sol contract at [1]\n* The only difference is the \"Proxy contract functionality\" section \n* given below. We'd inherit from BPool if we could, for simplicity.\n* But we can't, because the proxy section needs to access private\n* variables declared in BPool, and Solidity disallows this. Therefore\n* the best we can do for now is clearly demarcate the proxy section. \n*\n* [1] https://github.com/balancer-labs/balancer-core/contracts/.\n*/\ncontract BPool is BToken, BMath {\n\n struct Record {\n bool bound; // is token bound to pool\n uint index; // private\n uint denorm; // denormalized weight\n uint balance;\n }\n\n event LOG_SWAP(\n address indexed caller,\n address indexed tokenIn,\n address indexed tokenOut,\n uint256 tokenAmountIn,\n uint256 tokenAmountOut\n );\n\n event LOG_JOIN(\n address indexed caller,\n address indexed tokenIn,\n uint256 tokenAmountIn\n );\n\n event LOG_EXIT(\n address indexed caller,\n address indexed tokenOut,\n uint256 tokenAmountOut\n );\n\n event LOG_CALL(\n bytes4 indexed sig,\n address indexed caller,\n bytes data\n ) anonymous;\n\n modifier _logs_() {\n emit LOG_CALL(msg.sig, msg.sender, msg.data);\n _;\n }\n\n modifier _lock_() {\n require(\n !_mutex, \n 'ERR_REENTRY'\n );\n _mutex = true;\n _;\n _mutex = false;\n }\n\n modifier _viewlock_() {\n require(!_mutex, 'ERR_REENTRY');\n _;\n }\n \n bool private _mutex;\n\n address private _factory; // BFactory address to push token exitFee to\n address private _controller; // has CONTROL role\n bool private _publicSwap; // true if PUBLIC can call SWAP functions\n\n // `setSwapFee` and `finalize` require CONTROL\n // `finalize` sets `PUBLIC can SWAP`, `PUBLIC can JOIN`\n uint private _swapFee;\n bool private _finalized;\n\n address[] private _tokens;\n mapping(address=>Record) private _records;\n uint private _totalWeight;\n\n //-----------------------------------------------------------------------\n //Proxy contract functionality: begin\n bool private initialized = false; \n modifier onlyNotInitialized() {\n require(\n !initialized, \n 'ERR_ALREADY_INITIALIZED'\n );\n _;\n }\n function isInitialized() external view returns(bool) {\n return initialized;\n }\n \n // Called prior to contract deployment\n constructor() public {\n _initialize(msg.sender, msg.sender, MIN_FEE, false, false);\n }\n \n // Called prior to contract initialization (e.g creating new BPool instance)\n // Calls private _initialize function. Only if contract is not initialized.\n function initialize(\n address controller, \n address factory, \n uint swapFee,\n bool publicSwap,\n bool finalized\n )\n external\n onlyNotInitialized\n returns(bool)\n {\n require(\n controller != address(0),\n 'ERR_INVALID_CONTROLLER_ADDRESS'\n );\n require(\n factory != address(0),\n 'ERR_INVALID_FACTORY_ADDRESS'\n );\n require(swapFee >= MIN_FEE, 'ERR_MIN_FEE');\n require(swapFee <= MAX_FEE, 'ERR_MAX_FEE');\n return _initialize(controller, factory, swapFee, publicSwap, finalized);\n }\n\t\n // Private function called on contract initialization.\n function _initialize(\n address controller, \n address factory, \n uint swapFee,\n bool publicSwap, \n bool finalized\n )\n private\n returns(bool)\n {\n _controller = controller;\n _factory = factory;\n _swapFee = swapFee;\n _publicSwap = publicSwap;\n _finalized = finalized;\n\t\n initialized = true;\n return initialized;\n }\n\n function setup(\n address dataTokenAaddress, \n uint256 dataTokenAmount,\n uint256 dataTokenWeight,\n address baseTokenAddress, \n uint256 baseTokenAmount,\n uint256 baseTokenWeight,\n uint256 swapFee\n )\n external\n _logs_\n {\n require(\n dataTokenAaddress != address(0),\n 'ERR_INVALID_DATATOKEN_ADDRESS'\n );\n require(\n baseTokenAddress != address(0),\n 'ERR_INVALID_BASETOKEN_ADDRESS'\n );\n // other inputs will be validated prior\n // calling the below functions\n // bind data token\n bind(\n dataTokenAaddress,\n dataTokenAmount,\n dataTokenWeight\n );\n emit LOG_JOIN(msg.sender, dataTokenAaddress, dataTokenAmount);\n // bind base token\n bind(\n baseTokenAddress,\n baseTokenAmount,\n baseTokenWeight\n );\n emit LOG_JOIN(msg.sender, baseTokenAddress, baseTokenAmount);\n setSwapFee(swapFee);\n // finalize\n finalize();\n }\n \n //Proxy contract functionality: end\n //-----------------------------------------------------------------------\n\n function isPublicSwap()\n external view\n returns (bool)\n {\n return _publicSwap;\n }\n\n function isFinalized()\n external view\n returns (bool)\n {\n return _finalized;\n }\n\n function isBound(address t)\n external view\n returns (bool)\n {\n return _records[t].bound;\n }\n\n function getNumTokens()\n external view\n returns (uint) \n {\n return _tokens.length;\n }\n\n function getCurrentTokens()\n external view _viewlock_\n returns (address[] memory tokens)\n {\n return _tokens;\n }\n\n function getFinalTokens()\n external view\n _viewlock_\n returns (address[] memory tokens)\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n return _tokens;\n }\n\n function getDenormalizedWeight(address token)\n external view\n _viewlock_\n returns (uint)\n {\n\n require(_records[token].bound, 'ERR_NOT_BOUND');\n return _records[token].denorm;\n }\n\n function getTotalDenormalizedWeight()\n external view\n _viewlock_\n returns (uint)\n {\n return _totalWeight;\n }\n\n function getNormalizedWeight(address token)\n external view\n _viewlock_\n returns (uint)\n {\n\n require(_records[token].bound, 'ERR_NOT_BOUND');\n uint denorm = _records[token].denorm;\n return bdiv(denorm, _totalWeight);\n }\n\n function getBalance(address token)\n external view\n _viewlock_\n returns (uint)\n {\n\n require(_records[token].bound, 'ERR_NOT_BOUND');\n return _records[token].balance;\n }\n\n function getSwapFee()\n external view\n _viewlock_\n returns (uint)\n {\n return _swapFee;\n }\n\n function getController()\n external view\n _viewlock_\n returns (address)\n {\n return _controller;\n }\n\n function setSwapFee(uint swapFee)\n public\n _logs_\n _lock_\n { \n require(!_finalized, 'ERR_IS_FINALIZED');\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n require(swapFee >= MIN_FEE, 'ERR_MIN_FEE');\n require(swapFee <= MAX_FEE, 'ERR_MAX_FEE');\n _swapFee = swapFee;\n }\n\n function setController(address manager)\n external\n _logs_\n _lock_\n {\n require(\n manager != address(0),\n 'ERR_INVALID_MANAGER_ADDRESS'\n );\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n _controller = manager;\n }\n\t\n function setPublicSwap(bool public_)\n public\n _logs_\n _lock_\n {\n require(!_finalized, 'ERR_IS_FINALIZED');\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n _publicSwap = public_;\n }\n\n function finalize()\n public\n _logs_\n _lock_\n {\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n require(!_finalized, 'ERR_IS_FINALIZED');\n require(_tokens.length >= MIN_BOUND_TOKENS, 'ERR_MIN_TOKENS');\n\n _finalized = true;\n _publicSwap = true;\n\n _mintPoolShare(INIT_POOL_SUPPLY);\n _pushPoolShare(msg.sender, INIT_POOL_SUPPLY);\n }\n\n\n function bind(address token, uint balance, uint denorm)\n public\n _logs_\n // _lock_ Bind does not lock because it jumps to `rebind`, which does\n {\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n require(!_records[token].bound, 'ERR_IS_BOUND');\n require(!_finalized, 'ERR_IS_FINALIZED');\n\n require(_tokens.length < MAX_BOUND_TOKENS, 'ERR_MAX_TOKENS');\n\n _records[token] = Record({\n bound: true,\n index: _tokens.length,\n denorm: 0,\n // balance and denorm will be validated\n balance: 0 // and set by `rebind`\n });\n _tokens.push(token);\n rebind(token, balance, denorm);\n }\n\n function rebind(address token, uint balance, uint denorm)\n public\n _logs_\n _lock_\n {\n\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n require(_records[token].bound, 'ERR_NOT_BOUND');\n require(!_finalized, 'ERR_IS_FINALIZED');\n\n require(denorm >= MIN_WEIGHT, 'ERR_MIN_WEIGHT');\n require(denorm <= MAX_WEIGHT, 'ERR_MAX_WEIGHT');\n require(balance >= MIN_BALANCE, 'ERR_MIN_BALANCE');\n\n // Adjust the denorm and totalWeight\n uint oldWeight = _records[token].denorm;\n if (denorm > oldWeight) {\n _totalWeight = badd(_totalWeight, bsub(denorm, oldWeight));\n require(_totalWeight <= MAX_TOTAL_WEIGHT, 'ERR_MAX_TOTAL_WEIGHT');\n } else if (denorm < oldWeight) {\n _totalWeight = bsub(_totalWeight, bsub(oldWeight, denorm));\n } \n _records[token].denorm = denorm;\n\n // Adjust the balance record and actual token balance\n uint oldBalance = _records[token].balance;\n _records[token].balance = balance;\n if (balance > oldBalance) {\n _pullUnderlying(token, msg.sender, bsub(balance, oldBalance));\n } else if (balance < oldBalance) {\n // In this case liquidity is being withdrawn, so charge EXIT_FEE\n uint tokenBalanceWithdrawn = bsub(oldBalance, balance);\n uint tokenExitFee = bmul(tokenBalanceWithdrawn, EXIT_FEE);\n _pushUnderlying(token, msg.sender, bsub(tokenBalanceWithdrawn, tokenExitFee));\n _pushUnderlying(token, _factory, tokenExitFee);\n }\n }\n\n function unbind(address token)\n external\n _logs_\n _lock_\n {\n\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n require(_records[token].bound, 'ERR_NOT_BOUND');\n require(!_finalized, 'ERR_IS_FINALIZED');\n\n uint tokenBalance = _records[token].balance;\n uint tokenExitFee = bmul(tokenBalance, EXIT_FEE);\n\n _totalWeight = bsub(_totalWeight, _records[token].denorm);\n\n // Swap the token-to-unbind with the last token,\n // then delete the last token\n uint index = _records[token].index;\n uint last = _tokens.length - 1;\n _tokens[index] = _tokens[last];\n _records[_tokens[index]].index = index;\n _tokens.pop();\n _records[token] = Record({\n bound: false,\n index: 0,\n denorm: 0,\n balance: 0\n });\n\n _pushUnderlying(token, msg.sender, bsub(tokenBalance, tokenExitFee));\n _pushUnderlying(token, _factory, tokenExitFee);\n }\n\n // Absorb any tokens that have been sent to this contract into the pool\n function gulp(address token)\n external\n _logs_\n _lock_\n {\n require(_records[token].bound, 'ERR_NOT_BOUND');\n _records[token].balance = IERC20(token).balanceOf(address(this));\n }\n\n function getSpotPrice(address tokenIn, address tokenOut)\n external view\n _viewlock_\n returns (uint spotPrice)\n {\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n Record storage inRecord = _records[tokenIn];\n Record storage outRecord = _records[tokenOut];\n return calcSpotPrice(\n inRecord.balance, \n inRecord.denorm, \n outRecord.balance, \n outRecord.denorm, \n _swapFee\n );\n }\n\n function getSpotPriceSansFee(address tokenIn, address tokenOut)\n external view\n _viewlock_\n returns (uint spotPrice)\n {\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n Record storage inRecord = _records[tokenIn];\n Record storage outRecord = _records[tokenOut];\n return calcSpotPrice(\n inRecord.balance, \n inRecord.denorm, \n outRecord.balance, \n outRecord.denorm, \n 0\n );\n }\n\n function joinPool(uint poolAmountOut, uint[] calldata maxAmountsIn)\n external\n _logs_\n _lock_\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n\n uint poolTotal = totalSupply();\n uint ratio = bdiv(poolAmountOut, poolTotal);\n require(ratio != 0, 'ERR_MATH_APPROX');\n\n for (uint i = 0; i < _tokens.length; i++) {\n address t = _tokens[i];\n uint bal = _records[t].balance;\n uint tokenAmountIn = bmul(ratio, bal);\n require(tokenAmountIn != 0, 'ERR_MATH_APPROX');\n require(tokenAmountIn <= maxAmountsIn[i], 'ERR_LIMIT_IN');\n _records[t].balance = badd(_records[t].balance, tokenAmountIn);\n emit LOG_JOIN(msg.sender, t, tokenAmountIn);\n _pullUnderlying(t, msg.sender, tokenAmountIn);\n }\n _mintPoolShare(poolAmountOut);\n _pushPoolShare(msg.sender, poolAmountOut);\n }\n\n function exitPool(uint poolAmountIn, uint[] calldata minAmountsOut)\n external\n _logs_\n _lock_\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n\n uint poolTotal = totalSupply();\n uint exitFee = bmul(poolAmountIn, EXIT_FEE);\n uint pAiAfterExitFee = bsub(poolAmountIn, exitFee);\n uint ratio = bdiv(pAiAfterExitFee, poolTotal);\n require(ratio != 0, 'ERR_MATH_APPROX');\n\n _pullPoolShare(msg.sender, poolAmountIn);\n _pushPoolShare(_factory, exitFee);\n _burnPoolShare(pAiAfterExitFee);\n\n for (uint i = 0; i < _tokens.length; i++) {\n address t = _tokens[i];\n uint bal = _records[t].balance;\n uint tokenAmountOut = bmul(ratio, bal);\n require(tokenAmountOut != 0, 'ERR_MATH_APPROX');\n require(tokenAmountOut >= minAmountsOut[i], 'ERR_LIMIT_OUT');\n _records[t].balance = bsub(_records[t].balance, tokenAmountOut);\n emit LOG_EXIT(msg.sender, t, tokenAmountOut);\n _pushUnderlying(t, msg.sender, tokenAmountOut);\n }\n\n }\n\n\n function swapExactAmountIn(\n address tokenIn,\n uint tokenAmountIn,\n address tokenOut,\n uint minAmountOut,\n uint maxPrice\n )\n external\n _logs_\n _lock_\n returns (uint tokenAmountOut, uint spotPriceAfter)\n {\n\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n require(_publicSwap, 'ERR_SWAP_NOT_PUBLIC');\n\n Record storage inRecord = _records[address(tokenIn)];\n Record storage outRecord = _records[address(tokenOut)];\n\n require(\n tokenAmountIn <= bmul(inRecord.balance, MAX_IN_RATIO), \n 'ERR_MAX_IN_RATIO'\n );\n\n uint spotPriceBefore = calcSpotPrice(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n _swapFee\n );\n require(spotPriceBefore <= maxPrice, 'ERR_BAD_LIMIT_PRICE');\n\n tokenAmountOut = calcOutGivenIn(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n tokenAmountIn,\n _swapFee\n );\n require(tokenAmountOut >= minAmountOut, 'ERR_LIMIT_OUT');\n\n inRecord.balance = badd(inRecord.balance, tokenAmountIn);\n outRecord.balance = bsub(outRecord.balance, tokenAmountOut);\n\n spotPriceAfter = calcSpotPrice(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n _swapFee\n );\n require(spotPriceAfter >= spotPriceBefore, 'ERR_MATH_APPROX'); \n require(spotPriceAfter <= maxPrice, 'ERR_LIMIT_PRICE');\n require(\n spotPriceBefore <= bdiv(tokenAmountIn, tokenAmountOut), \n 'ERR_MATH_APPROX'\n );\n\n emit LOG_SWAP(\n msg.sender, \n tokenIn, \n tokenOut, \n tokenAmountIn, \n tokenAmountOut\n );\n\n _pullUnderlying(tokenIn, msg.sender, tokenAmountIn);\n _pushUnderlying(tokenOut, msg.sender, tokenAmountOut);\n\n return (tokenAmountOut, spotPriceAfter);\n }\n\n function swapExactAmountOut(\n address tokenIn,\n uint maxAmountIn,\n address tokenOut,\n uint tokenAmountOut,\n uint maxPrice\n )\n external\n _logs_\n _lock_ \n returns (uint tokenAmountIn, uint spotPriceAfter)\n {\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n require(_publicSwap, 'ERR_SWAP_NOT_PUBLIC');\n\n Record storage inRecord = _records[address(tokenIn)];\n Record storage outRecord = _records[address(tokenOut)];\n\n require(\n tokenAmountOut <= bmul(outRecord.balance, MAX_OUT_RATIO), \n 'ERR_MAX_OUT_RATIO'\n );\n\n uint spotPriceBefore = calcSpotPrice(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n _swapFee\n );\n \n require(spotPriceBefore <= maxPrice, 'ERR_BAD_LIMIT_PRICE');\n\n tokenAmountIn = calcInGivenOut(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n tokenAmountOut,\n _swapFee\n );\n require(tokenAmountIn <= maxAmountIn, 'ERR_LIMIT_IN');\n\n inRecord.balance = badd(inRecord.balance, tokenAmountIn);\n outRecord.balance = bsub(outRecord.balance, tokenAmountOut);\n\n spotPriceAfter = calcSpotPrice(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n _swapFee\n );\n require(spotPriceAfter >= spotPriceBefore, 'ERR_MATH_APPROX');\n require(spotPriceAfter <= maxPrice, 'ERR_LIMIT_PRICE');\n require(\n spotPriceBefore <= bdiv(tokenAmountIn, tokenAmountOut), \n 'ERR_MATH_APPROX'\n );\n\n emit LOG_SWAP(\n msg.sender, \n tokenIn, \n tokenOut, \n tokenAmountIn, \n tokenAmountOut\n );\n\n _pullUnderlying(tokenIn, msg.sender, tokenAmountIn);\n _pushUnderlying(tokenOut, msg.sender, tokenAmountOut);\n\n return (tokenAmountIn, spotPriceAfter);\n }\n\n\n function joinswapExternAmountIn(\n address tokenIn, \n uint tokenAmountIn, \n uint minPoolAmountOut\n )\n external\n _logs_\n _lock_\n returns (uint poolAmountOut)\n\n { \n require(_finalized, 'ERR_NOT_FINALIZED');\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n require(\n tokenAmountIn <= bmul(_records[tokenIn].balance, MAX_IN_RATIO), \n 'ERR_MAX_IN_RATIO'\n );\n\n Record storage inRecord = _records[tokenIn];\n\n poolAmountOut = calcPoolOutGivenSingleIn(\n inRecord.balance,\n inRecord.denorm,\n _totalSupply,\n _totalWeight,\n tokenAmountIn,\n _swapFee\n );\n\n require(poolAmountOut >= minPoolAmountOut, 'ERR_LIMIT_OUT');\n\n inRecord.balance = badd(inRecord.balance, tokenAmountIn);\n\n emit LOG_JOIN(msg.sender, tokenIn, tokenAmountIn);\n\n _mintPoolShare(poolAmountOut);\n _pushPoolShare(msg.sender, poolAmountOut);\n _pullUnderlying(tokenIn, msg.sender, tokenAmountIn);\n\n return poolAmountOut;\n }\n\n function joinswapPoolAmountOut(\n address tokenIn, \n uint poolAmountOut, \n uint maxAmountIn\n )\n external\n _logs_\n _lock_\n returns (uint tokenAmountIn)\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n\n Record storage inRecord = _records[tokenIn];\n\n tokenAmountIn = calcSingleInGivenPoolOut(\n inRecord.balance,\n inRecord.denorm,\n _totalSupply,\n _totalWeight,\n poolAmountOut,\n _swapFee\n );\n\n require(tokenAmountIn != 0, 'ERR_MATH_APPROX');\n require(tokenAmountIn <= maxAmountIn, 'ERR_LIMIT_IN');\n \n require(\n tokenAmountIn <= bmul(_records[tokenIn].balance, MAX_IN_RATIO), \n 'ERR_MAX_IN_RATIO'\n );\n\n inRecord.balance = badd(inRecord.balance, tokenAmountIn);\n\n emit LOG_JOIN(msg.sender, tokenIn, tokenAmountIn);\n\n _mintPoolShare(poolAmountOut);\n _pushPoolShare(msg.sender, poolAmountOut);\n _pullUnderlying(tokenIn, msg.sender, tokenAmountIn);\n\n return tokenAmountIn;\n }\n\n function exitswapPoolAmountIn(\n address tokenOut, \n uint poolAmountIn, \n uint minAmountOut\n )\n external\n _logs_\n _lock_\n returns (uint tokenAmountOut)\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n\n Record storage outRecord = _records[tokenOut];\n\n tokenAmountOut = calcSingleOutGivenPoolIn(\n outRecord.balance,\n outRecord.denorm,\n _totalSupply,\n _totalWeight,\n poolAmountIn,\n _swapFee\n );\n\n require(tokenAmountOut >= minAmountOut, 'ERR_LIMIT_OUT');\n \n require(\n tokenAmountOut <= bmul(_records[tokenOut].balance, MAX_OUT_RATIO), \n 'ERR_MAX_OUT_RATIO'\n );\n\n outRecord.balance = bsub(outRecord.balance, tokenAmountOut);\n\n uint exitFee = bmul(poolAmountIn, EXIT_FEE);\n\n emit LOG_EXIT(msg.sender, tokenOut, tokenAmountOut);\n\n _pullPoolShare(msg.sender, poolAmountIn);\n _burnPoolShare(bsub(poolAmountIn, exitFee));\n _pushPoolShare(_factory, exitFee);\n _pushUnderlying(tokenOut, msg.sender, tokenAmountOut);\n\n return tokenAmountOut;\n }\n\n function exitswapExternAmountOut(\n address tokenOut, \n uint tokenAmountOut, \n uint maxPoolAmountIn\n )\n external\n _logs_\n _lock_\n returns (uint poolAmountIn)\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n require(\n tokenAmountOut <= bmul(_records[tokenOut].balance, MAX_OUT_RATIO), \n 'ERR_MAX_OUT_RATIO'\n );\n\n Record storage outRecord = _records[tokenOut];\n\n poolAmountIn = calcPoolInGivenSingleOut(\n outRecord.balance,\n outRecord.denorm,\n _totalSupply,\n _totalWeight,\n tokenAmountOut,\n _swapFee\n );\n\n require(poolAmountIn != 0, 'ERR_MATH_APPROX');\n require(poolAmountIn <= maxPoolAmountIn, 'ERR_LIMIT_IN');\n\n outRecord.balance = bsub(outRecord.balance, tokenAmountOut);\n\n uint exitFee = bmul(poolAmountIn, EXIT_FEE);\n\n emit LOG_EXIT(msg.sender, tokenOut, tokenAmountOut);\n\n _pullPoolShare(msg.sender, poolAmountIn);\n _burnPoolShare(bsub(poolAmountIn, exitFee));\n _pushPoolShare(_factory, exitFee);\n _pushUnderlying(tokenOut, msg.sender, tokenAmountOut); \n\n return poolAmountIn;\n }\n\n\n // ==\n // 'Underlying' token-manipulation functions make external calls but are NOT locked\n // You must `_lock_` or otherwise ensure reentry-safety\n\n function _pullUnderlying(address erc20, address from, uint amount)\n internal\n {\n bool xfer = IERC20(erc20).transferFrom(from, address(this), amount);\n require(xfer, 'ERR_ERC20_FALSE');\n }\n\n function _pushUnderlying(address erc20, address to, uint amount)\n internal\n {\n bool xfer = IERC20(erc20).transfer(to, amount);\n require(xfer, 'ERR_ERC20_FALSE');\n }\n\n function _pullPoolShare(address from, uint amount)\n internal\n {\n _pull(from, amount);\n }\n\n function _pushPoolShare(address to, uint amount)\n internal\n {\n _push(to, amount);\n }\n\n function _mintPoolShare(uint amount)\n internal\n {\n _mint(amount);\n }\n\n function _burnPoolShare(uint amount)\n internal\n {\n _burn(amount);\n }\n\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BPool.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BPool.sol", + "exportedSymbols": { + "BPool": [ + 3778 + ] + }, + "id": 3779, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1424, + "literals": [ + "solidity", + "^", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol", + "file": "./BToken.sol", + "id": 1425, + "nodeType": "ImportDirective", + "scope": 3779, + "sourceUnit": 4286, + "src": "186:22:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BMath.sol", + "file": "./BMath.sol", + "id": 1426, + "nodeType": "ImportDirective", + "scope": 3779, + "sourceUnit": 946, + "src": "209:21:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1427, + "name": "BToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4285, + "src": "872:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BToken_$4285", + "typeString": "contract BToken" + } + }, + "id": 1428, + "nodeType": "InheritanceSpecifier", + "src": "872:6:6" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1429, + "name": "BMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 945, + "src": "880:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BMath_$945", + "typeString": "contract BMath" + } + }, + "id": 1430, + "nodeType": "InheritanceSpecifier", + "src": "880:5:6" + } + ], + "contractDependencies": [ + 280, + 945, + 1422, + 3979, + 4285, + 7106 + ], + "contractKind": "contract", + "documentation": "@title BPool\n \n@dev Used by the (Ocean version) BFactory contract as a bytecode reference to\n deploy new BPools.\n* This contract is is nearly identical to the BPool.sol contract at [1]\n The only difference is the \"Proxy contract functionality\" section \n given below. We'd inherit from BPool if we could, for simplicity.\n But we can't, because the proxy section needs to access private\n variables declared in BPool, and Solidity disallows this. Therefore\n the best we can do for now is clearly demarcate the proxy section. \n* [1] https://github.com/balancer-labs/balancer-core/contracts/.", + "fullyImplemented": true, + "id": 3778, + "linearizedBaseContracts": [ + 3778, + 945, + 4285, + 7106, + 3979, + 1422, + 280 + ], + "name": "BPool", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "BPool.Record", + "id": 1439, + "members": [ + { + "constant": false, + "id": 1432, + "name": "bound", + "nodeType": "VariableDeclaration", + "scope": 1439, + "src": "917:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1431, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "917:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1434, + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 1439, + "src": "965:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1433, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "965:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1436, + "name": "denorm", + "nodeType": "VariableDeclaration", + "scope": 1439, + "src": "998:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1435, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "998:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1438, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 1439, + "src": "1043:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1437, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1043:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Record", + "nodeType": "StructDefinition", + "scope": 3778, + "src": "893:169:6", + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1451, + "name": "LOG_SWAP", + "nodeType": "EventDefinition", + "parameters": { + "id": 1450, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1441, + "indexed": true, + "name": "caller", + "nodeType": "VariableDeclaration", + "scope": 1451, + "src": "1092:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1440, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1092:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1443, + "indexed": true, + "name": "tokenIn", + "nodeType": "VariableDeclaration", + "scope": 1451, + "src": "1124:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1442, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1124:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1445, + "indexed": true, + "name": "tokenOut", + "nodeType": "VariableDeclaration", + "scope": 1451, + "src": "1157:24:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1444, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1157:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1447, + "indexed": false, + "name": "tokenAmountIn", + "nodeType": "VariableDeclaration", + "scope": 1451, + "src": "1191:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1446, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1191:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1449, + "indexed": false, + "name": "tokenAmountOut", + "nodeType": "VariableDeclaration", + "scope": 1451, + "src": "1230:30:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1448, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1230:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1082:184:6" + }, + "src": "1068:199:6" + }, + { + "anonymous": false, + "documentation": null, + "id": 1459, + "name": "LOG_JOIN", + "nodeType": "EventDefinition", + "parameters": { + "id": 1458, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1453, + "indexed": true, + "name": "caller", + "nodeType": "VariableDeclaration", + "scope": 1459, + "src": "1297:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1297:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1455, + "indexed": true, + "name": "tokenIn", + "nodeType": "VariableDeclaration", + "scope": 1459, + "src": "1329:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1454, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1329:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1457, + "indexed": false, + "name": "tokenAmountIn", + "nodeType": "VariableDeclaration", + "scope": 1459, + "src": "1362:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1456, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1362:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1287:110:6" + }, + "src": "1273:125:6" + }, + { + "anonymous": false, + "documentation": null, + "id": 1467, + "name": "LOG_EXIT", + "nodeType": "EventDefinition", + "parameters": { + "id": 1466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1461, + "indexed": true, + "name": "caller", + "nodeType": "VariableDeclaration", + "scope": 1467, + "src": "1428:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1460, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1428:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1463, + "indexed": true, + "name": "tokenOut", + "nodeType": "VariableDeclaration", + "scope": 1467, + "src": "1460:24:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1462, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1460:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1465, + "indexed": false, + "name": "tokenAmountOut", + "nodeType": "VariableDeclaration", + "scope": 1467, + "src": "1494:30:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1464, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1494:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1418:112:6" + }, + "src": "1404:127:6" + }, + { + "anonymous": true, + "documentation": null, + "id": 1475, + "name": "LOG_CALL", + "nodeType": "EventDefinition", + "parameters": { + "id": 1474, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1469, + "indexed": true, + "name": "sig", + "nodeType": "VariableDeclaration", + "scope": 1475, + "src": "1561:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1468, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "1561:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1471, + "indexed": true, + "name": "caller", + "nodeType": "VariableDeclaration", + "scope": 1475, + "src": "1590:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1470, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1590:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1473, + "indexed": false, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 1475, + "src": "1622:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1472, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1622:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1551:97:6" + }, + "src": "1537:122:6" + }, + { + "body": { + "id": 1487, + "nodeType": "Block", + "src": "1683:72:6", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1478, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "1707:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sig", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1707:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1480, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "1716:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1716:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1482, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "1728:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1728:8:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "id": 1477, + "name": "LOG_CALL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1475, + "src": "1698:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes4_$_t_address_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (bytes4,address,bytes memory)" + } + }, + "id": 1484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1698:39:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1485, + "nodeType": "EmitStatement", + "src": "1693:44:6" + }, + { + "id": 1486, + "nodeType": "PlaceholderStatement", + "src": "1747:1:6" + } + ] + }, + "documentation": null, + "id": 1488, + "name": "_logs_", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1476, + "nodeType": "ParameterList", + "parameters": [], + "src": "1680:2:6" + }, + "src": "1665:90:6", + "visibility": "internal" + }, + { + "body": { + "id": 1505, + "nodeType": "Block", + "src": "1779:141:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1810:7:6", + "subExpression": { + "argumentTypes": null, + "id": 1491, + "name": "_mutex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1518, + "src": "1811:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5245454e545259", + "id": 1493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1832:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4", + "typeString": "literal_string \"ERR_REENTRY\"" + }, + "value": "ERR_REENTRY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4", + "typeString": "literal_string \"ERR_REENTRY\"" + } + ], + "id": 1490, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1789:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:66:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1495, + "nodeType": "ExpressionStatement", + "src": "1789:66:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1496, + "name": "_mutex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1518, + "src": "1865:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1874:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1865:13:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1499, + "nodeType": "ExpressionStatement", + "src": "1865:13:6" + }, + { + "id": 1500, + "nodeType": "PlaceholderStatement", + "src": "1888:1:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1501, + "name": "_mutex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1518, + "src": "1899:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1502, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1908:5:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1899:14:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1504, + "nodeType": "ExpressionStatement", + "src": "1899:14:6" + } + ] + }, + "documentation": null, + "id": 1506, + "name": "_lock_", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1489, + "nodeType": "ParameterList", + "parameters": [], + "src": "1776:2:6" + }, + "src": "1761:159:6", + "visibility": "internal" + }, + { + "body": { + "id": 1515, + "nodeType": "Block", + "src": "1948:59:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1966:7:6", + "subExpression": { + "argumentTypes": null, + "id": 1509, + "name": "_mutex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1518, + "src": "1967:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5245454e545259", + "id": 1511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1975:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4", + "typeString": "literal_string \"ERR_REENTRY\"" + }, + "value": "ERR_REENTRY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4", + "typeString": "literal_string \"ERR_REENTRY\"" + } + ], + "id": 1508, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1958:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1958:31:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1513, + "nodeType": "ExpressionStatement", + "src": "1958:31:6" + }, + { + "id": 1514, + "nodeType": "PlaceholderStatement", + "src": "1999:1:6" + } + ] + }, + "documentation": null, + "id": 1516, + "name": "_viewlock_", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1507, + "nodeType": "ParameterList", + "parameters": [], + "src": "1945:2:6" + }, + "src": "1926:81:6", + "visibility": "internal" + }, + { + "constant": false, + "id": 1518, + "name": "_mutex", + "nodeType": "VariableDeclaration", + "scope": 3778, + "src": "2017:19:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1517, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2017:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 1520, + "name": "_factory", + "nodeType": "VariableDeclaration", + "scope": 3778, + "src": "2043:24:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2043:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 1522, + "name": "_controller", + "nodeType": "VariableDeclaration", + "scope": 3778, + "src": "2121:27:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1521, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2121:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 1524, + "name": "_publicSwap", + "nodeType": "VariableDeclaration", + "scope": 3778, + "src": "2174:24:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1523, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2174:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 1526, + "name": "_swapFee", + "nodeType": "VariableDeclaration", + "scope": 3778, + "src": "2358:21:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1525, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2358:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 1528, + "name": "_finalized", + "nodeType": "VariableDeclaration", + "scope": 3778, + "src": "2385:23:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2385:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 1531, + "name": "_tokens", + "nodeType": "VariableDeclaration", + "scope": 3778, + "src": "2415:25:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1529, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2415:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1530, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2415:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 1535, + "name": "_records", + "nodeType": "VariableDeclaration", + "scope": 3778, + "src": "2446:42:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record)" + }, + "typeName": { + "id": 1534, + "keyType": { + "id": 1532, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2454:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2446:24:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record)" + }, + "valueType": { + "contractScope": null, + "id": 1533, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "2463:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 1537, + "name": "_totalWeight", + "nodeType": "VariableDeclaration", + "scope": 3778, + "src": "2494:25:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1536, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2494:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 1540, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 3778, + "src": "2646:32:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1538, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2646:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2673:5:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "private" + }, + { + "body": { + "id": 1549, + "nodeType": "Block", + "src": "2715:111:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2746:12:6", + "subExpression": { + "argumentTypes": null, + "id": 1543, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1540, + "src": "2747:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414c52454144595f494e495449414c495a4544", + "id": 1545, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2773:25:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1fb8797b66eca6c15df697c66cc4b5186be8e5c9588f384f789ecfab2607b249", + "typeString": "literal_string \"ERR_ALREADY_INITIALIZED\"" + }, + "value": "ERR_ALREADY_INITIALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1fb8797b66eca6c15df697c66cc4b5186be8e5c9588f384f789ecfab2607b249", + "typeString": "literal_string \"ERR_ALREADY_INITIALIZED\"" + } + ], + "id": 1542, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2725:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2725:83:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1547, + "nodeType": "ExpressionStatement", + "src": "2725:83:6" + }, + { + "id": 1548, + "nodeType": "PlaceholderStatement", + "src": "2818:1:6" + } + ] + }, + "documentation": null, + "id": 1550, + "name": "onlyNotInitialized", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1541, + "nodeType": "ParameterList", + "parameters": [], + "src": "2712:2:6" + }, + "src": "2685:141:6", + "visibility": "internal" + }, + { + "body": { + "id": 1557, + "nodeType": "Block", + "src": "2884:35:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1555, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1540, + "src": "2901:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1554, + "id": 1556, + "nodeType": "Return", + "src": "2894:18:6" + } + ] + }, + "documentation": null, + "id": 1558, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isInitialized", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1551, + "nodeType": "ParameterList", + "parameters": [], + "src": "2853:2:6" + }, + "returnParameters": { + "id": 1554, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1553, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1558, + "src": "2878:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1552, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2878:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2877:6:6" + }, + "scope": 3778, + "src": "2831:88:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1571, + "nodeType": "Block", + "src": "2993:75:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1562, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3015:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3015:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1564, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3027:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3027:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1566, + "name": "MIN_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 215, + "src": "3039:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1567, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3048:5:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1568, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3055:5:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1561, + "name": "_initialize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1672, + "src": "3003:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bool_$_t_bool_$returns$_t_bool_$", + "typeString": "function (address,address,uint256,bool,bool) returns (bool)" + } + }, + "id": 1569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3003:58:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1570, + "nodeType": "ExpressionStatement", + "src": "3003:58:6" + } + ] + }, + "documentation": null, + "id": 1572, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1559, + "nodeType": "ParameterList", + "parameters": [], + "src": "2983:2:6" + }, + "returnParameters": { + "id": 1560, + "nodeType": "ParameterList", + "parameters": [], + "src": "2993:0:6" + }, + "scope": 3778, + "src": "2972:96:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1629, + "nodeType": "Block", + "src": "3461:408:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1590, + "name": "controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1574, + "src": "3492:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1592, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3514: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": 1591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3506:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3506:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3492:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f434f4e54524f4c4c45525f41444452455353", + "id": 1595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3530:32:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_27bd7417075a75a6fa345231d32603870be38c05ec22dde6b19bc44a340342dd", + "typeString": "literal_string \"ERR_INVALID_CONTROLLER_ADDRESS\"" + }, + "value": "ERR_INVALID_CONTROLLER_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_27bd7417075a75a6fa345231d32603870be38c05ec22dde6b19bc44a340342dd", + "typeString": "literal_string \"ERR_INVALID_CONTROLLER_ADDRESS\"" + } + ], + "id": 1589, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "3471:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3471:101:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1597, + "nodeType": "ExpressionStatement", + "src": "3471:101:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1599, + "name": "factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1576, + "src": "3603:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1601, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3622: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": 1600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3614:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3614:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3603:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f464143544f52595f41444452455353", + "id": 1604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3638:29:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ea269bf0660439ffbd72480b6b4854b47a9bcddbad5646f4d4f582f8c48bd39b", + "typeString": "literal_string \"ERR_INVALID_FACTORY_ADDRESS\"" + }, + "value": "ERR_INVALID_FACTORY_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea269bf0660439ffbd72480b6b4854b47a9bcddbad5646f4d4f582f8c48bd39b", + "typeString": "literal_string \"ERR_INVALID_FACTORY_ADDRESS\"" + } + ], + "id": 1598, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "3582:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3582:95:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1606, + "nodeType": "ExpressionStatement", + "src": "3582:95:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1608, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "3695:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1609, + "name": "MIN_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 215, + "src": "3706:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3695:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d494e5f464545", + "id": 1611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3715:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5", + "typeString": "literal_string \"ERR_MIN_FEE\"" + }, + "value": "ERR_MIN_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5", + "typeString": "literal_string \"ERR_MIN_FEE\"" + } + ], + "id": 1607, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "3687:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3687:42:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1613, + "nodeType": "ExpressionStatement", + "src": "3687:42:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1615, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "3747:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1616, + "name": "MAX_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "3758:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3747:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f464545", + "id": 1618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3767:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2", + "typeString": "literal_string \"ERR_MAX_FEE\"" + }, + "value": "ERR_MAX_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2", + "typeString": "literal_string \"ERR_MAX_FEE\"" + } + ], + "id": 1614, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "3739:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3739:42:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1620, + "nodeType": "ExpressionStatement", + "src": "3739:42:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1622, + "name": "controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1574, + "src": "3810:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1623, + "name": "factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1576, + "src": "3822:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1624, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "3831:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1625, + "name": "publicSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1580, + "src": "3840:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 1626, + "name": "finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1582, + "src": "3852:9:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1621, + "name": "_initialize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1672, + "src": "3798:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bool_$_t_bool_$returns$_t_bool_$", + "typeString": "function (address,address,uint256,bool,bool) returns (bool)" + } + }, + "id": 1627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3798:64:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1588, + "id": 1628, + "nodeType": "Return", + "src": "3791:71:6" + } + ] + }, + "documentation": null, + "id": 1630, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1585, + "modifierName": { + "argumentTypes": null, + "id": 1584, + "name": "onlyNotInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1550, + "src": "3416:18:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3416:18:6" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1583, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1574, + "name": "controller", + "nodeType": "VariableDeclaration", + "scope": 1630, + "src": "3268:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1573, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3268:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1576, + "name": "factory", + "nodeType": "VariableDeclaration", + "scope": 1630, + "src": "3297:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1575, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3297:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1578, + "name": "swapFee", + "nodeType": "VariableDeclaration", + "scope": 1630, + "src": "3323:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1577, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3323:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1580, + "name": "publicSwap", + "nodeType": "VariableDeclaration", + "scope": 1630, + "src": "3345:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1579, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3345:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1582, + "name": "finalized", + "nodeType": "VariableDeclaration", + "scope": 1630, + "src": "3370:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1581, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3370:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3258:132:6" + }, + "returnParameters": { + "id": 1588, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1587, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1630, + "src": "3451:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1586, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3451:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3450:6:6" + }, + "scope": 3778, + "src": "3239:630:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1671, + "nodeType": "Block", + "src": "4131:221:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1645, + "name": "_controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "4141:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1646, + "name": "controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1632, + "src": "4155:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4141:24:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1648, + "nodeType": "ExpressionStatement", + "src": "4141:24:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1649, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "4175:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1650, + "name": "factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1634, + "src": "4186:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4175:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1652, + "nodeType": "ExpressionStatement", + "src": "4175:18:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1653, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "4203:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1654, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1636, + "src": "4214:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4203:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1656, + "nodeType": "ExpressionStatement", + "src": "4203:18:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1657, + "name": "_publicSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1524, + "src": "4231:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1658, + "name": "publicSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1638, + "src": "4245:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4231:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1660, + "nodeType": "ExpressionStatement", + "src": "4231:24:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1661, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "4265:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1662, + "name": "finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1640, + "src": "4278:9:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4265:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1664, + "nodeType": "ExpressionStatement", + "src": "4265:22:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1665, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1540, + "src": "4299:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4313:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "4299:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1668, + "nodeType": "ExpressionStatement", + "src": "4299:18:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1669, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1540, + "src": "4334:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1644, + "id": 1670, + "nodeType": "Return", + "src": "4327:18:6" + } + ] + }, + "documentation": null, + "id": 1672, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_initialize", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1632, + "name": "controller", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "3965:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1631, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3965:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1634, + "name": "factory", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "3994:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1633, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3994:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1636, + "name": "swapFee", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "4020:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1635, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4020:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1638, + "name": "publicSwap", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "4042:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1637, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4042:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1640, + "name": "finalized", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "4068:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1639, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4068:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3955:133:6" + }, + "returnParameters": { + "id": 1644, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1643, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "4121:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1642, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4121:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4120:6:6" + }, + "scope": 3778, + "src": "3935:417:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 1742, + "nodeType": "Block", + "src": "4643:816:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1692, + "name": "dataTokenAaddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1674, + "src": "4674:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4703: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": 1693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4695:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4695:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4674:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f44415441544f4b454e5f41444452455353", + "id": 1697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4719:31:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c32bb61c112b11a0a138368229143b221c7b45bb96a8d15205ee6861a5ea6632", + "typeString": "literal_string \"ERR_INVALID_DATATOKEN_ADDRESS\"" + }, + "value": "ERR_INVALID_DATATOKEN_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c32bb61c112b11a0a138368229143b221c7b45bb96a8d15205ee6861a5ea6632", + "typeString": "literal_string \"ERR_INVALID_DATATOKEN_ADDRESS\"" + } + ], + "id": 1691, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "4653:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4653:107:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1699, + "nodeType": "ExpressionStatement", + "src": "4653:107:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1701, + "name": "baseTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1680, + "src": "4791:16:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1703, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4819: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": 1702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4811:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1704, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4811:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4791:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f42415345544f4b454e5f41444452455353", + "id": 1706, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4835:31:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4b2297dc625c16c7dff9433ba745e0a13395a58d1fe6f08b62aefc6950ecb072", + "typeString": "literal_string \"ERR_INVALID_BASETOKEN_ADDRESS\"" + }, + "value": "ERR_INVALID_BASETOKEN_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4b2297dc625c16c7dff9433ba745e0a13395a58d1fe6f08b62aefc6950ecb072", + "typeString": "literal_string \"ERR_INVALID_BASETOKEN_ADDRESS\"" + } + ], + "id": 1700, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "4770:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4770:106:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1708, + "nodeType": "ExpressionStatement", + "src": "4770:106:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1710, + "name": "dataTokenAaddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1674, + "src": "5018:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1711, + "name": "dataTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "5049:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1712, + "name": "dataTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1678, + "src": "5078:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1709, + "name": "bind", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2130, + "src": "5000:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 1713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5000:103:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1714, + "nodeType": "ExpressionStatement", + "src": "5000:103:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1716, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "5127:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5127:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1718, + "name": "dataTokenAaddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1674, + "src": "5139:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1719, + "name": "dataTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "5158:15:6", + "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": 1715, + "name": "LOG_JOIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1459, + "src": "5118:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5118:56:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1721, + "nodeType": "EmitStatement", + "src": "5113:61:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1723, + "name": "baseTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1680, + "src": "5229:16:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1724, + "name": "baseTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "5259:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1725, + "name": "baseTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1684, + "src": "5288:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1722, + "name": "bind", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2130, + "src": "5211:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 1726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5211:102:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1727, + "nodeType": "ExpressionStatement", + "src": "5211:102:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1729, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "5337:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5337:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1731, + "name": "baseTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1680, + "src": "5349:16:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1732, + "name": "baseTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "5367:15:6", + "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": 1728, + "name": "LOG_JOIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1459, + "src": "5328:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5328:55:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1734, + "nodeType": "EmitStatement", + "src": "5323:60:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1736, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1686, + "src": "5404:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1735, + "name": "setSwapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1956, + "src": "5393:10:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5393:19:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1738, + "nodeType": "ExpressionStatement", + "src": "5393:19:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1739, + "name": "finalize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2063, + "src": "5442:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5442:10:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1741, + "nodeType": "ExpressionStatement", + "src": "5442:10:6" + } + ] + }, + "documentation": null, + "id": 1743, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1689, + "modifierName": { + "argumentTypes": null, + "id": 1688, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "4632:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4632:6:6" + } + ], + "name": "setup", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1687, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1674, + "name": "dataTokenAaddress", + "nodeType": "VariableDeclaration", + "scope": 1743, + "src": "4382:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1673, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4382:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1676, + "name": "dataTokenAmount", + "nodeType": "VariableDeclaration", + "scope": 1743, + "src": "4418:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1675, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4418:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1678, + "name": "dataTokenWeight", + "nodeType": "VariableDeclaration", + "scope": 1743, + "src": "4451:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1677, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4451:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1680, + "name": "baseTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 1743, + "src": "4484:24:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1679, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4484:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1682, + "name": "baseTokenAmount", + "nodeType": "VariableDeclaration", + "scope": 1743, + "src": "4519:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1681, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4519:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1684, + "name": "baseTokenWeight", + "nodeType": "VariableDeclaration", + "scope": 1743, + "src": "4552:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1683, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4552:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1686, + "name": "swapFee", + "nodeType": "VariableDeclaration", + "scope": 1743, + "src": "4585:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1685, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4585:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4372:234:6" + }, + "returnParameters": { + "id": 1690, + "nodeType": "ParameterList", + "parameters": [], + "src": "4643:0:6" + }, + "scope": 3778, + "src": "4358:1101:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1750, + "nodeType": "Block", + "src": "5661:35:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1748, + "name": "_publicSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1524, + "src": "5678:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1747, + "id": 1749, + "nodeType": "Return", + "src": "5671:18:6" + } + ] + }, + "documentation": null, + "id": 1751, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isPublicSwap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1744, + "nodeType": "ParameterList", + "parameters": [], + "src": "5609:2:6" + }, + "returnParameters": { + "id": 1747, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1746, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1751, + "src": "5651:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1745, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5651:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5650:6:6" + }, + "scope": 3778, + "src": "5588:108:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1758, + "nodeType": "Block", + "src": "5774:34:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1756, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "5791:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1755, + "id": 1757, + "nodeType": "Return", + "src": "5784:17:6" + } + ] + }, + "documentation": null, + "id": 1759, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isFinalized", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1752, + "nodeType": "ParameterList", + "parameters": [], + "src": "5722:2:6" + }, + "returnParameters": { + "id": 1755, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1754, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1759, + "src": "5764:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1753, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5764:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5763:6:6" + }, + "scope": 3778, + "src": "5702:106:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1771, + "nodeType": "Block", + "src": "5891:41:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1766, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "5908:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 1768, + "indexExpression": { + "argumentTypes": null, + "id": 1767, + "name": "t", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1761, + "src": "5917:1:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5908:11:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 1769, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "5908:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1765, + "id": 1770, + "nodeType": "Return", + "src": "5901:24:6" + } + ] + }, + "documentation": null, + "id": 1772, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isBound", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1762, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1761, + "name": "t", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "5831:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1760, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5831:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5830:11:6" + }, + "returnParameters": { + "id": 1765, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1764, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1772, + "src": "5881:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1763, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5881:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5880:6:6" + }, + "scope": 3778, + "src": "5814:118:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1780, + "nodeType": "Block", + "src": "6012:38:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1777, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "6029:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 1778, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6029:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1776, + "id": 1779, + "nodeType": "Return", + "src": "6022:21:6" + } + ] + }, + "documentation": null, + "id": 1781, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNumTokens", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1773, + "nodeType": "ParameterList", + "parameters": [], + "src": "5959:2:6" + }, + "returnParameters": { + "id": 1776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1775, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "6001:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1774, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6001:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6000:6:6" + }, + "scope": 3778, + "src": "5938:112:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1791, + "nodeType": "Block", + "src": "6163:31:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1789, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "6180:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 1788, + "id": 1790, + "nodeType": "Return", + "src": "6173:14:6" + } + ] + }, + "documentation": null, + "id": 1792, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1784, + "modifierName": { + "argumentTypes": null, + "id": 1783, + "name": "_viewlock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1516, + "src": "6106:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6106:10:6" + } + ], + "name": "getCurrentTokens", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1782, + "nodeType": "ParameterList", + "parameters": [], + "src": "6081:2:6" + }, + "returnParameters": { + "id": 1788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1787, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1792, + "src": "6134:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1785, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6134:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1786, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6134:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6133:25:6" + }, + "scope": 3778, + "src": "6056:138:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1807, + "nodeType": "Block", + "src": "6313:81:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1801, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "6331:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f46494e414c495a4544", + "id": 1802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6343:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + }, + "value": "ERR_NOT_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "id": 1800, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "6323:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6323:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1804, + "nodeType": "ExpressionStatement", + "src": "6323:40:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1805, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "6380:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 1799, + "id": 1806, + "nodeType": "Return", + "src": "6373:14:6" + } + ] + }, + "documentation": null, + "id": 1808, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1795, + "modifierName": { + "argumentTypes": null, + "id": 1794, + "name": "_viewlock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1516, + "src": "6256:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6256:10:6" + } + ], + "name": "getFinalTokens", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1793, + "nodeType": "ParameterList", + "parameters": [], + "src": "6223:2:6" + }, + "returnParameters": { + "id": 1799, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1798, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1808, + "src": "6284:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1796, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6284:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1797, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6284:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6283:25:6" + }, + "scope": 3778, + "src": "6200:194:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1830, + "nodeType": "Block", + "src": "6514:104:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1818, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "6533:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 1820, + "indexExpression": { + "argumentTypes": null, + "id": 1819, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1810, + "src": "6542:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6533:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 1821, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "6533:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 1822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6556:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 1817, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "6525:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6525:47:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1824, + "nodeType": "ExpressionStatement", + "src": "6525:47:6" + }, + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1825, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "6589:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 1827, + "indexExpression": { + "argumentTypes": null, + "id": 1826, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1810, + "src": "6598:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6589:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 1828, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "6589:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1816, + "id": 1829, + "nodeType": "Return", + "src": "6582:29:6" + } + ] + }, + "documentation": null, + "id": 1831, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1813, + "modifierName": { + "argumentTypes": null, + "id": 1812, + "name": "_viewlock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1516, + "src": "6476:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6476:10:6" + } + ], + "name": "getDenormalizedWeight", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1811, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1810, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1831, + "src": "6431:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1809, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6431:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6430:15:6" + }, + "returnParameters": { + "id": 1816, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1815, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1831, + "src": "6504:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1814, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6504:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6503:6:6" + }, + "scope": 3778, + "src": "6400:218:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1840, + "nodeType": "Block", + "src": "6730:36:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1838, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "6747:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1837, + "id": 1839, + "nodeType": "Return", + "src": "6740:19:6" + } + ] + }, + "documentation": null, + "id": 1841, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1834, + "modifierName": { + "argumentTypes": null, + "id": 1833, + "name": "_viewlock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1516, + "src": "6692:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6692:10:6" + } + ], + "name": "getTotalDenormalizedWeight", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1832, + "nodeType": "ParameterList", + "parameters": [], + "src": "6659:2:6" + }, + "returnParameters": { + "id": 1837, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1836, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1841, + "src": "6720:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1835, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6720:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6719:6:6" + }, + "scope": 3778, + "src": "6624:142:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1870, + "nodeType": "Block", + "src": "6884:154:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1851, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "6903:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 1853, + "indexExpression": { + "argumentTypes": null, + "id": 1852, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1843, + "src": "6912:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6903:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 1854, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "6903:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 1855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6926:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 1850, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "6895:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6895:47:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1857, + "nodeType": "ExpressionStatement", + "src": "6895:47:6" + }, + { + "assignments": [ + 1859 + ], + "declarations": [ + { + "constant": false, + "id": 1859, + "name": "denorm", + "nodeType": "VariableDeclaration", + "scope": 1870, + "src": "6952:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1858, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6952:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1864, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1860, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "6966:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 1862, + "indexExpression": { + "argumentTypes": null, + "id": 1861, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1843, + "src": "6975:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6966:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 1863, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "6966:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6952:36:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1866, + "name": "denorm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1859, + "src": "7010:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1867, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "7018:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1865, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "7005:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7005:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1849, + "id": 1869, + "nodeType": "Return", + "src": "6998:33:6" + } + ] + }, + "documentation": null, + "id": 1871, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1846, + "modifierName": { + "argumentTypes": null, + "id": 1845, + "name": "_viewlock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1516, + "src": "6846:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6846:10:6" + } + ], + "name": "getNormalizedWeight", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1844, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1843, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1871, + "src": "6801:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6801:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6800:15:6" + }, + "returnParameters": { + "id": 1849, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1848, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1871, + "src": "6874:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1847, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6874:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6873:6:6" + }, + "scope": 3778, + "src": "6772:266:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1893, + "nodeType": "Block", + "src": "7147:105:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1881, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "7166:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 1883, + "indexExpression": { + "argumentTypes": null, + "id": 1882, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1873, + "src": "7175:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7166:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 1884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "7166:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 1885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7189:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 1880, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "7158:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7158:47:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1887, + "nodeType": "ExpressionStatement", + "src": "7158:47:6" + }, + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1888, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "7222:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 1890, + "indexExpression": { + "argumentTypes": null, + "id": 1889, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1873, + "src": "7231:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7222:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 1891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "7222:23:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1879, + "id": 1892, + "nodeType": "Return", + "src": "7215:30:6" + } + ] + }, + "documentation": null, + "id": 1894, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1876, + "modifierName": { + "argumentTypes": null, + "id": 1875, + "name": "_viewlock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1516, + "src": "7109:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7109:10:6" + } + ], + "name": "getBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1873, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1894, + "src": "7064:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1872, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7064:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7063:15:6" + }, + "returnParameters": { + "id": 1879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1878, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1894, + "src": "7137:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1877, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7137:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7136:6:6" + }, + "scope": 3778, + "src": "7044:208:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1903, + "nodeType": "Block", + "src": "7348:32:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1901, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7365:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1900, + "id": 1902, + "nodeType": "Return", + "src": "7358:15:6" + } + ] + }, + "documentation": null, + "id": 1904, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1897, + "modifierName": { + "argumentTypes": null, + "id": 1896, + "name": "_viewlock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1516, + "src": "7310:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7310:10:6" + } + ], + "name": "getSwapFee", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1895, + "nodeType": "ParameterList", + "parameters": [], + "src": "7277:2:6" + }, + "returnParameters": { + "id": 1900, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1899, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1904, + "src": "7338:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1898, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7338:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7337:6:6" + }, + "scope": 3778, + "src": "7258:122:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1913, + "nodeType": "Block", + "src": "7482:35:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1911, + "name": "_controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "7499:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1910, + "id": 1912, + "nodeType": "Return", + "src": "7492:18:6" + } + ] + }, + "documentation": null, + "id": 1914, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1907, + "modifierName": { + "argumentTypes": null, + "id": 1906, + "name": "_viewlock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1516, + "src": "7441:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7441:10:6" + } + ], + "name": "getController", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1905, + "nodeType": "ParameterList", + "parameters": [], + "src": "7408:2:6" + }, + "returnParameters": { + "id": 1910, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1909, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1914, + "src": "7469:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1908, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7469:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7468:9:6" + }, + "scope": 3778, + "src": "7386:131:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 1955, + "nodeType": "Block", + "src": "7606:256:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7625:11:6", + "subExpression": { + "argumentTypes": null, + "id": 1924, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "7626:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f49535f46494e414c495a4544", + "id": 1926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7638:18:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + }, + "value": "ERR_IS_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "id": 1923, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "7617:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7617:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1928, + "nodeType": "ExpressionStatement", + "src": "7617:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1930, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "7675:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7675:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1932, + "name": "_controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "7689:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7675:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f434f4e54524f4c4c4552", + "id": 1934, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7702:20:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + }, + "value": "ERR_NOT_CONTROLLER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "id": 1929, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "7667:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7667:56:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1936, + "nodeType": "ExpressionStatement", + "src": "7667:56:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1938, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1916, + "src": "7741:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1939, + "name": "MIN_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 215, + "src": "7752:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7741:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d494e5f464545", + "id": 1941, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7761:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5", + "typeString": "literal_string \"ERR_MIN_FEE\"" + }, + "value": "ERR_MIN_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5", + "typeString": "literal_string \"ERR_MIN_FEE\"" + } + ], + "id": 1937, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "7733:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7733:42:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1943, + "nodeType": "ExpressionStatement", + "src": "7733:42:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1945, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1916, + "src": "7793:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1946, + "name": "MAX_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "7804:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7793:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f464545", + "id": 1948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7813:13:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2", + "typeString": "literal_string \"ERR_MAX_FEE\"" + }, + "value": "ERR_MAX_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2", + "typeString": "literal_string \"ERR_MAX_FEE\"" + } + ], + "id": 1944, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "7785:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7785:42:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1950, + "nodeType": "ExpressionStatement", + "src": "7785:42:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1951, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7837:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1952, + "name": "swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1916, + "src": "7848:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7837:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1954, + "nodeType": "ExpressionStatement", + "src": "7837:18:6" + } + ] + }, + "documentation": null, + "id": 1956, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1919, + "modifierName": { + "argumentTypes": null, + "id": 1918, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "7580:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7580:6:6" + }, + { + "arguments": null, + "id": 1921, + "modifierName": { + "argumentTypes": null, + "id": 1920, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "7595:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7595:6:6" + } + ], + "name": "setSwapFee", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1917, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1916, + "name": "swapFee", + "nodeType": "VariableDeclaration", + "scope": 1956, + "src": "7543:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1915, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7543:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7542:14:6" + }, + "returnParameters": { + "id": 1922, + "nodeType": "ParameterList", + "parameters": [], + "src": "7606:0:6" + }, + "scope": 3778, + "src": "7523:339:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1986, + "nodeType": "Block", + "src": "7959:209:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1966, + "name": "manager", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1958, + "src": "7990:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1968, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8009: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": 1967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8001:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8001:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7990:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4d414e414745525f41444452455353", + "id": 1971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8025:29:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a37759e542f6ed44b54054d0c91dda523721dca7b5e18c58c26d81a883670078", + "typeString": "literal_string \"ERR_INVALID_MANAGER_ADDRESS\"" + }, + "value": "ERR_INVALID_MANAGER_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a37759e542f6ed44b54054d0c91dda523721dca7b5e18c58c26d81a883670078", + "typeString": "literal_string \"ERR_INVALID_MANAGER_ADDRESS\"" + } + ], + "id": 1965, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "7969:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7969:95:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1973, + "nodeType": "ExpressionStatement", + "src": "7969:95:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1975, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "8082:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8082:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1977, + "name": "_controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "8096:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8082:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f434f4e54524f4c4c4552", + "id": 1979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8109:20:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + }, + "value": "ERR_NOT_CONTROLLER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "id": 1974, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "8074:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8074:56:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1981, + "nodeType": "ExpressionStatement", + "src": "8074:56:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 1984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1982, + "name": "_controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "8140:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1983, + "name": "manager", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1958, + "src": "8154:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8140:21:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1985, + "nodeType": "ExpressionStatement", + "src": "8140:21:6" + } + ] + }, + "documentation": null, + "id": 1987, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1961, + "modifierName": { + "argumentTypes": null, + "id": 1960, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "7933:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7933:6:6" + }, + { + "arguments": null, + "id": 1963, + "modifierName": { + "argumentTypes": null, + "id": 1962, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "7948:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7948:6:6" + } + ], + "name": "setController", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1959, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1958, + "name": "manager", + "nodeType": "VariableDeclaration", + "scope": 1987, + "src": "7891:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1957, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7891:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7890:17:6" + }, + "returnParameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [], + "src": "7959:0:6" + }, + "scope": 3778, + "src": "7868:300:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2014, + "nodeType": "Block", + "src": "8261:154:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8279:11:6", + "subExpression": { + "argumentTypes": null, + "id": 1997, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "8280:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f49535f46494e414c495a4544", + "id": 1999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8292:18:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + }, + "value": "ERR_IS_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "id": 1996, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "8271:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8271:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2001, + "nodeType": "ExpressionStatement", + "src": "8271:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2003, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "8329:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8329:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 2005, + "name": "_controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "8343:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8329:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f434f4e54524f4c4c4552", + "id": 2007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8356:20:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + }, + "value": "ERR_NOT_CONTROLLER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "id": 2002, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "8321:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8321:56:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2009, + "nodeType": "ExpressionStatement", + "src": "8321:56:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2010, + "name": "_publicSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1524, + "src": "8387:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2011, + "name": "public_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1989, + "src": "8401:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8387:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2013, + "nodeType": "ExpressionStatement", + "src": "8387:21:6" + } + ] + }, + "documentation": null, + "id": 2015, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1992, + "modifierName": { + "argumentTypes": null, + "id": 1991, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "8235:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8235:6:6" + }, + { + "arguments": null, + "id": 1994, + "modifierName": { + "argumentTypes": null, + "id": 1993, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "8250:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8250:6:6" + } + ], + "name": "setPublicSwap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1989, + "name": "public_", + "nodeType": "VariableDeclaration", + "scope": 2015, + "src": "8198:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1988, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8198:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8197:14:6" + }, + "returnParameters": { + "id": 1995, + "nodeType": "ParameterList", + "parameters": [], + "src": "8261:0:6" + }, + "scope": 3778, + "src": "8175:240:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2062, + "nodeType": "Block", + "src": "8490:347:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2023, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "8508:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8508:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 2025, + "name": "_controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "8522:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8508:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f434f4e54524f4c4c4552", + "id": 2027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8535:20:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + }, + "value": "ERR_NOT_CONTROLLER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "id": 2022, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "8500:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8500:56:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2029, + "nodeType": "ExpressionStatement", + "src": "8500:56:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8574:11:6", + "subExpression": { + "argumentTypes": null, + "id": 2031, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "8575:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f49535f46494e414c495a4544", + "id": 2033, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8587:18:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + }, + "value": "ERR_IS_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "id": 2030, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "8566:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8566:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2035, + "nodeType": "ExpressionStatement", + "src": "8566:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2037, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "8624:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2038, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8624:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 2039, + "name": "MIN_BOUND_TOKENS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 205, + "src": "8642:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8624:34:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d494e5f544f4b454e53", + "id": 2041, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8660:16:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e51b2df926e9f13c18594bdf17dd3e1810e2676b7bad834d6cfa8e46bba574a9", + "typeString": "literal_string \"ERR_MIN_TOKENS\"" + }, + "value": "ERR_MIN_TOKENS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e51b2df926e9f13c18594bdf17dd3e1810e2676b7bad834d6cfa8e46bba574a9", + "typeString": "literal_string \"ERR_MIN_TOKENS\"" + } + ], + "id": 2036, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "8616:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8616:61:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2043, + "nodeType": "ExpressionStatement", + "src": "8616:61:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2044, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "8688:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2045, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8701:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "8688:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2047, + "nodeType": "ExpressionStatement", + "src": "8688:17:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2048, + "name": "_publicSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1524, + "src": "8715:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8729:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "8715:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2051, + "nodeType": "ExpressionStatement", + "src": "8715:18:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2053, + "name": "INIT_POOL_SUPPLY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "8759:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2052, + "name": "_mintPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3767, + "src": "8744:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 2054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8744:32:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2055, + "nodeType": "ExpressionStatement", + "src": "8744:32:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2057, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "8801:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8801:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2059, + "name": "INIT_POOL_SUPPLY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "8813:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2056, + "name": "_pushPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3757, + "src": "8786:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8786:44:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2061, + "nodeType": "ExpressionStatement", + "src": "8786:44:6" + } + ] + }, + "documentation": null, + "id": 2063, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2018, + "modifierName": { + "argumentTypes": null, + "id": 2017, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "8464:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8464:6:6" + }, + { + "arguments": null, + "id": 2020, + "modifierName": { + "argumentTypes": null, + "id": 2019, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "8479:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8479:6:6" + } + ], + "name": "finalize", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2016, + "nodeType": "ParameterList", + "parameters": [], + "src": "8438:2:6" + }, + "returnParameters": { + "id": 2021, + "nodeType": "ParameterList", + "parameters": [], + "src": "8490:0:6" + }, + "scope": 3778, + "src": "8421:416:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2129, + "nodeType": "Block", + "src": "9013:551:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2075, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "9031:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9031:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 2077, + "name": "_controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "9045:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9031:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f434f4e54524f4c4c4552", + "id": 2079, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9058:20:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + }, + "value": "ERR_NOT_CONTROLLER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "id": 2074, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "9023:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9023:56:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2081, + "nodeType": "ExpressionStatement", + "src": "9023:56:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9097:22:6", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2083, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "9098:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2085, + "indexExpression": { + "argumentTypes": null, + "id": 2084, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "9107:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9098:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2086, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "9098:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f49535f424f554e44", + "id": 2088, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9121:14:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29524b4853ebf7d280374d088acc10bd6949cb77e38df49dfa9b02680b8a5f51", + "typeString": "literal_string \"ERR_IS_BOUND\"" + }, + "value": "ERR_IS_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29524b4853ebf7d280374d088acc10bd6949cb77e38df49dfa9b02680b8a5f51", + "typeString": "literal_string \"ERR_IS_BOUND\"" + } + ], + "id": 2082, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "9089:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9089:47:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2090, + "nodeType": "ExpressionStatement", + "src": "9089:47:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9154:11:6", + "subExpression": { + "argumentTypes": null, + "id": 2092, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "9155:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f49535f46494e414c495a4544", + "id": 2094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9167:18:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + }, + "value": "ERR_IS_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "id": 2091, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "9146:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9146:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2096, + "nodeType": "ExpressionStatement", + "src": "9146:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2098, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "9205:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2099, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9205:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2100, + "name": "MAX_BOUND_TOKENS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 208, + "src": "9222:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9205:33:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f544f4b454e53", + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9240:16:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2b41476dedca3afde44e68e1abeac58b7cde6712eb701df30a64635f310a23f5", + "typeString": "literal_string \"ERR_MAX_TOKENS\"" + }, + "value": "ERR_MAX_TOKENS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2b41476dedca3afde44e68e1abeac58b7cde6712eb701df30a64635f310a23f5", + "typeString": "literal_string \"ERR_MAX_TOKENS\"" + } + ], + "id": 2097, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "9197:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9197:60:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2104, + "nodeType": "ExpressionStatement", + "src": "9197:60:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2105, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "9268:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2107, + "indexExpression": { + "argumentTypes": null, + "id": 2106, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "9277:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9268:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9314:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2110, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "9339:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9339:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 2112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9375:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 2113, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9451:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2108, + "name": "Record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "9286:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Record_$1439_storage_ptr_$", + "typeString": "type(struct BPool.Record storage pointer)" + } + }, + "id": 2114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "bound", + "index", + "denorm", + "balance" + ], + "nodeType": "FunctionCall", + "src": "9286:202:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_memory", + "typeString": "struct BPool.Record memory" + } + }, + "src": "9268:220:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2116, + "nodeType": "ExpressionStatement", + "src": "9268:220:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2120, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "9511:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2117, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "9498:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9498:12:6", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 2121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9498:19:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2122, + "nodeType": "ExpressionStatement", + "src": "9498:19:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2124, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "9534:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2125, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "9541:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2126, + "name": "denorm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2069, + "src": "9550:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2123, + "name": "rebind", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2302, + "src": "9527:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 2127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9527:30:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2128, + "nodeType": "ExpressionStatement", + "src": "9527:30:6" + } + ] + }, + "documentation": null, + "id": 2130, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2072, + "modifierName": { + "argumentTypes": null, + "id": 2071, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "8923:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8923:6:6" + } + ], + "name": "bind", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2070, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2065, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 2130, + "src": "8858:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2064, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8858:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2067, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 2130, + "src": "8873:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2066, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8873:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2069, + "name": "denorm", + "nodeType": "VariableDeclaration", + "scope": 2130, + "src": "8887:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2068, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8887:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8857:42:6" + }, + "returnParameters": { + "id": 2073, + "nodeType": "ParameterList", + "parameters": [], + "src": "9013:0:6" + }, + "scope": 3778, + "src": "8844:720:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2301, + "nodeType": "Block", + "src": "9677:1496:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2144, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "9696:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9696:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 2146, + "name": "_controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "9710:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9696:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f434f4e54524f4c4c4552", + "id": 2148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9723:20:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + }, + "value": "ERR_NOT_CONTROLLER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "id": 2143, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "9688:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9688:56:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2150, + "nodeType": "ExpressionStatement", + "src": "9688:56:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2152, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "9762:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2154, + "indexExpression": { + "argumentTypes": null, + "id": 2153, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2132, + "src": "9771:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9762:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2155, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "9762:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 2156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9785:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 2151, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "9754:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9754:47:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2158, + "nodeType": "ExpressionStatement", + "src": "9754:47:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9819:11:6", + "subExpression": { + "argumentTypes": null, + "id": 2160, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "9820:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f49535f46494e414c495a4544", + "id": 2162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9832:18:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + }, + "value": "ERR_IS_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "id": 2159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "9811:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9811:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2164, + "nodeType": "ExpressionStatement", + "src": "9811:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2166, + "name": "denorm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "9870:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 2167, + "name": "MIN_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "9880:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9870:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d494e5f574549474854", + "id": 2169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9892:16:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8df266f07de77e4ef407edb2fcb3334221f5d37909c32010ecedbd042f2b2362", + "typeString": "literal_string \"ERR_MIN_WEIGHT\"" + }, + "value": "ERR_MIN_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8df266f07de77e4ef407edb2fcb3334221f5d37909c32010ecedbd042f2b2362", + "typeString": "literal_string \"ERR_MIN_WEIGHT\"" + } + ], + "id": 2165, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "9862:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9862:47:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2171, + "nodeType": "ExpressionStatement", + "src": "9862:47:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2173, + "name": "denorm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "9927:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2174, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 231, + "src": "9937:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9927:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f574549474854", + "id": 2176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9949:16:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4443a14e27060659cd754b886a4a9abce56b7a815ac41b5da14580c72eae7f33", + "typeString": "literal_string \"ERR_MAX_WEIGHT\"" + }, + "value": "ERR_MAX_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4443a14e27060659cd754b886a4a9abce56b7a815ac41b5da14580c72eae7f33", + "typeString": "literal_string \"ERR_MAX_WEIGHT\"" + } + ], + "id": 2172, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "9919:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9919:47:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2178, + "nodeType": "ExpressionStatement", + "src": "9919:47:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2180, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "9984:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 2181, + "name": "MIN_BALANCE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 243, + "src": "9995:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9984:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d494e5f42414c414e4345", + "id": 2183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10008:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_69c7afc4064c1fa740d9fba5145c2c6cfc449ab58df3114718ec5abc7738730c", + "typeString": "literal_string \"ERR_MIN_BALANCE\"" + }, + "value": "ERR_MIN_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_69c7afc4064c1fa740d9fba5145c2c6cfc449ab58df3114718ec5abc7738730c", + "typeString": "literal_string \"ERR_MIN_BALANCE\"" + } + ], + "id": 2179, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "9976:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9976:50:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2185, + "nodeType": "ExpressionStatement", + "src": "9976:50:6" + }, + { + "assignments": [ + 2187 + ], + "declarations": [ + { + "constant": false, + "id": 2187, + "name": "oldWeight", + "nodeType": "VariableDeclaration", + "scope": 2301, + "src": "10082:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2186, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10082:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2192, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2188, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "10099:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2190, + "indexExpression": { + "argumentTypes": null, + "id": 2189, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2132, + "src": "10108:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10099:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "10099:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10082:39:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2193, + "name": "denorm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "10135:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 2194, + "name": "oldWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2187, + "src": "10144:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10135:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2214, + "name": "denorm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "10327:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2215, + "name": "oldWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2187, + "src": "10336:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10327:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2228, + "nodeType": "IfStatement", + "src": "10323:107:6", + "trueBody": { + "id": 2227, + "nodeType": "Block", + "src": "10347:83:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2217, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "10361:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2219, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "10381:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2221, + "name": "oldWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2187, + "src": "10400:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2222, + "name": "denorm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "10411:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2220, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "10395:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10395:23:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2218, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "10376:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10376:43:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10361:58:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2226, + "nodeType": "ExpressionStatement", + "src": "10361:58:6" + } + ] + } + }, + "id": 2229, + "nodeType": "IfStatement", + "src": "10131:299:6", + "trueBody": { + "id": 2213, + "nodeType": "Block", + "src": "10155:162:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2196, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "10169:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2198, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "10189:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2200, + "name": "denorm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "10208:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2201, + "name": "oldWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2187, + "src": "10216:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2199, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "10203:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10203:23:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2197, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "10184:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10184:43:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10169:58:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2205, + "nodeType": "ExpressionStatement", + "src": "10169:58:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2207, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "10249:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2208, + "name": "MAX_TOTAL_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 236, + "src": "10265:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10249:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f544f54414c5f574549474854", + "id": 2210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10283:22:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_55ceb599893e4bee215a5c1285d9b5c12334585fcdd4c2c71690e94257494440", + "typeString": "literal_string \"ERR_MAX_TOTAL_WEIGHT\"" + }, + "value": "ERR_MAX_TOTAL_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_55ceb599893e4bee215a5c1285d9b5c12334585fcdd4c2c71690e94257494440", + "typeString": "literal_string \"ERR_MAX_TOTAL_WEIGHT\"" + } + ], + "id": 2206, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "10241:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10241:65:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2212, + "nodeType": "ExpressionStatement", + "src": "10241:65:6" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 2235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2230, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "10447:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2232, + "indexExpression": { + "argumentTypes": null, + "id": 2231, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2132, + "src": "10456:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10447:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2233, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "10447:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2234, + "name": "denorm", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2136, + "src": "10472:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2236, + "nodeType": "ExpressionStatement", + "src": "10447:31:6" + }, + { + "assignments": [ + 2238 + ], + "declarations": [ + { + "constant": false, + "id": 2238, + "name": "oldBalance", + "nodeType": "VariableDeclaration", + "scope": 2301, + "src": "10551:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2237, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10551:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2243, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2239, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "10569:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2241, + "indexExpression": { + "argumentTypes": null, + "id": 2240, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2132, + "src": "10578:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10569:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2242, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "10569:23:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10551:41:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2244, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "10602:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2246, + "indexExpression": { + "argumentTypes": null, + "id": 2245, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2132, + "src": "10611:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10602:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2247, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "10602:23:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2248, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "10628:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10602:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2250, + "nodeType": "ExpressionStatement", + "src": "10602:33:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2251, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "10649:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 2252, + "name": "oldBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2238, + "src": "10659:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10649:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2265, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "10767:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2266, + "name": "oldBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2238, + "src": "10777:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10767:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2299, + "nodeType": "IfStatement", + "src": "10763:404:6", + "trueBody": { + "id": 2298, + "nodeType": "Block", + "src": "10789:378:6", + "statements": [ + { + "assignments": [ + 2269 + ], + "declarations": [ + { + "constant": false, + "id": 2269, + "name": "tokenBalanceWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "10880:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2268, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10880:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2274, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2271, + "name": "oldBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2238, + "src": "10914:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2272, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "10926:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2270, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "10909:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10909:25:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10880:54:6" + }, + { + "assignments": [ + 2276 + ], + "declarations": [ + { + "constant": false, + "id": 2276, + "name": "tokenExitFee", + "nodeType": "VariableDeclaration", + "scope": 2298, + "src": "10948:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2275, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10948:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2281, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2278, + "name": "tokenBalanceWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2269, + "src": "10973:21:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2279, + "name": "EXIT_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "10996:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2277, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "10968:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10968:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10948:57:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2283, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2132, + "src": "11035:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2284, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "11042:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11042:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2287, + "name": "tokenBalanceWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2269, + "src": "11059:21:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2288, + "name": "tokenExitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2276, + "src": "11082:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2286, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "11054:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11054:41:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2282, + "name": "_pushUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3731, + "src": "11019:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11019:77:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2291, + "nodeType": "ExpressionStatement", + "src": "11019:77:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2293, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2132, + "src": "11126:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2294, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "11133:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2295, + "name": "tokenExitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2276, + "src": "11143:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2292, + "name": "_pushUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3731, + "src": "11110:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11110:46:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2297, + "nodeType": "ExpressionStatement", + "src": "11110:46:6" + } + ] + } + }, + "id": 2300, + "nodeType": "IfStatement", + "src": "10645:522:6", + "trueBody": { + "id": 2264, + "nodeType": "Block", + "src": "10671:86:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2255, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2132, + "src": "10701:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2256, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "10708:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10708:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2259, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2134, + "src": "10725:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2260, + "name": "oldBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2238, + "src": "10734:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2258, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "10720:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10720:25:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2254, + "name": "_pullUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3706, + "src": "10685:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10685:61:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2263, + "nodeType": "ExpressionStatement", + "src": "10685:61:6" + } + ] + } + } + ] + }, + "documentation": null, + "id": 2302, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2139, + "modifierName": { + "argumentTypes": null, + "id": 2138, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "9651:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9651:6:6" + }, + { + "arguments": null, + "id": 2141, + "modifierName": { + "argumentTypes": null, + "id": 2140, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "9666:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9666:6:6" + } + ], + "name": "rebind", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2137, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2132, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 2302, + "src": "9586:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2131, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9586:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2134, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 2302, + "src": "9601:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2133, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9601:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2136, + "name": "denorm", + "nodeType": "VariableDeclaration", + "scope": 2302, + "src": "9615:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2135, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9615:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9585:42:6" + }, + "returnParameters": { + "id": 2142, + "nodeType": "ParameterList", + "parameters": [], + "src": "9677:0:6" + }, + "scope": 3778, + "src": "9570:1603:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 2420, + "nodeType": "Block", + "src": "11261:928:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2312, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "11280:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11280:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 2314, + "name": "_controller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "11294:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "11280:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f434f4e54524f4c4c4552", + "id": 2316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11307:20:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + }, + "value": "ERR_NOT_CONTROLLER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "id": 2311, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "11272:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11272:56:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2318, + "nodeType": "ExpressionStatement", + "src": "11272:56:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2320, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "11346:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2322, + "indexExpression": { + "argumentTypes": null, + "id": 2321, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2304, + "src": "11355:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11346:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2323, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "11346:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 2324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11369:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 2319, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "11338:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11338:47:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2326, + "nodeType": "ExpressionStatement", + "src": "11338:47:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "11403:11:6", + "subExpression": { + "argumentTypes": null, + "id": 2328, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "11404:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f49535f46494e414c495a4544", + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11416:18:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + }, + "value": "ERR_IS_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "id": 2327, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "11395:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11395:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2332, + "nodeType": "ExpressionStatement", + "src": "11395:40:6" + }, + { + "assignments": [ + 2334 + ], + "declarations": [ + { + "constant": false, + "id": 2334, + "name": "tokenBalance", + "nodeType": "VariableDeclaration", + "scope": 2420, + "src": "11446:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2333, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11446:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2339, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2335, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "11466:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2337, + "indexExpression": { + "argumentTypes": null, + "id": 2336, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2304, + "src": "11475:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11466:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2338, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "11466:23:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11446:43:6" + }, + { + "assignments": [ + 2341 + ], + "declarations": [ + { + "constant": false, + "id": 2341, + "name": "tokenExitFee", + "nodeType": "VariableDeclaration", + "scope": 2420, + "src": "11499:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2340, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11499:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2346, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2343, + "name": "tokenBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "11524:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2344, + "name": "EXIT_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "11538:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2342, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "11519:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11519:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11499:48:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2347, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "11558:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2349, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "11578:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2350, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "11592:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2352, + "indexExpression": { + "argumentTypes": null, + "id": 2351, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2304, + "src": "11601:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11592:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2353, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "11592:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2348, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "11573:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11573:42:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11558:57:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2356, + "nodeType": "ExpressionStatement", + "src": "11558:57:6" + }, + { + "assignments": [ + 2358 + ], + "declarations": [ + { + "constant": false, + "id": 2358, + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 2420, + "src": "11721:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2357, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11721:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2363, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2359, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "11734:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2361, + "indexExpression": { + "argumentTypes": null, + "id": 2360, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2304, + "src": "11743:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11734:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2362, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 1434, + "src": "11734:21:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11721:34:6" + }, + { + "assignments": [ + 2365 + ], + "declarations": [ + { + "constant": false, + "id": 2365, + "name": "last", + "nodeType": "VariableDeclaration", + "scope": 2420, + "src": "11765:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2364, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11765:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2370, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2366, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "11777:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2367, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11777:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 2368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11794:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "11777:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11765:30:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2371, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "11805:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2373, + "indexExpression": { + "argumentTypes": null, + "id": 2372, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2358, + "src": "11813:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11805:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2374, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "11822:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2376, + "indexExpression": { + "argumentTypes": null, + "id": 2375, + "name": "last", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2365, + "src": "11830:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11822:13:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "11805:30:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2378, + "nodeType": "ExpressionStatement", + "src": "11805:30:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2379, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "11845:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2383, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2380, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "11854:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2382, + "indexExpression": { + "argumentTypes": null, + "id": 2381, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2358, + "src": "11862:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11854:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11845:24:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2384, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 1434, + "src": "11845:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2385, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2358, + "src": "11878:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11845:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2387, + "nodeType": "ExpressionStatement", + "src": "11845:38:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2388, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "11893:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11893:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 2391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11893:13:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2392, + "nodeType": "ExpressionStatement", + "src": "11893:13:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2393, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "11916:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2395, + "indexExpression": { + "argumentTypes": null, + "id": 2394, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2304, + "src": "11925:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11916:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 2397, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11962:5:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11988:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 2399, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12011:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 2400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12035:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2396, + "name": "Record", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1439, + "src": "11934:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Record_$1439_storage_ptr_$", + "typeString": "type(struct BPool.Record storage pointer)" + } + }, + "id": 2401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "bound", + "index", + "denorm", + "balance" + ], + "nodeType": "FunctionCall", + "src": "11934:113:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_memory", + "typeString": "struct BPool.Record memory" + } + }, + "src": "11916:131:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2403, + "nodeType": "ExpressionStatement", + "src": "11916:131:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2405, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2304, + "src": "12074:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2406, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "12081:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12081:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2409, + "name": "tokenBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2334, + "src": "12098:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2410, + "name": "tokenExitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2341, + "src": "12112:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2408, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "12093:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12093:32:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2404, + "name": "_pushUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3731, + "src": "12058:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12058:68:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2413, + "nodeType": "ExpressionStatement", + "src": "12058:68:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2415, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2304, + "src": "12152:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2416, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "12159:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2417, + "name": "tokenExitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2341, + "src": "12169:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2414, + "name": "_pushUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3731, + "src": "12136:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12136:46:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2419, + "nodeType": "ExpressionStatement", + "src": "12136:46:6" + } + ] + }, + "documentation": null, + "id": 2421, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2307, + "modifierName": { + "argumentTypes": null, + "id": 2306, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "11235:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11235:6:6" + }, + { + "arguments": null, + "id": 2309, + "modifierName": { + "argumentTypes": null, + "id": 2308, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "11250:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11250:6:6" + } + ], + "name": "unbind", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2305, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2304, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 2421, + "src": "11195:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2303, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11195:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11194:15:6" + }, + "returnParameters": { + "id": 2310, + "nodeType": "ParameterList", + "parameters": [], + "src": "11261:0:6" + }, + "scope": 3778, + "src": "11179:1010:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2452, + "nodeType": "Block", + "src": "12351:138:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2431, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "12369:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2433, + "indexExpression": { + "argumentTypes": null, + "id": 2432, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2423, + "src": "12378:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12369:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2434, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "12369:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 2435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12392:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 2430, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "12361:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12361:47:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2437, + "nodeType": "ExpressionStatement", + "src": "12361:47:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2438, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "12418:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2440, + "indexExpression": { + "argumentTypes": null, + "id": 2439, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2423, + "src": "12427:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12418:15:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2441, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "12418:23:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2447, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7155, + "src": "12476:4:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BPool_$3778", + "typeString": "contract BPool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BPool_$3778", + "typeString": "contract BPool" + } + ], + "id": 2446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12468:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12468:13:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2443, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2423, + "src": "12451:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2442, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7106, + "src": "12444:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$7106_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 2444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12444:13:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$7106", + "typeString": "contract IERC20" + } + }, + "id": 2445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 7051, + "src": "12444:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 2449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12444:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12418:64:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2451, + "nodeType": "ExpressionStatement", + "src": "12418:64:6" + } + ] + }, + "documentation": null, + "id": 2453, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2426, + "modifierName": { + "argumentTypes": null, + "id": 2425, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "12325:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12325:6:6" + }, + { + "arguments": null, + "id": 2428, + "modifierName": { + "argumentTypes": null, + "id": 2427, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "12340:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12340:6:6" + } + ], + "name": "gulp", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2424, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2423, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "12285:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2422, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12285:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12284:15:6" + }, + "returnParameters": { + "id": 2429, + "nodeType": "ParameterList", + "parameters": [], + "src": "12351:0:6" + }, + "scope": 3778, + "src": "12271:218:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2504, + "nodeType": "Block", + "src": "12630:420:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2465, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "12648:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2467, + "indexExpression": { + "argumentTypes": null, + "id": 2466, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2455, + "src": "12657:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12648:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "12648:23:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 2469, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12673:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 2464, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "12640:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12640:49:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2471, + "nodeType": "ExpressionStatement", + "src": "12640:49:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2473, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "12707:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2475, + "indexExpression": { + "argumentTypes": null, + "id": 2474, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2457, + "src": "12716:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12707:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2476, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "12707:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 2477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12733:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 2472, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "12699:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12699:50:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2479, + "nodeType": "ExpressionStatement", + "src": "12699:50:6" + }, + { + "assignments": [ + 2481 + ], + "declarations": [ + { + "constant": false, + "id": 2481, + "name": "inRecord", + "nodeType": "VariableDeclaration", + "scope": 2504, + "src": "12759:23:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 2480, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "12759:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2485, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2482, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "12785:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2484, + "indexExpression": { + "argumentTypes": null, + "id": 2483, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2455, + "src": "12794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12785:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12759:43:6" + }, + { + "assignments": [ + 2487 + ], + "declarations": [ + { + "constant": false, + "id": 2487, + "name": "outRecord", + "nodeType": "VariableDeclaration", + "scope": 2504, + "src": "12812:24:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 2486, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "12812:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2491, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2488, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "12839:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2490, + "indexExpression": { + "argumentTypes": null, + "id": 2489, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2457, + "src": "12848:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12839:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12812:45:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2493, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2481, + "src": "12901:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "12901:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2495, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2481, + "src": "12932:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2496, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "12932:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2497, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2487, + "src": "12962:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2498, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "12962:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2499, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2487, + "src": "12994:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "12994:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2501, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "13025:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2492, + "name": "calcSpotPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "12874:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 2502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12874:169:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2463, + "id": 2503, + "nodeType": "Return", + "src": "12867:176:6" + } + ] + }, + "documentation": null, + "id": 2505, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2460, + "modifierName": { + "argumentTypes": null, + "id": 2459, + "name": "_viewlock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1516, + "src": "12582:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12582:10:6" + } + ], + "name": "getSpotPrice", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2458, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2455, + "name": "tokenIn", + "nodeType": "VariableDeclaration", + "scope": 2505, + "src": "12517:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2454, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12517:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2457, + "name": "tokenOut", + "nodeType": "VariableDeclaration", + "scope": 2505, + "src": "12534:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2456, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12534:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12516:35:6" + }, + "returnParameters": { + "id": 2463, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2462, + "name": "spotPrice", + "nodeType": "VariableDeclaration", + "scope": 2505, + "src": "12610:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2461, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12610:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12609:16:6" + }, + "scope": 3778, + "src": "12495:555:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2556, + "nodeType": "Block", + "src": "13198:413:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2517, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "13216:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2519, + "indexExpression": { + "argumentTypes": null, + "id": 2518, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2507, + "src": "13225:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13216:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2520, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "13216:23:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 2521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13241:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 2516, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "13208:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13208:49:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2523, + "nodeType": "ExpressionStatement", + "src": "13208:49:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2525, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "13275:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2527, + "indexExpression": { + "argumentTypes": null, + "id": 2526, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2509, + "src": "13284:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13275:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "13275:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 2529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13301:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 2524, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "13267:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13267:50:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2531, + "nodeType": "ExpressionStatement", + "src": "13267:50:6" + }, + { + "assignments": [ + 2533 + ], + "declarations": [ + { + "constant": false, + "id": 2533, + "name": "inRecord", + "nodeType": "VariableDeclaration", + "scope": 2556, + "src": "13327:23:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 2532, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "13327:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2537, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2534, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "13353:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2536, + "indexExpression": { + "argumentTypes": null, + "id": 2535, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2507, + "src": "13362:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13353:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13327:43:6" + }, + { + "assignments": [ + 2539 + ], + "declarations": [ + { + "constant": false, + "id": 2539, + "name": "outRecord", + "nodeType": "VariableDeclaration", + "scope": 2556, + "src": "13380:24:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 2538, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "13380:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2543, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2540, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "13407:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2542, + "indexExpression": { + "argumentTypes": null, + "id": 2541, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2509, + "src": "13416:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13407:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13380:45:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2545, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2533, + "src": "13469:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "13469:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2547, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2533, + "src": "13500:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2548, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "13500:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2549, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2539, + "src": "13530:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2550, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "13530:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2551, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2539, + "src": "13562:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2552, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "13562:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 2553, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13593:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2544, + "name": "calcSpotPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "13442:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 2554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13442:162:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2515, + "id": 2555, + "nodeType": "Return", + "src": "13435:169:6" + } + ] + }, + "documentation": null, + "id": 2557, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2512, + "modifierName": { + "argumentTypes": null, + "id": 2511, + "name": "_viewlock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1516, + "src": "13150:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13150:10:6" + } + ], + "name": "getSpotPriceSansFee", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2510, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2507, + "name": "tokenIn", + "nodeType": "VariableDeclaration", + "scope": 2557, + "src": "13085:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2506, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13085:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2509, + "name": "tokenOut", + "nodeType": "VariableDeclaration", + "scope": 2557, + "src": "13102:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2508, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13102:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13084:35:6" + }, + "returnParameters": { + "id": 2515, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2514, + "name": "spotPrice", + "nodeType": "VariableDeclaration", + "scope": 2557, + "src": "13178:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2513, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13178:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13177:16:6" + }, + "scope": 3778, + "src": "13056:555:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2679, + "nodeType": "Block", + "src": "13736:806:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2570, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "13754:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f46494e414c495a4544", + "id": 2571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13766:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + }, + "value": "ERR_NOT_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "id": 2569, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "13746:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13746:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2573, + "nodeType": "ExpressionStatement", + "src": "13746:40:6" + }, + { + "assignments": [ + 2575 + ], + "declarations": [ + { + "constant": false, + "id": 2575, + "name": "poolTotal", + "nodeType": "VariableDeclaration", + "scope": 2679, + "src": "13797:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2574, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13797:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2578, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2576, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4052, + "src": "13814:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 2577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13814:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13797:30:6" + }, + { + "assignments": [ + 2580 + ], + "declarations": [ + { + "constant": false, + "id": 2580, + "name": "ratio", + "nodeType": "VariableDeclaration", + "scope": 2679, + "src": "13837:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2579, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13837:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2585, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2582, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2559, + "src": "13855:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2583, + "name": "poolTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2575, + "src": "13870:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2581, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "13850:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13850:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13837:43:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2587, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "13898:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13907:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13898:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d4154485f415050524f58", + "id": 2590, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13910:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + }, + "value": "ERR_MATH_APPROX" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "id": 2586, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "13890:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13890:38:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2592, + "nodeType": "ExpressionStatement", + "src": "13890:38:6" + }, + { + "body": { + "id": 2667, + "nodeType": "Block", + "src": "13981:465:6", + "statements": [ + { + "assignments": [ + 2605 + ], + "declarations": [ + { + "constant": false, + "id": 2605, + "name": "t", + "nodeType": "VariableDeclaration", + "scope": 2667, + "src": "13995:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2604, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13995:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2609, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2606, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "14007:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2608, + "indexExpression": { + "argumentTypes": null, + "id": 2607, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "14015:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14007:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13995:22:6" + }, + { + "assignments": [ + 2611 + ], + "declarations": [ + { + "constant": false, + "id": 2611, + "name": "bal", + "nodeType": "VariableDeclaration", + "scope": 2667, + "src": "14031:8:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2610, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14031:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2616, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2612, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "14042:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2614, + "indexExpression": { + "argumentTypes": null, + "id": 2613, + "name": "t", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2605, + "src": "14051:1:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14042:11:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2615, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "14042:19:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14031:30:6" + }, + { + "assignments": [ + 2618 + ], + "declarations": [ + { + "constant": false, + "id": 2618, + "name": "tokenAmountIn", + "nodeType": "VariableDeclaration", + "scope": 2667, + "src": "14075:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2617, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14075:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2623, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2620, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "14101:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2621, + "name": "bal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2611, + "src": "14108:3:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2619, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "14096:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14096:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14075:37:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2625, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "14134:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14151:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14134:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d4154485f415050524f58", + "id": 2628, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14154:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + }, + "value": "ERR_MATH_APPROX" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "id": 2624, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "14126:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14126:46:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2630, + "nodeType": "ExpressionStatement", + "src": "14126:46:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2632, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "14194:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2633, + "name": "maxAmountsIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2562, + "src": "14211:12:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 2635, + "indexExpression": { + "argumentTypes": null, + "id": 2634, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "14224:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14211:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14194:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4c494d49545f494e", + "id": 2637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14228:14:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + }, + "value": "ERR_LIMIT_IN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + } + ], + "id": 2631, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "14186:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14186:57:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2639, + "nodeType": "ExpressionStatement", + "src": "14186:57:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2640, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "14257:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2642, + "indexExpression": { + "argumentTypes": null, + "id": 2641, + "name": "t", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2605, + "src": "14266:1:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14257:11:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2643, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "14257:19:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2645, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "14284:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2647, + "indexExpression": { + "argumentTypes": null, + "id": 2646, + "name": "t", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2605, + "src": "14293:1:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14284:11:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2648, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "14284:19:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2649, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "14305:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2644, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "14279:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14279:40:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14257:62:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2652, + "nodeType": "ExpressionStatement", + "src": "14257:62:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2654, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "14347:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14347:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2656, + "name": "t", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2605, + "src": "14359:1:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2657, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "14362:13:6", + "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": 2653, + "name": "LOG_JOIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1459, + "src": "14338:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14338:38:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2659, + "nodeType": "EmitStatement", + "src": "14333:43:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2661, + "name": "t", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2605, + "src": "14406:1:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2662, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "14409:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14409:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2664, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2618, + "src": "14421:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2660, + "name": "_pullUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3706, + "src": "14390:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14390:45:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2666, + "nodeType": "ExpressionStatement", + "src": "14390:45:6" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2597, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "13956:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2598, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "13960:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13960:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13956:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2668, + "initializationExpression": { + "assignments": [ + 2594 + ], + "declarations": [ + { + "constant": false, + "id": 2594, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 2668, + "src": "13944:6:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2593, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13944:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2596, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13953:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13944:10:6" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "13976:3:6", + "subExpression": { + "argumentTypes": null, + "id": 2601, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "13976:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2603, + "nodeType": "ExpressionStatement", + "src": "13976:3:6" + }, + "nodeType": "ForStatement", + "src": "13939:507:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2670, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2559, + "src": "14470:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2669, + "name": "_mintPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3767, + "src": "14455:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 2671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14455:29:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2672, + "nodeType": "ExpressionStatement", + "src": "14455:29:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2674, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "14509:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14509:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2676, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2559, + "src": "14521:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2673, + "name": "_pushPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3757, + "src": "14494:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14494:41:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2678, + "nodeType": "ExpressionStatement", + "src": "14494:41:6" + } + ] + }, + "documentation": null, + "id": 2680, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2565, + "modifierName": { + "argumentTypes": null, + "id": 2564, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "13710:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13710:6:6" + }, + { + "arguments": null, + "id": 2567, + "modifierName": { + "argumentTypes": null, + "id": 2566, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "13725:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13725:6:6" + } + ], + "name": "joinPool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2563, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2559, + "name": "poolAmountOut", + "nodeType": "VariableDeclaration", + "scope": 2680, + "src": "13635:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2558, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13635:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2562, + "name": "maxAmountsIn", + "nodeType": "VariableDeclaration", + "scope": 2680, + "src": "13655:28:6", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2560, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13655:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2561, + "length": null, + "nodeType": "ArrayTypeName", + "src": "13655:6:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13634:50:6" + }, + "returnParameters": { + "id": 2568, + "nodeType": "ParameterList", + "parameters": [], + "src": "13736:0:6" + }, + "scope": 3778, + "src": "13617:925:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 2821, + "nodeType": "Block", + "src": "14667:975:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2693, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "14685:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f46494e414c495a4544", + "id": 2694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14697:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + }, + "value": "ERR_NOT_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "id": 2692, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "14677:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14677:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2696, + "nodeType": "ExpressionStatement", + "src": "14677:40:6" + }, + { + "assignments": [ + 2698 + ], + "declarations": [ + { + "constant": false, + "id": 2698, + "name": "poolTotal", + "nodeType": "VariableDeclaration", + "scope": 2821, + "src": "14728:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2697, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14728:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2701, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2699, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4052, + "src": "14745:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 2700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14745:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14728:30:6" + }, + { + "assignments": [ + 2703 + ], + "declarations": [ + { + "constant": false, + "id": 2703, + "name": "exitFee", + "nodeType": "VariableDeclaration", + "scope": 2821, + "src": "14768:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2702, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14768:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2708, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2705, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2682, + "src": "14788:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2706, + "name": "EXIT_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "14802:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2704, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "14783:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14783:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14768:43:6" + }, + { + "assignments": [ + 2710 + ], + "declarations": [ + { + "constant": false, + "id": 2710, + "name": "pAiAfterExitFee", + "nodeType": "VariableDeclaration", + "scope": 2821, + "src": "14821:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2709, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14821:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2715, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2712, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2682, + "src": "14849:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2713, + "name": "exitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2703, + "src": "14863:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2711, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "14844:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14844:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14821:50:6" + }, + { + "assignments": [ + 2717 + ], + "declarations": [ + { + "constant": false, + "id": 2717, + "name": "ratio", + "nodeType": "VariableDeclaration", + "scope": 2821, + "src": "14881:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2716, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14881:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2722, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2719, + "name": "pAiAfterExitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2710, + "src": "14899:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2720, + "name": "poolTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2698, + "src": "14916:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2718, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "14894:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14894:32:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14881:45:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2724, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2717, + "src": "14944:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2725, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14953:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14944:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d4154485f415050524f58", + "id": 2727, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14956:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + }, + "value": "ERR_MATH_APPROX" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "id": 2723, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "14936:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14936:38:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2729, + "nodeType": "ExpressionStatement", + "src": "14936:38:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2731, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "15000:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15000:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2733, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2682, + "src": "15012:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2730, + "name": "_pullPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3744, + "src": "14985:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14985:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2735, + "nodeType": "ExpressionStatement", + "src": "14985:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2737, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "15050:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2738, + "name": "exitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2703, + "src": "15060:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2736, + "name": "_pushPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3757, + "src": "15035:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15035:33:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2740, + "nodeType": "ExpressionStatement", + "src": "15035:33:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2742, + "name": "pAiAfterExitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2710, + "src": "15093:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2741, + "name": "_burnPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3777, + "src": "15078:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 2743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15078:31:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2744, + "nodeType": "ExpressionStatement", + "src": "15078:31:6" + }, + { + "body": { + "id": 2819, + "nodeType": "Block", + "src": "15162:473:6", + "statements": [ + { + "assignments": [ + 2757 + ], + "declarations": [ + { + "constant": false, + "id": 2757, + "name": "t", + "nodeType": "VariableDeclaration", + "scope": 2819, + "src": "15176:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2756, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15176:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2761, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2758, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "15188:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2760, + "indexExpression": { + "argumentTypes": null, + "id": 2759, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2746, + "src": "15196:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15188:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15176:22:6" + }, + { + "assignments": [ + 2763 + ], + "declarations": [ + { + "constant": false, + "id": 2763, + "name": "bal", + "nodeType": "VariableDeclaration", + "scope": 2819, + "src": "15212:8:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2762, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15212:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2768, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2764, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "15223:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2766, + "indexExpression": { + "argumentTypes": null, + "id": 2765, + "name": "t", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2757, + "src": "15232:1:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15223:11:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2767, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "15223:19:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15212:30:6" + }, + { + "assignments": [ + 2770 + ], + "declarations": [ + { + "constant": false, + "id": 2770, + "name": "tokenAmountOut", + "nodeType": "VariableDeclaration", + "scope": 2819, + "src": "15256:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2769, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15256:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2775, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2772, + "name": "ratio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2717, + "src": "15283:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2773, + "name": "bal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2763, + "src": "15290:3:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2771, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "15278:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15278:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15256:38:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2777, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2770, + "src": "15316:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2778, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15334:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15316:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d4154485f415050524f58", + "id": 2780, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15337:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + }, + "value": "ERR_MATH_APPROX" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "id": 2776, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "15308:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15308:47:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2782, + "nodeType": "ExpressionStatement", + "src": "15308:47:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2784, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2770, + "src": "15377:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2785, + "name": "minAmountsOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2685, + "src": "15395:13:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 2787, + "indexExpression": { + "argumentTypes": null, + "id": 2786, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2746, + "src": "15409:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15395:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15377:34:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4c494d49545f4f5554", + "id": 2789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15413:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + }, + "value": "ERR_LIMIT_OUT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + } + ], + "id": 2783, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "15369:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15369:60:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2791, + "nodeType": "ExpressionStatement", + "src": "15369:60:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2792, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "15443:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2794, + "indexExpression": { + "argumentTypes": null, + "id": 2793, + "name": "t", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2757, + "src": "15452:1:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15443:11:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2795, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "15443:19:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2797, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "15470:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2799, + "indexExpression": { + "argumentTypes": null, + "id": 2798, + "name": "t", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2757, + "src": "15479:1:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15470:11:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2800, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "15470:19:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2801, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2770, + "src": "15491:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2796, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "15465:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15465:41:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15443:63:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2804, + "nodeType": "ExpressionStatement", + "src": "15443:63:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2806, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "15534:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15534:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2808, + "name": "t", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2757, + "src": "15546:1:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2809, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2770, + "src": "15549:14:6", + "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": 2805, + "name": "LOG_EXIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1467, + "src": "15525:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15525:39:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2811, + "nodeType": "EmitStatement", + "src": "15520:44:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2813, + "name": "t", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2757, + "src": "15594:1:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2814, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "15597:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15597:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2816, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2770, + "src": "15609:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2812, + "name": "_pushUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3731, + "src": "15578:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15578:46:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2818, + "nodeType": "ExpressionStatement", + "src": "15578:46:6" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2749, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2746, + "src": "15137:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2750, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1531, + "src": "15141:7:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 2751, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15141:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15137:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2820, + "initializationExpression": { + "assignments": [ + 2746 + ], + "declarations": [ + { + "constant": false, + "id": 2746, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 2820, + "src": "15125:6:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2745, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15125:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2748, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15134:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "15125:10:6" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "15157:3:6", + "subExpression": { + "argumentTypes": null, + "id": 2753, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2746, + "src": "15157:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2755, + "nodeType": "ExpressionStatement", + "src": "15157:3:6" + }, + "nodeType": "ForStatement", + "src": "15120:515:6" + } + ] + }, + "documentation": null, + "id": 2822, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2688, + "modifierName": { + "argumentTypes": null, + "id": 2687, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "14641:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "14641:6:6" + }, + { + "arguments": null, + "id": 2690, + "modifierName": { + "argumentTypes": null, + "id": 2689, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "14656:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "14656:6:6" + } + ], + "name": "exitPool", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2686, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2682, + "name": "poolAmountIn", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "14566:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2681, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14566:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2685, + "name": "minAmountsOut", + "nodeType": "VariableDeclaration", + "scope": 2822, + "src": "14585:29:6", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 2683, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "14585:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2684, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14585:6:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14565:50:6" + }, + "returnParameters": { + "id": 2691, + "nodeType": "ParameterList", + "parameters": [], + "src": "14667:0:6" + }, + "scope": 3778, + "src": "14548:1094:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 3019, + "nodeType": "Block", + "src": "15921:1921:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2844, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "15940:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2846, + "indexExpression": { + "argumentTypes": null, + "id": 2845, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2824, + "src": "15949:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15940:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2847, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "15940:23:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 2848, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15965:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 2843, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "15932:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15932:49:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2850, + "nodeType": "ExpressionStatement", + "src": "15932:49:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2852, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "15999:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2854, + "indexExpression": { + "argumentTypes": null, + "id": 2853, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2828, + "src": "16008:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15999:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "15999:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16025:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 2851, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "15991:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15991:50:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2858, + "nodeType": "ExpressionStatement", + "src": "15991:50:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2860, + "name": "_publicSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1524, + "src": "16059:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f535741505f4e4f545f5055424c4943", + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16072:21:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282", + "typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\"" + }, + "value": "ERR_SWAP_NOT_PUBLIC" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282", + "typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\"" + } + ], + "id": 2859, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "16051:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16051:43:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2863, + "nodeType": "ExpressionStatement", + "src": "16051:43:6" + }, + { + "assignments": [ + 2865 + ], + "declarations": [ + { + "constant": false, + "id": 2865, + "name": "inRecord", + "nodeType": "VariableDeclaration", + "scope": 3019, + "src": "16105:23:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 2864, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "16105:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2871, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2866, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "16131:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2870, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2868, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2824, + "src": "16148:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2867, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16140:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16140:16:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16131:26:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16105:52:6" + }, + { + "assignments": [ + 2873 + ], + "declarations": [ + { + "constant": false, + "id": 2873, + "name": "outRecord", + "nodeType": "VariableDeclaration", + "scope": 3019, + "src": "16167:24:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 2872, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "16167:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2879, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2874, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "16194:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 2878, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2876, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2828, + "src": "16211:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16203:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16203:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16194:27:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16167:54:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2881, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2826, + "src": "16253:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2883, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2865, + "src": "16275:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "16275:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2885, + "name": "MAX_IN_RATIO", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 271, + "src": "16293:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2882, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "16270:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16270:36:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16253:53:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f494e5f524154494f", + "id": 2888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16321:18:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf", + "typeString": "literal_string \"ERR_MAX_IN_RATIO\"" + }, + "value": "ERR_MAX_IN_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf", + "typeString": "literal_string \"ERR_MAX_IN_RATIO\"" + } + ], + "id": 2880, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "16232:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:117:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2890, + "nodeType": "ExpressionStatement", + "src": "16232:117:6" + }, + { + "assignments": [ + 2892 + ], + "declarations": [ + { + "constant": false, + "id": 2892, + "name": "spotPriceBefore", + "nodeType": "VariableDeclaration", + "scope": 3019, + "src": "16360:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2891, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "16360:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2904, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2894, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2865, + "src": "16410:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "16410:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2896, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2865, + "src": "16440:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2897, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "16440:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2898, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2873, + "src": "16469:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2899, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "16469:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2900, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2873, + "src": "16500:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2901, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "16500:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2902, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "16530:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2893, + "name": "calcSpotPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "16383:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16383:165:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16360:188:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2906, + "name": "spotPriceBefore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2892, + "src": "16566:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2907, + "name": "maxPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2832, + "src": "16585:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16566:27:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4241445f4c494d49545f5052494345", + "id": 2909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16595:21:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88", + "typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\"" + }, + "value": "ERR_BAD_LIMIT_PRICE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88", + "typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\"" + } + ], + "id": 2905, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "16558:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16558:59:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2911, + "nodeType": "ExpressionStatement", + "src": "16558:59:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2912, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2839, + "src": "16628:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2914, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2865, + "src": "16673:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2915, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "16673:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2916, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2865, + "src": "16703:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2917, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "16703:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2918, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2873, + "src": "16732:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2919, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "16732:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2920, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2873, + "src": "16763:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2921, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "16763:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2922, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2826, + "src": "16793:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2923, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "16820:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2913, + "name": "calcOutGivenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "16645:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 2924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16645:193:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16628:210:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2926, + "nodeType": "ExpressionStatement", + "src": "16628:210:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2928, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2839, + "src": "16856:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 2929, + "name": "minAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2830, + "src": "16874:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16856:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4c494d49545f4f5554", + "id": 2931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16888:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + }, + "value": "ERR_LIMIT_OUT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + } + ], + "id": 2927, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "16848:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16848:56:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2933, + "nodeType": "ExpressionStatement", + "src": "16848:56:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2934, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2865, + "src": "16915:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2936, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "16915:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2938, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2865, + "src": "16939:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2939, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "16939:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2940, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2826, + "src": "16957:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2937, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "16934:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16934:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16915:56:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2943, + "nodeType": "ExpressionStatement", + "src": "16915:56:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2944, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2873, + "src": "16981:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2946, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "16981:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2948, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2873, + "src": "17006:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2949, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "17006:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2950, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2839, + "src": "17025:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2947, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "17001:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17001:39:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16981:59:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2953, + "nodeType": "ExpressionStatement", + "src": "16981:59:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 2966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2954, + "name": "spotPriceAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "17051:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2956, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2865, + "src": "17095:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2957, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "17095:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2958, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2865, + "src": "17125:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2959, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "17125:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2960, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2873, + "src": "17154:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2961, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "17154:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2962, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2873, + "src": "17185:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 2963, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "17185:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2964, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "17215:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2955, + "name": "calcSpotPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "17068:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17068:165:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17051:182:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2967, + "nodeType": "ExpressionStatement", + "src": "17051:182:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2969, + "name": "spotPriceAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "17251:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 2970, + "name": "spotPriceBefore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2892, + "src": "17269:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17251:33:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d4154485f415050524f58", + "id": 2972, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17286:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + }, + "value": "ERR_MATH_APPROX" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "id": 2968, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "17243:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17243:61:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2974, + "nodeType": "ExpressionStatement", + "src": "17243:61:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2976, + "name": "spotPriceAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "17327:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2977, + "name": "maxPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2832, + "src": "17345:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17327:26:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4c494d49545f5052494345", + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17355:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5", + "typeString": "literal_string \"ERR_LIMIT_PRICE\"" + }, + "value": "ERR_LIMIT_PRICE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5", + "typeString": "literal_string \"ERR_LIMIT_PRICE\"" + } + ], + "id": 2975, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "17319:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17319:54:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2981, + "nodeType": "ExpressionStatement", + "src": "17319:54:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2983, + "name": "spotPriceBefore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2892, + "src": "17404:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2985, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2826, + "src": "17428:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2986, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2839, + "src": "17443:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2984, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "17423:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17423:35:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17404:54:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d4154485f415050524f58", + "id": 2989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17473:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + }, + "value": "ERR_MATH_APPROX" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "id": 2982, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "17383:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17383:117:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2991, + "nodeType": "ExpressionStatement", + "src": "17383:117:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2993, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "17538:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17538:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2995, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2824, + "src": "17563:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2996, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2828, + "src": "17585:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2997, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2826, + "src": "17608:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2998, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2839, + "src": "17636:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2992, + "name": "LOG_SWAP", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1451, + "src": "17516:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256)" + } + }, + "id": 2999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17516:144:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3000, + "nodeType": "EmitStatement", + "src": "17511:149:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3002, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2824, + "src": "17687:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3003, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "17696:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17696:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3005, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2826, + "src": "17708:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3001, + "name": "_pullUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3706, + "src": "17671:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17671:51:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3007, + "nodeType": "ExpressionStatement", + "src": "17671:51:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3009, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2828, + "src": "17748:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3010, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "17758:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17758:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3012, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2839, + "src": "17770:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3008, + "name": "_pushUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3731, + "src": "17732:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17732:53:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3014, + "nodeType": "ExpressionStatement", + "src": "17732:53:6" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 3015, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2839, + "src": "17804:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3016, + "name": "spotPriceAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "17820:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3017, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "17803:32:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 2842, + "id": 3018, + "nodeType": "Return", + "src": "17796:39:6" + } + ] + }, + "documentation": null, + "id": 3020, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2835, + "modifierName": { + "argumentTypes": null, + "id": 2834, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "15836:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15836:6:6" + }, + { + "arguments": null, + "id": 2837, + "modifierName": { + "argumentTypes": null, + "id": 2836, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "15851:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15851:6:6" + } + ], + "name": "swapExactAmountIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2833, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2824, + "name": "tokenIn", + "nodeType": "VariableDeclaration", + "scope": 3020, + "src": "15685:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2823, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15685:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2826, + "name": "tokenAmountIn", + "nodeType": "VariableDeclaration", + "scope": 3020, + "src": "15710:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2825, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15710:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2828, + "name": "tokenOut", + "nodeType": "VariableDeclaration", + "scope": 3020, + "src": "15738:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2827, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15738:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2830, + "name": "minAmountOut", + "nodeType": "VariableDeclaration", + "scope": 3020, + "src": "15764:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2829, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15764:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2832, + "name": "maxPrice", + "nodeType": "VariableDeclaration", + "scope": 3020, + "src": "15791:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2831, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15791:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15675:135:6" + }, + "returnParameters": { + "id": 2842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2839, + "name": "tokenAmountOut", + "nodeType": "VariableDeclaration", + "scope": 3020, + "src": "15875:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2838, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15875:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2841, + "name": "spotPriceAfter", + "nodeType": "VariableDeclaration", + "scope": 3020, + "src": "15896:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2840, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15896:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15874:42:6" + }, + "scope": 3778, + "src": "15649:2193:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 3217, + "nodeType": "Block", + "src": "18121:1924:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3042, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "18139:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3044, + "indexExpression": { + "argumentTypes": null, + "id": 3043, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3022, + "src": "18148:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18139:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 3045, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "18139:23:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18164:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 3041, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "18131:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18131:49:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3048, + "nodeType": "ExpressionStatement", + "src": "18131:49:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3050, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "18198:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3052, + "indexExpression": { + "argumentTypes": null, + "id": 3051, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3026, + "src": "18207:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18198:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 3053, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "18198:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 3054, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18224:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 3049, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "18190:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18190:50:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3056, + "nodeType": "ExpressionStatement", + "src": "18190:50:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3058, + "name": "_publicSwap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1524, + "src": "18258:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f535741505f4e4f545f5055424c4943", + "id": 3059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18271:21:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282", + "typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\"" + }, + "value": "ERR_SWAP_NOT_PUBLIC" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282", + "typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\"" + } + ], + "id": 3057, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "18250:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18250:43:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3061, + "nodeType": "ExpressionStatement", + "src": "18250:43:6" + }, + { + "assignments": [ + 3063 + ], + "declarations": [ + { + "constant": false, + "id": 3063, + "name": "inRecord", + "nodeType": "VariableDeclaration", + "scope": 3217, + "src": "18304:23:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 3062, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "18304:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3069, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3064, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "18330:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3068, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3066, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3022, + "src": "18347:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18339:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18339:16:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18330:26:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18304:52:6" + }, + { + "assignments": [ + 3071 + ], + "declarations": [ + { + "constant": false, + "id": 3071, + "name": "outRecord", + "nodeType": "VariableDeclaration", + "scope": 3217, + "src": "18366:24:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 3070, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "18366:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3077, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3072, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "18393:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3076, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3074, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3026, + "src": "18410:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18402:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18402:17:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18393:27:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18366:54:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3079, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3028, + "src": "18452:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3081, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "18475:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3082, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "18475:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3083, + "name": "MAX_OUT_RATIO", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 279, + "src": "18494:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3080, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "18470:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18470:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18452:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f4f55545f524154494f", + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18523:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a", + "typeString": "literal_string \"ERR_MAX_OUT_RATIO\"" + }, + "value": "ERR_MAX_OUT_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a", + "typeString": "literal_string \"ERR_MAX_OUT_RATIO\"" + } + ], + "id": 3078, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "18431:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18431:121:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3088, + "nodeType": "ExpressionStatement", + "src": "18431:121:6" + }, + { + "assignments": [ + 3090 + ], + "declarations": [ + { + "constant": false, + "id": 3090, + "name": "spotPriceBefore", + "nodeType": "VariableDeclaration", + "scope": 3217, + "src": "18563:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3089, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "18563:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3102, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3092, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3063, + "src": "18613:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "18613:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3094, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3063, + "src": "18643:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3095, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "18643:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3096, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "18672:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3097, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "18672:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3098, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "18703:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3099, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "18703:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3100, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "18733:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3091, + "name": "calcSpotPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "18586:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 3101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18586:165:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18563:188:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3104, + "name": "spotPriceBefore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3090, + "src": "18778:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 3105, + "name": "maxPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3030, + "src": "18797:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18778:27:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4241445f4c494d49545f5052494345", + "id": 3107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18807:21:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88", + "typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\"" + }, + "value": "ERR_BAD_LIMIT_PRICE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88", + "typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\"" + } + ], + "id": 3103, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "18770:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18770:59:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3109, + "nodeType": "ExpressionStatement", + "src": "18770:59:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3110, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3037, + "src": "18840:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3112, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3063, + "src": "18884:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3113, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "18884:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3114, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3063, + "src": "18914:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3115, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "18914:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3116, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "18943:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "18943:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3118, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "18974:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3119, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "18974:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3120, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3028, + "src": "19004:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3121, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "19032:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3111, + "name": "calcInGivenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 582, + "src": "18856:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 3122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18856:194:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18840:210:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3124, + "nodeType": "ExpressionStatement", + "src": "18840:210:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3126, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3037, + "src": "19068:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 3127, + "name": "maxAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3024, + "src": "19085:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19068:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4c494d49545f494e", + "id": 3129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19098:14:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + }, + "value": "ERR_LIMIT_IN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + } + ], + "id": 3125, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "19060:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19060:53:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3131, + "nodeType": "ExpressionStatement", + "src": "19060:53:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3132, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3063, + "src": "19124:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3134, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "19124:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3136, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3063, + "src": "19148:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3137, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "19148:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3138, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3037, + "src": "19166:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3135, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "19143:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19143:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19124:56:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3141, + "nodeType": "ExpressionStatement", + "src": "19124:56:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3142, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "19190:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3144, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "19190:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3146, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "19215:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3147, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "19215:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3148, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3028, + "src": "19234:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3145, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "19210:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19210:39:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19190:59:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3151, + "nodeType": "ExpressionStatement", + "src": "19190:59:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3152, + "name": "spotPriceAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3039, + "src": "19260:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3154, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3063, + "src": "19304:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3155, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "19304:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3156, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3063, + "src": "19334:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3157, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "19334:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3158, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "19363:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3159, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "19363:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3160, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "19394:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3161, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "19394:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3162, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "19424:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3153, + "name": "calcSpotPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "19277:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 3163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19277:165:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19260:182:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3165, + "nodeType": "ExpressionStatement", + "src": "19260:182:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3167, + "name": "spotPriceAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3039, + "src": "19460:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3168, + "name": "spotPriceBefore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3090, + "src": "19478:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19460:33:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d4154485f415050524f58", + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19495:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + }, + "value": "ERR_MATH_APPROX" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "id": 3166, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "19452:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19452:61:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3172, + "nodeType": "ExpressionStatement", + "src": "19452:61:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3174, + "name": "spotPriceAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3039, + "src": "19531:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 3175, + "name": "maxPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3030, + "src": "19549:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19531:26:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4c494d49545f5052494345", + "id": 3177, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19559:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5", + "typeString": "literal_string \"ERR_LIMIT_PRICE\"" + }, + "value": "ERR_LIMIT_PRICE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5", + "typeString": "literal_string \"ERR_LIMIT_PRICE\"" + } + ], + "id": 3173, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "19523:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19523:54:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3179, + "nodeType": "ExpressionStatement", + "src": "19523:54:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3181, + "name": "spotPriceBefore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3090, + "src": "19608:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3183, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3037, + "src": "19632:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3184, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3028, + "src": "19647:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3182, + "name": "bdiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "19627:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19627:35:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19608:54:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d4154485f415050524f58", + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19677:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + }, + "value": "ERR_MATH_APPROX" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "id": 3180, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "19587:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19587:117:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3189, + "nodeType": "ExpressionStatement", + "src": "19587:117:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3191, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "19742:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19742:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3193, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3022, + "src": "19767:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3194, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3026, + "src": "19789:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3195, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3037, + "src": "19812:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3196, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3028, + "src": "19840:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3190, + "name": "LOG_SWAP", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1451, + "src": "19720:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256)" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19720:144:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3198, + "nodeType": "EmitStatement", + "src": "19715:149:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3200, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3022, + "src": "19891:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3201, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "19900:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19900:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3203, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3037, + "src": "19912:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3199, + "name": "_pullUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3706, + "src": "19875:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19875:51:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3205, + "nodeType": "ExpressionStatement", + "src": "19875:51:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3207, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3026, + "src": "19952:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3208, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "19962:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19962:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3210, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3028, + "src": "19974:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3206, + "name": "_pushUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3731, + "src": "19936:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19936:53:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3212, + "nodeType": "ExpressionStatement", + "src": "19936:53:6" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 3213, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3037, + "src": "20008:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3214, + "name": "spotPriceAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3039, + "src": "20023:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3215, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "20007:31:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 3040, + "id": 3216, + "nodeType": "Return", + "src": "20000:38:6" + } + ] + }, + "documentation": null, + "id": 3218, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3033, + "modifierName": { + "argumentTypes": null, + "id": 3032, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "18036:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "18036:6:6" + }, + { + "arguments": null, + "id": 3035, + "modifierName": { + "argumentTypes": null, + "id": 3034, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "18051:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "18051:6:6" + } + ], + "name": "swapExactAmountOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3031, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3022, + "name": "tokenIn", + "nodeType": "VariableDeclaration", + "scope": 3218, + "src": "17885:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3021, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17885:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3024, + "name": "maxAmountIn", + "nodeType": "VariableDeclaration", + "scope": 3218, + "src": "17910:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3023, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "17910:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3026, + "name": "tokenOut", + "nodeType": "VariableDeclaration", + "scope": 3218, + "src": "17936:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3025, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17936:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3028, + "name": "tokenAmountOut", + "nodeType": "VariableDeclaration", + "scope": 3218, + "src": "17962:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3027, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "17962:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3030, + "name": "maxPrice", + "nodeType": "VariableDeclaration", + "scope": 3218, + "src": "17991:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3029, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "17991:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17875:135:6" + }, + "returnParameters": { + "id": 3040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3037, + "name": "tokenAmountIn", + "nodeType": "VariableDeclaration", + "scope": 3218, + "src": "18076:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3036, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "18076:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3039, + "name": "spotPriceAfter", + "nodeType": "VariableDeclaration", + "scope": 3218, + "src": "18096:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3038, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "18096:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18075:41:6" + }, + "scope": 3778, + "src": "17848:2197:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 3321, + "nodeType": "Block", + "src": "20265:915:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3234, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "20291:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f46494e414c495a4544", + "id": 3235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20303:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + }, + "value": "ERR_NOT_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "id": 3233, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "20283:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20283:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3237, + "nodeType": "ExpressionStatement", + "src": "20283:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3239, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "20341:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3241, + "indexExpression": { + "argumentTypes": null, + "id": 3240, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "20350:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20341:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 3242, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "20341:23:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 3243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20366:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 3238, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "20333:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20333:49:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3245, + "nodeType": "ExpressionStatement", + "src": "20333:49:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3247, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "20413:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3249, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "20435:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3251, + "indexExpression": { + "argumentTypes": null, + "id": 3250, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "20444:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20435:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 3252, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "20435:25:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3253, + "name": "MAX_IN_RATIO", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 271, + "src": "20462:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3248, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "20430:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20430:45:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20413:62:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f494e5f524154494f", + "id": 3256, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20490:18:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf", + "typeString": "literal_string \"ERR_MAX_IN_RATIO\"" + }, + "value": "ERR_MAX_IN_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf", + "typeString": "literal_string \"ERR_MAX_IN_RATIO\"" + } + ], + "id": 3246, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "20392:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20392:126:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3258, + "nodeType": "ExpressionStatement", + "src": "20392:126:6" + }, + { + "assignments": [ + 3260 + ], + "declarations": [ + { + "constant": false, + "id": 3260, + "name": "inRecord", + "nodeType": "VariableDeclaration", + "scope": 3321, + "src": "20529:23:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 3259, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "20529:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3264, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3261, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "20555:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3263, + "indexExpression": { + "argumentTypes": null, + "id": 3262, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "20564:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20555:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20529:43:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3265, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3231, + "src": "20583:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3267, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "20637:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "20637:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3269, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "20667:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3270, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "20667:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3271, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "20696:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3272, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "20722:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3273, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "20748:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3274, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "20775:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3266, + "name": "calcPoolOutGivenSingleIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 664, + "src": "20599:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 3275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20599:194:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20583:210:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3277, + "nodeType": "ExpressionStatement", + "src": "20583:210:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3279, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3231, + "src": "20812:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3280, + "name": "minPoolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3224, + "src": "20829:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20812:33:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4c494d49545f4f5554", + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20847:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + }, + "value": "ERR_LIMIT_OUT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + } + ], + "id": 3278, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "20804:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20804:59:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3284, + "nodeType": "ExpressionStatement", + "src": "20804:59:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3285, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "20874:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "20874:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3289, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "20898:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3290, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "20898:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3291, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "20916:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3288, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "20893:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20893:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20874:56:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3294, + "nodeType": "ExpressionStatement", + "src": "20874:56:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3296, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "20955:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20955:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3298, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "20967:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3299, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "20976:13:6", + "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": 3295, + "name": "LOG_JOIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1459, + "src": "20946:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20946:44:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3301, + "nodeType": "EmitStatement", + "src": "20941:49:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3303, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3231, + "src": "21016:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3302, + "name": "_mintPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3767, + "src": "21001:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21001:29:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3305, + "nodeType": "ExpressionStatement", + "src": "21001:29:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3307, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "21055:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21055:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3309, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3231, + "src": "21067:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3306, + "name": "_pushPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3757, + "src": "21040:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21040:41:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3311, + "nodeType": "ExpressionStatement", + "src": "21040:41:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3313, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3220, + "src": "21107:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3314, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "21116:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21116:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3316, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3222, + "src": "21128:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3312, + "name": "_pullUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3706, + "src": "21091:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21091:51:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3318, + "nodeType": "ExpressionStatement", + "src": "21091:51:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3319, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3231, + "src": "21160:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3232, + "id": 3320, + "nodeType": "Return", + "src": "21153:20:6" + } + ] + }, + "documentation": null, + "id": 3322, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3227, + "modifierName": { + "argumentTypes": null, + "id": 3226, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "20201:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20201:6:6" + }, + { + "arguments": null, + "id": 3229, + "modifierName": { + "argumentTypes": null, + "id": 3228, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "20216:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20216:6:6" + } + ], + "name": "joinswapExternAmountIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3220, + "name": "tokenIn", + "nodeType": "VariableDeclaration", + "scope": 3322, + "src": "20093:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3219, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20093:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3222, + "name": "tokenAmountIn", + "nodeType": "VariableDeclaration", + "scope": 3322, + "src": "20119:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3221, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "20119:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3224, + "name": "minPoolAmountOut", + "nodeType": "VariableDeclaration", + "scope": 3322, + "src": "20148:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3223, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "20148:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20083:92:6" + }, + "returnParameters": { + "id": 3232, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3231, + "name": "poolAmountOut", + "nodeType": "VariableDeclaration", + "scope": 3322, + "src": "20240:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3230, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "20240:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20239:20:6" + }, + "scope": 3778, + "src": "20052:1128:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 3432, + "nodeType": "Block", + "src": "21392:966:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3338, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "21410:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f46494e414c495a4544", + "id": 3339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21422:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + }, + "value": "ERR_NOT_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "id": 3337, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "21402:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21402:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3341, + "nodeType": "ExpressionStatement", + "src": "21402:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3343, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "21460:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3345, + "indexExpression": { + "argumentTypes": null, + "id": 3344, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3324, + "src": "21469:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21460:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 3346, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "21460:23:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 3347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21485:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 3342, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "21452:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21452:49:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3349, + "nodeType": "ExpressionStatement", + "src": "21452:49:6" + }, + { + "assignments": [ + 3351 + ], + "declarations": [ + { + "constant": false, + "id": 3351, + "name": "inRecord", + "nodeType": "VariableDeclaration", + "scope": 3432, + "src": "21512:23:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 3350, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "21512:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3355, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3352, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "21538:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3354, + "indexExpression": { + "argumentTypes": null, + "id": 3353, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3324, + "src": "21547:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21538:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21512:43:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3356, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "21566:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3358, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "21620:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3359, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "21620:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3360, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "21650:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "21650:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3362, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "21679:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3363, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "21705:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3364, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3326, + "src": "21731:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3365, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "21758:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3357, + "name": "calcSingleInGivenPoolOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 753, + "src": "21582:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 3366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21582:194:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21566:210:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3368, + "nodeType": "ExpressionStatement", + "src": "21566:210:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3370, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "21795:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21812:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "21795:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d4154485f415050524f58", + "id": 3373, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21815:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + }, + "value": "ERR_MATH_APPROX" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "id": 3369, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "21787:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21787:46:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3375, + "nodeType": "ExpressionStatement", + "src": "21787:46:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3377, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "21851:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 3378, + "name": "maxAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3328, + "src": "21868:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21851:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4c494d49545f494e", + "id": 3380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21881:14:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + }, + "value": "ERR_LIMIT_IN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + } + ], + "id": 3376, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "21843:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21843:53:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3382, + "nodeType": "ExpressionStatement", + "src": "21843:53:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3384, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "21936:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3386, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "21958:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3388, + "indexExpression": { + "argumentTypes": null, + "id": 3387, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3324, + "src": "21967:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21958:17:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 3389, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "21958:25:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3390, + "name": "MAX_IN_RATIO", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 271, + "src": "21985:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3385, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "21953:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21953:45:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21936:62:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f494e5f524154494f", + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22013:18:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf", + "typeString": "literal_string \"ERR_MAX_IN_RATIO\"" + }, + "value": "ERR_MAX_IN_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf", + "typeString": "literal_string \"ERR_MAX_IN_RATIO\"" + } + ], + "id": 3383, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "21915:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21915:126:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3395, + "nodeType": "ExpressionStatement", + "src": "21915:126:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3396, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "22052:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3398, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "22052:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3400, + "name": "inRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3351, + "src": "22076:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3401, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "22076:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3402, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "22094:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3399, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "22071:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22071:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22052:56:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3405, + "nodeType": "ExpressionStatement", + "src": "22052:56:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3407, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "22133:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22133:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3409, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3324, + "src": "22145:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3410, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "22154:13:6", + "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": 3406, + "name": "LOG_JOIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1459, + "src": "22124:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22124:44:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3412, + "nodeType": "EmitStatement", + "src": "22119:49:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3414, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3326, + "src": "22194:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3413, + "name": "_mintPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3767, + "src": "22179:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22179:29:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3416, + "nodeType": "ExpressionStatement", + "src": "22179:29:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3418, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "22233:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22233:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3420, + "name": "poolAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3326, + "src": "22245:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3417, + "name": "_pushPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3757, + "src": "22218:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22218:41:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3422, + "nodeType": "ExpressionStatement", + "src": "22218:41:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3424, + "name": "tokenIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3324, + "src": "22285:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3425, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "22294:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22294:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3427, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "22306:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3423, + "name": "_pullUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3706, + "src": "22269:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22269:51:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3429, + "nodeType": "ExpressionStatement", + "src": "22269:51:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3430, + "name": "tokenAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3335, + "src": "22338:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3336, + "id": 3431, + "nodeType": "Return", + "src": "22331:20:6" + } + ] + }, + "documentation": null, + "id": 3433, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3331, + "modifierName": { + "argumentTypes": null, + "id": 3330, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "21329:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21329:6:6" + }, + { + "arguments": null, + "id": 3333, + "modifierName": { + "argumentTypes": null, + "id": 3332, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "21344:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21344:6:6" + } + ], + "name": "joinswapPoolAmountOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3329, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3324, + "name": "tokenIn", + "nodeType": "VariableDeclaration", + "scope": 3433, + "src": "21226:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3323, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21226:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3326, + "name": "poolAmountOut", + "nodeType": "VariableDeclaration", + "scope": 3433, + "src": "21252:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3325, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "21252:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3328, + "name": "maxAmountIn", + "nodeType": "VariableDeclaration", + "scope": 3433, + "src": "21281:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3327, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "21281:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21216:87:6" + }, + "returnParameters": { + "id": 3336, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3335, + "name": "tokenAmountIn", + "nodeType": "VariableDeclaration", + "scope": 3433, + "src": "21368:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3334, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "21368:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21367:20:6" + }, + "scope": 3778, + "src": "21186:1172:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 3551, + "nodeType": "Block", + "src": "22571:1040:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3449, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "22589:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f46494e414c495a4544", + "id": 3450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22601:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + }, + "value": "ERR_NOT_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "id": 3448, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "22581:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22581:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3452, + "nodeType": "ExpressionStatement", + "src": "22581:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3454, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "22639:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3456, + "indexExpression": { + "argumentTypes": null, + "id": 3455, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3435, + "src": "22648:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22639:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 3457, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "22639:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 3458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22665:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 3453, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "22631:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22631:50:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3460, + "nodeType": "ExpressionStatement", + "src": "22631:50:6" + }, + { + "assignments": [ + 3462 + ], + "declarations": [ + { + "constant": false, + "id": 3462, + "name": "outRecord", + "nodeType": "VariableDeclaration", + "scope": 3551, + "src": "22692:24:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 3461, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "22692:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3466, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3463, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "22719:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3465, + "indexExpression": { + "argumentTypes": null, + "id": 3464, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3435, + "src": "22728:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22719:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22692:45:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3467, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3446, + "src": "22748:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3469, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3462, + "src": "22803:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3470, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "22803:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3471, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3462, + "src": "22834:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3472, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "22834:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3473, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "22864:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3474, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "22890:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3475, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "22916:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3476, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "22942:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3468, + "name": "calcSingleOutGivenPoolIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 848, + "src": "22765:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 3477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22765:195:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22748:212:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3479, + "nodeType": "ExpressionStatement", + "src": "22748:212:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3481, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3446, + "src": "22979:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3482, + "name": "minAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3439, + "src": "22997:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22979:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4c494d49545f4f5554", + "id": 3484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23011:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + }, + "value": "ERR_LIMIT_OUT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + } + ], + "id": 3480, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "22971:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22971:56:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3486, + "nodeType": "ExpressionStatement", + "src": "22971:56:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3488, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3446, + "src": "23067:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3490, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "23090:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3492, + "indexExpression": { + "argumentTypes": null, + "id": 3491, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3435, + "src": "23099:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23090:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 3493, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "23090:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3494, + "name": "MAX_OUT_RATIO", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 279, + "src": "23118:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3489, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "23085:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23085:47:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23067:65:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f4f55545f524154494f", + "id": 3497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23147:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a", + "typeString": "literal_string \"ERR_MAX_OUT_RATIO\"" + }, + "value": "ERR_MAX_OUT_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a", + "typeString": "literal_string \"ERR_MAX_OUT_RATIO\"" + } + ], + "id": 3487, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "23046:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23046:130:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3499, + "nodeType": "ExpressionStatement", + "src": "23046:130:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3500, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3462, + "src": "23187:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3502, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "23187:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3504, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3462, + "src": "23212:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3505, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "23212:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3506, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3446, + "src": "23231:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3503, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "23207:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23207:39:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23187:59:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3509, + "nodeType": "ExpressionStatement", + "src": "23187:59:6" + }, + { + "assignments": [ + 3511 + ], + "declarations": [ + { + "constant": false, + "id": 3511, + "name": "exitFee", + "nodeType": "VariableDeclaration", + "scope": 3551, + "src": "23257:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3510, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "23257:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3516, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3513, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "23277:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3514, + "name": "EXIT_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "23291:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3512, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "23272:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23272:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23257:43:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3518, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "23325:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23325:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3520, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3435, + "src": "23337:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3521, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3446, + "src": "23347:14:6", + "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": 3517, + "name": "LOG_EXIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1467, + "src": "23316:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23316:46:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3523, + "nodeType": "EmitStatement", + "src": "23311:51:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3525, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "23388:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23388:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3527, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "23400:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3524, + "name": "_pullPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3744, + "src": "23373:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23373:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3529, + "nodeType": "ExpressionStatement", + "src": "23373:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3532, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "23443:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3533, + "name": "exitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3511, + "src": "23457:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3531, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "23438:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23438:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3530, + "name": "_burnPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3777, + "src": "23423:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23423:43:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3536, + "nodeType": "ExpressionStatement", + "src": "23423:43:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3538, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "23491:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3539, + "name": "exitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3511, + "src": "23501:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3537, + "name": "_pushPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3757, + "src": "23476:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23476:33:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3541, + "nodeType": "ExpressionStatement", + "src": "23476:33:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3543, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3435, + "src": "23535:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3544, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "23545:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23545:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3546, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3446, + "src": "23557:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3542, + "name": "_pushUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3731, + "src": "23519:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23519:53:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3548, + "nodeType": "ExpressionStatement", + "src": "23519:53:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3549, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3446, + "src": "23590:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3447, + "id": 3550, + "nodeType": "Return", + "src": "23583:21:6" + } + ] + }, + "documentation": null, + "id": 3552, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3442, + "modifierName": { + "argumentTypes": null, + "id": 3441, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "22507:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "22507:6:6" + }, + { + "arguments": null, + "id": 3444, + "modifierName": { + "argumentTypes": null, + "id": 3443, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "22522:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "22522:6:6" + } + ], + "name": "exitswapPoolAmountIn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3440, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3435, + "name": "tokenOut", + "nodeType": "VariableDeclaration", + "scope": 3552, + "src": "22403:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3434, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22403:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3437, + "name": "poolAmountIn", + "nodeType": "VariableDeclaration", + "scope": 3552, + "src": "22430:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3436, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "22430:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3439, + "name": "minAmountOut", + "nodeType": "VariableDeclaration", + "scope": 3552, + "src": "22458:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3438, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "22458:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22393:88:6" + }, + "returnParameters": { + "id": 3447, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3446, + "name": "tokenAmountOut", + "nodeType": "VariableDeclaration", + "scope": 3552, + "src": "22546:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3445, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "22546:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22545:21:6" + }, + "scope": 3778, + "src": "22364:1247:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 3677, + "nodeType": "Block", + "src": "23830:1092:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3568, + "name": "_finalized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "23848:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f46494e414c495a4544", + "id": 3569, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23860:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + }, + "value": "ERR_NOT_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "id": 3567, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "23840:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23840:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3571, + "nodeType": "ExpressionStatement", + "src": "23840:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3573, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "23898:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3575, + "indexExpression": { + "argumentTypes": null, + "id": 3574, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3554, + "src": "23907:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23898:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 3576, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bound", + "nodeType": "MemberAccess", + "referencedDeclaration": 1432, + "src": "23898:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f424f554e44", + "id": 3577, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23924:15:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + }, + "value": "ERR_NOT_BOUND" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "id": 3572, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "23890:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23890:50:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3579, + "nodeType": "ExpressionStatement", + "src": "23890:50:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3581, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3556, + "src": "23971:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3583, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "23994:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3585, + "indexExpression": { + "argumentTypes": null, + "id": 3584, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3554, + "src": "24003:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23994:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "id": 3586, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "23994:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3587, + "name": "MAX_OUT_RATIO", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 279, + "src": "24022:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3582, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "23989:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23989:47:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23971:65:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f4f55545f524154494f", + "id": 3590, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24051:19:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a", + "typeString": "literal_string \"ERR_MAX_OUT_RATIO\"" + }, + "value": "ERR_MAX_OUT_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a", + "typeString": "literal_string \"ERR_MAX_OUT_RATIO\"" + } + ], + "id": 3580, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "23950:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23950:130:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3592, + "nodeType": "ExpressionStatement", + "src": "23950:130:6" + }, + { + "assignments": [ + 3594 + ], + "declarations": [ + { + "constant": false, + "id": 3594, + "name": "outRecord", + "nodeType": "VariableDeclaration", + "scope": 3677, + "src": "24091:24:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + }, + "typeName": { + "contractScope": null, + "id": 3593, + "name": "Record", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1439, + "src": "24091:6:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3598, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3595, + "name": "_records", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "24118:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$", + "typeString": "mapping(address => struct BPool.Record storage ref)" + } + }, + "id": 3597, + "indexExpression": { + "argumentTypes": null, + "id": 3596, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3554, + "src": "24127:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24118:18:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage", + "typeString": "struct BPool.Record storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24091:45:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3599, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "24147:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3601, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3594, + "src": "24200:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3602, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "24200:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3603, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3594, + "src": "24231:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3604, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "denorm", + "nodeType": "MemberAccess", + "referencedDeclaration": 1436, + "src": "24231:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3605, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "24261:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3606, + "name": "_totalWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1537, + "src": "24287:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3607, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3556, + "src": "24313:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3608, + "name": "_swapFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "24341:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3600, + "name": "calcPoolInGivenSingleOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 944, + "src": "24162:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 3609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24162:197:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24147:212:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3611, + "nodeType": "ExpressionStatement", + "src": "24147:212:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3613, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "24378:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24394:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24378:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d4154485f415050524f58", + "id": 3616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24397:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + }, + "value": "ERR_MATH_APPROX" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "id": 3612, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "24370:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24370:45:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3618, + "nodeType": "ExpressionStatement", + "src": "24370:45:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3620, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "24433:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 3621, + "name": "maxPoolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3558, + "src": "24449:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24433:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4c494d49545f494e", + "id": 3623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24466:14:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + }, + "value": "ERR_LIMIT_IN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + } + ], + "id": 3619, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "24425:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24425:56:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3625, + "nodeType": "ExpressionStatement", + "src": "24425:56:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3626, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3594, + "src": "24492:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "24492:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3630, + "name": "outRecord", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3594, + "src": "24517:9:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Record_$1439_storage_ptr", + "typeString": "struct BPool.Record storage pointer" + } + }, + "id": 3631, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1438, + "src": "24517:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3632, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3556, + "src": "24536:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3629, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "24512:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24512:39:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24492:59:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3635, + "nodeType": "ExpressionStatement", + "src": "24492:59:6" + }, + { + "assignments": [ + 3637 + ], + "declarations": [ + { + "constant": false, + "id": 3637, + "name": "exitFee", + "nodeType": "VariableDeclaration", + "scope": 3677, + "src": "24562:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3636, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "24562:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3642, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3639, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "24582:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3640, + "name": "EXIT_FEE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "24596:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3638, + "name": "bmul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "24577:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24577:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24562:43:6" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3644, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "24630:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24630:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3646, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3554, + "src": "24642:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3647, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3556, + "src": "24652:14:6", + "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": 3643, + "name": "LOG_EXIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1467, + "src": "24621:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24621:46:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3649, + "nodeType": "EmitStatement", + "src": "24616:51:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3651, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "24693:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24693:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3653, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "24705:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3650, + "name": "_pullPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3744, + "src": "24678:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24678:40:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3655, + "nodeType": "ExpressionStatement", + "src": "24678:40:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3658, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "24748:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3659, + "name": "exitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "24762:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3657, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "24743:4:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24743:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3656, + "name": "_burnPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3777, + "src": "24728:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24728:43:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3662, + "nodeType": "ExpressionStatement", + "src": "24728:43:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3664, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1520, + "src": "24796:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3665, + "name": "exitFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3637, + "src": "24806:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3663, + "name": "_pushPoolShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3757, + "src": "24781:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24781:33:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3667, + "nodeType": "ExpressionStatement", + "src": "24781:33:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3669, + "name": "tokenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3554, + "src": "24840:8:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3670, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "24850:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24850:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3672, + "name": "tokenAmountOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3556, + "src": "24862:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3668, + "name": "_pushUnderlying", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3731, + "src": "24824:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24824:53:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3674, + "nodeType": "ExpressionStatement", + "src": "24824:53:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 3675, + "name": "poolAmountIn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "24903:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3566, + "id": 3676, + "nodeType": "Return", + "src": "24896:19:6" + } + ] + }, + "documentation": null, + "id": 3678, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3561, + "modifierName": { + "argumentTypes": null, + "id": 3560, + "name": "_logs_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "23768:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "23768:6:6" + }, + { + "arguments": null, + "id": 3563, + "modifierName": { + "argumentTypes": null, + "id": 3562, + "name": "_lock_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1506, + "src": "23783:6:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "23783:6:6" + } + ], + "name": "exitswapExternAmountOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3554, + "name": "tokenOut", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "23659:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3553, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23659:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3556, + "name": "tokenAmountOut", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "23686:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3555, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "23686:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3558, + "name": "maxPoolAmountIn", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "23716:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3557, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "23716:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23649:93:6" + }, + "returnParameters": { + "id": 3566, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3565, + "name": "poolAmountIn", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "23807:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3564, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "23807:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23806:19:6" + }, + "scope": 3778, + "src": "23617:1305:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 3705, + "nodeType": "Block", + "src": "25176:126:6", + "statements": [ + { + "assignments": [ + 3688 + ], + "declarations": [ + { + "constant": false, + "id": 3688, + "name": "xfer", + "nodeType": "VariableDeclaration", + "scope": 3705, + "src": "25186:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3687, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "25186:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3699, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3693, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3682, + "src": "25225:4:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3695, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7155, + "src": "25239:4:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BPool_$3778", + "typeString": "contract BPool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BPool_$3778", + "typeString": "contract BPool" + } + ], + "id": 3694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25231:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25231:13:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3697, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3684, + "src": "25246:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3690, + "name": "erc20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3680, + "src": "25205:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3689, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7106, + "src": "25198:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$7106_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 3691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25198:13:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$7106", + "typeString": "contract IERC20" + } + }, + "id": 3692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 7089, + "src": "25198:26:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 3698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25198:55:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25186:67:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3701, + "name": "xfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3688, + "src": "25271:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f45524332305f46414c5345", + "id": 3702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25277:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f", + "typeString": "literal_string \"ERR_ERC20_FALSE\"" + }, + "value": "ERR_ERC20_FALSE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f", + "typeString": "literal_string \"ERR_ERC20_FALSE\"" + } + ], + "id": 3700, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "25263:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25263:32:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3704, + "nodeType": "ExpressionStatement", + "src": "25263:32:6" + } + ] + }, + "documentation": null, + "id": 3706, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_pullUnderlying", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3680, + "name": "erc20", + "nodeType": "VariableDeclaration", + "scope": 3706, + "src": "25113:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3679, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25113:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3682, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3706, + "src": "25128:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3681, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25128:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3684, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3706, + "src": "25142:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3683, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "25142:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25112:42:6" + }, + "returnParameters": { + "id": 3686, + "nodeType": "ParameterList", + "parameters": [], + "src": "25176:0:6" + }, + "scope": 3778, + "src": "25088:214:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3730, + "nodeType": "Block", + "src": "25394:105:6", + "statements": [ + { + "assignments": [ + 3716 + ], + "declarations": [ + { + "constant": false, + "id": 3716, + "name": "xfer", + "nodeType": "VariableDeclaration", + "scope": 3730, + "src": "25404:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3715, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "25404:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3724, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3721, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3710, + "src": "25439:2:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3722, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3712, + "src": "25443:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3718, + "name": "erc20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3708, + "src": "25423:5:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3717, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7106, + "src": "25416:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$7106_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 3719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25416:13:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$7106", + "typeString": "contract IERC20" + } + }, + "id": 3720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 7060, + "src": "25416:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 3723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25416:34:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25404:46:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3726, + "name": "xfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3716, + "src": "25468:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f45524332305f46414c5345", + "id": 3727, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25474:17:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f", + "typeString": "literal_string \"ERR_ERC20_FALSE\"" + }, + "value": "ERR_ERC20_FALSE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f", + "typeString": "literal_string \"ERR_ERC20_FALSE\"" + } + ], + "id": 3725, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "25460:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25460:32:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3729, + "nodeType": "ExpressionStatement", + "src": "25460:32:6" + } + ] + }, + "documentation": null, + "id": 3731, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_pushUnderlying", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3713, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3708, + "name": "erc20", + "nodeType": "VariableDeclaration", + "scope": 3731, + "src": "25333:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3707, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25333:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3710, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3731, + "src": "25348:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3709, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25348:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3712, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3731, + "src": "25360:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3711, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "25360:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25332:40:6" + }, + "returnParameters": { + "id": 3714, + "nodeType": "ParameterList", + "parameters": [], + "src": "25394:0:6" + }, + "scope": 3778, + "src": "25308:191:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3743, + "nodeType": "Block", + "src": "25577:36:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3739, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "25593:4:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3740, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3735, + "src": "25599:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3738, + "name": "_pull", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3978, + "src": "25587:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25587:19:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3742, + "nodeType": "ExpressionStatement", + "src": "25587:19:6" + } + ] + }, + "documentation": null, + "id": 3744, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_pullPoolShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3736, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3733, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3744, + "src": "25529:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3732, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25529:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3735, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3744, + "src": "25543:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3734, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "25543:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25528:27:6" + }, + "returnParameters": { + "id": 3737, + "nodeType": "ParameterList", + "parameters": [], + "src": "25577:0:6" + }, + "scope": 3778, + "src": "25505:108:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3756, + "nodeType": "Block", + "src": "25689:34:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3752, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3746, + "src": "25705:2:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3753, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3748, + "src": "25709:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3751, + "name": "_push", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3962, + "src": "25699:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25699:17:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3755, + "nodeType": "ExpressionStatement", + "src": "25699:17:6" + } + ] + }, + "documentation": null, + "id": 3757, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_pushPoolShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3746, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3757, + "src": "25643:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3745, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25643:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3748, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3757, + "src": "25655:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3747, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "25655:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25642:25:6" + }, + "returnParameters": { + "id": 3750, + "nodeType": "ParameterList", + "parameters": [], + "src": "25689:0:6" + }, + "scope": 3778, + "src": "25619:104:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3766, + "nodeType": "Block", + "src": "25787:30:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3763, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3759, + "src": "25803:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3762, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3850, + "src": "25797:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25797:13:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3765, + "nodeType": "ExpressionStatement", + "src": "25797:13:6" + } + ] + }, + "documentation": null, + "id": 3767, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mintPoolShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3760, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3759, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3767, + "src": "25753:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3758, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "25753:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25752:13:6" + }, + "returnParameters": { + "id": 3761, + "nodeType": "ParameterList", + "parameters": [], + "src": "25787:0:6" + }, + "scope": 3778, + "src": "25729:88:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3776, + "nodeType": "Block", + "src": "25881:30:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3773, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3769, + "src": "25897:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3772, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3899, + "src": "25891:5:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25891:13:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3775, + "nodeType": "ExpressionStatement", + "src": "25891:13:6" + } + ] + }, + "documentation": null, + "id": 3777, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burnPoolShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3769, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 3777, + "src": "25847:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3768, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "25847:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25846:13:6" + }, + "returnParameters": { + "id": 3771, + "nodeType": "ParameterList", + "parameters": [], + "src": "25881:0:6" + }, + "scope": 3778, + "src": "25823:88:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 3779, + "src": "854:25060:6" + } + ], + "src": "0:25915:6" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BPool.sol", + "exportedSymbols": { + "BPool": [ + 3778 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.5", + ".7" + ] + }, + "id": 1424, + "name": "PragmaDirective", + "src": "0:23:6" + }, + { + "attributes": { + "SourceUnit": 4286, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol", + "file": "./BToken.sol", + "scope": 3779, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1425, + "name": "ImportDirective", + "src": "186:22:6" + }, + { + "attributes": { + "SourceUnit": 946, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BMath.sol", + "file": "./BMath.sol", + "scope": 3779, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1426, + "name": "ImportDirective", + "src": "209:21:6" + }, + { + "attributes": { + "contractDependencies": [ + 280, + 945, + 1422, + 3979, + 4285, + 7106 + ], + "contractKind": "contract", + "documentation": "@title BPool\n \n@dev Used by the (Ocean version) BFactory contract as a bytecode reference to\n deploy new BPools.\n* This contract is is nearly identical to the BPool.sol contract at [1]\n The only difference is the \"Proxy contract functionality\" section \n given below. We'd inherit from BPool if we could, for simplicity.\n But we can't, because the proxy section needs to access private\n variables declared in BPool, and Solidity disallows this. Therefore\n the best we can do for now is clearly demarcate the proxy section. \n* [1] https://github.com/balancer-labs/balancer-core/contracts/.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 3778, + 945, + 4285, + 7106, + 3979, + 1422, + 280 + ], + "name": "BPool", + "scope": 3779 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BToken", + "referencedDeclaration": 4285, + "type": "contract BToken" + }, + "id": 1427, + "name": "UserDefinedTypeName", + "src": "872:6:6" + } + ], + "id": 1428, + "name": "InheritanceSpecifier", + "src": "872:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BMath", + "referencedDeclaration": 945, + "type": "contract BMath" + }, + "id": 1429, + "name": "UserDefinedTypeName", + "src": "880:5:6" + } + ], + "id": 1430, + "name": "InheritanceSpecifier", + "src": "880:5:6" + }, + { + "attributes": { + "canonicalName": "BPool.Record", + "name": "Record", + "scope": 3778, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "bound", + "scope": 1439, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1431, + "name": "ElementaryTypeName", + "src": "917:4:6" + } + ], + "id": 1432, + "name": "VariableDeclaration", + "src": "917:10:6" + }, + { + "attributes": { + "constant": false, + "name": "index", + "scope": 1439, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1433, + "name": "ElementaryTypeName", + "src": "965:4:6" + } + ], + "id": 1434, + "name": "VariableDeclaration", + "src": "965:10:6" + }, + { + "attributes": { + "constant": false, + "name": "denorm", + "scope": 1439, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1435, + "name": "ElementaryTypeName", + "src": "998:4:6" + } + ], + "id": 1436, + "name": "VariableDeclaration", + "src": "998:11:6" + }, + { + "attributes": { + "constant": false, + "name": "balance", + "scope": 1439, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1437, + "name": "ElementaryTypeName", + "src": "1043:4:6" + } + ], + "id": 1438, + "name": "VariableDeclaration", + "src": "1043:12:6" + } + ], + "id": 1439, + "name": "StructDefinition", + "src": "893:169:6" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "LOG_SWAP" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "caller", + "scope": 1451, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1440, + "name": "ElementaryTypeName", + "src": "1092:7:6" + } + ], + "id": 1441, + "name": "VariableDeclaration", + "src": "1092:22:6" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "tokenIn", + "scope": 1451, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1442, + "name": "ElementaryTypeName", + "src": "1124:7:6" + } + ], + "id": 1443, + "name": "VariableDeclaration", + "src": "1124:23:6" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "tokenOut", + "scope": 1451, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1444, + "name": "ElementaryTypeName", + "src": "1157:7:6" + } + ], + "id": 1445, + "name": "VariableDeclaration", + "src": "1157:24:6" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "tokenAmountIn", + "scope": 1451, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1446, + "name": "ElementaryTypeName", + "src": "1191:7:6" + } + ], + "id": 1447, + "name": "VariableDeclaration", + "src": "1191:29:6" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "tokenAmountOut", + "scope": 1451, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1448, + "name": "ElementaryTypeName", + "src": "1230:7:6" + } + ], + "id": 1449, + "name": "VariableDeclaration", + "src": "1230:30:6" + } + ], + "id": 1450, + "name": "ParameterList", + "src": "1082:184:6" + } + ], + "id": 1451, + "name": "EventDefinition", + "src": "1068:199:6" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "LOG_JOIN" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "caller", + "scope": 1459, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1452, + "name": "ElementaryTypeName", + "src": "1297:7:6" + } + ], + "id": 1453, + "name": "VariableDeclaration", + "src": "1297:22:6" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "tokenIn", + "scope": 1459, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1454, + "name": "ElementaryTypeName", + "src": "1329:7:6" + } + ], + "id": 1455, + "name": "VariableDeclaration", + "src": "1329:23:6" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "tokenAmountIn", + "scope": 1459, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1456, + "name": "ElementaryTypeName", + "src": "1362:7:6" + } + ], + "id": 1457, + "name": "VariableDeclaration", + "src": "1362:29:6" + } + ], + "id": 1458, + "name": "ParameterList", + "src": "1287:110:6" + } + ], + "id": 1459, + "name": "EventDefinition", + "src": "1273:125:6" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "LOG_EXIT" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "caller", + "scope": 1467, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1460, + "name": "ElementaryTypeName", + "src": "1428:7:6" + } + ], + "id": 1461, + "name": "VariableDeclaration", + "src": "1428:22:6" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "tokenOut", + "scope": 1467, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1462, + "name": "ElementaryTypeName", + "src": "1460:7:6" + } + ], + "id": 1463, + "name": "VariableDeclaration", + "src": "1460:24:6" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "tokenAmountOut", + "scope": 1467, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1464, + "name": "ElementaryTypeName", + "src": "1494:7:6" + } + ], + "id": 1465, + "name": "VariableDeclaration", + "src": "1494:30:6" + } + ], + "id": 1466, + "name": "ParameterList", + "src": "1418:112:6" + } + ], + "id": 1467, + "name": "EventDefinition", + "src": "1404:127:6" + }, + { + "attributes": { + "anonymous": true, + "documentation": null, + "name": "LOG_CALL" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "sig", + "scope": 1475, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes4", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes4", + "type": "bytes4" + }, + "id": 1468, + "name": "ElementaryTypeName", + "src": "1561:6:6" + } + ], + "id": 1469, + "name": "VariableDeclaration", + "src": "1561:19:6" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "caller", + "scope": 1475, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1470, + "name": "ElementaryTypeName", + "src": "1590:7:6" + } + ], + "id": 1471, + "name": "VariableDeclaration", + "src": "1590:22:6" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "data", + "scope": 1475, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 1472, + "name": "ElementaryTypeName", + "src": "1622:5:6" + } + ], + "id": 1473, + "name": "VariableDeclaration", + "src": "1622:20:6" + } + ], + "id": 1474, + "name": "ParameterList", + "src": "1551:97:6" + } + ], + "id": 1475, + "name": "EventDefinition", + "src": "1537:122:6" + }, + { + "attributes": { + "documentation": null, + "name": "_logs_", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1476, + "name": "ParameterList", + "src": "1680:2:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1475, + "type": "function (bytes4,address,bytes memory)", + "value": "LOG_CALL" + }, + "id": 1477, + "name": "Identifier", + "src": "1698:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sig", + "referencedDeclaration": null, + "type": "bytes4" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 1478, + "name": "Identifier", + "src": "1707:3:6" + } + ], + "id": 1479, + "name": "MemberAccess", + "src": "1707:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 1480, + "name": "Identifier", + "src": "1716:3:6" + } + ], + "id": 1481, + "name": "MemberAccess", + "src": "1716:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "data", + "referencedDeclaration": null, + "type": "bytes calldata" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 1482, + "name": "Identifier", + "src": "1728:3:6" + } + ], + "id": 1483, + "name": "MemberAccess", + "src": "1728:8:6" + } + ], + "id": 1484, + "name": "FunctionCall", + "src": "1698:39:6" + } + ], + "id": 1485, + "name": "EmitStatement", + "src": "1693:44:6" + }, + { + "id": 1486, + "name": "PlaceholderStatement", + "src": "1747:1:6" + } + ], + "id": 1487, + "name": "Block", + "src": "1683:72:6" + } + ], + "id": 1488, + "name": "ModifierDefinition", + "src": "1665:90:6" + }, + { + "attributes": { + "documentation": null, + "name": "_lock_", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1489, + "name": "ParameterList", + "src": "1776:2:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4", + "typeString": "literal_string \"ERR_REENTRY\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1490, + "name": "Identifier", + "src": "1789:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1518, + "type": "bool", + "value": "_mutex" + }, + "id": 1491, + "name": "Identifier", + "src": "1811:6:6" + } + ], + "id": 1492, + "name": "UnaryOperation", + "src": "1810:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f5245454e545259", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_REENTRY\"", + "value": "ERR_REENTRY" + }, + "id": 1493, + "name": "Literal", + "src": "1832:13:6" + } + ], + "id": 1494, + "name": "FunctionCall", + "src": "1789:66:6" + } + ], + "id": 1495, + "name": "ExpressionStatement", + "src": "1789:66:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1518, + "type": "bool", + "value": "_mutex" + }, + "id": 1496, + "name": "Identifier", + "src": "1865:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 1497, + "name": "Literal", + "src": "1874:4:6" + } + ], + "id": 1498, + "name": "Assignment", + "src": "1865:13:6" + } + ], + "id": 1499, + "name": "ExpressionStatement", + "src": "1865:13:6" + }, + { + "id": 1500, + "name": "PlaceholderStatement", + "src": "1888:1:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1518, + "type": "bool", + "value": "_mutex" + }, + "id": 1501, + "name": "Identifier", + "src": "1899:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 1502, + "name": "Literal", + "src": "1908:5:6" + } + ], + "id": 1503, + "name": "Assignment", + "src": "1899:14:6" + } + ], + "id": 1504, + "name": "ExpressionStatement", + "src": "1899:14:6" + } + ], + "id": 1505, + "name": "Block", + "src": "1779:141:6" + } + ], + "id": 1506, + "name": "ModifierDefinition", + "src": "1761:159:6" + }, + { + "attributes": { + "documentation": null, + "name": "_viewlock_", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1507, + "name": "ParameterList", + "src": "1945:2:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4", + "typeString": "literal_string \"ERR_REENTRY\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1508, + "name": "Identifier", + "src": "1958:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1518, + "type": "bool", + "value": "_mutex" + }, + "id": 1509, + "name": "Identifier", + "src": "1967:6:6" + } + ], + "id": 1510, + "name": "UnaryOperation", + "src": "1966:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f5245454e545259", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_REENTRY\"", + "value": "ERR_REENTRY" + }, + "id": 1511, + "name": "Literal", + "src": "1975:13:6" + } + ], + "id": 1512, + "name": "FunctionCall", + "src": "1958:31:6" + } + ], + "id": 1513, + "name": "ExpressionStatement", + "src": "1958:31:6" + }, + { + "id": 1514, + "name": "PlaceholderStatement", + "src": "1999:1:6" + } + ], + "id": 1515, + "name": "Block", + "src": "1948:59:6" + } + ], + "id": 1516, + "name": "ModifierDefinition", + "src": "1926:81:6" + }, + { + "attributes": { + "constant": false, + "name": "_mutex", + "scope": 3778, + "stateVariable": true, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1517, + "name": "ElementaryTypeName", + "src": "2017:4:6" + } + ], + "id": 1518, + "name": "VariableDeclaration", + "src": "2017:19:6" + }, + { + "attributes": { + "constant": false, + "name": "_factory", + "scope": 3778, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1519, + "name": "ElementaryTypeName", + "src": "2043:7:6" + } + ], + "id": 1520, + "name": "VariableDeclaration", + "src": "2043:24:6" + }, + { + "attributes": { + "constant": false, + "name": "_controller", + "scope": 3778, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1521, + "name": "ElementaryTypeName", + "src": "2121:7:6" + } + ], + "id": 1522, + "name": "VariableDeclaration", + "src": "2121:27:6" + }, + { + "attributes": { + "constant": false, + "name": "_publicSwap", + "scope": 3778, + "stateVariable": true, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1523, + "name": "ElementaryTypeName", + "src": "2174:4:6" + } + ], + "id": 1524, + "name": "VariableDeclaration", + "src": "2174:24:6" + }, + { + "attributes": { + "constant": false, + "name": "_swapFee", + "scope": 3778, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1525, + "name": "ElementaryTypeName", + "src": "2358:4:6" + } + ], + "id": 1526, + "name": "VariableDeclaration", + "src": "2358:21:6" + }, + { + "attributes": { + "constant": false, + "name": "_finalized", + "scope": 3778, + "stateVariable": true, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1527, + "name": "ElementaryTypeName", + "src": "2385:4:6" + } + ], + "id": 1528, + "name": "VariableDeclaration", + "src": "2385:23:6" + }, + { + "attributes": { + "constant": false, + "name": "_tokens", + "scope": 3778, + "stateVariable": true, + "storageLocation": "default", + "type": "address[]", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "length": null, + "type": "address[]" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1529, + "name": "ElementaryTypeName", + "src": "2415:7:6" + } + ], + "id": 1530, + "name": "ArrayTypeName", + "src": "2415:9:6" + } + ], + "id": 1531, + "name": "VariableDeclaration", + "src": "2415:25:6" + }, + { + "attributes": { + "constant": false, + "name": "_records", + "scope": 3778, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => struct BPool.Record)", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => struct BPool.Record)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 1532, + "name": "ElementaryTypeName", + "src": "2454:7:6" + }, + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 1533, + "name": "UserDefinedTypeName", + "src": "2463:6:6" + } + ], + "id": 1534, + "name": "Mapping", + "src": "2446:24:6" + } + ], + "id": 1535, + "name": "VariableDeclaration", + "src": "2446:42:6" + }, + { + "attributes": { + "constant": false, + "name": "_totalWeight", + "scope": 3778, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1536, + "name": "ElementaryTypeName", + "src": "2494:4:6" + } + ], + "id": 1537, + "name": "VariableDeclaration", + "src": "2494:25:6" + }, + { + "attributes": { + "constant": false, + "name": "initialized", + "scope": 3778, + "stateVariable": true, + "storageLocation": "default", + "type": "bool", + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1538, + "name": "ElementaryTypeName", + "src": "2646:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 1539, + "name": "Literal", + "src": "2673:5:6" + } + ], + "id": 1540, + "name": "VariableDeclaration", + "src": "2646:32:6" + }, + { + "attributes": { + "documentation": null, + "name": "onlyNotInitialized", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1541, + "name": "ParameterList", + "src": "2712:2:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1fb8797b66eca6c15df697c66cc4b5186be8e5c9588f384f789ecfab2607b249", + "typeString": "literal_string \"ERR_ALREADY_INITIALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1542, + "name": "Identifier", + "src": "2725:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1540, + "type": "bool", + "value": "initialized" + }, + "id": 1543, + "name": "Identifier", + "src": "2747:11:6" + } + ], + "id": 1544, + "name": "UnaryOperation", + "src": "2746:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f414c52454144595f494e495449414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_ALREADY_INITIALIZED\"", + "value": "ERR_ALREADY_INITIALIZED" + }, + "id": 1545, + "name": "Literal", + "src": "2773:25:6" + } + ], + "id": 1546, + "name": "FunctionCall", + "src": "2725:83:6" + } + ], + "id": 1547, + "name": "ExpressionStatement", + "src": "2725:83:6" + }, + { + "id": 1548, + "name": "PlaceholderStatement", + "src": "2818:1:6" + } + ], + "id": 1549, + "name": "Block", + "src": "2715:111:6" + } + ], + "id": 1550, + "name": "ModifierDefinition", + "src": "2685:141:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isInitialized", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1551, + "name": "ParameterList", + "src": "2853:2:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1558, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1552, + "name": "ElementaryTypeName", + "src": "2878:4:6" + } + ], + "id": 1553, + "name": "VariableDeclaration", + "src": "2878:4:6" + } + ], + "id": 1554, + "name": "ParameterList", + "src": "2877:6:6" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1554 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1540, + "type": "bool", + "value": "initialized" + }, + "id": 1555, + "name": "Identifier", + "src": "2901:11:6" + } + ], + "id": 1556, + "name": "Return", + "src": "2894:18:6" + } + ], + "id": 1557, + "name": "Block", + "src": "2884:35:6" + } + ], + "id": 1558, + "name": "FunctionDefinition", + "src": "2831:88:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "modifiers": [ + null + ], + "name": "", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1559, + "name": "ParameterList", + "src": "2983:2:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1560, + "name": "ParameterList", + "src": "2993:0:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1672, + "type": "function (address,address,uint256,bool,bool) returns (bool)", + "value": "_initialize" + }, + "id": 1561, + "name": "Identifier", + "src": "3003:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 1562, + "name": "Identifier", + "src": "3015:3:6" + } + ], + "id": 1563, + "name": "MemberAccess", + "src": "3015:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 1564, + "name": "Identifier", + "src": "3027:3:6" + } + ], + "id": 1565, + "name": "MemberAccess", + "src": "3027:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 215, + "type": "uint256", + "value": "MIN_FEE" + }, + "id": 1566, + "name": "Identifier", + "src": "3039:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 1567, + "name": "Literal", + "src": "3048:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 1568, + "name": "Literal", + "src": "3055:5:6" + } + ], + "id": 1569, + "name": "FunctionCall", + "src": "3003:58:6" + } + ], + "id": 1570, + "name": "ExpressionStatement", + "src": "3003:58:6" + } + ], + "id": 1571, + "name": "Block", + "src": "2993:75:6" + } + ], + "id": 1572, + "name": "FunctionDefinition", + "src": "2972:96:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "initialize", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "controller", + "scope": 1630, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1573, + "name": "ElementaryTypeName", + "src": "3268:7:6" + } + ], + "id": 1574, + "name": "VariableDeclaration", + "src": "3268:18:6" + }, + { + "attributes": { + "constant": false, + "name": "factory", + "scope": 1630, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1575, + "name": "ElementaryTypeName", + "src": "3297:7:6" + } + ], + "id": 1576, + "name": "VariableDeclaration", + "src": "3297:15:6" + }, + { + "attributes": { + "constant": false, + "name": "swapFee", + "scope": 1630, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1577, + "name": "ElementaryTypeName", + "src": "3323:4:6" + } + ], + "id": 1578, + "name": "VariableDeclaration", + "src": "3323:12:6" + }, + { + "attributes": { + "constant": false, + "name": "publicSwap", + "scope": 1630, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1579, + "name": "ElementaryTypeName", + "src": "3345:4:6" + } + ], + "id": 1580, + "name": "VariableDeclaration", + "src": "3345:15:6" + }, + { + "attributes": { + "constant": false, + "name": "finalized", + "scope": 1630, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1581, + "name": "ElementaryTypeName", + "src": "3370:4:6" + } + ], + "id": 1582, + "name": "VariableDeclaration", + "src": "3370:14:6" + } + ], + "id": 1583, + "name": "ParameterList", + "src": "3258:132:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1630, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1586, + "name": "ElementaryTypeName", + "src": "3451:4:6" + } + ], + "id": 1587, + "name": "VariableDeclaration", + "src": "3451:4:6" + } + ], + "id": 1588, + "name": "ParameterList", + "src": "3450:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1550, + "type": "modifier ()", + "value": "onlyNotInitialized" + }, + "id": 1584, + "name": "Identifier", + "src": "3416:18:6" + } + ], + "id": 1585, + "name": "ModifierInvocation", + "src": "3416:18:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_27bd7417075a75a6fa345231d32603870be38c05ec22dde6b19bc44a340342dd", + "typeString": "literal_string \"ERR_INVALID_CONTROLLER_ADDRESS\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1589, + "name": "Identifier", + "src": "3471:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1574, + "type": "address", + "value": "controller" + }, + "id": 1590, + "name": "Identifier", + "src": "3492:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 1591, + "name": "ElementaryTypeNameExpression", + "src": "3506:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1592, + "name": "Literal", + "src": "3514:1:6" + } + ], + "id": 1593, + "name": "FunctionCall", + "src": "3506:10:6" + } + ], + "id": 1594, + "name": "BinaryOperation", + "src": "3492:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f494e56414c49445f434f4e54524f4c4c45525f41444452455353", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_INVALID_CONTROLLER_ADDRESS\"", + "value": "ERR_INVALID_CONTROLLER_ADDRESS" + }, + "id": 1595, + "name": "Literal", + "src": "3530:32:6" + } + ], + "id": 1596, + "name": "FunctionCall", + "src": "3471:101:6" + } + ], + "id": 1597, + "name": "ExpressionStatement", + "src": "3471:101:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea269bf0660439ffbd72480b6b4854b47a9bcddbad5646f4d4f582f8c48bd39b", + "typeString": "literal_string \"ERR_INVALID_FACTORY_ADDRESS\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1598, + "name": "Identifier", + "src": "3582:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1576, + "type": "address", + "value": "factory" + }, + "id": 1599, + "name": "Identifier", + "src": "3603:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 1600, + "name": "ElementaryTypeNameExpression", + "src": "3614:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1601, + "name": "Literal", + "src": "3622:1:6" + } + ], + "id": 1602, + "name": "FunctionCall", + "src": "3614:10:6" + } + ], + "id": 1603, + "name": "BinaryOperation", + "src": "3603:21:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f494e56414c49445f464143544f52595f41444452455353", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_INVALID_FACTORY_ADDRESS\"", + "value": "ERR_INVALID_FACTORY_ADDRESS" + }, + "id": 1604, + "name": "Literal", + "src": "3638:29:6" + } + ], + "id": 1605, + "name": "FunctionCall", + "src": "3582:95:6" + } + ], + "id": 1606, + "name": "ExpressionStatement", + "src": "3582:95:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5", + "typeString": "literal_string \"ERR_MIN_FEE\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1607, + "name": "Identifier", + "src": "3687:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1578, + "type": "uint256", + "value": "swapFee" + }, + "id": 1608, + "name": "Identifier", + "src": "3695:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 215, + "type": "uint256", + "value": "MIN_FEE" + }, + "id": 1609, + "name": "Identifier", + "src": "3706:7:6" + } + ], + "id": 1610, + "name": "BinaryOperation", + "src": "3695:18:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d494e5f464545", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MIN_FEE\"", + "value": "ERR_MIN_FEE" + }, + "id": 1611, + "name": "Literal", + "src": "3715:13:6" + } + ], + "id": 1612, + "name": "FunctionCall", + "src": "3687:42:6" + } + ], + "id": 1613, + "name": "ExpressionStatement", + "src": "3687:42:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2", + "typeString": "literal_string \"ERR_MAX_FEE\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1614, + "name": "Identifier", + "src": "3739:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1578, + "type": "uint256", + "value": "swapFee" + }, + "id": 1615, + "name": "Identifier", + "src": "3747:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 220, + "type": "uint256", + "value": "MAX_FEE" + }, + "id": 1616, + "name": "Identifier", + "src": "3758:7:6" + } + ], + "id": 1617, + "name": "BinaryOperation", + "src": "3747:18:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d41585f464545", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MAX_FEE\"", + "value": "ERR_MAX_FEE" + }, + "id": 1618, + "name": "Literal", + "src": "3767:13:6" + } + ], + "id": 1619, + "name": "FunctionCall", + "src": "3739:42:6" + } + ], + "id": 1620, + "name": "ExpressionStatement", + "src": "3739:42:6" + }, + { + "attributes": { + "functionReturnParameters": 1588 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1672, + "type": "function (address,address,uint256,bool,bool) returns (bool)", + "value": "_initialize" + }, + "id": 1621, + "name": "Identifier", + "src": "3798:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1574, + "type": "address", + "value": "controller" + }, + "id": 1622, + "name": "Identifier", + "src": "3810:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1576, + "type": "address", + "value": "factory" + }, + "id": 1623, + "name": "Identifier", + "src": "3822:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1578, + "type": "uint256", + "value": "swapFee" + }, + "id": 1624, + "name": "Identifier", + "src": "3831:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1580, + "type": "bool", + "value": "publicSwap" + }, + "id": 1625, + "name": "Identifier", + "src": "3840:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1582, + "type": "bool", + "value": "finalized" + }, + "id": 1626, + "name": "Identifier", + "src": "3852:9:6" + } + ], + "id": 1627, + "name": "FunctionCall", + "src": "3798:64:6" + } + ], + "id": 1628, + "name": "Return", + "src": "3791:71:6" + } + ], + "id": 1629, + "name": "Block", + "src": "3461:408:6" + } + ], + "id": 1630, + "name": "FunctionDefinition", + "src": "3239:630:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_initialize", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "controller", + "scope": 1672, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1631, + "name": "ElementaryTypeName", + "src": "3965:7:6" + } + ], + "id": 1632, + "name": "VariableDeclaration", + "src": "3965:18:6" + }, + { + "attributes": { + "constant": false, + "name": "factory", + "scope": 1672, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1633, + "name": "ElementaryTypeName", + "src": "3994:7:6" + } + ], + "id": 1634, + "name": "VariableDeclaration", + "src": "3994:15:6" + }, + { + "attributes": { + "constant": false, + "name": "swapFee", + "scope": 1672, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1635, + "name": "ElementaryTypeName", + "src": "4020:4:6" + } + ], + "id": 1636, + "name": "VariableDeclaration", + "src": "4020:12:6" + }, + { + "attributes": { + "constant": false, + "name": "publicSwap", + "scope": 1672, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1637, + "name": "ElementaryTypeName", + "src": "4042:4:6" + } + ], + "id": 1638, + "name": "VariableDeclaration", + "src": "4042:15:6" + }, + { + "attributes": { + "constant": false, + "name": "finalized", + "scope": 1672, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1639, + "name": "ElementaryTypeName", + "src": "4068:4:6" + } + ], + "id": 1640, + "name": "VariableDeclaration", + "src": "4068:14:6" + } + ], + "id": 1641, + "name": "ParameterList", + "src": "3955:133:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1672, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1642, + "name": "ElementaryTypeName", + "src": "4121:4:6" + } + ], + "id": 1643, + "name": "VariableDeclaration", + "src": "4121:4:6" + } + ], + "id": 1644, + "name": "ParameterList", + "src": "4120:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1522, + "type": "address", + "value": "_controller" + }, + "id": 1645, + "name": "Identifier", + "src": "4141:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1632, + "type": "address", + "value": "controller" + }, + "id": 1646, + "name": "Identifier", + "src": "4155:10:6" + } + ], + "id": 1647, + "name": "Assignment", + "src": "4141:24:6" + } + ], + "id": 1648, + "name": "ExpressionStatement", + "src": "4141:24:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1520, + "type": "address", + "value": "_factory" + }, + "id": 1649, + "name": "Identifier", + "src": "4175:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1634, + "type": "address", + "value": "factory" + }, + "id": 1650, + "name": "Identifier", + "src": "4186:7:6" + } + ], + "id": 1651, + "name": "Assignment", + "src": "4175:18:6" + } + ], + "id": 1652, + "name": "ExpressionStatement", + "src": "4175:18:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 1653, + "name": "Identifier", + "src": "4203:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1636, + "type": "uint256", + "value": "swapFee" + }, + "id": 1654, + "name": "Identifier", + "src": "4214:7:6" + } + ], + "id": 1655, + "name": "Assignment", + "src": "4203:18:6" + } + ], + "id": 1656, + "name": "ExpressionStatement", + "src": "4203:18:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1524, + "type": "bool", + "value": "_publicSwap" + }, + "id": 1657, + "name": "Identifier", + "src": "4231:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1638, + "type": "bool", + "value": "publicSwap" + }, + "id": 1658, + "name": "Identifier", + "src": "4245:10:6" + } + ], + "id": 1659, + "name": "Assignment", + "src": "4231:24:6" + } + ], + "id": 1660, + "name": "ExpressionStatement", + "src": "4231:24:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 1661, + "name": "Identifier", + "src": "4265:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1640, + "type": "bool", + "value": "finalized" + }, + "id": 1662, + "name": "Identifier", + "src": "4278:9:6" + } + ], + "id": 1663, + "name": "Assignment", + "src": "4265:22:6" + } + ], + "id": 1664, + "name": "ExpressionStatement", + "src": "4265:22:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1540, + "type": "bool", + "value": "initialized" + }, + "id": 1665, + "name": "Identifier", + "src": "4299:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 1666, + "name": "Literal", + "src": "4313:4:6" + } + ], + "id": 1667, + "name": "Assignment", + "src": "4299:18:6" + } + ], + "id": 1668, + "name": "ExpressionStatement", + "src": "4299:18:6" + }, + { + "attributes": { + "functionReturnParameters": 1644 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1540, + "type": "bool", + "value": "initialized" + }, + "id": 1669, + "name": "Identifier", + "src": "4334:11:6" + } + ], + "id": 1670, + "name": "Return", + "src": "4327:18:6" + } + ], + "id": 1671, + "name": "Block", + "src": "4131:221:6" + } + ], + "id": 1672, + "name": "FunctionDefinition", + "src": "3935:417:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "setup", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dataTokenAaddress", + "scope": 1743, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1673, + "name": "ElementaryTypeName", + "src": "4382:7:6" + } + ], + "id": 1674, + "name": "VariableDeclaration", + "src": "4382:25:6" + }, + { + "attributes": { + "constant": false, + "name": "dataTokenAmount", + "scope": 1743, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1675, + "name": "ElementaryTypeName", + "src": "4418:7:6" + } + ], + "id": 1676, + "name": "VariableDeclaration", + "src": "4418:23:6" + }, + { + "attributes": { + "constant": false, + "name": "dataTokenWeight", + "scope": 1743, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1677, + "name": "ElementaryTypeName", + "src": "4451:7:6" + } + ], + "id": 1678, + "name": "VariableDeclaration", + "src": "4451:23:6" + }, + { + "attributes": { + "constant": false, + "name": "baseTokenAddress", + "scope": 1743, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1679, + "name": "ElementaryTypeName", + "src": "4484:7:6" + } + ], + "id": 1680, + "name": "VariableDeclaration", + "src": "4484:24:6" + }, + { + "attributes": { + "constant": false, + "name": "baseTokenAmount", + "scope": 1743, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1681, + "name": "ElementaryTypeName", + "src": "4519:7:6" + } + ], + "id": 1682, + "name": "VariableDeclaration", + "src": "4519:23:6" + }, + { + "attributes": { + "constant": false, + "name": "baseTokenWeight", + "scope": 1743, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1683, + "name": "ElementaryTypeName", + "src": "4552:7:6" + } + ], + "id": 1684, + "name": "VariableDeclaration", + "src": "4552:23:6" + }, + { + "attributes": { + "constant": false, + "name": "swapFee", + "scope": 1743, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1685, + "name": "ElementaryTypeName", + "src": "4585:7:6" + } + ], + "id": 1686, + "name": "VariableDeclaration", + "src": "4585:15:6" + } + ], + "id": 1687, + "name": "ParameterList", + "src": "4372:234:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1690, + "name": "ParameterList", + "src": "4643:0:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 1688, + "name": "Identifier", + "src": "4632:6:6" + } + ], + "id": 1689, + "name": "ModifierInvocation", + "src": "4632:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c32bb61c112b11a0a138368229143b221c7b45bb96a8d15205ee6861a5ea6632", + "typeString": "literal_string \"ERR_INVALID_DATATOKEN_ADDRESS\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1691, + "name": "Identifier", + "src": "4653:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1674, + "type": "address", + "value": "dataTokenAaddress" + }, + "id": 1692, + "name": "Identifier", + "src": "4674:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 1693, + "name": "ElementaryTypeNameExpression", + "src": "4695:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1694, + "name": "Literal", + "src": "4703:1:6" + } + ], + "id": 1695, + "name": "FunctionCall", + "src": "4695:10:6" + } + ], + "id": 1696, + "name": "BinaryOperation", + "src": "4674:31:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f494e56414c49445f44415441544f4b454e5f41444452455353", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_INVALID_DATATOKEN_ADDRESS\"", + "value": "ERR_INVALID_DATATOKEN_ADDRESS" + }, + "id": 1697, + "name": "Literal", + "src": "4719:31:6" + } + ], + "id": 1698, + "name": "FunctionCall", + "src": "4653:107:6" + } + ], + "id": 1699, + "name": "ExpressionStatement", + "src": "4653:107:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4b2297dc625c16c7dff9433ba745e0a13395a58d1fe6f08b62aefc6950ecb072", + "typeString": "literal_string \"ERR_INVALID_BASETOKEN_ADDRESS\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1700, + "name": "Identifier", + "src": "4770:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1680, + "type": "address", + "value": "baseTokenAddress" + }, + "id": 1701, + "name": "Identifier", + "src": "4791:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 1702, + "name": "ElementaryTypeNameExpression", + "src": "4811:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1703, + "name": "Literal", + "src": "4819:1:6" + } + ], + "id": 1704, + "name": "FunctionCall", + "src": "4811:10:6" + } + ], + "id": 1705, + "name": "BinaryOperation", + "src": "4791:30:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f494e56414c49445f42415345544f4b454e5f41444452455353", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_INVALID_BASETOKEN_ADDRESS\"", + "value": "ERR_INVALID_BASETOKEN_ADDRESS" + }, + "id": 1706, + "name": "Literal", + "src": "4835:31:6" + } + ], + "id": 1707, + "name": "FunctionCall", + "src": "4770:106:6" + } + ], + "id": 1708, + "name": "ExpressionStatement", + "src": "4770:106:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2130, + "type": "function (address,uint256,uint256)", + "value": "bind" + }, + "id": 1709, + "name": "Identifier", + "src": "5000:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1674, + "type": "address", + "value": "dataTokenAaddress" + }, + "id": 1710, + "name": "Identifier", + "src": "5018:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1676, + "type": "uint256", + "value": "dataTokenAmount" + }, + "id": 1711, + "name": "Identifier", + "src": "5049:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1678, + "type": "uint256", + "value": "dataTokenWeight" + }, + "id": 1712, + "name": "Identifier", + "src": "5078:15:6" + } + ], + "id": 1713, + "name": "FunctionCall", + "src": "5000:103:6" + } + ], + "id": 1714, + "name": "ExpressionStatement", + "src": "5000:103:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1459, + "type": "function (address,address,uint256)", + "value": "LOG_JOIN" + }, + "id": 1715, + "name": "Identifier", + "src": "5118:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 1716, + "name": "Identifier", + "src": "5127:3:6" + } + ], + "id": 1717, + "name": "MemberAccess", + "src": "5127:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1674, + "type": "address", + "value": "dataTokenAaddress" + }, + "id": 1718, + "name": "Identifier", + "src": "5139:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1676, + "type": "uint256", + "value": "dataTokenAmount" + }, + "id": 1719, + "name": "Identifier", + "src": "5158:15:6" + } + ], + "id": 1720, + "name": "FunctionCall", + "src": "5118:56:6" + } + ], + "id": 1721, + "name": "EmitStatement", + "src": "5113:61:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2130, + "type": "function (address,uint256,uint256)", + "value": "bind" + }, + "id": 1722, + "name": "Identifier", + "src": "5211:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1680, + "type": "address", + "value": "baseTokenAddress" + }, + "id": 1723, + "name": "Identifier", + "src": "5229:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1682, + "type": "uint256", + "value": "baseTokenAmount" + }, + "id": 1724, + "name": "Identifier", + "src": "5259:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1684, + "type": "uint256", + "value": "baseTokenWeight" + }, + "id": 1725, + "name": "Identifier", + "src": "5288:15:6" + } + ], + "id": 1726, + "name": "FunctionCall", + "src": "5211:102:6" + } + ], + "id": 1727, + "name": "ExpressionStatement", + "src": "5211:102:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1459, + "type": "function (address,address,uint256)", + "value": "LOG_JOIN" + }, + "id": 1728, + "name": "Identifier", + "src": "5328:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 1729, + "name": "Identifier", + "src": "5337:3:6" + } + ], + "id": 1730, + "name": "MemberAccess", + "src": "5337:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1680, + "type": "address", + "value": "baseTokenAddress" + }, + "id": 1731, + "name": "Identifier", + "src": "5349:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1682, + "type": "uint256", + "value": "baseTokenAmount" + }, + "id": 1732, + "name": "Identifier", + "src": "5367:15:6" + } + ], + "id": 1733, + "name": "FunctionCall", + "src": "5328:55:6" + } + ], + "id": 1734, + "name": "EmitStatement", + "src": "5323:60:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1956, + "type": "function (uint256)", + "value": "setSwapFee" + }, + "id": 1735, + "name": "Identifier", + "src": "5393:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1686, + "type": "uint256", + "value": "swapFee" + }, + "id": 1736, + "name": "Identifier", + "src": "5404:7:6" + } + ], + "id": 1737, + "name": "FunctionCall", + "src": "5393:19:6" + } + ], + "id": 1738, + "name": "ExpressionStatement", + "src": "5393:19:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2063, + "type": "function ()", + "value": "finalize" + }, + "id": 1739, + "name": "Identifier", + "src": "5442:8:6" + } + ], + "id": 1740, + "name": "FunctionCall", + "src": "5442:10:6" + } + ], + "id": 1741, + "name": "ExpressionStatement", + "src": "5442:10:6" + } + ], + "id": 1742, + "name": "Block", + "src": "4643:816:6" + } + ], + "id": 1743, + "name": "FunctionDefinition", + "src": "4358:1101:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isPublicSwap", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1744, + "name": "ParameterList", + "src": "5609:2:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1751, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1745, + "name": "ElementaryTypeName", + "src": "5651:4:6" + } + ], + "id": 1746, + "name": "VariableDeclaration", + "src": "5651:4:6" + } + ], + "id": 1747, + "name": "ParameterList", + "src": "5650:6:6" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1747 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1524, + "type": "bool", + "value": "_publicSwap" + }, + "id": 1748, + "name": "Identifier", + "src": "5678:11:6" + } + ], + "id": 1749, + "name": "Return", + "src": "5671:18:6" + } + ], + "id": 1750, + "name": "Block", + "src": "5661:35:6" + } + ], + "id": 1751, + "name": "FunctionDefinition", + "src": "5588:108:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isFinalized", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1752, + "name": "ParameterList", + "src": "5722:2:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1759, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1753, + "name": "ElementaryTypeName", + "src": "5764:4:6" + } + ], + "id": 1754, + "name": "VariableDeclaration", + "src": "5764:4:6" + } + ], + "id": 1755, + "name": "ParameterList", + "src": "5763:6:6" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1755 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 1756, + "name": "Identifier", + "src": "5791:10:6" + } + ], + "id": 1757, + "name": "Return", + "src": "5784:17:6" + } + ], + "id": 1758, + "name": "Block", + "src": "5774:34:6" + } + ], + "id": 1759, + "name": "FunctionDefinition", + "src": "5702:106:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isBound", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "t", + "scope": 1772, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1760, + "name": "ElementaryTypeName", + "src": "5831:7:6" + } + ], + "id": 1761, + "name": "VariableDeclaration", + "src": "5831:9:6" + } + ], + "id": 1762, + "name": "ParameterList", + "src": "5830:11:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1772, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1763, + "name": "ElementaryTypeName", + "src": "5881:4:6" + } + ], + "id": 1764, + "name": "VariableDeclaration", + "src": "5881:4:6" + } + ], + "id": 1765, + "name": "ParameterList", + "src": "5880:6:6" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1765 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 1766, + "name": "Identifier", + "src": "5908:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1761, + "type": "address", + "value": "t" + }, + "id": 1767, + "name": "Identifier", + "src": "5917:1:6" + } + ], + "id": 1768, + "name": "IndexAccess", + "src": "5908:11:6" + } + ], + "id": 1769, + "name": "MemberAccess", + "src": "5908:17:6" + } + ], + "id": 1770, + "name": "Return", + "src": "5901:24:6" + } + ], + "id": 1771, + "name": "Block", + "src": "5891:41:6" + } + ], + "id": 1772, + "name": "FunctionDefinition", + "src": "5814:118:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getNumTokens", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1773, + "name": "ParameterList", + "src": "5959:2:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1781, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1774, + "name": "ElementaryTypeName", + "src": "6001:4:6" + } + ], + "id": 1775, + "name": "VariableDeclaration", + "src": "6001:4:6" + } + ], + "id": 1776, + "name": "ParameterList", + "src": "6000:6:6" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1776 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 1777, + "name": "Identifier", + "src": "6029:7:6" + } + ], + "id": 1778, + "name": "MemberAccess", + "src": "6029:14:6" + } + ], + "id": 1779, + "name": "Return", + "src": "6022:21:6" + } + ], + "id": 1780, + "name": "Block", + "src": "6012:38:6" + } + ], + "id": 1781, + "name": "FunctionDefinition", + "src": "5938:112:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "getCurrentTokens", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1782, + "name": "ParameterList", + "src": "6081:2:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokens", + "scope": 1792, + "stateVariable": false, + "storageLocation": "memory", + "type": "address[]", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "length": null, + "type": "address[]" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1785, + "name": "ElementaryTypeName", + "src": "6134:7:6" + } + ], + "id": 1786, + "name": "ArrayTypeName", + "src": "6134:9:6" + } + ], + "id": 1787, + "name": "VariableDeclaration", + "src": "6134:23:6" + } + ], + "id": 1788, + "name": "ParameterList", + "src": "6133:25:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1516, + "type": "modifier ()", + "value": "_viewlock_" + }, + "id": 1783, + "name": "Identifier", + "src": "6106:10:6" + } + ], + "id": 1784, + "name": "ModifierInvocation", + "src": "6106:10:6" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1788 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 1789, + "name": "Identifier", + "src": "6180:7:6" + } + ], + "id": 1790, + "name": "Return", + "src": "6173:14:6" + } + ], + "id": 1791, + "name": "Block", + "src": "6163:31:6" + } + ], + "id": 1792, + "name": "FunctionDefinition", + "src": "6056:138:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "getFinalTokens", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1793, + "name": "ParameterList", + "src": "6223:2:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokens", + "scope": 1808, + "stateVariable": false, + "storageLocation": "memory", + "type": "address[]", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "length": null, + "type": "address[]" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1796, + "name": "ElementaryTypeName", + "src": "6284:7:6" + } + ], + "id": 1797, + "name": "ArrayTypeName", + "src": "6284:9:6" + } + ], + "id": 1798, + "name": "VariableDeclaration", + "src": "6284:23:6" + } + ], + "id": 1799, + "name": "ParameterList", + "src": "6283:25:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1516, + "type": "modifier ()", + "value": "_viewlock_" + }, + "id": 1794, + "name": "Identifier", + "src": "6256:10:6" + } + ], + "id": 1795, + "name": "ModifierInvocation", + "src": "6256:10:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1800, + "name": "Identifier", + "src": "6323:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 1801, + "name": "Identifier", + "src": "6331:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_FINALIZED\"", + "value": "ERR_NOT_FINALIZED" + }, + "id": 1802, + "name": "Literal", + "src": "6343:19:6" + } + ], + "id": 1803, + "name": "FunctionCall", + "src": "6323:40:6" + } + ], + "id": 1804, + "name": "ExpressionStatement", + "src": "6323:40:6" + }, + { + "attributes": { + "functionReturnParameters": 1799 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 1805, + "name": "Identifier", + "src": "6380:7:6" + } + ], + "id": 1806, + "name": "Return", + "src": "6373:14:6" + } + ], + "id": 1807, + "name": "Block", + "src": "6313:81:6" + } + ], + "id": 1808, + "name": "FunctionDefinition", + "src": "6200:194:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "getDenormalizedWeight", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "token", + "scope": 1831, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1809, + "name": "ElementaryTypeName", + "src": "6431:7:6" + } + ], + "id": 1810, + "name": "VariableDeclaration", + "src": "6431:13:6" + } + ], + "id": 1811, + "name": "ParameterList", + "src": "6430:15:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1831, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1814, + "name": "ElementaryTypeName", + "src": "6504:4:6" + } + ], + "id": 1815, + "name": "VariableDeclaration", + "src": "6504:4:6" + } + ], + "id": 1816, + "name": "ParameterList", + "src": "6503:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1516, + "type": "modifier ()", + "value": "_viewlock_" + }, + "id": 1812, + "name": "Identifier", + "src": "6476:10:6" + } + ], + "id": 1813, + "name": "ModifierInvocation", + "src": "6476:10:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1817, + "name": "Identifier", + "src": "6525:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 1818, + "name": "Identifier", + "src": "6533:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1810, + "type": "address", + "value": "token" + }, + "id": 1819, + "name": "Identifier", + "src": "6542:5:6" + } + ], + "id": 1820, + "name": "IndexAccess", + "src": "6533:15:6" + } + ], + "id": 1821, + "name": "MemberAccess", + "src": "6533:21:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 1822, + "name": "Literal", + "src": "6556:15:6" + } + ], + "id": 1823, + "name": "FunctionCall", + "src": "6525:47:6" + } + ], + "id": 1824, + "name": "ExpressionStatement", + "src": "6525:47:6" + }, + { + "attributes": { + "functionReturnParameters": 1816 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 1825, + "name": "Identifier", + "src": "6589:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1810, + "type": "address", + "value": "token" + }, + "id": 1826, + "name": "Identifier", + "src": "6598:5:6" + } + ], + "id": 1827, + "name": "IndexAccess", + "src": "6589:15:6" + } + ], + "id": 1828, + "name": "MemberAccess", + "src": "6589:22:6" + } + ], + "id": 1829, + "name": "Return", + "src": "6582:29:6" + } + ], + "id": 1830, + "name": "Block", + "src": "6514:104:6" + } + ], + "id": 1831, + "name": "FunctionDefinition", + "src": "6400:218:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "getTotalDenormalizedWeight", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1832, + "name": "ParameterList", + "src": "6659:2:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1841, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1835, + "name": "ElementaryTypeName", + "src": "6720:4:6" + } + ], + "id": 1836, + "name": "VariableDeclaration", + "src": "6720:4:6" + } + ], + "id": 1837, + "name": "ParameterList", + "src": "6719:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1516, + "type": "modifier ()", + "value": "_viewlock_" + }, + "id": 1833, + "name": "Identifier", + "src": "6692:10:6" + } + ], + "id": 1834, + "name": "ModifierInvocation", + "src": "6692:10:6" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1837 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 1838, + "name": "Identifier", + "src": "6747:12:6" + } + ], + "id": 1839, + "name": "Return", + "src": "6740:19:6" + } + ], + "id": 1840, + "name": "Block", + "src": "6730:36:6" + } + ], + "id": 1841, + "name": "FunctionDefinition", + "src": "6624:142:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "getNormalizedWeight", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "token", + "scope": 1871, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1842, + "name": "ElementaryTypeName", + "src": "6801:7:6" + } + ], + "id": 1843, + "name": "VariableDeclaration", + "src": "6801:13:6" + } + ], + "id": 1844, + "name": "ParameterList", + "src": "6800:15:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1871, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1847, + "name": "ElementaryTypeName", + "src": "6874:4:6" + } + ], + "id": 1848, + "name": "VariableDeclaration", + "src": "6874:4:6" + } + ], + "id": 1849, + "name": "ParameterList", + "src": "6873:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1516, + "type": "modifier ()", + "value": "_viewlock_" + }, + "id": 1845, + "name": "Identifier", + "src": "6846:10:6" + } + ], + "id": 1846, + "name": "ModifierInvocation", + "src": "6846:10:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1850, + "name": "Identifier", + "src": "6895:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 1851, + "name": "Identifier", + "src": "6903:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1843, + "type": "address", + "value": "token" + }, + "id": 1852, + "name": "Identifier", + "src": "6912:5:6" + } + ], + "id": 1853, + "name": "IndexAccess", + "src": "6903:15:6" + } + ], + "id": 1854, + "name": "MemberAccess", + "src": "6903:21:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 1855, + "name": "Literal", + "src": "6926:15:6" + } + ], + "id": 1856, + "name": "FunctionCall", + "src": "6895:47:6" + } + ], + "id": 1857, + "name": "ExpressionStatement", + "src": "6895:47:6" + }, + { + "attributes": { + "assignments": [ + 1859 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "denorm", + "scope": 1870, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1858, + "name": "ElementaryTypeName", + "src": "6952:4:6" + } + ], + "id": 1859, + "name": "VariableDeclaration", + "src": "6952:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 1860, + "name": "Identifier", + "src": "6966:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1843, + "type": "address", + "value": "token" + }, + "id": 1861, + "name": "Identifier", + "src": "6975:5:6" + } + ], + "id": 1862, + "name": "IndexAccess", + "src": "6966:15:6" + } + ], + "id": 1863, + "name": "MemberAccess", + "src": "6966:22:6" + } + ], + "id": 1864, + "name": "VariableDeclarationStatement", + "src": "6952:36:6" + }, + { + "attributes": { + "functionReturnParameters": 1849 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 1865, + "name": "Identifier", + "src": "7005:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1859, + "type": "uint256", + "value": "denorm" + }, + "id": 1866, + "name": "Identifier", + "src": "7010:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 1867, + "name": "Identifier", + "src": "7018:12:6" + } + ], + "id": 1868, + "name": "FunctionCall", + "src": "7005:26:6" + } + ], + "id": 1869, + "name": "Return", + "src": "6998:33:6" + } + ], + "id": 1870, + "name": "Block", + "src": "6884:154:6" + } + ], + "id": 1871, + "name": "FunctionDefinition", + "src": "6772:266:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "getBalance", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "token", + "scope": 1894, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1872, + "name": "ElementaryTypeName", + "src": "7064:7:6" + } + ], + "id": 1873, + "name": "VariableDeclaration", + "src": "7064:13:6" + } + ], + "id": 1874, + "name": "ParameterList", + "src": "7063:15:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1894, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1877, + "name": "ElementaryTypeName", + "src": "7137:4:6" + } + ], + "id": 1878, + "name": "VariableDeclaration", + "src": "7137:4:6" + } + ], + "id": 1879, + "name": "ParameterList", + "src": "7136:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1516, + "type": "modifier ()", + "value": "_viewlock_" + }, + "id": 1875, + "name": "Identifier", + "src": "7109:10:6" + } + ], + "id": 1876, + "name": "ModifierInvocation", + "src": "7109:10:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1880, + "name": "Identifier", + "src": "7158:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 1881, + "name": "Identifier", + "src": "7166:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1873, + "type": "address", + "value": "token" + }, + "id": 1882, + "name": "Identifier", + "src": "7175:5:6" + } + ], + "id": 1883, + "name": "IndexAccess", + "src": "7166:15:6" + } + ], + "id": 1884, + "name": "MemberAccess", + "src": "7166:21:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 1885, + "name": "Literal", + "src": "7189:15:6" + } + ], + "id": 1886, + "name": "FunctionCall", + "src": "7158:47:6" + } + ], + "id": 1887, + "name": "ExpressionStatement", + "src": "7158:47:6" + }, + { + "attributes": { + "functionReturnParameters": 1879 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 1888, + "name": "Identifier", + "src": "7222:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1873, + "type": "address", + "value": "token" + }, + "id": 1889, + "name": "Identifier", + "src": "7231:5:6" + } + ], + "id": 1890, + "name": "IndexAccess", + "src": "7222:15:6" + } + ], + "id": 1891, + "name": "MemberAccess", + "src": "7222:23:6" + } + ], + "id": 1892, + "name": "Return", + "src": "7215:30:6" + } + ], + "id": 1893, + "name": "Block", + "src": "7147:105:6" + } + ], + "id": 1894, + "name": "FunctionDefinition", + "src": "7044:208:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "getSwapFee", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1895, + "name": "ParameterList", + "src": "7277:2:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1904, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1898, + "name": "ElementaryTypeName", + "src": "7338:4:6" + } + ], + "id": 1899, + "name": "VariableDeclaration", + "src": "7338:4:6" + } + ], + "id": 1900, + "name": "ParameterList", + "src": "7337:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1516, + "type": "modifier ()", + "value": "_viewlock_" + }, + "id": 1896, + "name": "Identifier", + "src": "7310:10:6" + } + ], + "id": 1897, + "name": "ModifierInvocation", + "src": "7310:10:6" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1900 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 1901, + "name": "Identifier", + "src": "7365:8:6" + } + ], + "id": 1902, + "name": "Return", + "src": "7358:15:6" + } + ], + "id": 1903, + "name": "Block", + "src": "7348:32:6" + } + ], + "id": 1904, + "name": "FunctionDefinition", + "src": "7258:122:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "getController", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1905, + "name": "ParameterList", + "src": "7408:2:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1914, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1908, + "name": "ElementaryTypeName", + "src": "7469:7:6" + } + ], + "id": 1909, + "name": "VariableDeclaration", + "src": "7469:7:6" + } + ], + "id": 1910, + "name": "ParameterList", + "src": "7468:9:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1516, + "type": "modifier ()", + "value": "_viewlock_" + }, + "id": 1906, + "name": "Identifier", + "src": "7441:10:6" + } + ], + "id": 1907, + "name": "ModifierInvocation", + "src": "7441:10:6" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1910 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1522, + "type": "address", + "value": "_controller" + }, + "id": 1911, + "name": "Identifier", + "src": "7499:11:6" + } + ], + "id": 1912, + "name": "Return", + "src": "7492:18:6" + } + ], + "id": 1913, + "name": "Block", + "src": "7482:35:6" + } + ], + "id": 1914, + "name": "FunctionDefinition", + "src": "7386:131:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "setSwapFee", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "swapFee", + "scope": 1956, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 1915, + "name": "ElementaryTypeName", + "src": "7543:4:6" + } + ], + "id": 1916, + "name": "VariableDeclaration", + "src": "7543:12:6" + } + ], + "id": 1917, + "name": "ParameterList", + "src": "7542:14:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1922, + "name": "ParameterList", + "src": "7606:0:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 1918, + "name": "Identifier", + "src": "7580:6:6" + } + ], + "id": 1919, + "name": "ModifierInvocation", + "src": "7580:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 1920, + "name": "Identifier", + "src": "7595:6:6" + } + ], + "id": 1921, + "name": "ModifierInvocation", + "src": "7595:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1923, + "name": "Identifier", + "src": "7617:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 1924, + "name": "Identifier", + "src": "7626:10:6" + } + ], + "id": 1925, + "name": "UnaryOperation", + "src": "7625:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f49535f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_IS_FINALIZED\"", + "value": "ERR_IS_FINALIZED" + }, + "id": 1926, + "name": "Literal", + "src": "7638:18:6" + } + ], + "id": 1927, + "name": "FunctionCall", + "src": "7617:40:6" + } + ], + "id": 1928, + "name": "ExpressionStatement", + "src": "7617:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1929, + "name": "Identifier", + "src": "7667:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 1930, + "name": "Identifier", + "src": "7675:3:6" + } + ], + "id": 1931, + "name": "MemberAccess", + "src": "7675:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1522, + "type": "address", + "value": "_controller" + }, + "id": 1932, + "name": "Identifier", + "src": "7689:11:6" + } + ], + "id": 1933, + "name": "BinaryOperation", + "src": "7675:25:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f434f4e54524f4c4c4552", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_CONTROLLER\"", + "value": "ERR_NOT_CONTROLLER" + }, + "id": 1934, + "name": "Literal", + "src": "7702:20:6" + } + ], + "id": 1935, + "name": "FunctionCall", + "src": "7667:56:6" + } + ], + "id": 1936, + "name": "ExpressionStatement", + "src": "7667:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5", + "typeString": "literal_string \"ERR_MIN_FEE\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1937, + "name": "Identifier", + "src": "7733:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1916, + "type": "uint256", + "value": "swapFee" + }, + "id": 1938, + "name": "Identifier", + "src": "7741:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 215, + "type": "uint256", + "value": "MIN_FEE" + }, + "id": 1939, + "name": "Identifier", + "src": "7752:7:6" + } + ], + "id": 1940, + "name": "BinaryOperation", + "src": "7741:18:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d494e5f464545", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MIN_FEE\"", + "value": "ERR_MIN_FEE" + }, + "id": 1941, + "name": "Literal", + "src": "7761:13:6" + } + ], + "id": 1942, + "name": "FunctionCall", + "src": "7733:42:6" + } + ], + "id": 1943, + "name": "ExpressionStatement", + "src": "7733:42:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2", + "typeString": "literal_string \"ERR_MAX_FEE\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1944, + "name": "Identifier", + "src": "7785:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1916, + "type": "uint256", + "value": "swapFee" + }, + "id": 1945, + "name": "Identifier", + "src": "7793:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 220, + "type": "uint256", + "value": "MAX_FEE" + }, + "id": 1946, + "name": "Identifier", + "src": "7804:7:6" + } + ], + "id": 1947, + "name": "BinaryOperation", + "src": "7793:18:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d41585f464545", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MAX_FEE\"", + "value": "ERR_MAX_FEE" + }, + "id": 1948, + "name": "Literal", + "src": "7813:13:6" + } + ], + "id": 1949, + "name": "FunctionCall", + "src": "7785:42:6" + } + ], + "id": 1950, + "name": "ExpressionStatement", + "src": "7785:42:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 1951, + "name": "Identifier", + "src": "7837:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1916, + "type": "uint256", + "value": "swapFee" + }, + "id": 1952, + "name": "Identifier", + "src": "7848:7:6" + } + ], + "id": 1953, + "name": "Assignment", + "src": "7837:18:6" + } + ], + "id": 1954, + "name": "ExpressionStatement", + "src": "7837:18:6" + } + ], + "id": 1955, + "name": "Block", + "src": "7606:256:6" + } + ], + "id": 1956, + "name": "FunctionDefinition", + "src": "7523:339:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "setController", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "manager", + "scope": 1987, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1957, + "name": "ElementaryTypeName", + "src": "7891:7:6" + } + ], + "id": 1958, + "name": "VariableDeclaration", + "src": "7891:15:6" + } + ], + "id": 1959, + "name": "ParameterList", + "src": "7890:17:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1964, + "name": "ParameterList", + "src": "7959:0:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 1960, + "name": "Identifier", + "src": "7933:6:6" + } + ], + "id": 1961, + "name": "ModifierInvocation", + "src": "7933:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 1962, + "name": "Identifier", + "src": "7948:6:6" + } + ], + "id": 1963, + "name": "ModifierInvocation", + "src": "7948:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a37759e542f6ed44b54054d0c91dda523721dca7b5e18c58c26d81a883670078", + "typeString": "literal_string \"ERR_INVALID_MANAGER_ADDRESS\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1965, + "name": "Identifier", + "src": "7969:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1958, + "type": "address", + "value": "manager" + }, + "id": 1966, + "name": "Identifier", + "src": "7990:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 1967, + "name": "ElementaryTypeNameExpression", + "src": "8001:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1968, + "name": "Literal", + "src": "8009:1:6" + } + ], + "id": 1969, + "name": "FunctionCall", + "src": "8001:10:6" + } + ], + "id": 1970, + "name": "BinaryOperation", + "src": "7990:21:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f494e56414c49445f4d414e414745525f41444452455353", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_INVALID_MANAGER_ADDRESS\"", + "value": "ERR_INVALID_MANAGER_ADDRESS" + }, + "id": 1971, + "name": "Literal", + "src": "8025:29:6" + } + ], + "id": 1972, + "name": "FunctionCall", + "src": "7969:95:6" + } + ], + "id": 1973, + "name": "ExpressionStatement", + "src": "7969:95:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1974, + "name": "Identifier", + "src": "8074:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 1975, + "name": "Identifier", + "src": "8082:3:6" + } + ], + "id": 1976, + "name": "MemberAccess", + "src": "8082:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1522, + "type": "address", + "value": "_controller" + }, + "id": 1977, + "name": "Identifier", + "src": "8096:11:6" + } + ], + "id": 1978, + "name": "BinaryOperation", + "src": "8082:25:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f434f4e54524f4c4c4552", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_CONTROLLER\"", + "value": "ERR_NOT_CONTROLLER" + }, + "id": 1979, + "name": "Literal", + "src": "8109:20:6" + } + ], + "id": 1980, + "name": "FunctionCall", + "src": "8074:56:6" + } + ], + "id": 1981, + "name": "ExpressionStatement", + "src": "8074:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1522, + "type": "address", + "value": "_controller" + }, + "id": 1982, + "name": "Identifier", + "src": "8140:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1958, + "type": "address", + "value": "manager" + }, + "id": 1983, + "name": "Identifier", + "src": "8154:7:6" + } + ], + "id": 1984, + "name": "Assignment", + "src": "8140:21:6" + } + ], + "id": 1985, + "name": "ExpressionStatement", + "src": "8140:21:6" + } + ], + "id": 1986, + "name": "Block", + "src": "7959:209:6" + } + ], + "id": 1987, + "name": "FunctionDefinition", + "src": "7868:300:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "setPublicSwap", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "public_", + "scope": 2015, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1988, + "name": "ElementaryTypeName", + "src": "8198:4:6" + } + ], + "id": 1989, + "name": "VariableDeclaration", + "src": "8198:12:6" + } + ], + "id": 1990, + "name": "ParameterList", + "src": "8197:14:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1995, + "name": "ParameterList", + "src": "8261:0:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 1991, + "name": "Identifier", + "src": "8235:6:6" + } + ], + "id": 1992, + "name": "ModifierInvocation", + "src": "8235:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 1993, + "name": "Identifier", + "src": "8250:6:6" + } + ], + "id": 1994, + "name": "ModifierInvocation", + "src": "8250:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1996, + "name": "Identifier", + "src": "8271:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 1997, + "name": "Identifier", + "src": "8280:10:6" + } + ], + "id": 1998, + "name": "UnaryOperation", + "src": "8279:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f49535f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_IS_FINALIZED\"", + "value": "ERR_IS_FINALIZED" + }, + "id": 1999, + "name": "Literal", + "src": "8292:18:6" + } + ], + "id": 2000, + "name": "FunctionCall", + "src": "8271:40:6" + } + ], + "id": 2001, + "name": "ExpressionStatement", + "src": "8271:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2002, + "name": "Identifier", + "src": "8321:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2003, + "name": "Identifier", + "src": "8329:3:6" + } + ], + "id": 2004, + "name": "MemberAccess", + "src": "8329:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1522, + "type": "address", + "value": "_controller" + }, + "id": 2005, + "name": "Identifier", + "src": "8343:11:6" + } + ], + "id": 2006, + "name": "BinaryOperation", + "src": "8329:25:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f434f4e54524f4c4c4552", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_CONTROLLER\"", + "value": "ERR_NOT_CONTROLLER" + }, + "id": 2007, + "name": "Literal", + "src": "8356:20:6" + } + ], + "id": 2008, + "name": "FunctionCall", + "src": "8321:56:6" + } + ], + "id": 2009, + "name": "ExpressionStatement", + "src": "8321:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1524, + "type": "bool", + "value": "_publicSwap" + }, + "id": 2010, + "name": "Identifier", + "src": "8387:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1989, + "type": "bool", + "value": "public_" + }, + "id": 2011, + "name": "Identifier", + "src": "8401:7:6" + } + ], + "id": 2012, + "name": "Assignment", + "src": "8387:21:6" + } + ], + "id": 2013, + "name": "ExpressionStatement", + "src": "8387:21:6" + } + ], + "id": 2014, + "name": "Block", + "src": "8261:154:6" + } + ], + "id": 2015, + "name": "FunctionDefinition", + "src": "8175:240:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "finalize", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 2016, + "name": "ParameterList", + "src": "8438:2:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 2021, + "name": "ParameterList", + "src": "8490:0:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 2017, + "name": "Identifier", + "src": "8464:6:6" + } + ], + "id": 2018, + "name": "ModifierInvocation", + "src": "8464:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 2019, + "name": "Identifier", + "src": "8479:6:6" + } + ], + "id": 2020, + "name": "ModifierInvocation", + "src": "8479:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2022, + "name": "Identifier", + "src": "8500:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2023, + "name": "Identifier", + "src": "8508:3:6" + } + ], + "id": 2024, + "name": "MemberAccess", + "src": "8508:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1522, + "type": "address", + "value": "_controller" + }, + "id": 2025, + "name": "Identifier", + "src": "8522:11:6" + } + ], + "id": 2026, + "name": "BinaryOperation", + "src": "8508:25:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f434f4e54524f4c4c4552", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_CONTROLLER\"", + "value": "ERR_NOT_CONTROLLER" + }, + "id": 2027, + "name": "Literal", + "src": "8535:20:6" + } + ], + "id": 2028, + "name": "FunctionCall", + "src": "8500:56:6" + } + ], + "id": 2029, + "name": "ExpressionStatement", + "src": "8500:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2030, + "name": "Identifier", + "src": "8566:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 2031, + "name": "Identifier", + "src": "8575:10:6" + } + ], + "id": 2032, + "name": "UnaryOperation", + "src": "8574:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f49535f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_IS_FINALIZED\"", + "value": "ERR_IS_FINALIZED" + }, + "id": 2033, + "name": "Literal", + "src": "8587:18:6" + } + ], + "id": 2034, + "name": "FunctionCall", + "src": "8566:40:6" + } + ], + "id": 2035, + "name": "ExpressionStatement", + "src": "8566:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e51b2df926e9f13c18594bdf17dd3e1810e2676b7bad834d6cfa8e46bba574a9", + "typeString": "literal_string \"ERR_MIN_TOKENS\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2036, + "name": "Identifier", + "src": "8616:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2037, + "name": "Identifier", + "src": "8624:7:6" + } + ], + "id": 2038, + "name": "MemberAccess", + "src": "8624:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 205, + "type": "uint256", + "value": "MIN_BOUND_TOKENS" + }, + "id": 2039, + "name": "Identifier", + "src": "8642:16:6" + } + ], + "id": 2040, + "name": "BinaryOperation", + "src": "8624:34:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d494e5f544f4b454e53", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MIN_TOKENS\"", + "value": "ERR_MIN_TOKENS" + }, + "id": 2041, + "name": "Literal", + "src": "8660:16:6" + } + ], + "id": 2042, + "name": "FunctionCall", + "src": "8616:61:6" + } + ], + "id": 2043, + "name": "ExpressionStatement", + "src": "8616:61:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 2044, + "name": "Identifier", + "src": "8688:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 2045, + "name": "Literal", + "src": "8701:4:6" + } + ], + "id": 2046, + "name": "Assignment", + "src": "8688:17:6" + } + ], + "id": 2047, + "name": "ExpressionStatement", + "src": "8688:17:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1524, + "type": "bool", + "value": "_publicSwap" + }, + "id": 2048, + "name": "Identifier", + "src": "8715:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 2049, + "name": "Literal", + "src": "8729:4:6" + } + ], + "id": 2050, + "name": "Assignment", + "src": "8715:18:6" + } + ], + "id": 2051, + "name": "ExpressionStatement", + "src": "8715:18:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3767, + "type": "function (uint256)", + "value": "_mintPoolShare" + }, + "id": 2052, + "name": "Identifier", + "src": "8744:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 248, + "type": "uint256", + "value": "INIT_POOL_SUPPLY" + }, + "id": 2053, + "name": "Identifier", + "src": "8759:16:6" + } + ], + "id": 2054, + "name": "FunctionCall", + "src": "8744:32:6" + } + ], + "id": 2055, + "name": "ExpressionStatement", + "src": "8744:32:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3757, + "type": "function (address,uint256)", + "value": "_pushPoolShare" + }, + "id": 2056, + "name": "Identifier", + "src": "8786:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2057, + "name": "Identifier", + "src": "8801:3:6" + } + ], + "id": 2058, + "name": "MemberAccess", + "src": "8801:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 248, + "type": "uint256", + "value": "INIT_POOL_SUPPLY" + }, + "id": 2059, + "name": "Identifier", + "src": "8813:16:6" + } + ], + "id": 2060, + "name": "FunctionCall", + "src": "8786:44:6" + } + ], + "id": 2061, + "name": "ExpressionStatement", + "src": "8786:44:6" + } + ], + "id": 2062, + "name": "Block", + "src": "8490:347:6" + } + ], + "id": 2063, + "name": "FunctionDefinition", + "src": "8421:416:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "bind", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "token", + "scope": 2130, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2064, + "name": "ElementaryTypeName", + "src": "8858:7:6" + } + ], + "id": 2065, + "name": "VariableDeclaration", + "src": "8858:13:6" + }, + { + "attributes": { + "constant": false, + "name": "balance", + "scope": 2130, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2066, + "name": "ElementaryTypeName", + "src": "8873:4:6" + } + ], + "id": 2067, + "name": "VariableDeclaration", + "src": "8873:12:6" + }, + { + "attributes": { + "constant": false, + "name": "denorm", + "scope": 2130, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2068, + "name": "ElementaryTypeName", + "src": "8887:4:6" + } + ], + "id": 2069, + "name": "VariableDeclaration", + "src": "8887:11:6" + } + ], + "id": 2070, + "name": "ParameterList", + "src": "8857:42:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 2073, + "name": "ParameterList", + "src": "9013:0:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 2071, + "name": "Identifier", + "src": "8923:6:6" + } + ], + "id": 2072, + "name": "ModifierInvocation", + "src": "8923:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2074, + "name": "Identifier", + "src": "9023:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2075, + "name": "Identifier", + "src": "9031:3:6" + } + ], + "id": 2076, + "name": "MemberAccess", + "src": "9031:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1522, + "type": "address", + "value": "_controller" + }, + "id": 2077, + "name": "Identifier", + "src": "9045:11:6" + } + ], + "id": 2078, + "name": "BinaryOperation", + "src": "9031:25:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f434f4e54524f4c4c4552", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_CONTROLLER\"", + "value": "ERR_NOT_CONTROLLER" + }, + "id": 2079, + "name": "Literal", + "src": "9058:20:6" + } + ], + "id": 2080, + "name": "FunctionCall", + "src": "9023:56:6" + } + ], + "id": 2081, + "name": "ExpressionStatement", + "src": "9023:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29524b4853ebf7d280374d088acc10bd6949cb77e38df49dfa9b02680b8a5f51", + "typeString": "literal_string \"ERR_IS_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2082, + "name": "Identifier", + "src": "9089:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2083, + "name": "Identifier", + "src": "9098:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2065, + "type": "address", + "value": "token" + }, + "id": 2084, + "name": "Identifier", + "src": "9107:5:6" + } + ], + "id": 2085, + "name": "IndexAccess", + "src": "9098:15:6" + } + ], + "id": 2086, + "name": "MemberAccess", + "src": "9098:21:6" + } + ], + "id": 2087, + "name": "UnaryOperation", + "src": "9097:22:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f49535f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_IS_BOUND\"", + "value": "ERR_IS_BOUND" + }, + "id": 2088, + "name": "Literal", + "src": "9121:14:6" + } + ], + "id": 2089, + "name": "FunctionCall", + "src": "9089:47:6" + } + ], + "id": 2090, + "name": "ExpressionStatement", + "src": "9089:47:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2091, + "name": "Identifier", + "src": "9146:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 2092, + "name": "Identifier", + "src": "9155:10:6" + } + ], + "id": 2093, + "name": "UnaryOperation", + "src": "9154:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f49535f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_IS_FINALIZED\"", + "value": "ERR_IS_FINALIZED" + }, + "id": 2094, + "name": "Literal", + "src": "9167:18:6" + } + ], + "id": 2095, + "name": "FunctionCall", + "src": "9146:40:6" + } + ], + "id": 2096, + "name": "ExpressionStatement", + "src": "9146:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2b41476dedca3afde44e68e1abeac58b7cde6712eb701df30a64635f310a23f5", + "typeString": "literal_string \"ERR_MAX_TOKENS\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2097, + "name": "Identifier", + "src": "9197:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2098, + "name": "Identifier", + "src": "9205:7:6" + } + ], + "id": 2099, + "name": "MemberAccess", + "src": "9205:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 208, + "type": "uint256", + "value": "MAX_BOUND_TOKENS" + }, + "id": 2100, + "name": "Identifier", + "src": "9222:16:6" + } + ], + "id": 2101, + "name": "BinaryOperation", + "src": "9205:33:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d41585f544f4b454e53", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MAX_TOKENS\"", + "value": "ERR_MAX_TOKENS" + }, + "id": 2102, + "name": "Literal", + "src": "9240:16:6" + } + ], + "id": 2103, + "name": "FunctionCall", + "src": "9197:60:6" + } + ], + "id": 2104, + "name": "ExpressionStatement", + "src": "9197:60:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2105, + "name": "Identifier", + "src": "9268:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2065, + "type": "address", + "value": "token" + }, + "id": 2106, + "name": "Identifier", + "src": "9277:5:6" + } + ], + "id": 2107, + "name": "IndexAccess", + "src": "9268:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": true, + "lValueRequested": false, + "names": [ + "bound", + "index", + "denorm", + "balance" + ], + "type": "struct BPool.Record memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1439, + "type": "type(struct BPool.Record storage pointer)", + "value": "Record" + }, + "id": 2108, + "name": "Identifier", + "src": "9286:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 2109, + "name": "Literal", + "src": "9314:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2110, + "name": "Identifier", + "src": "9339:7:6" + } + ], + "id": 2111, + "name": "MemberAccess", + "src": "9339:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2112, + "name": "Literal", + "src": "9375:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2113, + "name": "Literal", + "src": "9451:1:6" + } + ], + "id": 2114, + "name": "FunctionCall", + "src": "9286:202:6" + } + ], + "id": 2115, + "name": "Assignment", + "src": "9268:220:6" + } + ], + "id": 2116, + "name": "ExpressionStatement", + "src": "9268:220:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "push", + "referencedDeclaration": null, + "type": "function (address) returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2117, + "name": "Identifier", + "src": "9498:7:6" + } + ], + "id": 2119, + "name": "MemberAccess", + "src": "9498:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2065, + "type": "address", + "value": "token" + }, + "id": 2120, + "name": "Identifier", + "src": "9511:5:6" + } + ], + "id": 2121, + "name": "FunctionCall", + "src": "9498:19:6" + } + ], + "id": 2122, + "name": "ExpressionStatement", + "src": "9498:19:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2302, + "type": "function (address,uint256,uint256)", + "value": "rebind" + }, + "id": 2123, + "name": "Identifier", + "src": "9527:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2065, + "type": "address", + "value": "token" + }, + "id": 2124, + "name": "Identifier", + "src": "9534:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2067, + "type": "uint256", + "value": "balance" + }, + "id": 2125, + "name": "Identifier", + "src": "9541:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2069, + "type": "uint256", + "value": "denorm" + }, + "id": 2126, + "name": "Identifier", + "src": "9550:6:6" + } + ], + "id": 2127, + "name": "FunctionCall", + "src": "9527:30:6" + } + ], + "id": 2128, + "name": "ExpressionStatement", + "src": "9527:30:6" + } + ], + "id": 2129, + "name": "Block", + "src": "9013:551:6" + } + ], + "id": 2130, + "name": "FunctionDefinition", + "src": "8844:720:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "rebind", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "token", + "scope": 2302, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2131, + "name": "ElementaryTypeName", + "src": "9586:7:6" + } + ], + "id": 2132, + "name": "VariableDeclaration", + "src": "9586:13:6" + }, + { + "attributes": { + "constant": false, + "name": "balance", + "scope": 2302, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2133, + "name": "ElementaryTypeName", + "src": "9601:4:6" + } + ], + "id": 2134, + "name": "VariableDeclaration", + "src": "9601:12:6" + }, + { + "attributes": { + "constant": false, + "name": "denorm", + "scope": 2302, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2135, + "name": "ElementaryTypeName", + "src": "9615:4:6" + } + ], + "id": 2136, + "name": "VariableDeclaration", + "src": "9615:11:6" + } + ], + "id": 2137, + "name": "ParameterList", + "src": "9585:42:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 2142, + "name": "ParameterList", + "src": "9677:0:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 2138, + "name": "Identifier", + "src": "9651:6:6" + } + ], + "id": 2139, + "name": "ModifierInvocation", + "src": "9651:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 2140, + "name": "Identifier", + "src": "9666:6:6" + } + ], + "id": 2141, + "name": "ModifierInvocation", + "src": "9666:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2143, + "name": "Identifier", + "src": "9688:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2144, + "name": "Identifier", + "src": "9696:3:6" + } + ], + "id": 2145, + "name": "MemberAccess", + "src": "9696:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1522, + "type": "address", + "value": "_controller" + }, + "id": 2146, + "name": "Identifier", + "src": "9710:11:6" + } + ], + "id": 2147, + "name": "BinaryOperation", + "src": "9696:25:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f434f4e54524f4c4c4552", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_CONTROLLER\"", + "value": "ERR_NOT_CONTROLLER" + }, + "id": 2148, + "name": "Literal", + "src": "9723:20:6" + } + ], + "id": 2149, + "name": "FunctionCall", + "src": "9688:56:6" + } + ], + "id": 2150, + "name": "ExpressionStatement", + "src": "9688:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2151, + "name": "Identifier", + "src": "9754:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2152, + "name": "Identifier", + "src": "9762:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2132, + "type": "address", + "value": "token" + }, + "id": 2153, + "name": "Identifier", + "src": "9771:5:6" + } + ], + "id": 2154, + "name": "IndexAccess", + "src": "9762:15:6" + } + ], + "id": 2155, + "name": "MemberAccess", + "src": "9762:21:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 2156, + "name": "Literal", + "src": "9785:15:6" + } + ], + "id": 2157, + "name": "FunctionCall", + "src": "9754:47:6" + } + ], + "id": 2158, + "name": "ExpressionStatement", + "src": "9754:47:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2159, + "name": "Identifier", + "src": "9811:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 2160, + "name": "Identifier", + "src": "9820:10:6" + } + ], + "id": 2161, + "name": "UnaryOperation", + "src": "9819:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f49535f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_IS_FINALIZED\"", + "value": "ERR_IS_FINALIZED" + }, + "id": 2162, + "name": "Literal", + "src": "9832:18:6" + } + ], + "id": 2163, + "name": "FunctionCall", + "src": "9811:40:6" + } + ], + "id": 2164, + "name": "ExpressionStatement", + "src": "9811:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8df266f07de77e4ef407edb2fcb3334221f5d37909c32010ecedbd042f2b2362", + "typeString": "literal_string \"ERR_MIN_WEIGHT\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2165, + "name": "Identifier", + "src": "9862:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2136, + "type": "uint256", + "value": "denorm" + }, + "id": 2166, + "name": "Identifier", + "src": "9870:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 226, + "type": "uint256", + "value": "MIN_WEIGHT" + }, + "id": 2167, + "name": "Identifier", + "src": "9880:10:6" + } + ], + "id": 2168, + "name": "BinaryOperation", + "src": "9870:20:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d494e5f574549474854", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MIN_WEIGHT\"", + "value": "ERR_MIN_WEIGHT" + }, + "id": 2169, + "name": "Literal", + "src": "9892:16:6" + } + ], + "id": 2170, + "name": "FunctionCall", + "src": "9862:47:6" + } + ], + "id": 2171, + "name": "ExpressionStatement", + "src": "9862:47:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4443a14e27060659cd754b886a4a9abce56b7a815ac41b5da14580c72eae7f33", + "typeString": "literal_string \"ERR_MAX_WEIGHT\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2172, + "name": "Identifier", + "src": "9919:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2136, + "type": "uint256", + "value": "denorm" + }, + "id": 2173, + "name": "Identifier", + "src": "9927:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 231, + "type": "uint256", + "value": "MAX_WEIGHT" + }, + "id": 2174, + "name": "Identifier", + "src": "9937:10:6" + } + ], + "id": 2175, + "name": "BinaryOperation", + "src": "9927:20:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d41585f574549474854", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MAX_WEIGHT\"", + "value": "ERR_MAX_WEIGHT" + }, + "id": 2176, + "name": "Literal", + "src": "9949:16:6" + } + ], + "id": 2177, + "name": "FunctionCall", + "src": "9919:47:6" + } + ], + "id": 2178, + "name": "ExpressionStatement", + "src": "9919:47:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_69c7afc4064c1fa740d9fba5145c2c6cfc449ab58df3114718ec5abc7738730c", + "typeString": "literal_string \"ERR_MIN_BALANCE\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2179, + "name": "Identifier", + "src": "9976:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2134, + "type": "uint256", + "value": "balance" + }, + "id": 2180, + "name": "Identifier", + "src": "9984:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 243, + "type": "uint256", + "value": "MIN_BALANCE" + }, + "id": 2181, + "name": "Identifier", + "src": "9995:11:6" + } + ], + "id": 2182, + "name": "BinaryOperation", + "src": "9984:22:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d494e5f42414c414e4345", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MIN_BALANCE\"", + "value": "ERR_MIN_BALANCE" + }, + "id": 2183, + "name": "Literal", + "src": "10008:17:6" + } + ], + "id": 2184, + "name": "FunctionCall", + "src": "9976:50:6" + } + ], + "id": 2185, + "name": "ExpressionStatement", + "src": "9976:50:6" + }, + { + "attributes": { + "assignments": [ + 2187 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "oldWeight", + "scope": 2301, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2186, + "name": "ElementaryTypeName", + "src": "10082:4:6" + } + ], + "id": 2187, + "name": "VariableDeclaration", + "src": "10082:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2188, + "name": "Identifier", + "src": "10099:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2132, + "type": "address", + "value": "token" + }, + "id": 2189, + "name": "Identifier", + "src": "10108:5:6" + } + ], + "id": 2190, + "name": "IndexAccess", + "src": "10099:15:6" + } + ], + "id": 2191, + "name": "MemberAccess", + "src": "10099:22:6" + } + ], + "id": 2192, + "name": "VariableDeclarationStatement", + "src": "10082:39:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2136, + "type": "uint256", + "value": "denorm" + }, + "id": 2193, + "name": "Identifier", + "src": "10135:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2187, + "type": "uint256", + "value": "oldWeight" + }, + "id": 2194, + "name": "Identifier", + "src": "10144:9:6" + } + ], + "id": 2195, + "name": "BinaryOperation", + "src": "10135:18:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 2196, + "name": "Identifier", + "src": "10169:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 2197, + "name": "Identifier", + "src": "10184:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 2198, + "name": "Identifier", + "src": "10189:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 2199, + "name": "Identifier", + "src": "10203:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2136, + "type": "uint256", + "value": "denorm" + }, + "id": 2200, + "name": "Identifier", + "src": "10208:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2187, + "type": "uint256", + "value": "oldWeight" + }, + "id": 2201, + "name": "Identifier", + "src": "10216:9:6" + } + ], + "id": 2202, + "name": "FunctionCall", + "src": "10203:23:6" + } + ], + "id": 2203, + "name": "FunctionCall", + "src": "10184:43:6" + } + ], + "id": 2204, + "name": "Assignment", + "src": "10169:58:6" + } + ], + "id": 2205, + "name": "ExpressionStatement", + "src": "10169:58:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_55ceb599893e4bee215a5c1285d9b5c12334585fcdd4c2c71690e94257494440", + "typeString": "literal_string \"ERR_MAX_TOTAL_WEIGHT\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2206, + "name": "Identifier", + "src": "10241:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 2207, + "name": "Identifier", + "src": "10249:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 236, + "type": "uint256", + "value": "MAX_TOTAL_WEIGHT" + }, + "id": 2208, + "name": "Identifier", + "src": "10265:16:6" + } + ], + "id": 2209, + "name": "BinaryOperation", + "src": "10249:32:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d41585f544f54414c5f574549474854", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MAX_TOTAL_WEIGHT\"", + "value": "ERR_MAX_TOTAL_WEIGHT" + }, + "id": 2210, + "name": "Literal", + "src": "10283:22:6" + } + ], + "id": 2211, + "name": "FunctionCall", + "src": "10241:65:6" + } + ], + "id": 2212, + "name": "ExpressionStatement", + "src": "10241:65:6" + } + ], + "id": 2213, + "name": "Block", + "src": "10155:162:6" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2136, + "type": "uint256", + "value": "denorm" + }, + "id": 2214, + "name": "Identifier", + "src": "10327:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2187, + "type": "uint256", + "value": "oldWeight" + }, + "id": 2215, + "name": "Identifier", + "src": "10336:9:6" + } + ], + "id": 2216, + "name": "BinaryOperation", + "src": "10327:18:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 2217, + "name": "Identifier", + "src": "10361:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 2218, + "name": "Identifier", + "src": "10376:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 2219, + "name": "Identifier", + "src": "10381:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 2220, + "name": "Identifier", + "src": "10395:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2187, + "type": "uint256", + "value": "oldWeight" + }, + "id": 2221, + "name": "Identifier", + "src": "10400:9:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2136, + "type": "uint256", + "value": "denorm" + }, + "id": 2222, + "name": "Identifier", + "src": "10411:6:6" + } + ], + "id": 2223, + "name": "FunctionCall", + "src": "10395:23:6" + } + ], + "id": 2224, + "name": "FunctionCall", + "src": "10376:43:6" + } + ], + "id": 2225, + "name": "Assignment", + "src": "10361:58:6" + } + ], + "id": 2226, + "name": "ExpressionStatement", + "src": "10361:58:6" + } + ], + "id": 2227, + "name": "Block", + "src": "10347:83:6" + } + ], + "id": 2228, + "name": "IfStatement", + "src": "10323:107:6" + } + ], + "id": 2229, + "name": "IfStatement", + "src": "10131:299:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2230, + "name": "Identifier", + "src": "10447:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2132, + "type": "address", + "value": "token" + }, + "id": 2231, + "name": "Identifier", + "src": "10456:5:6" + } + ], + "id": 2232, + "name": "IndexAccess", + "src": "10447:15:6" + } + ], + "id": 2233, + "name": "MemberAccess", + "src": "10447:22:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2136, + "type": "uint256", + "value": "denorm" + }, + "id": 2234, + "name": "Identifier", + "src": "10472:6:6" + } + ], + "id": 2235, + "name": "Assignment", + "src": "10447:31:6" + } + ], + "id": 2236, + "name": "ExpressionStatement", + "src": "10447:31:6" + }, + { + "attributes": { + "assignments": [ + 2238 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "oldBalance", + "scope": 2301, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2237, + "name": "ElementaryTypeName", + "src": "10551:4:6" + } + ], + "id": 2238, + "name": "VariableDeclaration", + "src": "10551:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2239, + "name": "Identifier", + "src": "10569:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2132, + "type": "address", + "value": "token" + }, + "id": 2240, + "name": "Identifier", + "src": "10578:5:6" + } + ], + "id": 2241, + "name": "IndexAccess", + "src": "10569:15:6" + } + ], + "id": 2242, + "name": "MemberAccess", + "src": "10569:23:6" + } + ], + "id": 2243, + "name": "VariableDeclarationStatement", + "src": "10551:41:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2244, + "name": "Identifier", + "src": "10602:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2132, + "type": "address", + "value": "token" + }, + "id": 2245, + "name": "Identifier", + "src": "10611:5:6" + } + ], + "id": 2246, + "name": "IndexAccess", + "src": "10602:15:6" + } + ], + "id": 2247, + "name": "MemberAccess", + "src": "10602:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2134, + "type": "uint256", + "value": "balance" + }, + "id": 2248, + "name": "Identifier", + "src": "10628:7:6" + } + ], + "id": 2249, + "name": "Assignment", + "src": "10602:33:6" + } + ], + "id": 2250, + "name": "ExpressionStatement", + "src": "10602:33:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2134, + "type": "uint256", + "value": "balance" + }, + "id": 2251, + "name": "Identifier", + "src": "10649:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2238, + "type": "uint256", + "value": "oldBalance" + }, + "id": 2252, + "name": "Identifier", + "src": "10659:10:6" + } + ], + "id": 2253, + "name": "BinaryOperation", + "src": "10649:20:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3706, + "type": "function (address,address,uint256)", + "value": "_pullUnderlying" + }, + "id": 2254, + "name": "Identifier", + "src": "10685:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2132, + "type": "address", + "value": "token" + }, + "id": 2255, + "name": "Identifier", + "src": "10701:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2256, + "name": "Identifier", + "src": "10708:3:6" + } + ], + "id": 2257, + "name": "MemberAccess", + "src": "10708:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 2258, + "name": "Identifier", + "src": "10720:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2134, + "type": "uint256", + "value": "balance" + }, + "id": 2259, + "name": "Identifier", + "src": "10725:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2238, + "type": "uint256", + "value": "oldBalance" + }, + "id": 2260, + "name": "Identifier", + "src": "10734:10:6" + } + ], + "id": 2261, + "name": "FunctionCall", + "src": "10720:25:6" + } + ], + "id": 2262, + "name": "FunctionCall", + "src": "10685:61:6" + } + ], + "id": 2263, + "name": "ExpressionStatement", + "src": "10685:61:6" + } + ], + "id": 2264, + "name": "Block", + "src": "10671:86:6" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2134, + "type": "uint256", + "value": "balance" + }, + "id": 2265, + "name": "Identifier", + "src": "10767:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2238, + "type": "uint256", + "value": "oldBalance" + }, + "id": 2266, + "name": "Identifier", + "src": "10777:10:6" + } + ], + "id": 2267, + "name": "BinaryOperation", + "src": "10767:20:6" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 2269 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenBalanceWithdrawn", + "scope": 2298, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2268, + "name": "ElementaryTypeName", + "src": "10880:4:6" + } + ], + "id": 2269, + "name": "VariableDeclaration", + "src": "10880:26:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 2270, + "name": "Identifier", + "src": "10909:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2238, + "type": "uint256", + "value": "oldBalance" + }, + "id": 2271, + "name": "Identifier", + "src": "10914:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2134, + "type": "uint256", + "value": "balance" + }, + "id": 2272, + "name": "Identifier", + "src": "10926:7:6" + } + ], + "id": 2273, + "name": "FunctionCall", + "src": "10909:25:6" + } + ], + "id": 2274, + "name": "VariableDeclarationStatement", + "src": "10880:54:6" + }, + { + "attributes": { + "assignments": [ + 2276 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenExitFee", + "scope": 2298, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2275, + "name": "ElementaryTypeName", + "src": "10948:4:6" + } + ], + "id": 2276, + "name": "VariableDeclaration", + "src": "10948:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 2277, + "name": "Identifier", + "src": "10968:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2269, + "type": "uint256", + "value": "tokenBalanceWithdrawn" + }, + "id": 2278, + "name": "Identifier", + "src": "10973:21:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 223, + "type": "uint256", + "value": "EXIT_FEE" + }, + "id": 2279, + "name": "Identifier", + "src": "10996:8:6" + } + ], + "id": 2280, + "name": "FunctionCall", + "src": "10968:37:6" + } + ], + "id": 2281, + "name": "VariableDeclarationStatement", + "src": "10948:57:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3731, + "type": "function (address,address,uint256)", + "value": "_pushUnderlying" + }, + "id": 2282, + "name": "Identifier", + "src": "11019:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2132, + "type": "address", + "value": "token" + }, + "id": 2283, + "name": "Identifier", + "src": "11035:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2284, + "name": "Identifier", + "src": "11042:3:6" + } + ], + "id": 2285, + "name": "MemberAccess", + "src": "11042:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 2286, + "name": "Identifier", + "src": "11054:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2269, + "type": "uint256", + "value": "tokenBalanceWithdrawn" + }, + "id": 2287, + "name": "Identifier", + "src": "11059:21:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2276, + "type": "uint256", + "value": "tokenExitFee" + }, + "id": 2288, + "name": "Identifier", + "src": "11082:12:6" + } + ], + "id": 2289, + "name": "FunctionCall", + "src": "11054:41:6" + } + ], + "id": 2290, + "name": "FunctionCall", + "src": "11019:77:6" + } + ], + "id": 2291, + "name": "ExpressionStatement", + "src": "11019:77:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3731, + "type": "function (address,address,uint256)", + "value": "_pushUnderlying" + }, + "id": 2292, + "name": "Identifier", + "src": "11110:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2132, + "type": "address", + "value": "token" + }, + "id": 2293, + "name": "Identifier", + "src": "11126:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1520, + "type": "address", + "value": "_factory" + }, + "id": 2294, + "name": "Identifier", + "src": "11133:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2276, + "type": "uint256", + "value": "tokenExitFee" + }, + "id": 2295, + "name": "Identifier", + "src": "11143:12:6" + } + ], + "id": 2296, + "name": "FunctionCall", + "src": "11110:46:6" + } + ], + "id": 2297, + "name": "ExpressionStatement", + "src": "11110:46:6" + } + ], + "id": 2298, + "name": "Block", + "src": "10789:378:6" + } + ], + "id": 2299, + "name": "IfStatement", + "src": "10763:404:6" + } + ], + "id": 2300, + "name": "IfStatement", + "src": "10645:522:6" + } + ], + "id": 2301, + "name": "Block", + "src": "9677:1496:6" + } + ], + "id": 2302, + "name": "FunctionDefinition", + "src": "9570:1603:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "unbind", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "token", + "scope": 2421, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2303, + "name": "ElementaryTypeName", + "src": "11195:7:6" + } + ], + "id": 2304, + "name": "VariableDeclaration", + "src": "11195:13:6" + } + ], + "id": 2305, + "name": "ParameterList", + "src": "11194:15:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 2310, + "name": "ParameterList", + "src": "11261:0:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 2306, + "name": "Identifier", + "src": "11235:6:6" + } + ], + "id": 2307, + "name": "ModifierInvocation", + "src": "11235:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 2308, + "name": "Identifier", + "src": "11250:6:6" + } + ], + "id": 2309, + "name": "ModifierInvocation", + "src": "11250:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668", + "typeString": "literal_string \"ERR_NOT_CONTROLLER\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2311, + "name": "Identifier", + "src": "11272:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2312, + "name": "Identifier", + "src": "11280:3:6" + } + ], + "id": 2313, + "name": "MemberAccess", + "src": "11280:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1522, + "type": "address", + "value": "_controller" + }, + "id": 2314, + "name": "Identifier", + "src": "11294:11:6" + } + ], + "id": 2315, + "name": "BinaryOperation", + "src": "11280:25:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f434f4e54524f4c4c4552", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_CONTROLLER\"", + "value": "ERR_NOT_CONTROLLER" + }, + "id": 2316, + "name": "Literal", + "src": "11307:20:6" + } + ], + "id": 2317, + "name": "FunctionCall", + "src": "11272:56:6" + } + ], + "id": 2318, + "name": "ExpressionStatement", + "src": "11272:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2319, + "name": "Identifier", + "src": "11338:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2320, + "name": "Identifier", + "src": "11346:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2304, + "type": "address", + "value": "token" + }, + "id": 2321, + "name": "Identifier", + "src": "11355:5:6" + } + ], + "id": 2322, + "name": "IndexAccess", + "src": "11346:15:6" + } + ], + "id": 2323, + "name": "MemberAccess", + "src": "11346:21:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 2324, + "name": "Literal", + "src": "11369:15:6" + } + ], + "id": 2325, + "name": "FunctionCall", + "src": "11338:47:6" + } + ], + "id": 2326, + "name": "ExpressionStatement", + "src": "11338:47:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe", + "typeString": "literal_string \"ERR_IS_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2327, + "name": "Identifier", + "src": "11395:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 2328, + "name": "Identifier", + "src": "11404:10:6" + } + ], + "id": 2329, + "name": "UnaryOperation", + "src": "11403:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f49535f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_IS_FINALIZED\"", + "value": "ERR_IS_FINALIZED" + }, + "id": 2330, + "name": "Literal", + "src": "11416:18:6" + } + ], + "id": 2331, + "name": "FunctionCall", + "src": "11395:40:6" + } + ], + "id": 2332, + "name": "ExpressionStatement", + "src": "11395:40:6" + }, + { + "attributes": { + "assignments": [ + 2334 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenBalance", + "scope": 2420, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2333, + "name": "ElementaryTypeName", + "src": "11446:4:6" + } + ], + "id": 2334, + "name": "VariableDeclaration", + "src": "11446:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2335, + "name": "Identifier", + "src": "11466:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2304, + "type": "address", + "value": "token" + }, + "id": 2336, + "name": "Identifier", + "src": "11475:5:6" + } + ], + "id": 2337, + "name": "IndexAccess", + "src": "11466:15:6" + } + ], + "id": 2338, + "name": "MemberAccess", + "src": "11466:23:6" + } + ], + "id": 2339, + "name": "VariableDeclarationStatement", + "src": "11446:43:6" + }, + { + "attributes": { + "assignments": [ + 2341 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenExitFee", + "scope": 2420, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2340, + "name": "ElementaryTypeName", + "src": "11499:4:6" + } + ], + "id": 2341, + "name": "VariableDeclaration", + "src": "11499:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 2342, + "name": "Identifier", + "src": "11519:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2334, + "type": "uint256", + "value": "tokenBalance" + }, + "id": 2343, + "name": "Identifier", + "src": "11524:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 223, + "type": "uint256", + "value": "EXIT_FEE" + }, + "id": 2344, + "name": "Identifier", + "src": "11538:8:6" + } + ], + "id": 2345, + "name": "FunctionCall", + "src": "11519:28:6" + } + ], + "id": 2346, + "name": "VariableDeclarationStatement", + "src": "11499:48:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 2347, + "name": "Identifier", + "src": "11558:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 2348, + "name": "Identifier", + "src": "11573:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 2349, + "name": "Identifier", + "src": "11578:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2350, + "name": "Identifier", + "src": "11592:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2304, + "type": "address", + "value": "token" + }, + "id": 2351, + "name": "Identifier", + "src": "11601:5:6" + } + ], + "id": 2352, + "name": "IndexAccess", + "src": "11592:15:6" + } + ], + "id": 2353, + "name": "MemberAccess", + "src": "11592:22:6" + } + ], + "id": 2354, + "name": "FunctionCall", + "src": "11573:42:6" + } + ], + "id": 2355, + "name": "Assignment", + "src": "11558:57:6" + } + ], + "id": 2356, + "name": "ExpressionStatement", + "src": "11558:57:6" + }, + { + "attributes": { + "assignments": [ + 2358 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "index", + "scope": 2420, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2357, + "name": "ElementaryTypeName", + "src": "11721:4:6" + } + ], + "id": 2358, + "name": "VariableDeclaration", + "src": "11721:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "index", + "referencedDeclaration": 1434, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2359, + "name": "Identifier", + "src": "11734:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2304, + "type": "address", + "value": "token" + }, + "id": 2360, + "name": "Identifier", + "src": "11743:5:6" + } + ], + "id": 2361, + "name": "IndexAccess", + "src": "11734:15:6" + } + ], + "id": 2362, + "name": "MemberAccess", + "src": "11734:21:6" + } + ], + "id": 2363, + "name": "VariableDeclarationStatement", + "src": "11721:34:6" + }, + { + "attributes": { + "assignments": [ + 2365 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "last", + "scope": 2420, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2364, + "name": "ElementaryTypeName", + "src": "11765:4:6" + } + ], + "id": 2365, + "name": "VariableDeclaration", + "src": "11765:9:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "-", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2366, + "name": "Identifier", + "src": "11777:7:6" + } + ], + "id": 2367, + "name": "MemberAccess", + "src": "11777:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 2368, + "name": "Literal", + "src": "11794:1:6" + } + ], + "id": 2369, + "name": "BinaryOperation", + "src": "11777:18:6" + } + ], + "id": 2370, + "name": "VariableDeclarationStatement", + "src": "11765:30:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2371, + "name": "Identifier", + "src": "11805:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2358, + "type": "uint256", + "value": "index" + }, + "id": 2372, + "name": "Identifier", + "src": "11813:5:6" + } + ], + "id": 2373, + "name": "IndexAccess", + "src": "11805:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2374, + "name": "Identifier", + "src": "11822:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2365, + "type": "uint256", + "value": "last" + }, + "id": 2375, + "name": "Identifier", + "src": "11830:4:6" + } + ], + "id": 2376, + "name": "IndexAccess", + "src": "11822:13:6" + } + ], + "id": 2377, + "name": "Assignment", + "src": "11805:30:6" + } + ], + "id": 2378, + "name": "ExpressionStatement", + "src": "11805:30:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "index", + "referencedDeclaration": 1434, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2379, + "name": "Identifier", + "src": "11845:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2380, + "name": "Identifier", + "src": "11854:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2358, + "type": "uint256", + "value": "index" + }, + "id": 2381, + "name": "Identifier", + "src": "11862:5:6" + } + ], + "id": 2382, + "name": "IndexAccess", + "src": "11854:14:6" + } + ], + "id": 2383, + "name": "IndexAccess", + "src": "11845:24:6" + } + ], + "id": 2384, + "name": "MemberAccess", + "src": "11845:30:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2358, + "type": "uint256", + "value": "index" + }, + "id": 2385, + "name": "Identifier", + "src": "11878:5:6" + } + ], + "id": 2386, + "name": "Assignment", + "src": "11845:38:6" + } + ], + "id": 2387, + "name": "ExpressionStatement", + "src": "11845:38:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "pop", + "referencedDeclaration": null, + "type": "function ()" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2388, + "name": "Identifier", + "src": "11893:7:6" + } + ], + "id": 2390, + "name": "MemberAccess", + "src": "11893:11:6" + } + ], + "id": 2391, + "name": "FunctionCall", + "src": "11893:13:6" + } + ], + "id": 2392, + "name": "ExpressionStatement", + "src": "11893:13:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2393, + "name": "Identifier", + "src": "11916:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2304, + "type": "address", + "value": "token" + }, + "id": 2394, + "name": "Identifier", + "src": "11925:5:6" + } + ], + "id": 2395, + "name": "IndexAccess", + "src": "11916:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": true, + "lValueRequested": false, + "names": [ + "bound", + "index", + "denorm", + "balance" + ], + "type": "struct BPool.Record memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1439, + "type": "type(struct BPool.Record storage pointer)", + "value": "Record" + }, + "id": 2396, + "name": "Identifier", + "src": "11934:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 2397, + "name": "Literal", + "src": "11962:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2398, + "name": "Literal", + "src": "11988:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2399, + "name": "Literal", + "src": "12011:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2400, + "name": "Literal", + "src": "12035:1:6" + } + ], + "id": 2401, + "name": "FunctionCall", + "src": "11934:113:6" + } + ], + "id": 2402, + "name": "Assignment", + "src": "11916:131:6" + } + ], + "id": 2403, + "name": "ExpressionStatement", + "src": "11916:131:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3731, + "type": "function (address,address,uint256)", + "value": "_pushUnderlying" + }, + "id": 2404, + "name": "Identifier", + "src": "12058:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2304, + "type": "address", + "value": "token" + }, + "id": 2405, + "name": "Identifier", + "src": "12074:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2406, + "name": "Identifier", + "src": "12081:3:6" + } + ], + "id": 2407, + "name": "MemberAccess", + "src": "12081:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 2408, + "name": "Identifier", + "src": "12093:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2334, + "type": "uint256", + "value": "tokenBalance" + }, + "id": 2409, + "name": "Identifier", + "src": "12098:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2341, + "type": "uint256", + "value": "tokenExitFee" + }, + "id": 2410, + "name": "Identifier", + "src": "12112:12:6" + } + ], + "id": 2411, + "name": "FunctionCall", + "src": "12093:32:6" + } + ], + "id": 2412, + "name": "FunctionCall", + "src": "12058:68:6" + } + ], + "id": 2413, + "name": "ExpressionStatement", + "src": "12058:68:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3731, + "type": "function (address,address,uint256)", + "value": "_pushUnderlying" + }, + "id": 2414, + "name": "Identifier", + "src": "12136:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2304, + "type": "address", + "value": "token" + }, + "id": 2415, + "name": "Identifier", + "src": "12152:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1520, + "type": "address", + "value": "_factory" + }, + "id": 2416, + "name": "Identifier", + "src": "12159:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2341, + "type": "uint256", + "value": "tokenExitFee" + }, + "id": 2417, + "name": "Identifier", + "src": "12169:12:6" + } + ], + "id": 2418, + "name": "FunctionCall", + "src": "12136:46:6" + } + ], + "id": 2419, + "name": "ExpressionStatement", + "src": "12136:46:6" + } + ], + "id": 2420, + "name": "Block", + "src": "11261:928:6" + } + ], + "id": 2421, + "name": "FunctionDefinition", + "src": "11179:1010:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "gulp", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "token", + "scope": 2453, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2422, + "name": "ElementaryTypeName", + "src": "12285:7:6" + } + ], + "id": 2423, + "name": "VariableDeclaration", + "src": "12285:13:6" + } + ], + "id": 2424, + "name": "ParameterList", + "src": "12284:15:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 2429, + "name": "ParameterList", + "src": "12351:0:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 2425, + "name": "Identifier", + "src": "12325:6:6" + } + ], + "id": 2426, + "name": "ModifierInvocation", + "src": "12325:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 2427, + "name": "Identifier", + "src": "12340:6:6" + } + ], + "id": 2428, + "name": "ModifierInvocation", + "src": "12340:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2430, + "name": "Identifier", + "src": "12361:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2431, + "name": "Identifier", + "src": "12369:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2423, + "type": "address", + "value": "token" + }, + "id": 2432, + "name": "Identifier", + "src": "12378:5:6" + } + ], + "id": 2433, + "name": "IndexAccess", + "src": "12369:15:6" + } + ], + "id": 2434, + "name": "MemberAccess", + "src": "12369:21:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 2435, + "name": "Literal", + "src": "12392:15:6" + } + ], + "id": 2436, + "name": "FunctionCall", + "src": "12361:47:6" + } + ], + "id": 2437, + "name": "ExpressionStatement", + "src": "12361:47:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2438, + "name": "Identifier", + "src": "12418:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2423, + "type": "address", + "value": "token" + }, + "id": 2439, + "name": "Identifier", + "src": "12427:5:6" + } + ], + "id": 2440, + "name": "IndexAccess", + "src": "12418:15:6" + } + ], + "id": 2441, + "name": "MemberAccess", + "src": "12418:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 7051, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7106, + "type": "type(contract IERC20)", + "value": "IERC20" + }, + "id": 2442, + "name": "Identifier", + "src": "12444:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2423, + "type": "address", + "value": "token" + }, + "id": 2443, + "name": "Identifier", + "src": "12451:5:6" + } + ], + "id": 2444, + "name": "FunctionCall", + "src": "12444:13:6" + } + ], + "id": 2445, + "name": "MemberAccess", + "src": "12444:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BPool_$3778", + "typeString": "contract BPool" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 2446, + "name": "ElementaryTypeNameExpression", + "src": "12468:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7155, + "type": "contract BPool", + "value": "this" + }, + "id": 2447, + "name": "Identifier", + "src": "12476:4:6" + } + ], + "id": 2448, + "name": "FunctionCall", + "src": "12468:13:6" + } + ], + "id": 2449, + "name": "FunctionCall", + "src": "12444:38:6" + } + ], + "id": 2450, + "name": "Assignment", + "src": "12418:64:6" + } + ], + "id": 2451, + "name": "ExpressionStatement", + "src": "12418:64:6" + } + ], + "id": 2452, + "name": "Block", + "src": "12351:138:6" + } + ], + "id": 2453, + "name": "FunctionDefinition", + "src": "12271:218:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "getSpotPrice", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenIn", + "scope": 2505, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2454, + "name": "ElementaryTypeName", + "src": "12517:7:6" + } + ], + "id": 2455, + "name": "VariableDeclaration", + "src": "12517:15:6" + }, + { + "attributes": { + "constant": false, + "name": "tokenOut", + "scope": 2505, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2456, + "name": "ElementaryTypeName", + "src": "12534:7:6" + } + ], + "id": 2457, + "name": "VariableDeclaration", + "src": "12534:16:6" + } + ], + "id": 2458, + "name": "ParameterList", + "src": "12516:35:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "spotPrice", + "scope": 2505, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2461, + "name": "ElementaryTypeName", + "src": "12610:4:6" + } + ], + "id": 2462, + "name": "VariableDeclaration", + "src": "12610:14:6" + } + ], + "id": 2463, + "name": "ParameterList", + "src": "12609:16:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1516, + "type": "modifier ()", + "value": "_viewlock_" + }, + "id": 2459, + "name": "Identifier", + "src": "12582:10:6" + } + ], + "id": 2460, + "name": "ModifierInvocation", + "src": "12582:10:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2464, + "name": "Identifier", + "src": "12640:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2465, + "name": "Identifier", + "src": "12648:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2455, + "type": "address", + "value": "tokenIn" + }, + "id": 2466, + "name": "Identifier", + "src": "12657:7:6" + } + ], + "id": 2467, + "name": "IndexAccess", + "src": "12648:17:6" + } + ], + "id": 2468, + "name": "MemberAccess", + "src": "12648:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 2469, + "name": "Literal", + "src": "12673:15:6" + } + ], + "id": 2470, + "name": "FunctionCall", + "src": "12640:49:6" + } + ], + "id": 2471, + "name": "ExpressionStatement", + "src": "12640:49:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2472, + "name": "Identifier", + "src": "12699:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2473, + "name": "Identifier", + "src": "12707:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2457, + "type": "address", + "value": "tokenOut" + }, + "id": 2474, + "name": "Identifier", + "src": "12716:8:6" + } + ], + "id": 2475, + "name": "IndexAccess", + "src": "12707:18:6" + } + ], + "id": 2476, + "name": "MemberAccess", + "src": "12707:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 2477, + "name": "Literal", + "src": "12733:15:6" + } + ], + "id": 2478, + "name": "FunctionCall", + "src": "12699:50:6" + } + ], + "id": 2479, + "name": "ExpressionStatement", + "src": "12699:50:6" + }, + { + "attributes": { + "assignments": [ + 2481 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "inRecord", + "scope": 2504, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 2480, + "name": "UserDefinedTypeName", + "src": "12759:6:6" + } + ], + "id": 2481, + "name": "VariableDeclaration", + "src": "12759:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2482, + "name": "Identifier", + "src": "12785:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2455, + "type": "address", + "value": "tokenIn" + }, + "id": 2483, + "name": "Identifier", + "src": "12794:7:6" + } + ], + "id": 2484, + "name": "IndexAccess", + "src": "12785:17:6" + } + ], + "id": 2485, + "name": "VariableDeclarationStatement", + "src": "12759:43:6" + }, + { + "attributes": { + "assignments": [ + 2487 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "outRecord", + "scope": 2504, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 2486, + "name": "UserDefinedTypeName", + "src": "12812:6:6" + } + ], + "id": 2487, + "name": "VariableDeclaration", + "src": "12812:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2488, + "name": "Identifier", + "src": "12839:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2457, + "type": "address", + "value": "tokenOut" + }, + "id": 2489, + "name": "Identifier", + "src": "12848:8:6" + } + ], + "id": 2490, + "name": "IndexAccess", + "src": "12839:18:6" + } + ], + "id": 2491, + "name": "VariableDeclarationStatement", + "src": "12812:45:6" + }, + { + "attributes": { + "functionReturnParameters": 2463 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 438, + "type": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcSpotPrice" + }, + "id": 2492, + "name": "Identifier", + "src": "12874:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2481, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2493, + "name": "Identifier", + "src": "12901:8:6" + } + ], + "id": 2494, + "name": "MemberAccess", + "src": "12901:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2481, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2495, + "name": "Identifier", + "src": "12932:8:6" + } + ], + "id": 2496, + "name": "MemberAccess", + "src": "12932:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2487, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2497, + "name": "Identifier", + "src": "12962:9:6" + } + ], + "id": 2498, + "name": "MemberAccess", + "src": "12962:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2487, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2499, + "name": "Identifier", + "src": "12994:9:6" + } + ], + "id": 2500, + "name": "MemberAccess", + "src": "12994:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 2501, + "name": "Identifier", + "src": "13025:8:6" + } + ], + "id": 2502, + "name": "FunctionCall", + "src": "12874:169:6" + } + ], + "id": 2503, + "name": "Return", + "src": "12867:176:6" + } + ], + "id": 2504, + "name": "Block", + "src": "12630:420:6" + } + ], + "id": 2505, + "name": "FunctionDefinition", + "src": "12495:555:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "getSpotPriceSansFee", + "scope": 3778, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenIn", + "scope": 2557, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2506, + "name": "ElementaryTypeName", + "src": "13085:7:6" + } + ], + "id": 2507, + "name": "VariableDeclaration", + "src": "13085:15:6" + }, + { + "attributes": { + "constant": false, + "name": "tokenOut", + "scope": 2557, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2508, + "name": "ElementaryTypeName", + "src": "13102:7:6" + } + ], + "id": 2509, + "name": "VariableDeclaration", + "src": "13102:16:6" + } + ], + "id": 2510, + "name": "ParameterList", + "src": "13084:35:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "spotPrice", + "scope": 2557, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2513, + "name": "ElementaryTypeName", + "src": "13178:4:6" + } + ], + "id": 2514, + "name": "VariableDeclaration", + "src": "13178:14:6" + } + ], + "id": 2515, + "name": "ParameterList", + "src": "13177:16:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1516, + "type": "modifier ()", + "value": "_viewlock_" + }, + "id": 2511, + "name": "Identifier", + "src": "13150:10:6" + } + ], + "id": 2512, + "name": "ModifierInvocation", + "src": "13150:10:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2516, + "name": "Identifier", + "src": "13208:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2517, + "name": "Identifier", + "src": "13216:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2507, + "type": "address", + "value": "tokenIn" + }, + "id": 2518, + "name": "Identifier", + "src": "13225:7:6" + } + ], + "id": 2519, + "name": "IndexAccess", + "src": "13216:17:6" + } + ], + "id": 2520, + "name": "MemberAccess", + "src": "13216:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 2521, + "name": "Literal", + "src": "13241:15:6" + } + ], + "id": 2522, + "name": "FunctionCall", + "src": "13208:49:6" + } + ], + "id": 2523, + "name": "ExpressionStatement", + "src": "13208:49:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2524, + "name": "Identifier", + "src": "13267:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2525, + "name": "Identifier", + "src": "13275:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2509, + "type": "address", + "value": "tokenOut" + }, + "id": 2526, + "name": "Identifier", + "src": "13284:8:6" + } + ], + "id": 2527, + "name": "IndexAccess", + "src": "13275:18:6" + } + ], + "id": 2528, + "name": "MemberAccess", + "src": "13275:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 2529, + "name": "Literal", + "src": "13301:15:6" + } + ], + "id": 2530, + "name": "FunctionCall", + "src": "13267:50:6" + } + ], + "id": 2531, + "name": "ExpressionStatement", + "src": "13267:50:6" + }, + { + "attributes": { + "assignments": [ + 2533 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "inRecord", + "scope": 2556, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 2532, + "name": "UserDefinedTypeName", + "src": "13327:6:6" + } + ], + "id": 2533, + "name": "VariableDeclaration", + "src": "13327:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2534, + "name": "Identifier", + "src": "13353:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2507, + "type": "address", + "value": "tokenIn" + }, + "id": 2535, + "name": "Identifier", + "src": "13362:7:6" + } + ], + "id": 2536, + "name": "IndexAccess", + "src": "13353:17:6" + } + ], + "id": 2537, + "name": "VariableDeclarationStatement", + "src": "13327:43:6" + }, + { + "attributes": { + "assignments": [ + 2539 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "outRecord", + "scope": 2556, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 2538, + "name": "UserDefinedTypeName", + "src": "13380:6:6" + } + ], + "id": 2539, + "name": "VariableDeclaration", + "src": "13380:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2540, + "name": "Identifier", + "src": "13407:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2509, + "type": "address", + "value": "tokenOut" + }, + "id": 2541, + "name": "Identifier", + "src": "13416:8:6" + } + ], + "id": 2542, + "name": "IndexAccess", + "src": "13407:18:6" + } + ], + "id": 2543, + "name": "VariableDeclarationStatement", + "src": "13380:45:6" + }, + { + "attributes": { + "functionReturnParameters": 2515 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 438, + "type": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcSpotPrice" + }, + "id": 2544, + "name": "Identifier", + "src": "13442:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2533, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2545, + "name": "Identifier", + "src": "13469:8:6" + } + ], + "id": 2546, + "name": "MemberAccess", + "src": "13469:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2533, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2547, + "name": "Identifier", + "src": "13500:8:6" + } + ], + "id": 2548, + "name": "MemberAccess", + "src": "13500:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2539, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2549, + "name": "Identifier", + "src": "13530:9:6" + } + ], + "id": 2550, + "name": "MemberAccess", + "src": "13530:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2539, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2551, + "name": "Identifier", + "src": "13562:9:6" + } + ], + "id": 2552, + "name": "MemberAccess", + "src": "13562:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2553, + "name": "Literal", + "src": "13593:1:6" + } + ], + "id": 2554, + "name": "FunctionCall", + "src": "13442:162:6" + } + ], + "id": 2555, + "name": "Return", + "src": "13435:169:6" + } + ], + "id": 2556, + "name": "Block", + "src": "13198:413:6" + } + ], + "id": 2557, + "name": "FunctionDefinition", + "src": "13056:555:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "joinPool", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "poolAmountOut", + "scope": 2680, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2558, + "name": "ElementaryTypeName", + "src": "13635:4:6" + } + ], + "id": 2559, + "name": "VariableDeclaration", + "src": "13635:18:6" + }, + { + "attributes": { + "constant": false, + "name": "maxAmountsIn", + "scope": 2680, + "stateVariable": false, + "storageLocation": "calldata", + "type": "uint256[]", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "length": null, + "type": "uint256[]" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2560, + "name": "ElementaryTypeName", + "src": "13655:4:6" + } + ], + "id": 2561, + "name": "ArrayTypeName", + "src": "13655:6:6" + } + ], + "id": 2562, + "name": "VariableDeclaration", + "src": "13655:28:6" + } + ], + "id": 2563, + "name": "ParameterList", + "src": "13634:50:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 2568, + "name": "ParameterList", + "src": "13736:0:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 2564, + "name": "Identifier", + "src": "13710:6:6" + } + ], + "id": 2565, + "name": "ModifierInvocation", + "src": "13710:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 2566, + "name": "Identifier", + "src": "13725:6:6" + } + ], + "id": 2567, + "name": "ModifierInvocation", + "src": "13725:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2569, + "name": "Identifier", + "src": "13746:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 2570, + "name": "Identifier", + "src": "13754:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_FINALIZED\"", + "value": "ERR_NOT_FINALIZED" + }, + "id": 2571, + "name": "Literal", + "src": "13766:19:6" + } + ], + "id": 2572, + "name": "FunctionCall", + "src": "13746:40:6" + } + ], + "id": 2573, + "name": "ExpressionStatement", + "src": "13746:40:6" + }, + { + "attributes": { + "assignments": [ + 2575 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "poolTotal", + "scope": 2679, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2574, + "name": "ElementaryTypeName", + "src": "13797:4:6" + } + ], + "id": 2575, + "name": "VariableDeclaration", + "src": "13797:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4052, + "type": "function () view returns (uint256)", + "value": "totalSupply" + }, + "id": 2576, + "name": "Identifier", + "src": "13814:11:6" + } + ], + "id": 2577, + "name": "FunctionCall", + "src": "13814:13:6" + } + ], + "id": 2578, + "name": "VariableDeclarationStatement", + "src": "13797:30:6" + }, + { + "attributes": { + "assignments": [ + 2580 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "ratio", + "scope": 2679, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2579, + "name": "ElementaryTypeName", + "src": "13837:4:6" + } + ], + "id": 2580, + "name": "VariableDeclaration", + "src": "13837:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 2581, + "name": "Identifier", + "src": "13850:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2559, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 2582, + "name": "Identifier", + "src": "13855:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2575, + "type": "uint256", + "value": "poolTotal" + }, + "id": 2583, + "name": "Identifier", + "src": "13870:9:6" + } + ], + "id": 2584, + "name": "FunctionCall", + "src": "13850:30:6" + } + ], + "id": 2585, + "name": "VariableDeclarationStatement", + "src": "13837:43:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2586, + "name": "Identifier", + "src": "13890:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2580, + "type": "uint256", + "value": "ratio" + }, + "id": 2587, + "name": "Identifier", + "src": "13898:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2588, + "name": "Literal", + "src": "13907:1:6" + } + ], + "id": 2589, + "name": "BinaryOperation", + "src": "13898:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d4154485f415050524f58", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MATH_APPROX\"", + "value": "ERR_MATH_APPROX" + }, + "id": 2590, + "name": "Literal", + "src": "13910:17:6" + } + ], + "id": 2591, + "name": "FunctionCall", + "src": "13890:38:6" + } + ], + "id": 2592, + "name": "ExpressionStatement", + "src": "13890:38:6" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 2594 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "i", + "scope": 2668, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2593, + "name": "ElementaryTypeName", + "src": "13944:4:6" + } + ], + "id": 2594, + "name": "VariableDeclaration", + "src": "13944:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2595, + "name": "Literal", + "src": "13953:1:6" + } + ], + "id": 2596, + "name": "VariableDeclarationStatement", + "src": "13944:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2594, + "type": "uint256", + "value": "i" + }, + "id": 2597, + "name": "Identifier", + "src": "13956:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2598, + "name": "Identifier", + "src": "13960:7:6" + } + ], + "id": 2599, + "name": "MemberAccess", + "src": "13960:14:6" + } + ], + "id": 2600, + "name": "BinaryOperation", + "src": "13956:18:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "++", + "prefix": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2594, + "type": "uint256", + "value": "i" + }, + "id": 2601, + "name": "Identifier", + "src": "13976:1:6" + } + ], + "id": 2602, + "name": "UnaryOperation", + "src": "13976:3:6" + } + ], + "id": 2603, + "name": "ExpressionStatement", + "src": "13976:3:6" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 2605 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "t", + "scope": 2667, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2604, + "name": "ElementaryTypeName", + "src": "13995:7:6" + } + ], + "id": 2605, + "name": "VariableDeclaration", + "src": "13995:9:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2606, + "name": "Identifier", + "src": "14007:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2594, + "type": "uint256", + "value": "i" + }, + "id": 2607, + "name": "Identifier", + "src": "14015:1:6" + } + ], + "id": 2608, + "name": "IndexAccess", + "src": "14007:10:6" + } + ], + "id": 2609, + "name": "VariableDeclarationStatement", + "src": "13995:22:6" + }, + { + "attributes": { + "assignments": [ + 2611 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "bal", + "scope": 2667, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2610, + "name": "ElementaryTypeName", + "src": "14031:4:6" + } + ], + "id": 2611, + "name": "VariableDeclaration", + "src": "14031:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2612, + "name": "Identifier", + "src": "14042:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2605, + "type": "address", + "value": "t" + }, + "id": 2613, + "name": "Identifier", + "src": "14051:1:6" + } + ], + "id": 2614, + "name": "IndexAccess", + "src": "14042:11:6" + } + ], + "id": 2615, + "name": "MemberAccess", + "src": "14042:19:6" + } + ], + "id": 2616, + "name": "VariableDeclarationStatement", + "src": "14031:30:6" + }, + { + "attributes": { + "assignments": [ + 2618 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountIn", + "scope": 2667, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2617, + "name": "ElementaryTypeName", + "src": "14075:4:6" + } + ], + "id": 2618, + "name": "VariableDeclaration", + "src": "14075:18:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 2619, + "name": "Identifier", + "src": "14096:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2580, + "type": "uint256", + "value": "ratio" + }, + "id": 2620, + "name": "Identifier", + "src": "14101:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2611, + "type": "uint256", + "value": "bal" + }, + "id": 2621, + "name": "Identifier", + "src": "14108:3:6" + } + ], + "id": 2622, + "name": "FunctionCall", + "src": "14096:16:6" + } + ], + "id": 2623, + "name": "VariableDeclarationStatement", + "src": "14075:37:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2624, + "name": "Identifier", + "src": "14126:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2618, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 2625, + "name": "Identifier", + "src": "14134:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2626, + "name": "Literal", + "src": "14151:1:6" + } + ], + "id": 2627, + "name": "BinaryOperation", + "src": "14134:18:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d4154485f415050524f58", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MATH_APPROX\"", + "value": "ERR_MATH_APPROX" + }, + "id": 2628, + "name": "Literal", + "src": "14154:17:6" + } + ], + "id": 2629, + "name": "FunctionCall", + "src": "14126:46:6" + } + ], + "id": 2630, + "name": "ExpressionStatement", + "src": "14126:46:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2631, + "name": "Identifier", + "src": "14186:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2618, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 2632, + "name": "Identifier", + "src": "14194:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2562, + "type": "uint256[] calldata", + "value": "maxAmountsIn" + }, + "id": 2633, + "name": "Identifier", + "src": "14211:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2594, + "type": "uint256", + "value": "i" + }, + "id": 2634, + "name": "Identifier", + "src": "14224:1:6" + } + ], + "id": 2635, + "name": "IndexAccess", + "src": "14211:15:6" + } + ], + "id": 2636, + "name": "BinaryOperation", + "src": "14194:32:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4c494d49545f494e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_LIMIT_IN\"", + "value": "ERR_LIMIT_IN" + }, + "id": 2637, + "name": "Literal", + "src": "14228:14:6" + } + ], + "id": 2638, + "name": "FunctionCall", + "src": "14186:57:6" + } + ], + "id": 2639, + "name": "ExpressionStatement", + "src": "14186:57:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2640, + "name": "Identifier", + "src": "14257:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2605, + "type": "address", + "value": "t" + }, + "id": 2641, + "name": "Identifier", + "src": "14266:1:6" + } + ], + "id": 2642, + "name": "IndexAccess", + "src": "14257:11:6" + } + ], + "id": 2643, + "name": "MemberAccess", + "src": "14257:19:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 2644, + "name": "Identifier", + "src": "14279:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2645, + "name": "Identifier", + "src": "14284:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2605, + "type": "address", + "value": "t" + }, + "id": 2646, + "name": "Identifier", + "src": "14293:1:6" + } + ], + "id": 2647, + "name": "IndexAccess", + "src": "14284:11:6" + } + ], + "id": 2648, + "name": "MemberAccess", + "src": "14284:19:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2618, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 2649, + "name": "Identifier", + "src": "14305:13:6" + } + ], + "id": 2650, + "name": "FunctionCall", + "src": "14279:40:6" + } + ], + "id": 2651, + "name": "Assignment", + "src": "14257:62:6" + } + ], + "id": 2652, + "name": "ExpressionStatement", + "src": "14257:62:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1459, + "type": "function (address,address,uint256)", + "value": "LOG_JOIN" + }, + "id": 2653, + "name": "Identifier", + "src": "14338:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2654, + "name": "Identifier", + "src": "14347:3:6" + } + ], + "id": 2655, + "name": "MemberAccess", + "src": "14347:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2605, + "type": "address", + "value": "t" + }, + "id": 2656, + "name": "Identifier", + "src": "14359:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2618, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 2657, + "name": "Identifier", + "src": "14362:13:6" + } + ], + "id": 2658, + "name": "FunctionCall", + "src": "14338:38:6" + } + ], + "id": 2659, + "name": "EmitStatement", + "src": "14333:43:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3706, + "type": "function (address,address,uint256)", + "value": "_pullUnderlying" + }, + "id": 2660, + "name": "Identifier", + "src": "14390:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2605, + "type": "address", + "value": "t" + }, + "id": 2661, + "name": "Identifier", + "src": "14406:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2662, + "name": "Identifier", + "src": "14409:3:6" + } + ], + "id": 2663, + "name": "MemberAccess", + "src": "14409:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2618, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 2664, + "name": "Identifier", + "src": "14421:13:6" + } + ], + "id": 2665, + "name": "FunctionCall", + "src": "14390:45:6" + } + ], + "id": 2666, + "name": "ExpressionStatement", + "src": "14390:45:6" + } + ], + "id": 2667, + "name": "Block", + "src": "13981:465:6" + } + ], + "id": 2668, + "name": "ForStatement", + "src": "13939:507:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3767, + "type": "function (uint256)", + "value": "_mintPoolShare" + }, + "id": 2669, + "name": "Identifier", + "src": "14455:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2559, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 2670, + "name": "Identifier", + "src": "14470:13:6" + } + ], + "id": 2671, + "name": "FunctionCall", + "src": "14455:29:6" + } + ], + "id": 2672, + "name": "ExpressionStatement", + "src": "14455:29:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3757, + "type": "function (address,uint256)", + "value": "_pushPoolShare" + }, + "id": 2673, + "name": "Identifier", + "src": "14494:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2674, + "name": "Identifier", + "src": "14509:3:6" + } + ], + "id": 2675, + "name": "MemberAccess", + "src": "14509:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2559, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 2676, + "name": "Identifier", + "src": "14521:13:6" + } + ], + "id": 2677, + "name": "FunctionCall", + "src": "14494:41:6" + } + ], + "id": 2678, + "name": "ExpressionStatement", + "src": "14494:41:6" + } + ], + "id": 2679, + "name": "Block", + "src": "13736:806:6" + } + ], + "id": 2680, + "name": "FunctionDefinition", + "src": "13617:925:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "exitPool", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "poolAmountIn", + "scope": 2822, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2681, + "name": "ElementaryTypeName", + "src": "14566:4:6" + } + ], + "id": 2682, + "name": "VariableDeclaration", + "src": "14566:17:6" + }, + { + "attributes": { + "constant": false, + "name": "minAmountsOut", + "scope": 2822, + "stateVariable": false, + "storageLocation": "calldata", + "type": "uint256[]", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "length": null, + "type": "uint256[]" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2683, + "name": "ElementaryTypeName", + "src": "14585:4:6" + } + ], + "id": 2684, + "name": "ArrayTypeName", + "src": "14585:6:6" + } + ], + "id": 2685, + "name": "VariableDeclaration", + "src": "14585:29:6" + } + ], + "id": 2686, + "name": "ParameterList", + "src": "14565:50:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 2691, + "name": "ParameterList", + "src": "14667:0:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 2687, + "name": "Identifier", + "src": "14641:6:6" + } + ], + "id": 2688, + "name": "ModifierInvocation", + "src": "14641:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 2689, + "name": "Identifier", + "src": "14656:6:6" + } + ], + "id": 2690, + "name": "ModifierInvocation", + "src": "14656:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2692, + "name": "Identifier", + "src": "14677:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 2693, + "name": "Identifier", + "src": "14685:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_FINALIZED\"", + "value": "ERR_NOT_FINALIZED" + }, + "id": 2694, + "name": "Literal", + "src": "14697:19:6" + } + ], + "id": 2695, + "name": "FunctionCall", + "src": "14677:40:6" + } + ], + "id": 2696, + "name": "ExpressionStatement", + "src": "14677:40:6" + }, + { + "attributes": { + "assignments": [ + 2698 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "poolTotal", + "scope": 2821, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2697, + "name": "ElementaryTypeName", + "src": "14728:4:6" + } + ], + "id": 2698, + "name": "VariableDeclaration", + "src": "14728:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4052, + "type": "function () view returns (uint256)", + "value": "totalSupply" + }, + "id": 2699, + "name": "Identifier", + "src": "14745:11:6" + } + ], + "id": 2700, + "name": "FunctionCall", + "src": "14745:13:6" + } + ], + "id": 2701, + "name": "VariableDeclarationStatement", + "src": "14728:30:6" + }, + { + "attributes": { + "assignments": [ + 2703 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "exitFee", + "scope": 2821, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2702, + "name": "ElementaryTypeName", + "src": "14768:4:6" + } + ], + "id": 2703, + "name": "VariableDeclaration", + "src": "14768:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 2704, + "name": "Identifier", + "src": "14783:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2682, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 2705, + "name": "Identifier", + "src": "14788:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 223, + "type": "uint256", + "value": "EXIT_FEE" + }, + "id": 2706, + "name": "Identifier", + "src": "14802:8:6" + } + ], + "id": 2707, + "name": "FunctionCall", + "src": "14783:28:6" + } + ], + "id": 2708, + "name": "VariableDeclarationStatement", + "src": "14768:43:6" + }, + { + "attributes": { + "assignments": [ + 2710 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "pAiAfterExitFee", + "scope": 2821, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2709, + "name": "ElementaryTypeName", + "src": "14821:4:6" + } + ], + "id": 2710, + "name": "VariableDeclaration", + "src": "14821:20:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 2711, + "name": "Identifier", + "src": "14844:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2682, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 2712, + "name": "Identifier", + "src": "14849:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2703, + "type": "uint256", + "value": "exitFee" + }, + "id": 2713, + "name": "Identifier", + "src": "14863:7:6" + } + ], + "id": 2714, + "name": "FunctionCall", + "src": "14844:27:6" + } + ], + "id": 2715, + "name": "VariableDeclarationStatement", + "src": "14821:50:6" + }, + { + "attributes": { + "assignments": [ + 2717 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "ratio", + "scope": 2821, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2716, + "name": "ElementaryTypeName", + "src": "14881:4:6" + } + ], + "id": 2717, + "name": "VariableDeclaration", + "src": "14881:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 2718, + "name": "Identifier", + "src": "14894:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2710, + "type": "uint256", + "value": "pAiAfterExitFee" + }, + "id": 2719, + "name": "Identifier", + "src": "14899:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2698, + "type": "uint256", + "value": "poolTotal" + }, + "id": 2720, + "name": "Identifier", + "src": "14916:9:6" + } + ], + "id": 2721, + "name": "FunctionCall", + "src": "14894:32:6" + } + ], + "id": 2722, + "name": "VariableDeclarationStatement", + "src": "14881:45:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2723, + "name": "Identifier", + "src": "14936:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2717, + "type": "uint256", + "value": "ratio" + }, + "id": 2724, + "name": "Identifier", + "src": "14944:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2725, + "name": "Literal", + "src": "14953:1:6" + } + ], + "id": 2726, + "name": "BinaryOperation", + "src": "14944:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d4154485f415050524f58", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MATH_APPROX\"", + "value": "ERR_MATH_APPROX" + }, + "id": 2727, + "name": "Literal", + "src": "14956:17:6" + } + ], + "id": 2728, + "name": "FunctionCall", + "src": "14936:38:6" + } + ], + "id": 2729, + "name": "ExpressionStatement", + "src": "14936:38:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3744, + "type": "function (address,uint256)", + "value": "_pullPoolShare" + }, + "id": 2730, + "name": "Identifier", + "src": "14985:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2731, + "name": "Identifier", + "src": "15000:3:6" + } + ], + "id": 2732, + "name": "MemberAccess", + "src": "15000:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2682, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 2733, + "name": "Identifier", + "src": "15012:12:6" + } + ], + "id": 2734, + "name": "FunctionCall", + "src": "14985:40:6" + } + ], + "id": 2735, + "name": "ExpressionStatement", + "src": "14985:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3757, + "type": "function (address,uint256)", + "value": "_pushPoolShare" + }, + "id": 2736, + "name": "Identifier", + "src": "15035:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1520, + "type": "address", + "value": "_factory" + }, + "id": 2737, + "name": "Identifier", + "src": "15050:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2703, + "type": "uint256", + "value": "exitFee" + }, + "id": 2738, + "name": "Identifier", + "src": "15060:7:6" + } + ], + "id": 2739, + "name": "FunctionCall", + "src": "15035:33:6" + } + ], + "id": 2740, + "name": "ExpressionStatement", + "src": "15035:33:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3777, + "type": "function (uint256)", + "value": "_burnPoolShare" + }, + "id": 2741, + "name": "Identifier", + "src": "15078:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2710, + "type": "uint256", + "value": "pAiAfterExitFee" + }, + "id": 2742, + "name": "Identifier", + "src": "15093:15:6" + } + ], + "id": 2743, + "name": "FunctionCall", + "src": "15078:31:6" + } + ], + "id": 2744, + "name": "ExpressionStatement", + "src": "15078:31:6" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 2746 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "i", + "scope": 2820, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2745, + "name": "ElementaryTypeName", + "src": "15125:4:6" + } + ], + "id": 2746, + "name": "VariableDeclaration", + "src": "15125:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2747, + "name": "Literal", + "src": "15134:1:6" + } + ], + "id": 2748, + "name": "VariableDeclarationStatement", + "src": "15125:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2746, + "type": "uint256", + "value": "i" + }, + "id": 2749, + "name": "Identifier", + "src": "15137:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2750, + "name": "Identifier", + "src": "15141:7:6" + } + ], + "id": 2751, + "name": "MemberAccess", + "src": "15141:14:6" + } + ], + "id": 2752, + "name": "BinaryOperation", + "src": "15137:18:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "++", + "prefix": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2746, + "type": "uint256", + "value": "i" + }, + "id": 2753, + "name": "Identifier", + "src": "15157:1:6" + } + ], + "id": 2754, + "name": "UnaryOperation", + "src": "15157:3:6" + } + ], + "id": 2755, + "name": "ExpressionStatement", + "src": "15157:3:6" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 2757 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "t", + "scope": 2819, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2756, + "name": "ElementaryTypeName", + "src": "15176:7:6" + } + ], + "id": 2757, + "name": "VariableDeclaration", + "src": "15176:9:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1531, + "type": "address[] storage ref", + "value": "_tokens" + }, + "id": 2758, + "name": "Identifier", + "src": "15188:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2746, + "type": "uint256", + "value": "i" + }, + "id": 2759, + "name": "Identifier", + "src": "15196:1:6" + } + ], + "id": 2760, + "name": "IndexAccess", + "src": "15188:10:6" + } + ], + "id": 2761, + "name": "VariableDeclarationStatement", + "src": "15176:22:6" + }, + { + "attributes": { + "assignments": [ + 2763 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "bal", + "scope": 2819, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2762, + "name": "ElementaryTypeName", + "src": "15212:4:6" + } + ], + "id": 2763, + "name": "VariableDeclaration", + "src": "15212:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2764, + "name": "Identifier", + "src": "15223:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2757, + "type": "address", + "value": "t" + }, + "id": 2765, + "name": "Identifier", + "src": "15232:1:6" + } + ], + "id": 2766, + "name": "IndexAccess", + "src": "15223:11:6" + } + ], + "id": 2767, + "name": "MemberAccess", + "src": "15223:19:6" + } + ], + "id": 2768, + "name": "VariableDeclarationStatement", + "src": "15212:30:6" + }, + { + "attributes": { + "assignments": [ + 2770 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountOut", + "scope": 2819, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2769, + "name": "ElementaryTypeName", + "src": "15256:4:6" + } + ], + "id": 2770, + "name": "VariableDeclaration", + "src": "15256:19:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 2771, + "name": "Identifier", + "src": "15278:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2717, + "type": "uint256", + "value": "ratio" + }, + "id": 2772, + "name": "Identifier", + "src": "15283:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2763, + "type": "uint256", + "value": "bal" + }, + "id": 2773, + "name": "Identifier", + "src": "15290:3:6" + } + ], + "id": 2774, + "name": "FunctionCall", + "src": "15278:16:6" + } + ], + "id": 2775, + "name": "VariableDeclarationStatement", + "src": "15256:38:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2776, + "name": "Identifier", + "src": "15308:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2770, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 2777, + "name": "Identifier", + "src": "15316:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 2778, + "name": "Literal", + "src": "15334:1:6" + } + ], + "id": 2779, + "name": "BinaryOperation", + "src": "15316:19:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d4154485f415050524f58", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MATH_APPROX\"", + "value": "ERR_MATH_APPROX" + }, + "id": 2780, + "name": "Literal", + "src": "15337:17:6" + } + ], + "id": 2781, + "name": "FunctionCall", + "src": "15308:47:6" + } + ], + "id": 2782, + "name": "ExpressionStatement", + "src": "15308:47:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2783, + "name": "Identifier", + "src": "15369:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2770, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 2784, + "name": "Identifier", + "src": "15377:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2685, + "type": "uint256[] calldata", + "value": "minAmountsOut" + }, + "id": 2785, + "name": "Identifier", + "src": "15395:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2746, + "type": "uint256", + "value": "i" + }, + "id": 2786, + "name": "Identifier", + "src": "15409:1:6" + } + ], + "id": 2787, + "name": "IndexAccess", + "src": "15395:16:6" + } + ], + "id": 2788, + "name": "BinaryOperation", + "src": "15377:34:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4c494d49545f4f5554", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_LIMIT_OUT\"", + "value": "ERR_LIMIT_OUT" + }, + "id": 2789, + "name": "Literal", + "src": "15413:15:6" + } + ], + "id": 2790, + "name": "FunctionCall", + "src": "15369:60:6" + } + ], + "id": 2791, + "name": "ExpressionStatement", + "src": "15369:60:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2792, + "name": "Identifier", + "src": "15443:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2757, + "type": "address", + "value": "t" + }, + "id": 2793, + "name": "Identifier", + "src": "15452:1:6" + } + ], + "id": 2794, + "name": "IndexAccess", + "src": "15443:11:6" + } + ], + "id": 2795, + "name": "MemberAccess", + "src": "15443:19:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 2796, + "name": "Identifier", + "src": "15465:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2797, + "name": "Identifier", + "src": "15470:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2757, + "type": "address", + "value": "t" + }, + "id": 2798, + "name": "Identifier", + "src": "15479:1:6" + } + ], + "id": 2799, + "name": "IndexAccess", + "src": "15470:11:6" + } + ], + "id": 2800, + "name": "MemberAccess", + "src": "15470:19:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2770, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 2801, + "name": "Identifier", + "src": "15491:14:6" + } + ], + "id": 2802, + "name": "FunctionCall", + "src": "15465:41:6" + } + ], + "id": 2803, + "name": "Assignment", + "src": "15443:63:6" + } + ], + "id": 2804, + "name": "ExpressionStatement", + "src": "15443:63:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1467, + "type": "function (address,address,uint256)", + "value": "LOG_EXIT" + }, + "id": 2805, + "name": "Identifier", + "src": "15525:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2806, + "name": "Identifier", + "src": "15534:3:6" + } + ], + "id": 2807, + "name": "MemberAccess", + "src": "15534:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2757, + "type": "address", + "value": "t" + }, + "id": 2808, + "name": "Identifier", + "src": "15546:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2770, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 2809, + "name": "Identifier", + "src": "15549:14:6" + } + ], + "id": 2810, + "name": "FunctionCall", + "src": "15525:39:6" + } + ], + "id": 2811, + "name": "EmitStatement", + "src": "15520:44:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3731, + "type": "function (address,address,uint256)", + "value": "_pushUnderlying" + }, + "id": 2812, + "name": "Identifier", + "src": "15578:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2757, + "type": "address", + "value": "t" + }, + "id": 2813, + "name": "Identifier", + "src": "15594:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2814, + "name": "Identifier", + "src": "15597:3:6" + } + ], + "id": 2815, + "name": "MemberAccess", + "src": "15597:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2770, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 2816, + "name": "Identifier", + "src": "15609:14:6" + } + ], + "id": 2817, + "name": "FunctionCall", + "src": "15578:46:6" + } + ], + "id": 2818, + "name": "ExpressionStatement", + "src": "15578:46:6" + } + ], + "id": 2819, + "name": "Block", + "src": "15162:473:6" + } + ], + "id": 2820, + "name": "ForStatement", + "src": "15120:515:6" + } + ], + "id": 2821, + "name": "Block", + "src": "14667:975:6" + } + ], + "id": 2822, + "name": "FunctionDefinition", + "src": "14548:1094:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "swapExactAmountIn", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenIn", + "scope": 3020, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2823, + "name": "ElementaryTypeName", + "src": "15685:7:6" + } + ], + "id": 2824, + "name": "VariableDeclaration", + "src": "15685:15:6" + }, + { + "attributes": { + "constant": false, + "name": "tokenAmountIn", + "scope": 3020, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2825, + "name": "ElementaryTypeName", + "src": "15710:4:6" + } + ], + "id": 2826, + "name": "VariableDeclaration", + "src": "15710:18:6" + }, + { + "attributes": { + "constant": false, + "name": "tokenOut", + "scope": 3020, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 2827, + "name": "ElementaryTypeName", + "src": "15738:7:6" + } + ], + "id": 2828, + "name": "VariableDeclaration", + "src": "15738:16:6" + }, + { + "attributes": { + "constant": false, + "name": "minAmountOut", + "scope": 3020, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2829, + "name": "ElementaryTypeName", + "src": "15764:4:6" + } + ], + "id": 2830, + "name": "VariableDeclaration", + "src": "15764:17:6" + }, + { + "attributes": { + "constant": false, + "name": "maxPrice", + "scope": 3020, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2831, + "name": "ElementaryTypeName", + "src": "15791:4:6" + } + ], + "id": 2832, + "name": "VariableDeclaration", + "src": "15791:13:6" + } + ], + "id": 2833, + "name": "ParameterList", + "src": "15675:135:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountOut", + "scope": 3020, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2838, + "name": "ElementaryTypeName", + "src": "15875:4:6" + } + ], + "id": 2839, + "name": "VariableDeclaration", + "src": "15875:19:6" + }, + { + "attributes": { + "constant": false, + "name": "spotPriceAfter", + "scope": 3020, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2840, + "name": "ElementaryTypeName", + "src": "15896:4:6" + } + ], + "id": 2841, + "name": "VariableDeclaration", + "src": "15896:19:6" + } + ], + "id": 2842, + "name": "ParameterList", + "src": "15874:42:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 2834, + "name": "Identifier", + "src": "15836:6:6" + } + ], + "id": 2835, + "name": "ModifierInvocation", + "src": "15836:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 2836, + "name": "Identifier", + "src": "15851:6:6" + } + ], + "id": 2837, + "name": "ModifierInvocation", + "src": "15851:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2843, + "name": "Identifier", + "src": "15932:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2844, + "name": "Identifier", + "src": "15940:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2824, + "type": "address", + "value": "tokenIn" + }, + "id": 2845, + "name": "Identifier", + "src": "15949:7:6" + } + ], + "id": 2846, + "name": "IndexAccess", + "src": "15940:17:6" + } + ], + "id": 2847, + "name": "MemberAccess", + "src": "15940:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 2848, + "name": "Literal", + "src": "15965:15:6" + } + ], + "id": 2849, + "name": "FunctionCall", + "src": "15932:49:6" + } + ], + "id": 2850, + "name": "ExpressionStatement", + "src": "15932:49:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2851, + "name": "Identifier", + "src": "15991:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2852, + "name": "Identifier", + "src": "15999:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2828, + "type": "address", + "value": "tokenOut" + }, + "id": 2853, + "name": "Identifier", + "src": "16008:8:6" + } + ], + "id": 2854, + "name": "IndexAccess", + "src": "15999:18:6" + } + ], + "id": 2855, + "name": "MemberAccess", + "src": "15999:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 2856, + "name": "Literal", + "src": "16025:15:6" + } + ], + "id": 2857, + "name": "FunctionCall", + "src": "15991:50:6" + } + ], + "id": 2858, + "name": "ExpressionStatement", + "src": "15991:50:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282", + "typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2859, + "name": "Identifier", + "src": "16051:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1524, + "type": "bool", + "value": "_publicSwap" + }, + "id": 2860, + "name": "Identifier", + "src": "16059:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f535741505f4e4f545f5055424c4943", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_SWAP_NOT_PUBLIC\"", + "value": "ERR_SWAP_NOT_PUBLIC" + }, + "id": 2861, + "name": "Literal", + "src": "16072:21:6" + } + ], + "id": 2862, + "name": "FunctionCall", + "src": "16051:43:6" + } + ], + "id": 2863, + "name": "ExpressionStatement", + "src": "16051:43:6" + }, + { + "attributes": { + "assignments": [ + 2865 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "inRecord", + "scope": 3019, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 2864, + "name": "UserDefinedTypeName", + "src": "16105:6:6" + } + ], + "id": 2865, + "name": "VariableDeclaration", + "src": "16105:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2866, + "name": "Identifier", + "src": "16131:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 2867, + "name": "ElementaryTypeNameExpression", + "src": "16140:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2824, + "type": "address", + "value": "tokenIn" + }, + "id": 2868, + "name": "Identifier", + "src": "16148:7:6" + } + ], + "id": 2869, + "name": "FunctionCall", + "src": "16140:16:6" + } + ], + "id": 2870, + "name": "IndexAccess", + "src": "16131:26:6" + } + ], + "id": 2871, + "name": "VariableDeclarationStatement", + "src": "16105:52:6" + }, + { + "attributes": { + "assignments": [ + 2873 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "outRecord", + "scope": 3019, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 2872, + "name": "UserDefinedTypeName", + "src": "16167:6:6" + } + ], + "id": 2873, + "name": "VariableDeclaration", + "src": "16167:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 2874, + "name": "Identifier", + "src": "16194:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 2875, + "name": "ElementaryTypeNameExpression", + "src": "16203:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2828, + "type": "address", + "value": "tokenOut" + }, + "id": 2876, + "name": "Identifier", + "src": "16211:8:6" + } + ], + "id": 2877, + "name": "FunctionCall", + "src": "16203:17:6" + } + ], + "id": 2878, + "name": "IndexAccess", + "src": "16194:27:6" + } + ], + "id": 2879, + "name": "VariableDeclarationStatement", + "src": "16167:54:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf", + "typeString": "literal_string \"ERR_MAX_IN_RATIO\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2880, + "name": "Identifier", + "src": "16232:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2826, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 2881, + "name": "Identifier", + "src": "16253:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 2882, + "name": "Identifier", + "src": "16270:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2865, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2883, + "name": "Identifier", + "src": "16275:8:6" + } + ], + "id": 2884, + "name": "MemberAccess", + "src": "16275:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 271, + "type": "uint256", + "value": "MAX_IN_RATIO" + }, + "id": 2885, + "name": "Identifier", + "src": "16293:12:6" + } + ], + "id": 2886, + "name": "FunctionCall", + "src": "16270:36:6" + } + ], + "id": 2887, + "name": "BinaryOperation", + "src": "16253:53:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d41585f494e5f524154494f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MAX_IN_RATIO\"", + "value": "ERR_MAX_IN_RATIO" + }, + "id": 2888, + "name": "Literal", + "src": "16321:18:6" + } + ], + "id": 2889, + "name": "FunctionCall", + "src": "16232:117:6" + } + ], + "id": 2890, + "name": "ExpressionStatement", + "src": "16232:117:6" + }, + { + "attributes": { + "assignments": [ + 2892 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "spotPriceBefore", + "scope": 3019, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 2891, + "name": "ElementaryTypeName", + "src": "16360:4:6" + } + ], + "id": 2892, + "name": "VariableDeclaration", + "src": "16360:20:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 438, + "type": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcSpotPrice" + }, + "id": 2893, + "name": "Identifier", + "src": "16383:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2865, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2894, + "name": "Identifier", + "src": "16410:8:6" + } + ], + "id": 2895, + "name": "MemberAccess", + "src": "16410:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2865, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2896, + "name": "Identifier", + "src": "16440:8:6" + } + ], + "id": 2897, + "name": "MemberAccess", + "src": "16440:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2873, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2898, + "name": "Identifier", + "src": "16469:9:6" + } + ], + "id": 2899, + "name": "MemberAccess", + "src": "16469:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2873, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2900, + "name": "Identifier", + "src": "16500:9:6" + } + ], + "id": 2901, + "name": "MemberAccess", + "src": "16500:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 2902, + "name": "Identifier", + "src": "16530:8:6" + } + ], + "id": 2903, + "name": "FunctionCall", + "src": "16383:165:6" + } + ], + "id": 2904, + "name": "VariableDeclarationStatement", + "src": "16360:188:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88", + "typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2905, + "name": "Identifier", + "src": "16558:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2892, + "type": "uint256", + "value": "spotPriceBefore" + }, + "id": 2906, + "name": "Identifier", + "src": "16566:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2832, + "type": "uint256", + "value": "maxPrice" + }, + "id": 2907, + "name": "Identifier", + "src": "16585:8:6" + } + ], + "id": 2908, + "name": "BinaryOperation", + "src": "16566:27:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4241445f4c494d49545f5052494345", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_BAD_LIMIT_PRICE\"", + "value": "ERR_BAD_LIMIT_PRICE" + }, + "id": 2909, + "name": "Literal", + "src": "16595:21:6" + } + ], + "id": 2910, + "name": "FunctionCall", + "src": "16558:59:6" + } + ], + "id": 2911, + "name": "ExpressionStatement", + "src": "16558:59:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2839, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 2912, + "name": "Identifier", + "src": "16628:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 510, + "type": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcOutGivenIn" + }, + "id": 2913, + "name": "Identifier", + "src": "16645:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2865, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2914, + "name": "Identifier", + "src": "16673:8:6" + } + ], + "id": 2915, + "name": "MemberAccess", + "src": "16673:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2865, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2916, + "name": "Identifier", + "src": "16703:8:6" + } + ], + "id": 2917, + "name": "MemberAccess", + "src": "16703:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2873, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2918, + "name": "Identifier", + "src": "16732:9:6" + } + ], + "id": 2919, + "name": "MemberAccess", + "src": "16732:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2873, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2920, + "name": "Identifier", + "src": "16763:9:6" + } + ], + "id": 2921, + "name": "MemberAccess", + "src": "16763:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2826, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 2922, + "name": "Identifier", + "src": "16793:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 2923, + "name": "Identifier", + "src": "16820:8:6" + } + ], + "id": 2924, + "name": "FunctionCall", + "src": "16645:193:6" + } + ], + "id": 2925, + "name": "Assignment", + "src": "16628:210:6" + } + ], + "id": 2926, + "name": "ExpressionStatement", + "src": "16628:210:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2927, + "name": "Identifier", + "src": "16848:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2839, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 2928, + "name": "Identifier", + "src": "16856:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2830, + "type": "uint256", + "value": "minAmountOut" + }, + "id": 2929, + "name": "Identifier", + "src": "16874:12:6" + } + ], + "id": 2930, + "name": "BinaryOperation", + "src": "16856:30:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4c494d49545f4f5554", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_LIMIT_OUT\"", + "value": "ERR_LIMIT_OUT" + }, + "id": 2931, + "name": "Literal", + "src": "16888:15:6" + } + ], + "id": 2932, + "name": "FunctionCall", + "src": "16848:56:6" + } + ], + "id": 2933, + "name": "ExpressionStatement", + "src": "16848:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2865, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2934, + "name": "Identifier", + "src": "16915:8:6" + } + ], + "id": 2936, + "name": "MemberAccess", + "src": "16915:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 2937, + "name": "Identifier", + "src": "16934:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2865, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2938, + "name": "Identifier", + "src": "16939:8:6" + } + ], + "id": 2939, + "name": "MemberAccess", + "src": "16939:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2826, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 2940, + "name": "Identifier", + "src": "16957:13:6" + } + ], + "id": 2941, + "name": "FunctionCall", + "src": "16934:37:6" + } + ], + "id": 2942, + "name": "Assignment", + "src": "16915:56:6" + } + ], + "id": 2943, + "name": "ExpressionStatement", + "src": "16915:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2873, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2944, + "name": "Identifier", + "src": "16981:9:6" + } + ], + "id": 2946, + "name": "MemberAccess", + "src": "16981:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 2947, + "name": "Identifier", + "src": "17001:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2873, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2948, + "name": "Identifier", + "src": "17006:9:6" + } + ], + "id": 2949, + "name": "MemberAccess", + "src": "17006:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2839, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 2950, + "name": "Identifier", + "src": "17025:14:6" + } + ], + "id": 2951, + "name": "FunctionCall", + "src": "17001:39:6" + } + ], + "id": 2952, + "name": "Assignment", + "src": "16981:59:6" + } + ], + "id": 2953, + "name": "ExpressionStatement", + "src": "16981:59:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2841, + "type": "uint256", + "value": "spotPriceAfter" + }, + "id": 2954, + "name": "Identifier", + "src": "17051:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 438, + "type": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcSpotPrice" + }, + "id": 2955, + "name": "Identifier", + "src": "17068:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2865, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2956, + "name": "Identifier", + "src": "17095:8:6" + } + ], + "id": 2957, + "name": "MemberAccess", + "src": "17095:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2865, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 2958, + "name": "Identifier", + "src": "17125:8:6" + } + ], + "id": 2959, + "name": "MemberAccess", + "src": "17125:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2873, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2960, + "name": "Identifier", + "src": "17154:9:6" + } + ], + "id": 2961, + "name": "MemberAccess", + "src": "17154:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2873, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 2962, + "name": "Identifier", + "src": "17185:9:6" + } + ], + "id": 2963, + "name": "MemberAccess", + "src": "17185:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 2964, + "name": "Identifier", + "src": "17215:8:6" + } + ], + "id": 2965, + "name": "FunctionCall", + "src": "17068:165:6" + } + ], + "id": 2966, + "name": "Assignment", + "src": "17051:182:6" + } + ], + "id": 2967, + "name": "ExpressionStatement", + "src": "17051:182:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2968, + "name": "Identifier", + "src": "17243:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2841, + "type": "uint256", + "value": "spotPriceAfter" + }, + "id": 2969, + "name": "Identifier", + "src": "17251:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2892, + "type": "uint256", + "value": "spotPriceBefore" + }, + "id": 2970, + "name": "Identifier", + "src": "17269:15:6" + } + ], + "id": 2971, + "name": "BinaryOperation", + "src": "17251:33:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d4154485f415050524f58", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MATH_APPROX\"", + "value": "ERR_MATH_APPROX" + }, + "id": 2972, + "name": "Literal", + "src": "17286:17:6" + } + ], + "id": 2973, + "name": "FunctionCall", + "src": "17243:61:6" + } + ], + "id": 2974, + "name": "ExpressionStatement", + "src": "17243:61:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5", + "typeString": "literal_string \"ERR_LIMIT_PRICE\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2975, + "name": "Identifier", + "src": "17319:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2841, + "type": "uint256", + "value": "spotPriceAfter" + }, + "id": 2976, + "name": "Identifier", + "src": "17327:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2832, + "type": "uint256", + "value": "maxPrice" + }, + "id": 2977, + "name": "Identifier", + "src": "17345:8:6" + } + ], + "id": 2978, + "name": "BinaryOperation", + "src": "17327:26:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4c494d49545f5052494345", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_LIMIT_PRICE\"", + "value": "ERR_LIMIT_PRICE" + }, + "id": 2979, + "name": "Literal", + "src": "17355:17:6" + } + ], + "id": 2980, + "name": "FunctionCall", + "src": "17319:54:6" + } + ], + "id": 2981, + "name": "ExpressionStatement", + "src": "17319:54:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 2982, + "name": "Identifier", + "src": "17383:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2892, + "type": "uint256", + "value": "spotPriceBefore" + }, + "id": 2983, + "name": "Identifier", + "src": "17404:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 2984, + "name": "Identifier", + "src": "17423:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2826, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 2985, + "name": "Identifier", + "src": "17428:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2839, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 2986, + "name": "Identifier", + "src": "17443:14:6" + } + ], + "id": 2987, + "name": "FunctionCall", + "src": "17423:35:6" + } + ], + "id": 2988, + "name": "BinaryOperation", + "src": "17404:54:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d4154485f415050524f58", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MATH_APPROX\"", + "value": "ERR_MATH_APPROX" + }, + "id": 2989, + "name": "Literal", + "src": "17473:17:6" + } + ], + "id": 2990, + "name": "FunctionCall", + "src": "17383:117:6" + } + ], + "id": 2991, + "name": "ExpressionStatement", + "src": "17383:117:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1451, + "type": "function (address,address,address,uint256,uint256)", + "value": "LOG_SWAP" + }, + "id": 2992, + "name": "Identifier", + "src": "17516:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 2993, + "name": "Identifier", + "src": "17538:3:6" + } + ], + "id": 2994, + "name": "MemberAccess", + "src": "17538:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2824, + "type": "address", + "value": "tokenIn" + }, + "id": 2995, + "name": "Identifier", + "src": "17563:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2828, + "type": "address", + "value": "tokenOut" + }, + "id": 2996, + "name": "Identifier", + "src": "17585:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2826, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 2997, + "name": "Identifier", + "src": "17608:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2839, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 2998, + "name": "Identifier", + "src": "17636:14:6" + } + ], + "id": 2999, + "name": "FunctionCall", + "src": "17516:144:6" + } + ], + "id": 3000, + "name": "EmitStatement", + "src": "17511:149:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3706, + "type": "function (address,address,uint256)", + "value": "_pullUnderlying" + }, + "id": 3001, + "name": "Identifier", + "src": "17671:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2824, + "type": "address", + "value": "tokenIn" + }, + "id": 3002, + "name": "Identifier", + "src": "17687:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3003, + "name": "Identifier", + "src": "17696:3:6" + } + ], + "id": 3004, + "name": "MemberAccess", + "src": "17696:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2826, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3005, + "name": "Identifier", + "src": "17708:13:6" + } + ], + "id": 3006, + "name": "FunctionCall", + "src": "17671:51:6" + } + ], + "id": 3007, + "name": "ExpressionStatement", + "src": "17671:51:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3731, + "type": "function (address,address,uint256)", + "value": "_pushUnderlying" + }, + "id": 3008, + "name": "Identifier", + "src": "17732:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2828, + "type": "address", + "value": "tokenOut" + }, + "id": 3009, + "name": "Identifier", + "src": "17748:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3010, + "name": "Identifier", + "src": "17758:3:6" + } + ], + "id": 3011, + "name": "MemberAccess", + "src": "17758:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2839, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3012, + "name": "Identifier", + "src": "17770:14:6" + } + ], + "id": 3013, + "name": "FunctionCall", + "src": "17732:53:6" + } + ], + "id": 3014, + "name": "ExpressionStatement", + "src": "17732:53:6" + }, + { + "attributes": { + "functionReturnParameters": 2842 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "tuple(uint256,uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2839, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3015, + "name": "Identifier", + "src": "17804:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 2841, + "type": "uint256", + "value": "spotPriceAfter" + }, + "id": 3016, + "name": "Identifier", + "src": "17820:14:6" + } + ], + "id": 3017, + "name": "TupleExpression", + "src": "17803:32:6" + } + ], + "id": 3018, + "name": "Return", + "src": "17796:39:6" + } + ], + "id": 3019, + "name": "Block", + "src": "15921:1921:6" + } + ], + "id": 3020, + "name": "FunctionDefinition", + "src": "15649:2193:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "swapExactAmountOut", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenIn", + "scope": 3218, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3021, + "name": "ElementaryTypeName", + "src": "17885:7:6" + } + ], + "id": 3022, + "name": "VariableDeclaration", + "src": "17885:15:6" + }, + { + "attributes": { + "constant": false, + "name": "maxAmountIn", + "scope": 3218, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3023, + "name": "ElementaryTypeName", + "src": "17910:4:6" + } + ], + "id": 3024, + "name": "VariableDeclaration", + "src": "17910:16:6" + }, + { + "attributes": { + "constant": false, + "name": "tokenOut", + "scope": 3218, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3025, + "name": "ElementaryTypeName", + "src": "17936:7:6" + } + ], + "id": 3026, + "name": "VariableDeclaration", + "src": "17936:16:6" + }, + { + "attributes": { + "constant": false, + "name": "tokenAmountOut", + "scope": 3218, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3027, + "name": "ElementaryTypeName", + "src": "17962:4:6" + } + ], + "id": 3028, + "name": "VariableDeclaration", + "src": "17962:19:6" + }, + { + "attributes": { + "constant": false, + "name": "maxPrice", + "scope": 3218, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3029, + "name": "ElementaryTypeName", + "src": "17991:4:6" + } + ], + "id": 3030, + "name": "VariableDeclaration", + "src": "17991:13:6" + } + ], + "id": 3031, + "name": "ParameterList", + "src": "17875:135:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountIn", + "scope": 3218, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3036, + "name": "ElementaryTypeName", + "src": "18076:4:6" + } + ], + "id": 3037, + "name": "VariableDeclaration", + "src": "18076:18:6" + }, + { + "attributes": { + "constant": false, + "name": "spotPriceAfter", + "scope": 3218, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3038, + "name": "ElementaryTypeName", + "src": "18096:4:6" + } + ], + "id": 3039, + "name": "VariableDeclaration", + "src": "18096:19:6" + } + ], + "id": 3040, + "name": "ParameterList", + "src": "18075:41:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 3032, + "name": "Identifier", + "src": "18036:6:6" + } + ], + "id": 3033, + "name": "ModifierInvocation", + "src": "18036:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 3034, + "name": "Identifier", + "src": "18051:6:6" + } + ], + "id": 3035, + "name": "ModifierInvocation", + "src": "18051:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3041, + "name": "Identifier", + "src": "18131:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3042, + "name": "Identifier", + "src": "18139:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3022, + "type": "address", + "value": "tokenIn" + }, + "id": 3043, + "name": "Identifier", + "src": "18148:7:6" + } + ], + "id": 3044, + "name": "IndexAccess", + "src": "18139:17:6" + } + ], + "id": 3045, + "name": "MemberAccess", + "src": "18139:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 3046, + "name": "Literal", + "src": "18164:15:6" + } + ], + "id": 3047, + "name": "FunctionCall", + "src": "18131:49:6" + } + ], + "id": 3048, + "name": "ExpressionStatement", + "src": "18131:49:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3049, + "name": "Identifier", + "src": "18190:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3050, + "name": "Identifier", + "src": "18198:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3026, + "type": "address", + "value": "tokenOut" + }, + "id": 3051, + "name": "Identifier", + "src": "18207:8:6" + } + ], + "id": 3052, + "name": "IndexAccess", + "src": "18198:18:6" + } + ], + "id": 3053, + "name": "MemberAccess", + "src": "18198:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 3054, + "name": "Literal", + "src": "18224:15:6" + } + ], + "id": 3055, + "name": "FunctionCall", + "src": "18190:50:6" + } + ], + "id": 3056, + "name": "ExpressionStatement", + "src": "18190:50:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282", + "typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3057, + "name": "Identifier", + "src": "18250:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1524, + "type": "bool", + "value": "_publicSwap" + }, + "id": 3058, + "name": "Identifier", + "src": "18258:11:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f535741505f4e4f545f5055424c4943", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_SWAP_NOT_PUBLIC\"", + "value": "ERR_SWAP_NOT_PUBLIC" + }, + "id": 3059, + "name": "Literal", + "src": "18271:21:6" + } + ], + "id": 3060, + "name": "FunctionCall", + "src": "18250:43:6" + } + ], + "id": 3061, + "name": "ExpressionStatement", + "src": "18250:43:6" + }, + { + "attributes": { + "assignments": [ + 3063 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "inRecord", + "scope": 3217, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 3062, + "name": "UserDefinedTypeName", + "src": "18304:6:6" + } + ], + "id": 3063, + "name": "VariableDeclaration", + "src": "18304:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3064, + "name": "Identifier", + "src": "18330:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3065, + "name": "ElementaryTypeNameExpression", + "src": "18339:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3022, + "type": "address", + "value": "tokenIn" + }, + "id": 3066, + "name": "Identifier", + "src": "18347:7:6" + } + ], + "id": 3067, + "name": "FunctionCall", + "src": "18339:16:6" + } + ], + "id": 3068, + "name": "IndexAccess", + "src": "18330:26:6" + } + ], + "id": 3069, + "name": "VariableDeclarationStatement", + "src": "18304:52:6" + }, + { + "attributes": { + "assignments": [ + 3071 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "outRecord", + "scope": 3217, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 3070, + "name": "UserDefinedTypeName", + "src": "18366:6:6" + } + ], + "id": 3071, + "name": "VariableDeclaration", + "src": "18366:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3072, + "name": "Identifier", + "src": "18393:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3073, + "name": "ElementaryTypeNameExpression", + "src": "18402:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3026, + "type": "address", + "value": "tokenOut" + }, + "id": 3074, + "name": "Identifier", + "src": "18410:8:6" + } + ], + "id": 3075, + "name": "FunctionCall", + "src": "18402:17:6" + } + ], + "id": 3076, + "name": "IndexAccess", + "src": "18393:27:6" + } + ], + "id": 3077, + "name": "VariableDeclarationStatement", + "src": "18366:54:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a", + "typeString": "literal_string \"ERR_MAX_OUT_RATIO\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3078, + "name": "Identifier", + "src": "18431:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3028, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3079, + "name": "Identifier", + "src": "18452:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 3080, + "name": "Identifier", + "src": "18470:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3071, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3081, + "name": "Identifier", + "src": "18475:9:6" + } + ], + "id": 3082, + "name": "MemberAccess", + "src": "18475:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 279, + "type": "uint256", + "value": "MAX_OUT_RATIO" + }, + "id": 3083, + "name": "Identifier", + "src": "18494:13:6" + } + ], + "id": 3084, + "name": "FunctionCall", + "src": "18470:38:6" + } + ], + "id": 3085, + "name": "BinaryOperation", + "src": "18452:56:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d41585f4f55545f524154494f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MAX_OUT_RATIO\"", + "value": "ERR_MAX_OUT_RATIO" + }, + "id": 3086, + "name": "Literal", + "src": "18523:19:6" + } + ], + "id": 3087, + "name": "FunctionCall", + "src": "18431:121:6" + } + ], + "id": 3088, + "name": "ExpressionStatement", + "src": "18431:121:6" + }, + { + "attributes": { + "assignments": [ + 3090 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "spotPriceBefore", + "scope": 3217, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3089, + "name": "ElementaryTypeName", + "src": "18563:4:6" + } + ], + "id": 3090, + "name": "VariableDeclaration", + "src": "18563:20:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 438, + "type": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcSpotPrice" + }, + "id": 3091, + "name": "Identifier", + "src": "18586:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3063, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3092, + "name": "Identifier", + "src": "18613:8:6" + } + ], + "id": 3093, + "name": "MemberAccess", + "src": "18613:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3063, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3094, + "name": "Identifier", + "src": "18643:8:6" + } + ], + "id": 3095, + "name": "MemberAccess", + "src": "18643:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3071, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3096, + "name": "Identifier", + "src": "18672:9:6" + } + ], + "id": 3097, + "name": "MemberAccess", + "src": "18672:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3071, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3098, + "name": "Identifier", + "src": "18703:9:6" + } + ], + "id": 3099, + "name": "MemberAccess", + "src": "18703:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 3100, + "name": "Identifier", + "src": "18733:8:6" + } + ], + "id": 3101, + "name": "FunctionCall", + "src": "18586:165:6" + } + ], + "id": 3102, + "name": "VariableDeclarationStatement", + "src": "18563:188:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88", + "typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3103, + "name": "Identifier", + "src": "18770:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3090, + "type": "uint256", + "value": "spotPriceBefore" + }, + "id": 3104, + "name": "Identifier", + "src": "18778:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3030, + "type": "uint256", + "value": "maxPrice" + }, + "id": 3105, + "name": "Identifier", + "src": "18797:8:6" + } + ], + "id": 3106, + "name": "BinaryOperation", + "src": "18778:27:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4241445f4c494d49545f5052494345", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_BAD_LIMIT_PRICE\"", + "value": "ERR_BAD_LIMIT_PRICE" + }, + "id": 3107, + "name": "Literal", + "src": "18807:21:6" + } + ], + "id": 3108, + "name": "FunctionCall", + "src": "18770:59:6" + } + ], + "id": 3109, + "name": "ExpressionStatement", + "src": "18770:59:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3037, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3110, + "name": "Identifier", + "src": "18840:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 582, + "type": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcInGivenOut" + }, + "id": 3111, + "name": "Identifier", + "src": "18856:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3063, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3112, + "name": "Identifier", + "src": "18884:8:6" + } + ], + "id": 3113, + "name": "MemberAccess", + "src": "18884:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3063, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3114, + "name": "Identifier", + "src": "18914:8:6" + } + ], + "id": 3115, + "name": "MemberAccess", + "src": "18914:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3071, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3116, + "name": "Identifier", + "src": "18943:9:6" + } + ], + "id": 3117, + "name": "MemberAccess", + "src": "18943:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3071, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3118, + "name": "Identifier", + "src": "18974:9:6" + } + ], + "id": 3119, + "name": "MemberAccess", + "src": "18974:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3028, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3120, + "name": "Identifier", + "src": "19004:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 3121, + "name": "Identifier", + "src": "19032:8:6" + } + ], + "id": 3122, + "name": "FunctionCall", + "src": "18856:194:6" + } + ], + "id": 3123, + "name": "Assignment", + "src": "18840:210:6" + } + ], + "id": 3124, + "name": "ExpressionStatement", + "src": "18840:210:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3125, + "name": "Identifier", + "src": "19060:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3037, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3126, + "name": "Identifier", + "src": "19068:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3024, + "type": "uint256", + "value": "maxAmountIn" + }, + "id": 3127, + "name": "Identifier", + "src": "19085:11:6" + } + ], + "id": 3128, + "name": "BinaryOperation", + "src": "19068:28:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4c494d49545f494e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_LIMIT_IN\"", + "value": "ERR_LIMIT_IN" + }, + "id": 3129, + "name": "Literal", + "src": "19098:14:6" + } + ], + "id": 3130, + "name": "FunctionCall", + "src": "19060:53:6" + } + ], + "id": 3131, + "name": "ExpressionStatement", + "src": "19060:53:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3063, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3132, + "name": "Identifier", + "src": "19124:8:6" + } + ], + "id": 3134, + "name": "MemberAccess", + "src": "19124:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 3135, + "name": "Identifier", + "src": "19143:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3063, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3136, + "name": "Identifier", + "src": "19148:8:6" + } + ], + "id": 3137, + "name": "MemberAccess", + "src": "19148:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3037, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3138, + "name": "Identifier", + "src": "19166:13:6" + } + ], + "id": 3139, + "name": "FunctionCall", + "src": "19143:37:6" + } + ], + "id": 3140, + "name": "Assignment", + "src": "19124:56:6" + } + ], + "id": 3141, + "name": "ExpressionStatement", + "src": "19124:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3071, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3142, + "name": "Identifier", + "src": "19190:9:6" + } + ], + "id": 3144, + "name": "MemberAccess", + "src": "19190:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 3145, + "name": "Identifier", + "src": "19210:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3071, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3146, + "name": "Identifier", + "src": "19215:9:6" + } + ], + "id": 3147, + "name": "MemberAccess", + "src": "19215:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3028, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3148, + "name": "Identifier", + "src": "19234:14:6" + } + ], + "id": 3149, + "name": "FunctionCall", + "src": "19210:39:6" + } + ], + "id": 3150, + "name": "Assignment", + "src": "19190:59:6" + } + ], + "id": 3151, + "name": "ExpressionStatement", + "src": "19190:59:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3039, + "type": "uint256", + "value": "spotPriceAfter" + }, + "id": 3152, + "name": "Identifier", + "src": "19260:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 438, + "type": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcSpotPrice" + }, + "id": 3153, + "name": "Identifier", + "src": "19277:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3063, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3154, + "name": "Identifier", + "src": "19304:8:6" + } + ], + "id": 3155, + "name": "MemberAccess", + "src": "19304:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3063, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3156, + "name": "Identifier", + "src": "19334:8:6" + } + ], + "id": 3157, + "name": "MemberAccess", + "src": "19334:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3071, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3158, + "name": "Identifier", + "src": "19363:9:6" + } + ], + "id": 3159, + "name": "MemberAccess", + "src": "19363:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3071, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3160, + "name": "Identifier", + "src": "19394:9:6" + } + ], + "id": 3161, + "name": "MemberAccess", + "src": "19394:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 3162, + "name": "Identifier", + "src": "19424:8:6" + } + ], + "id": 3163, + "name": "FunctionCall", + "src": "19277:165:6" + } + ], + "id": 3164, + "name": "Assignment", + "src": "19260:182:6" + } + ], + "id": 3165, + "name": "ExpressionStatement", + "src": "19260:182:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3166, + "name": "Identifier", + "src": "19452:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3039, + "type": "uint256", + "value": "spotPriceAfter" + }, + "id": 3167, + "name": "Identifier", + "src": "19460:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3090, + "type": "uint256", + "value": "spotPriceBefore" + }, + "id": 3168, + "name": "Identifier", + "src": "19478:15:6" + } + ], + "id": 3169, + "name": "BinaryOperation", + "src": "19460:33:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d4154485f415050524f58", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MATH_APPROX\"", + "value": "ERR_MATH_APPROX" + }, + "id": 3170, + "name": "Literal", + "src": "19495:17:6" + } + ], + "id": 3171, + "name": "FunctionCall", + "src": "19452:61:6" + } + ], + "id": 3172, + "name": "ExpressionStatement", + "src": "19452:61:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5", + "typeString": "literal_string \"ERR_LIMIT_PRICE\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3173, + "name": "Identifier", + "src": "19523:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3039, + "type": "uint256", + "value": "spotPriceAfter" + }, + "id": 3174, + "name": "Identifier", + "src": "19531:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3030, + "type": "uint256", + "value": "maxPrice" + }, + "id": 3175, + "name": "Identifier", + "src": "19549:8:6" + } + ], + "id": 3176, + "name": "BinaryOperation", + "src": "19531:26:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4c494d49545f5052494345", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_LIMIT_PRICE\"", + "value": "ERR_LIMIT_PRICE" + }, + "id": 3177, + "name": "Literal", + "src": "19559:17:6" + } + ], + "id": 3178, + "name": "FunctionCall", + "src": "19523:54:6" + } + ], + "id": 3179, + "name": "ExpressionStatement", + "src": "19523:54:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3180, + "name": "Identifier", + "src": "19587:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3090, + "type": "uint256", + "value": "spotPriceBefore" + }, + "id": 3181, + "name": "Identifier", + "src": "19608:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1171, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bdiv" + }, + "id": 3182, + "name": "Identifier", + "src": "19627:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3037, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3183, + "name": "Identifier", + "src": "19632:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3028, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3184, + "name": "Identifier", + "src": "19647:14:6" + } + ], + "id": 3185, + "name": "FunctionCall", + "src": "19627:35:6" + } + ], + "id": 3186, + "name": "BinaryOperation", + "src": "19608:54:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d4154485f415050524f58", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MATH_APPROX\"", + "value": "ERR_MATH_APPROX" + }, + "id": 3187, + "name": "Literal", + "src": "19677:17:6" + } + ], + "id": 3188, + "name": "FunctionCall", + "src": "19587:117:6" + } + ], + "id": 3189, + "name": "ExpressionStatement", + "src": "19587:117:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1451, + "type": "function (address,address,address,uint256,uint256)", + "value": "LOG_SWAP" + }, + "id": 3190, + "name": "Identifier", + "src": "19720:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3191, + "name": "Identifier", + "src": "19742:3:6" + } + ], + "id": 3192, + "name": "MemberAccess", + "src": "19742:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3022, + "type": "address", + "value": "tokenIn" + }, + "id": 3193, + "name": "Identifier", + "src": "19767:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3026, + "type": "address", + "value": "tokenOut" + }, + "id": 3194, + "name": "Identifier", + "src": "19789:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3037, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3195, + "name": "Identifier", + "src": "19812:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3028, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3196, + "name": "Identifier", + "src": "19840:14:6" + } + ], + "id": 3197, + "name": "FunctionCall", + "src": "19720:144:6" + } + ], + "id": 3198, + "name": "EmitStatement", + "src": "19715:149:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3706, + "type": "function (address,address,uint256)", + "value": "_pullUnderlying" + }, + "id": 3199, + "name": "Identifier", + "src": "19875:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3022, + "type": "address", + "value": "tokenIn" + }, + "id": 3200, + "name": "Identifier", + "src": "19891:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3201, + "name": "Identifier", + "src": "19900:3:6" + } + ], + "id": 3202, + "name": "MemberAccess", + "src": "19900:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3037, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3203, + "name": "Identifier", + "src": "19912:13:6" + } + ], + "id": 3204, + "name": "FunctionCall", + "src": "19875:51:6" + } + ], + "id": 3205, + "name": "ExpressionStatement", + "src": "19875:51:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3731, + "type": "function (address,address,uint256)", + "value": "_pushUnderlying" + }, + "id": 3206, + "name": "Identifier", + "src": "19936:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3026, + "type": "address", + "value": "tokenOut" + }, + "id": 3207, + "name": "Identifier", + "src": "19952:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3208, + "name": "Identifier", + "src": "19962:3:6" + } + ], + "id": 3209, + "name": "MemberAccess", + "src": "19962:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3028, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3210, + "name": "Identifier", + "src": "19974:14:6" + } + ], + "id": 3211, + "name": "FunctionCall", + "src": "19936:53:6" + } + ], + "id": 3212, + "name": "ExpressionStatement", + "src": "19936:53:6" + }, + { + "attributes": { + "functionReturnParameters": 3040 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "tuple(uint256,uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3037, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3213, + "name": "Identifier", + "src": "20008:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3039, + "type": "uint256", + "value": "spotPriceAfter" + }, + "id": 3214, + "name": "Identifier", + "src": "20023:14:6" + } + ], + "id": 3215, + "name": "TupleExpression", + "src": "20007:31:6" + } + ], + "id": 3216, + "name": "Return", + "src": "20000:38:6" + } + ], + "id": 3217, + "name": "Block", + "src": "18121:1924:6" + } + ], + "id": 3218, + "name": "FunctionDefinition", + "src": "17848:2197:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "joinswapExternAmountIn", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenIn", + "scope": 3322, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3219, + "name": "ElementaryTypeName", + "src": "20093:7:6" + } + ], + "id": 3220, + "name": "VariableDeclaration", + "src": "20093:15:6" + }, + { + "attributes": { + "constant": false, + "name": "tokenAmountIn", + "scope": 3322, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3221, + "name": "ElementaryTypeName", + "src": "20119:4:6" + } + ], + "id": 3222, + "name": "VariableDeclaration", + "src": "20119:18:6" + }, + { + "attributes": { + "constant": false, + "name": "minPoolAmountOut", + "scope": 3322, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3223, + "name": "ElementaryTypeName", + "src": "20148:4:6" + } + ], + "id": 3224, + "name": "VariableDeclaration", + "src": "20148:21:6" + } + ], + "id": 3225, + "name": "ParameterList", + "src": "20083:92:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "poolAmountOut", + "scope": 3322, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3230, + "name": "ElementaryTypeName", + "src": "20240:4:6" + } + ], + "id": 3231, + "name": "VariableDeclaration", + "src": "20240:18:6" + } + ], + "id": 3232, + "name": "ParameterList", + "src": "20239:20:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 3226, + "name": "Identifier", + "src": "20201:6:6" + } + ], + "id": 3227, + "name": "ModifierInvocation", + "src": "20201:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 3228, + "name": "Identifier", + "src": "20216:6:6" + } + ], + "id": 3229, + "name": "ModifierInvocation", + "src": "20216:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3233, + "name": "Identifier", + "src": "20283:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 3234, + "name": "Identifier", + "src": "20291:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_FINALIZED\"", + "value": "ERR_NOT_FINALIZED" + }, + "id": 3235, + "name": "Literal", + "src": "20303:19:6" + } + ], + "id": 3236, + "name": "FunctionCall", + "src": "20283:40:6" + } + ], + "id": 3237, + "name": "ExpressionStatement", + "src": "20283:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3238, + "name": "Identifier", + "src": "20333:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3239, + "name": "Identifier", + "src": "20341:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3220, + "type": "address", + "value": "tokenIn" + }, + "id": 3240, + "name": "Identifier", + "src": "20350:7:6" + } + ], + "id": 3241, + "name": "IndexAccess", + "src": "20341:17:6" + } + ], + "id": 3242, + "name": "MemberAccess", + "src": "20341:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 3243, + "name": "Literal", + "src": "20366:15:6" + } + ], + "id": 3244, + "name": "FunctionCall", + "src": "20333:49:6" + } + ], + "id": 3245, + "name": "ExpressionStatement", + "src": "20333:49:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf", + "typeString": "literal_string \"ERR_MAX_IN_RATIO\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3246, + "name": "Identifier", + "src": "20392:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3222, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3247, + "name": "Identifier", + "src": "20413:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 3248, + "name": "Identifier", + "src": "20430:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3249, + "name": "Identifier", + "src": "20435:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3220, + "type": "address", + "value": "tokenIn" + }, + "id": 3250, + "name": "Identifier", + "src": "20444:7:6" + } + ], + "id": 3251, + "name": "IndexAccess", + "src": "20435:17:6" + } + ], + "id": 3252, + "name": "MemberAccess", + "src": "20435:25:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 271, + "type": "uint256", + "value": "MAX_IN_RATIO" + }, + "id": 3253, + "name": "Identifier", + "src": "20462:12:6" + } + ], + "id": 3254, + "name": "FunctionCall", + "src": "20430:45:6" + } + ], + "id": 3255, + "name": "BinaryOperation", + "src": "20413:62:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d41585f494e5f524154494f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MAX_IN_RATIO\"", + "value": "ERR_MAX_IN_RATIO" + }, + "id": 3256, + "name": "Literal", + "src": "20490:18:6" + } + ], + "id": 3257, + "name": "FunctionCall", + "src": "20392:126:6" + } + ], + "id": 3258, + "name": "ExpressionStatement", + "src": "20392:126:6" + }, + { + "attributes": { + "assignments": [ + 3260 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "inRecord", + "scope": 3321, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 3259, + "name": "UserDefinedTypeName", + "src": "20529:6:6" + } + ], + "id": 3260, + "name": "VariableDeclaration", + "src": "20529:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3261, + "name": "Identifier", + "src": "20555:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3220, + "type": "address", + "value": "tokenIn" + }, + "id": 3262, + "name": "Identifier", + "src": "20564:7:6" + } + ], + "id": 3263, + "name": "IndexAccess", + "src": "20555:17:6" + } + ], + "id": 3264, + "name": "VariableDeclarationStatement", + "src": "20529:43:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3231, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 3265, + "name": "Identifier", + "src": "20583:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 664, + "type": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcPoolOutGivenSingleIn" + }, + "id": 3266, + "name": "Identifier", + "src": "20599:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3267, + "name": "Identifier", + "src": "20637:8:6" + } + ], + "id": 3268, + "name": "MemberAccess", + "src": "20637:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3269, + "name": "Identifier", + "src": "20667:8:6" + } + ], + "id": 3270, + "name": "MemberAccess", + "src": "20667:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3271, + "name": "Identifier", + "src": "20696:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 3272, + "name": "Identifier", + "src": "20722:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3222, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3273, + "name": "Identifier", + "src": "20748:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 3274, + "name": "Identifier", + "src": "20775:8:6" + } + ], + "id": 3275, + "name": "FunctionCall", + "src": "20599:194:6" + } + ], + "id": 3276, + "name": "Assignment", + "src": "20583:210:6" + } + ], + "id": 3277, + "name": "ExpressionStatement", + "src": "20583:210:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3278, + "name": "Identifier", + "src": "20804:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3231, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 3279, + "name": "Identifier", + "src": "20812:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3224, + "type": "uint256", + "value": "minPoolAmountOut" + }, + "id": 3280, + "name": "Identifier", + "src": "20829:16:6" + } + ], + "id": 3281, + "name": "BinaryOperation", + "src": "20812:33:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4c494d49545f4f5554", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_LIMIT_OUT\"", + "value": "ERR_LIMIT_OUT" + }, + "id": 3282, + "name": "Literal", + "src": "20847:15:6" + } + ], + "id": 3283, + "name": "FunctionCall", + "src": "20804:59:6" + } + ], + "id": 3284, + "name": "ExpressionStatement", + "src": "20804:59:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3285, + "name": "Identifier", + "src": "20874:8:6" + } + ], + "id": 3287, + "name": "MemberAccess", + "src": "20874:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 3288, + "name": "Identifier", + "src": "20893:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3260, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3289, + "name": "Identifier", + "src": "20898:8:6" + } + ], + "id": 3290, + "name": "MemberAccess", + "src": "20898:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3222, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3291, + "name": "Identifier", + "src": "20916:13:6" + } + ], + "id": 3292, + "name": "FunctionCall", + "src": "20893:37:6" + } + ], + "id": 3293, + "name": "Assignment", + "src": "20874:56:6" + } + ], + "id": 3294, + "name": "ExpressionStatement", + "src": "20874:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1459, + "type": "function (address,address,uint256)", + "value": "LOG_JOIN" + }, + "id": 3295, + "name": "Identifier", + "src": "20946:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3296, + "name": "Identifier", + "src": "20955:3:6" + } + ], + "id": 3297, + "name": "MemberAccess", + "src": "20955:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3220, + "type": "address", + "value": "tokenIn" + }, + "id": 3298, + "name": "Identifier", + "src": "20967:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3222, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3299, + "name": "Identifier", + "src": "20976:13:6" + } + ], + "id": 3300, + "name": "FunctionCall", + "src": "20946:44:6" + } + ], + "id": 3301, + "name": "EmitStatement", + "src": "20941:49:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3767, + "type": "function (uint256)", + "value": "_mintPoolShare" + }, + "id": 3302, + "name": "Identifier", + "src": "21001:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3231, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 3303, + "name": "Identifier", + "src": "21016:13:6" + } + ], + "id": 3304, + "name": "FunctionCall", + "src": "21001:29:6" + } + ], + "id": 3305, + "name": "ExpressionStatement", + "src": "21001:29:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3757, + "type": "function (address,uint256)", + "value": "_pushPoolShare" + }, + "id": 3306, + "name": "Identifier", + "src": "21040:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3307, + "name": "Identifier", + "src": "21055:3:6" + } + ], + "id": 3308, + "name": "MemberAccess", + "src": "21055:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3231, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 3309, + "name": "Identifier", + "src": "21067:13:6" + } + ], + "id": 3310, + "name": "FunctionCall", + "src": "21040:41:6" + } + ], + "id": 3311, + "name": "ExpressionStatement", + "src": "21040:41:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3706, + "type": "function (address,address,uint256)", + "value": "_pullUnderlying" + }, + "id": 3312, + "name": "Identifier", + "src": "21091:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3220, + "type": "address", + "value": "tokenIn" + }, + "id": 3313, + "name": "Identifier", + "src": "21107:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3314, + "name": "Identifier", + "src": "21116:3:6" + } + ], + "id": 3315, + "name": "MemberAccess", + "src": "21116:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3222, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3316, + "name": "Identifier", + "src": "21128:13:6" + } + ], + "id": 3317, + "name": "FunctionCall", + "src": "21091:51:6" + } + ], + "id": 3318, + "name": "ExpressionStatement", + "src": "21091:51:6" + }, + { + "attributes": { + "functionReturnParameters": 3232 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3231, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 3319, + "name": "Identifier", + "src": "21160:13:6" + } + ], + "id": 3320, + "name": "Return", + "src": "21153:20:6" + } + ], + "id": 3321, + "name": "Block", + "src": "20265:915:6" + } + ], + "id": 3322, + "name": "FunctionDefinition", + "src": "20052:1128:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "joinswapPoolAmountOut", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenIn", + "scope": 3433, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3323, + "name": "ElementaryTypeName", + "src": "21226:7:6" + } + ], + "id": 3324, + "name": "VariableDeclaration", + "src": "21226:15:6" + }, + { + "attributes": { + "constant": false, + "name": "poolAmountOut", + "scope": 3433, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3325, + "name": "ElementaryTypeName", + "src": "21252:4:6" + } + ], + "id": 3326, + "name": "VariableDeclaration", + "src": "21252:18:6" + }, + { + "attributes": { + "constant": false, + "name": "maxAmountIn", + "scope": 3433, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3327, + "name": "ElementaryTypeName", + "src": "21281:4:6" + } + ], + "id": 3328, + "name": "VariableDeclaration", + "src": "21281:16:6" + } + ], + "id": 3329, + "name": "ParameterList", + "src": "21216:87:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountIn", + "scope": 3433, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3334, + "name": "ElementaryTypeName", + "src": "21368:4:6" + } + ], + "id": 3335, + "name": "VariableDeclaration", + "src": "21368:18:6" + } + ], + "id": 3336, + "name": "ParameterList", + "src": "21367:20:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 3330, + "name": "Identifier", + "src": "21329:6:6" + } + ], + "id": 3331, + "name": "ModifierInvocation", + "src": "21329:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 3332, + "name": "Identifier", + "src": "21344:6:6" + } + ], + "id": 3333, + "name": "ModifierInvocation", + "src": "21344:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3337, + "name": "Identifier", + "src": "21402:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 3338, + "name": "Identifier", + "src": "21410:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_FINALIZED\"", + "value": "ERR_NOT_FINALIZED" + }, + "id": 3339, + "name": "Literal", + "src": "21422:19:6" + } + ], + "id": 3340, + "name": "FunctionCall", + "src": "21402:40:6" + } + ], + "id": 3341, + "name": "ExpressionStatement", + "src": "21402:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3342, + "name": "Identifier", + "src": "21452:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3343, + "name": "Identifier", + "src": "21460:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3324, + "type": "address", + "value": "tokenIn" + }, + "id": 3344, + "name": "Identifier", + "src": "21469:7:6" + } + ], + "id": 3345, + "name": "IndexAccess", + "src": "21460:17:6" + } + ], + "id": 3346, + "name": "MemberAccess", + "src": "21460:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 3347, + "name": "Literal", + "src": "21485:15:6" + } + ], + "id": 3348, + "name": "FunctionCall", + "src": "21452:49:6" + } + ], + "id": 3349, + "name": "ExpressionStatement", + "src": "21452:49:6" + }, + { + "attributes": { + "assignments": [ + 3351 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "inRecord", + "scope": 3432, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 3350, + "name": "UserDefinedTypeName", + "src": "21512:6:6" + } + ], + "id": 3351, + "name": "VariableDeclaration", + "src": "21512:23:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3352, + "name": "Identifier", + "src": "21538:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3324, + "type": "address", + "value": "tokenIn" + }, + "id": 3353, + "name": "Identifier", + "src": "21547:7:6" + } + ], + "id": 3354, + "name": "IndexAccess", + "src": "21538:17:6" + } + ], + "id": 3355, + "name": "VariableDeclarationStatement", + "src": "21512:43:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3335, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3356, + "name": "Identifier", + "src": "21566:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 753, + "type": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcSingleInGivenPoolOut" + }, + "id": 3357, + "name": "Identifier", + "src": "21582:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3351, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3358, + "name": "Identifier", + "src": "21620:8:6" + } + ], + "id": 3359, + "name": "MemberAccess", + "src": "21620:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3351, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3360, + "name": "Identifier", + "src": "21650:8:6" + } + ], + "id": 3361, + "name": "MemberAccess", + "src": "21650:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3362, + "name": "Identifier", + "src": "21679:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 3363, + "name": "Identifier", + "src": "21705:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3326, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 3364, + "name": "Identifier", + "src": "21731:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 3365, + "name": "Identifier", + "src": "21758:8:6" + } + ], + "id": 3366, + "name": "FunctionCall", + "src": "21582:194:6" + } + ], + "id": 3367, + "name": "Assignment", + "src": "21566:210:6" + } + ], + "id": 3368, + "name": "ExpressionStatement", + "src": "21566:210:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3369, + "name": "Identifier", + "src": "21787:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3335, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3370, + "name": "Identifier", + "src": "21795:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 3371, + "name": "Literal", + "src": "21812:1:6" + } + ], + "id": 3372, + "name": "BinaryOperation", + "src": "21795:18:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d4154485f415050524f58", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MATH_APPROX\"", + "value": "ERR_MATH_APPROX" + }, + "id": 3373, + "name": "Literal", + "src": "21815:17:6" + } + ], + "id": 3374, + "name": "FunctionCall", + "src": "21787:46:6" + } + ], + "id": 3375, + "name": "ExpressionStatement", + "src": "21787:46:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3376, + "name": "Identifier", + "src": "21843:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3335, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3377, + "name": "Identifier", + "src": "21851:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3328, + "type": "uint256", + "value": "maxAmountIn" + }, + "id": 3378, + "name": "Identifier", + "src": "21868:11:6" + } + ], + "id": 3379, + "name": "BinaryOperation", + "src": "21851:28:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4c494d49545f494e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_LIMIT_IN\"", + "value": "ERR_LIMIT_IN" + }, + "id": 3380, + "name": "Literal", + "src": "21881:14:6" + } + ], + "id": 3381, + "name": "FunctionCall", + "src": "21843:53:6" + } + ], + "id": 3382, + "name": "ExpressionStatement", + "src": "21843:53:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf", + "typeString": "literal_string \"ERR_MAX_IN_RATIO\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3383, + "name": "Identifier", + "src": "21915:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3335, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3384, + "name": "Identifier", + "src": "21936:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 3385, + "name": "Identifier", + "src": "21953:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3386, + "name": "Identifier", + "src": "21958:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3324, + "type": "address", + "value": "tokenIn" + }, + "id": 3387, + "name": "Identifier", + "src": "21967:7:6" + } + ], + "id": 3388, + "name": "IndexAccess", + "src": "21958:17:6" + } + ], + "id": 3389, + "name": "MemberAccess", + "src": "21958:25:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 271, + "type": "uint256", + "value": "MAX_IN_RATIO" + }, + "id": 3390, + "name": "Identifier", + "src": "21985:12:6" + } + ], + "id": 3391, + "name": "FunctionCall", + "src": "21953:45:6" + } + ], + "id": 3392, + "name": "BinaryOperation", + "src": "21936:62:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d41585f494e5f524154494f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MAX_IN_RATIO\"", + "value": "ERR_MAX_IN_RATIO" + }, + "id": 3393, + "name": "Literal", + "src": "22013:18:6" + } + ], + "id": 3394, + "name": "FunctionCall", + "src": "21915:126:6" + } + ], + "id": 3395, + "name": "ExpressionStatement", + "src": "21915:126:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3351, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3396, + "name": "Identifier", + "src": "22052:8:6" + } + ], + "id": 3398, + "name": "MemberAccess", + "src": "22052:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 3399, + "name": "Identifier", + "src": "22071:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3351, + "type": "struct BPool.Record storage pointer", + "value": "inRecord" + }, + "id": 3400, + "name": "Identifier", + "src": "22076:8:6" + } + ], + "id": 3401, + "name": "MemberAccess", + "src": "22076:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3335, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3402, + "name": "Identifier", + "src": "22094:13:6" + } + ], + "id": 3403, + "name": "FunctionCall", + "src": "22071:37:6" + } + ], + "id": 3404, + "name": "Assignment", + "src": "22052:56:6" + } + ], + "id": 3405, + "name": "ExpressionStatement", + "src": "22052:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1459, + "type": "function (address,address,uint256)", + "value": "LOG_JOIN" + }, + "id": 3406, + "name": "Identifier", + "src": "22124:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3407, + "name": "Identifier", + "src": "22133:3:6" + } + ], + "id": 3408, + "name": "MemberAccess", + "src": "22133:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3324, + "type": "address", + "value": "tokenIn" + }, + "id": 3409, + "name": "Identifier", + "src": "22145:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3335, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3410, + "name": "Identifier", + "src": "22154:13:6" + } + ], + "id": 3411, + "name": "FunctionCall", + "src": "22124:44:6" + } + ], + "id": 3412, + "name": "EmitStatement", + "src": "22119:49:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3767, + "type": "function (uint256)", + "value": "_mintPoolShare" + }, + "id": 3413, + "name": "Identifier", + "src": "22179:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3326, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 3414, + "name": "Identifier", + "src": "22194:13:6" + } + ], + "id": 3415, + "name": "FunctionCall", + "src": "22179:29:6" + } + ], + "id": 3416, + "name": "ExpressionStatement", + "src": "22179:29:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3757, + "type": "function (address,uint256)", + "value": "_pushPoolShare" + }, + "id": 3417, + "name": "Identifier", + "src": "22218:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3418, + "name": "Identifier", + "src": "22233:3:6" + } + ], + "id": 3419, + "name": "MemberAccess", + "src": "22233:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3326, + "type": "uint256", + "value": "poolAmountOut" + }, + "id": 3420, + "name": "Identifier", + "src": "22245:13:6" + } + ], + "id": 3421, + "name": "FunctionCall", + "src": "22218:41:6" + } + ], + "id": 3422, + "name": "ExpressionStatement", + "src": "22218:41:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3706, + "type": "function (address,address,uint256)", + "value": "_pullUnderlying" + }, + "id": 3423, + "name": "Identifier", + "src": "22269:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3324, + "type": "address", + "value": "tokenIn" + }, + "id": 3424, + "name": "Identifier", + "src": "22285:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3425, + "name": "Identifier", + "src": "22294:3:6" + } + ], + "id": 3426, + "name": "MemberAccess", + "src": "22294:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3335, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3427, + "name": "Identifier", + "src": "22306:13:6" + } + ], + "id": 3428, + "name": "FunctionCall", + "src": "22269:51:6" + } + ], + "id": 3429, + "name": "ExpressionStatement", + "src": "22269:51:6" + }, + { + "attributes": { + "functionReturnParameters": 3336 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3335, + "type": "uint256", + "value": "tokenAmountIn" + }, + "id": 3430, + "name": "Identifier", + "src": "22338:13:6" + } + ], + "id": 3431, + "name": "Return", + "src": "22331:20:6" + } + ], + "id": 3432, + "name": "Block", + "src": "21392:966:6" + } + ], + "id": 3433, + "name": "FunctionDefinition", + "src": "21186:1172:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "exitswapPoolAmountIn", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenOut", + "scope": 3552, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3434, + "name": "ElementaryTypeName", + "src": "22403:7:6" + } + ], + "id": 3435, + "name": "VariableDeclaration", + "src": "22403:16:6" + }, + { + "attributes": { + "constant": false, + "name": "poolAmountIn", + "scope": 3552, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3436, + "name": "ElementaryTypeName", + "src": "22430:4:6" + } + ], + "id": 3437, + "name": "VariableDeclaration", + "src": "22430:17:6" + }, + { + "attributes": { + "constant": false, + "name": "minAmountOut", + "scope": 3552, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3438, + "name": "ElementaryTypeName", + "src": "22458:4:6" + } + ], + "id": 3439, + "name": "VariableDeclaration", + "src": "22458:17:6" + } + ], + "id": 3440, + "name": "ParameterList", + "src": "22393:88:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAmountOut", + "scope": 3552, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3445, + "name": "ElementaryTypeName", + "src": "22546:4:6" + } + ], + "id": 3446, + "name": "VariableDeclaration", + "src": "22546:19:6" + } + ], + "id": 3447, + "name": "ParameterList", + "src": "22545:21:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 3441, + "name": "Identifier", + "src": "22507:6:6" + } + ], + "id": 3442, + "name": "ModifierInvocation", + "src": "22507:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 3443, + "name": "Identifier", + "src": "22522:6:6" + } + ], + "id": 3444, + "name": "ModifierInvocation", + "src": "22522:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3448, + "name": "Identifier", + "src": "22581:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 3449, + "name": "Identifier", + "src": "22589:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_FINALIZED\"", + "value": "ERR_NOT_FINALIZED" + }, + "id": 3450, + "name": "Literal", + "src": "22601:19:6" + } + ], + "id": 3451, + "name": "FunctionCall", + "src": "22581:40:6" + } + ], + "id": 3452, + "name": "ExpressionStatement", + "src": "22581:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3453, + "name": "Identifier", + "src": "22631:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3454, + "name": "Identifier", + "src": "22639:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3435, + "type": "address", + "value": "tokenOut" + }, + "id": 3455, + "name": "Identifier", + "src": "22648:8:6" + } + ], + "id": 3456, + "name": "IndexAccess", + "src": "22639:18:6" + } + ], + "id": 3457, + "name": "MemberAccess", + "src": "22639:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 3458, + "name": "Literal", + "src": "22665:15:6" + } + ], + "id": 3459, + "name": "FunctionCall", + "src": "22631:50:6" + } + ], + "id": 3460, + "name": "ExpressionStatement", + "src": "22631:50:6" + }, + { + "attributes": { + "assignments": [ + 3462 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "outRecord", + "scope": 3551, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 3461, + "name": "UserDefinedTypeName", + "src": "22692:6:6" + } + ], + "id": 3462, + "name": "VariableDeclaration", + "src": "22692:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3463, + "name": "Identifier", + "src": "22719:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3435, + "type": "address", + "value": "tokenOut" + }, + "id": 3464, + "name": "Identifier", + "src": "22728:8:6" + } + ], + "id": 3465, + "name": "IndexAccess", + "src": "22719:18:6" + } + ], + "id": 3466, + "name": "VariableDeclarationStatement", + "src": "22692:45:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3446, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3467, + "name": "Identifier", + "src": "22748:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 848, + "type": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcSingleOutGivenPoolIn" + }, + "id": 3468, + "name": "Identifier", + "src": "22765:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3462, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3469, + "name": "Identifier", + "src": "22803:9:6" + } + ], + "id": 3470, + "name": "MemberAccess", + "src": "22803:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3462, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3471, + "name": "Identifier", + "src": "22834:9:6" + } + ], + "id": 3472, + "name": "MemberAccess", + "src": "22834:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3473, + "name": "Identifier", + "src": "22864:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 3474, + "name": "Identifier", + "src": "22890:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3437, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 3475, + "name": "Identifier", + "src": "22916:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 3476, + "name": "Identifier", + "src": "22942:8:6" + } + ], + "id": 3477, + "name": "FunctionCall", + "src": "22765:195:6" + } + ], + "id": 3478, + "name": "Assignment", + "src": "22748:212:6" + } + ], + "id": 3479, + "name": "ExpressionStatement", + "src": "22748:212:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705", + "typeString": "literal_string \"ERR_LIMIT_OUT\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3480, + "name": "Identifier", + "src": "22971:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3446, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3481, + "name": "Identifier", + "src": "22979:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3439, + "type": "uint256", + "value": "minAmountOut" + }, + "id": 3482, + "name": "Identifier", + "src": "22997:12:6" + } + ], + "id": 3483, + "name": "BinaryOperation", + "src": "22979:30:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4c494d49545f4f5554", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_LIMIT_OUT\"", + "value": "ERR_LIMIT_OUT" + }, + "id": 3484, + "name": "Literal", + "src": "23011:15:6" + } + ], + "id": 3485, + "name": "FunctionCall", + "src": "22971:56:6" + } + ], + "id": 3486, + "name": "ExpressionStatement", + "src": "22971:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a", + "typeString": "literal_string \"ERR_MAX_OUT_RATIO\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3487, + "name": "Identifier", + "src": "23046:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3446, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3488, + "name": "Identifier", + "src": "23067:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 3489, + "name": "Identifier", + "src": "23085:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3490, + "name": "Identifier", + "src": "23090:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3435, + "type": "address", + "value": "tokenOut" + }, + "id": 3491, + "name": "Identifier", + "src": "23099:8:6" + } + ], + "id": 3492, + "name": "IndexAccess", + "src": "23090:18:6" + } + ], + "id": 3493, + "name": "MemberAccess", + "src": "23090:26:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 279, + "type": "uint256", + "value": "MAX_OUT_RATIO" + }, + "id": 3494, + "name": "Identifier", + "src": "23118:13:6" + } + ], + "id": 3495, + "name": "FunctionCall", + "src": "23085:47:6" + } + ], + "id": 3496, + "name": "BinaryOperation", + "src": "23067:65:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d41585f4f55545f524154494f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MAX_OUT_RATIO\"", + "value": "ERR_MAX_OUT_RATIO" + }, + "id": 3497, + "name": "Literal", + "src": "23147:19:6" + } + ], + "id": 3498, + "name": "FunctionCall", + "src": "23046:130:6" + } + ], + "id": 3499, + "name": "ExpressionStatement", + "src": "23046:130:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3462, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3500, + "name": "Identifier", + "src": "23187:9:6" + } + ], + "id": 3502, + "name": "MemberAccess", + "src": "23187:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 3503, + "name": "Identifier", + "src": "23207:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3462, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3504, + "name": "Identifier", + "src": "23212:9:6" + } + ], + "id": 3505, + "name": "MemberAccess", + "src": "23212:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3446, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3506, + "name": "Identifier", + "src": "23231:14:6" + } + ], + "id": 3507, + "name": "FunctionCall", + "src": "23207:39:6" + } + ], + "id": 3508, + "name": "Assignment", + "src": "23187:59:6" + } + ], + "id": 3509, + "name": "ExpressionStatement", + "src": "23187:59:6" + }, + { + "attributes": { + "assignments": [ + 3511 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "exitFee", + "scope": 3551, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3510, + "name": "ElementaryTypeName", + "src": "23257:4:6" + } + ], + "id": 3511, + "name": "VariableDeclaration", + "src": "23257:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 3512, + "name": "Identifier", + "src": "23272:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3437, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 3513, + "name": "Identifier", + "src": "23277:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 223, + "type": "uint256", + "value": "EXIT_FEE" + }, + "id": 3514, + "name": "Identifier", + "src": "23291:8:6" + } + ], + "id": 3515, + "name": "FunctionCall", + "src": "23272:28:6" + } + ], + "id": 3516, + "name": "VariableDeclarationStatement", + "src": "23257:43:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1467, + "type": "function (address,address,uint256)", + "value": "LOG_EXIT" + }, + "id": 3517, + "name": "Identifier", + "src": "23316:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3518, + "name": "Identifier", + "src": "23325:3:6" + } + ], + "id": 3519, + "name": "MemberAccess", + "src": "23325:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3435, + "type": "address", + "value": "tokenOut" + }, + "id": 3520, + "name": "Identifier", + "src": "23337:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3446, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3521, + "name": "Identifier", + "src": "23347:14:6" + } + ], + "id": 3522, + "name": "FunctionCall", + "src": "23316:46:6" + } + ], + "id": 3523, + "name": "EmitStatement", + "src": "23311:51:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3744, + "type": "function (address,uint256)", + "value": "_pullPoolShare" + }, + "id": 3524, + "name": "Identifier", + "src": "23373:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3525, + "name": "Identifier", + "src": "23388:3:6" + } + ], + "id": 3526, + "name": "MemberAccess", + "src": "23388:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3437, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 3527, + "name": "Identifier", + "src": "23400:12:6" + } + ], + "id": 3528, + "name": "FunctionCall", + "src": "23373:40:6" + } + ], + "id": 3529, + "name": "ExpressionStatement", + "src": "23373:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3777, + "type": "function (uint256)", + "value": "_burnPoolShare" + }, + "id": 3530, + "name": "Identifier", + "src": "23423:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 3531, + "name": "Identifier", + "src": "23438:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3437, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 3532, + "name": "Identifier", + "src": "23443:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3511, + "type": "uint256", + "value": "exitFee" + }, + "id": 3533, + "name": "Identifier", + "src": "23457:7:6" + } + ], + "id": 3534, + "name": "FunctionCall", + "src": "23438:27:6" + } + ], + "id": 3535, + "name": "FunctionCall", + "src": "23423:43:6" + } + ], + "id": 3536, + "name": "ExpressionStatement", + "src": "23423:43:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3757, + "type": "function (address,uint256)", + "value": "_pushPoolShare" + }, + "id": 3537, + "name": "Identifier", + "src": "23476:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1520, + "type": "address", + "value": "_factory" + }, + "id": 3538, + "name": "Identifier", + "src": "23491:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3511, + "type": "uint256", + "value": "exitFee" + }, + "id": 3539, + "name": "Identifier", + "src": "23501:7:6" + } + ], + "id": 3540, + "name": "FunctionCall", + "src": "23476:33:6" + } + ], + "id": 3541, + "name": "ExpressionStatement", + "src": "23476:33:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3731, + "type": "function (address,address,uint256)", + "value": "_pushUnderlying" + }, + "id": 3542, + "name": "Identifier", + "src": "23519:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3435, + "type": "address", + "value": "tokenOut" + }, + "id": 3543, + "name": "Identifier", + "src": "23535:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3544, + "name": "Identifier", + "src": "23545:3:6" + } + ], + "id": 3545, + "name": "MemberAccess", + "src": "23545:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3446, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3546, + "name": "Identifier", + "src": "23557:14:6" + } + ], + "id": 3547, + "name": "FunctionCall", + "src": "23519:53:6" + } + ], + "id": 3548, + "name": "ExpressionStatement", + "src": "23519:53:6" + }, + { + "attributes": { + "functionReturnParameters": 3447 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3446, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3549, + "name": "Identifier", + "src": "23590:14:6" + } + ], + "id": 3550, + "name": "Return", + "src": "23583:21:6" + } + ], + "id": 3551, + "name": "Block", + "src": "22571:1040:6" + } + ], + "id": 3552, + "name": "FunctionDefinition", + "src": "22364:1247:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "exitswapExternAmountOut", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenOut", + "scope": 3678, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3553, + "name": "ElementaryTypeName", + "src": "23659:7:6" + } + ], + "id": 3554, + "name": "VariableDeclaration", + "src": "23659:16:6" + }, + { + "attributes": { + "constant": false, + "name": "tokenAmountOut", + "scope": 3678, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3555, + "name": "ElementaryTypeName", + "src": "23686:4:6" + } + ], + "id": 3556, + "name": "VariableDeclaration", + "src": "23686:19:6" + }, + { + "attributes": { + "constant": false, + "name": "maxPoolAmountIn", + "scope": 3678, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3557, + "name": "ElementaryTypeName", + "src": "23716:4:6" + } + ], + "id": 3558, + "name": "VariableDeclaration", + "src": "23716:20:6" + } + ], + "id": 3559, + "name": "ParameterList", + "src": "23649:93:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "poolAmountIn", + "scope": 3678, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3564, + "name": "ElementaryTypeName", + "src": "23807:4:6" + } + ], + "id": 3565, + "name": "VariableDeclaration", + "src": "23807:17:6" + } + ], + "id": 3566, + "name": "ParameterList", + "src": "23806:19:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1488, + "type": "modifier ()", + "value": "_logs_" + }, + "id": 3560, + "name": "Identifier", + "src": "23768:6:6" + } + ], + "id": 3561, + "name": "ModifierInvocation", + "src": "23768:6:6" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1506, + "type": "modifier ()", + "value": "_lock_" + }, + "id": 3562, + "name": "Identifier", + "src": "23783:6:6" + } + ], + "id": 3563, + "name": "ModifierInvocation", + "src": "23783:6:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f", + "typeString": "literal_string \"ERR_NOT_FINALIZED\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3567, + "name": "Identifier", + "src": "23840:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "bool", + "value": "_finalized" + }, + "id": 3568, + "name": "Identifier", + "src": "23848:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f46494e414c495a4544", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_FINALIZED\"", + "value": "ERR_NOT_FINALIZED" + }, + "id": 3569, + "name": "Literal", + "src": "23860:19:6" + } + ], + "id": 3570, + "name": "FunctionCall", + "src": "23840:40:6" + } + ], + "id": 3571, + "name": "ExpressionStatement", + "src": "23840:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c", + "typeString": "literal_string \"ERR_NOT_BOUND\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3572, + "name": "Identifier", + "src": "23890:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "bound", + "referencedDeclaration": 1432, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3573, + "name": "Identifier", + "src": "23898:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3554, + "type": "address", + "value": "tokenOut" + }, + "id": 3574, + "name": "Identifier", + "src": "23907:8:6" + } + ], + "id": 3575, + "name": "IndexAccess", + "src": "23898:18:6" + } + ], + "id": 3576, + "name": "MemberAccess", + "src": "23898:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4e4f545f424f554e44", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_NOT_BOUND\"", + "value": "ERR_NOT_BOUND" + }, + "id": 3577, + "name": "Literal", + "src": "23924:15:6" + } + ], + "id": 3578, + "name": "FunctionCall", + "src": "23890:50:6" + } + ], + "id": 3579, + "name": "ExpressionStatement", + "src": "23890:50:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a", + "typeString": "literal_string \"ERR_MAX_OUT_RATIO\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3580, + "name": "Identifier", + "src": "23950:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3556, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3581, + "name": "Identifier", + "src": "23971:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 3582, + "name": "Identifier", + "src": "23989:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3583, + "name": "Identifier", + "src": "23994:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3554, + "type": "address", + "value": "tokenOut" + }, + "id": 3584, + "name": "Identifier", + "src": "24003:8:6" + } + ], + "id": 3585, + "name": "IndexAccess", + "src": "23994:18:6" + } + ], + "id": 3586, + "name": "MemberAccess", + "src": "23994:26:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 279, + "type": "uint256", + "value": "MAX_OUT_RATIO" + }, + "id": 3587, + "name": "Identifier", + "src": "24022:13:6" + } + ], + "id": 3588, + "name": "FunctionCall", + "src": "23989:47:6" + } + ], + "id": 3589, + "name": "BinaryOperation", + "src": "23971:65:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d41585f4f55545f524154494f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MAX_OUT_RATIO\"", + "value": "ERR_MAX_OUT_RATIO" + }, + "id": 3590, + "name": "Literal", + "src": "24051:19:6" + } + ], + "id": 3591, + "name": "FunctionCall", + "src": "23950:130:6" + } + ], + "id": 3592, + "name": "ExpressionStatement", + "src": "23950:130:6" + }, + { + "attributes": { + "assignments": [ + 3594 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "outRecord", + "scope": 3677, + "stateVariable": false, + "storageLocation": "storage", + "type": "struct BPool.Record", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Record", + "referencedDeclaration": 1439, + "type": "struct BPool.Record" + }, + "id": 3593, + "name": "UserDefinedTypeName", + "src": "24091:6:6" + } + ], + "id": 3594, + "name": "VariableDeclaration", + "src": "24091:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct BPool.Record storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1535, + "type": "mapping(address => struct BPool.Record storage ref)", + "value": "_records" + }, + "id": 3595, + "name": "Identifier", + "src": "24118:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3554, + "type": "address", + "value": "tokenOut" + }, + "id": 3596, + "name": "Identifier", + "src": "24127:8:6" + } + ], + "id": 3597, + "name": "IndexAccess", + "src": "24118:18:6" + } + ], + "id": 3598, + "name": "VariableDeclarationStatement", + "src": "24091:45:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3565, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 3599, + "name": "Identifier", + "src": "24147:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 944, + "type": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure returns (uint256)", + "value": "calcPoolInGivenSingleOut" + }, + "id": 3600, + "name": "Identifier", + "src": "24162:24:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3594, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3601, + "name": "Identifier", + "src": "24200:9:6" + } + ], + "id": 3602, + "name": "MemberAccess", + "src": "24200:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "denorm", + "referencedDeclaration": 1436, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3594, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3603, + "name": "Identifier", + "src": "24231:9:6" + } + ], + "id": 3604, + "name": "MemberAccess", + "src": "24231:16:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3605, + "name": "Identifier", + "src": "24261:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1537, + "type": "uint256", + "value": "_totalWeight" + }, + "id": 3606, + "name": "Identifier", + "src": "24287:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3556, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3607, + "name": "Identifier", + "src": "24313:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1526, + "type": "uint256", + "value": "_swapFee" + }, + "id": 3608, + "name": "Identifier", + "src": "24341:8:6" + } + ], + "id": 3609, + "name": "FunctionCall", + "src": "24162:197:6" + } + ], + "id": 3610, + "name": "Assignment", + "src": "24147:212:6" + } + ], + "id": 3611, + "name": "ExpressionStatement", + "src": "24147:212:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187", + "typeString": "literal_string \"ERR_MATH_APPROX\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3612, + "name": "Identifier", + "src": "24370:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3565, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 3613, + "name": "Identifier", + "src": "24378:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 3614, + "name": "Literal", + "src": "24394:1:6" + } + ], + "id": 3615, + "name": "BinaryOperation", + "src": "24378:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4d4154485f415050524f58", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_MATH_APPROX\"", + "value": "ERR_MATH_APPROX" + }, + "id": 3616, + "name": "Literal", + "src": "24397:17:6" + } + ], + "id": 3617, + "name": "FunctionCall", + "src": "24370:45:6" + } + ], + "id": 3618, + "name": "ExpressionStatement", + "src": "24370:45:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68", + "typeString": "literal_string \"ERR_LIMIT_IN\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3619, + "name": "Identifier", + "src": "24425:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3565, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 3620, + "name": "Identifier", + "src": "24433:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3558, + "type": "uint256", + "value": "maxPoolAmountIn" + }, + "id": 3621, + "name": "Identifier", + "src": "24449:15:6" + } + ], + "id": 3622, + "name": "BinaryOperation", + "src": "24433:31:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f4c494d49545f494e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_LIMIT_IN\"", + "value": "ERR_LIMIT_IN" + }, + "id": 3623, + "name": "Literal", + "src": "24466:14:6" + } + ], + "id": 3624, + "name": "FunctionCall", + "src": "24425:56:6" + } + ], + "id": 3625, + "name": "ExpressionStatement", + "src": "24425:56:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3594, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3626, + "name": "Identifier", + "src": "24492:9:6" + } + ], + "id": 3628, + "name": "MemberAccess", + "src": "24492:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 3629, + "name": "Identifier", + "src": "24512:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": 1438, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3594, + "type": "struct BPool.Record storage pointer", + "value": "outRecord" + }, + "id": 3630, + "name": "Identifier", + "src": "24517:9:6" + } + ], + "id": 3631, + "name": "MemberAccess", + "src": "24517:17:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3556, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3632, + "name": "Identifier", + "src": "24536:14:6" + } + ], + "id": 3633, + "name": "FunctionCall", + "src": "24512:39:6" + } + ], + "id": 3634, + "name": "Assignment", + "src": "24492:59:6" + } + ], + "id": 3635, + "name": "ExpressionStatement", + "src": "24492:59:6" + }, + { + "attributes": { + "assignments": [ + 3637 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "exitFee", + "scope": 3677, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3636, + "name": "ElementaryTypeName", + "src": "24562:4:6" + } + ], + "id": 3637, + "name": "VariableDeclaration", + "src": "24562:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1111, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bmul" + }, + "id": 3638, + "name": "Identifier", + "src": "24577:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3565, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 3639, + "name": "Identifier", + "src": "24582:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 223, + "type": "uint256", + "value": "EXIT_FEE" + }, + "id": 3640, + "name": "Identifier", + "src": "24596:8:6" + } + ], + "id": 3641, + "name": "FunctionCall", + "src": "24577:28:6" + } + ], + "id": 3642, + "name": "VariableDeclarationStatement", + "src": "24562:43:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1467, + "type": "function (address,address,uint256)", + "value": "LOG_EXIT" + }, + "id": 3643, + "name": "Identifier", + "src": "24621:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3644, + "name": "Identifier", + "src": "24630:3:6" + } + ], + "id": 3645, + "name": "MemberAccess", + "src": "24630:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3554, + "type": "address", + "value": "tokenOut" + }, + "id": 3646, + "name": "Identifier", + "src": "24642:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3556, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3647, + "name": "Identifier", + "src": "24652:14:6" + } + ], + "id": 3648, + "name": "FunctionCall", + "src": "24621:46:6" + } + ], + "id": 3649, + "name": "EmitStatement", + "src": "24616:51:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3744, + "type": "function (address,uint256)", + "value": "_pullPoolShare" + }, + "id": 3650, + "name": "Identifier", + "src": "24678:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3651, + "name": "Identifier", + "src": "24693:3:6" + } + ], + "id": 3652, + "name": "MemberAccess", + "src": "24693:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3565, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 3653, + "name": "Identifier", + "src": "24705:12:6" + } + ], + "id": 3654, + "name": "FunctionCall", + "src": "24678:40:6" + } + ], + "id": 3655, + "name": "ExpressionStatement", + "src": "24678:40:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3777, + "type": "function (uint256)", + "value": "_burnPoolShare" + }, + "id": 3656, + "name": "Identifier", + "src": "24728:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 3657, + "name": "Identifier", + "src": "24743:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3565, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 3658, + "name": "Identifier", + "src": "24748:12:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3637, + "type": "uint256", + "value": "exitFee" + }, + "id": 3659, + "name": "Identifier", + "src": "24762:7:6" + } + ], + "id": 3660, + "name": "FunctionCall", + "src": "24743:27:6" + } + ], + "id": 3661, + "name": "FunctionCall", + "src": "24728:43:6" + } + ], + "id": 3662, + "name": "ExpressionStatement", + "src": "24728:43:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3757, + "type": "function (address,uint256)", + "value": "_pushPoolShare" + }, + "id": 3663, + "name": "Identifier", + "src": "24781:14:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1520, + "type": "address", + "value": "_factory" + }, + "id": 3664, + "name": "Identifier", + "src": "24796:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3637, + "type": "uint256", + "value": "exitFee" + }, + "id": 3665, + "name": "Identifier", + "src": "24806:7:6" + } + ], + "id": 3666, + "name": "FunctionCall", + "src": "24781:33:6" + } + ], + "id": 3667, + "name": "ExpressionStatement", + "src": "24781:33:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3731, + "type": "function (address,address,uint256)", + "value": "_pushUnderlying" + }, + "id": 3668, + "name": "Identifier", + "src": "24824:15:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3554, + "type": "address", + "value": "tokenOut" + }, + "id": 3669, + "name": "Identifier", + "src": "24840:8:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 3670, + "name": "Identifier", + "src": "24850:3:6" + } + ], + "id": 3671, + "name": "MemberAccess", + "src": "24850:10:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3556, + "type": "uint256", + "value": "tokenAmountOut" + }, + "id": 3672, + "name": "Identifier", + "src": "24862:14:6" + } + ], + "id": 3673, + "name": "FunctionCall", + "src": "24824:53:6" + } + ], + "id": 3674, + "name": "ExpressionStatement", + "src": "24824:53:6" + }, + { + "attributes": { + "functionReturnParameters": 3566 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3565, + "type": "uint256", + "value": "poolAmountIn" + }, + "id": 3675, + "name": "Identifier", + "src": "24903:12:6" + } + ], + "id": 3676, + "name": "Return", + "src": "24896:19:6" + } + ], + "id": 3677, + "name": "Block", + "src": "23830:1092:6" + } + ], + "id": 3678, + "name": "FunctionDefinition", + "src": "23617:1305:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_pullUnderlying", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "erc20", + "scope": 3706, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3679, + "name": "ElementaryTypeName", + "src": "25113:7:6" + } + ], + "id": 3680, + "name": "VariableDeclaration", + "src": "25113:13:6" + }, + { + "attributes": { + "constant": false, + "name": "from", + "scope": 3706, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3681, + "name": "ElementaryTypeName", + "src": "25128:7:6" + } + ], + "id": 3682, + "name": "VariableDeclaration", + "src": "25128:12:6" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 3706, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3683, + "name": "ElementaryTypeName", + "src": "25142:4:6" + } + ], + "id": 3684, + "name": "VariableDeclaration", + "src": "25142:11:6" + } + ], + "id": 3685, + "name": "ParameterList", + "src": "25112:42:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3686, + "name": "ParameterList", + "src": "25176:0:6" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 3688 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "xfer", + "scope": 3705, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 3687, + "name": "ElementaryTypeName", + "src": "25186:4:6" + } + ], + "id": 3688, + "name": "VariableDeclaration", + "src": "25186:9:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transferFrom", + "referencedDeclaration": 7089, + "type": "function (address,address,uint256) external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7106, + "type": "type(contract IERC20)", + "value": "IERC20" + }, + "id": 3689, + "name": "Identifier", + "src": "25198:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3680, + "type": "address", + "value": "erc20" + }, + "id": 3690, + "name": "Identifier", + "src": "25205:5:6" + } + ], + "id": 3691, + "name": "FunctionCall", + "src": "25198:13:6" + } + ], + "id": 3692, + "name": "MemberAccess", + "src": "25198:26:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3682, + "type": "address", + "value": "from" + }, + "id": 3693, + "name": "Identifier", + "src": "25225:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BPool_$3778", + "typeString": "contract BPool" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3694, + "name": "ElementaryTypeNameExpression", + "src": "25231:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7155, + "type": "contract BPool", + "value": "this" + }, + "id": 3695, + "name": "Identifier", + "src": "25239:4:6" + } + ], + "id": 3696, + "name": "FunctionCall", + "src": "25231:13:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3684, + "type": "uint256", + "value": "amount" + }, + "id": 3697, + "name": "Identifier", + "src": "25246:6:6" + } + ], + "id": 3698, + "name": "FunctionCall", + "src": "25198:55:6" + } + ], + "id": 3699, + "name": "VariableDeclarationStatement", + "src": "25186:67:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f", + "typeString": "literal_string \"ERR_ERC20_FALSE\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3700, + "name": "Identifier", + "src": "25263:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3688, + "type": "bool", + "value": "xfer" + }, + "id": 3701, + "name": "Identifier", + "src": "25271:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f45524332305f46414c5345", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_ERC20_FALSE\"", + "value": "ERR_ERC20_FALSE" + }, + "id": 3702, + "name": "Literal", + "src": "25277:17:6" + } + ], + "id": 3703, + "name": "FunctionCall", + "src": "25263:32:6" + } + ], + "id": 3704, + "name": "ExpressionStatement", + "src": "25263:32:6" + } + ], + "id": 3705, + "name": "Block", + "src": "25176:126:6" + } + ], + "id": 3706, + "name": "FunctionDefinition", + "src": "25088:214:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_pushUnderlying", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "erc20", + "scope": 3731, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3707, + "name": "ElementaryTypeName", + "src": "25333:7:6" + } + ], + "id": 3708, + "name": "VariableDeclaration", + "src": "25333:13:6" + }, + { + "attributes": { + "constant": false, + "name": "to", + "scope": 3731, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3709, + "name": "ElementaryTypeName", + "src": "25348:7:6" + } + ], + "id": 3710, + "name": "VariableDeclaration", + "src": "25348:10:6" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 3731, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3711, + "name": "ElementaryTypeName", + "src": "25360:4:6" + } + ], + "id": 3712, + "name": "VariableDeclaration", + "src": "25360:11:6" + } + ], + "id": 3713, + "name": "ParameterList", + "src": "25332:40:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3714, + "name": "ParameterList", + "src": "25394:0:6" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 3716 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "xfer", + "scope": 3730, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 3715, + "name": "ElementaryTypeName", + "src": "25404:4:6" + } + ], + "id": 3716, + "name": "VariableDeclaration", + "src": "25404:9:6" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": 7060, + "type": "function (address,uint256) external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7106, + "type": "type(contract IERC20)", + "value": "IERC20" + }, + "id": 3717, + "name": "Identifier", + "src": "25416:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3708, + "type": "address", + "value": "erc20" + }, + "id": 3718, + "name": "Identifier", + "src": "25423:5:6" + } + ], + "id": 3719, + "name": "FunctionCall", + "src": "25416:13:6" + } + ], + "id": 3720, + "name": "MemberAccess", + "src": "25416:22:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3710, + "type": "address", + "value": "to" + }, + "id": 3721, + "name": "Identifier", + "src": "25439:2:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3712, + "type": "uint256", + "value": "amount" + }, + "id": 3722, + "name": "Identifier", + "src": "25443:6:6" + } + ], + "id": 3723, + "name": "FunctionCall", + "src": "25416:34:6" + } + ], + "id": 3724, + "name": "VariableDeclarationStatement", + "src": "25404:46:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f", + "typeString": "literal_string \"ERR_ERC20_FALSE\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3725, + "name": "Identifier", + "src": "25460:7:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3716, + "type": "bool", + "value": "xfer" + }, + "id": 3726, + "name": "Identifier", + "src": "25468:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f45524332305f46414c5345", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_ERC20_FALSE\"", + "value": "ERR_ERC20_FALSE" + }, + "id": 3727, + "name": "Literal", + "src": "25474:17:6" + } + ], + "id": 3728, + "name": "FunctionCall", + "src": "25460:32:6" + } + ], + "id": 3729, + "name": "ExpressionStatement", + "src": "25460:32:6" + } + ], + "id": 3730, + "name": "Block", + "src": "25394:105:6" + } + ], + "id": 3731, + "name": "FunctionDefinition", + "src": "25308:191:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_pullPoolShare", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "from", + "scope": 3744, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3732, + "name": "ElementaryTypeName", + "src": "25529:7:6" + } + ], + "id": 3733, + "name": "VariableDeclaration", + "src": "25529:12:6" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 3744, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3734, + "name": "ElementaryTypeName", + "src": "25543:4:6" + } + ], + "id": 3735, + "name": "VariableDeclaration", + "src": "25543:11:6" + } + ], + "id": 3736, + "name": "ParameterList", + "src": "25528:27:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3737, + "name": "ParameterList", + "src": "25577:0:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3978, + "type": "function (address,uint256)", + "value": "_pull" + }, + "id": 3738, + "name": "Identifier", + "src": "25587:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3733, + "type": "address", + "value": "from" + }, + "id": 3739, + "name": "Identifier", + "src": "25593:4:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3735, + "type": "uint256", + "value": "amount" + }, + "id": 3740, + "name": "Identifier", + "src": "25599:6:6" + } + ], + "id": 3741, + "name": "FunctionCall", + "src": "25587:19:6" + } + ], + "id": 3742, + "name": "ExpressionStatement", + "src": "25587:19:6" + } + ], + "id": 3743, + "name": "Block", + "src": "25577:36:6" + } + ], + "id": 3744, + "name": "FunctionDefinition", + "src": "25505:108:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_pushPoolShare", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "to", + "scope": 3757, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3745, + "name": "ElementaryTypeName", + "src": "25643:7:6" + } + ], + "id": 3746, + "name": "VariableDeclaration", + "src": "25643:10:6" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 3757, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3747, + "name": "ElementaryTypeName", + "src": "25655:4:6" + } + ], + "id": 3748, + "name": "VariableDeclaration", + "src": "25655:11:6" + } + ], + "id": 3749, + "name": "ParameterList", + "src": "25642:25:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3750, + "name": "ParameterList", + "src": "25689:0:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3962, + "type": "function (address,uint256)", + "value": "_push" + }, + "id": 3751, + "name": "Identifier", + "src": "25699:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3746, + "type": "address", + "value": "to" + }, + "id": 3752, + "name": "Identifier", + "src": "25705:2:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3748, + "type": "uint256", + "value": "amount" + }, + "id": 3753, + "name": "Identifier", + "src": "25709:6:6" + } + ], + "id": 3754, + "name": "FunctionCall", + "src": "25699:17:6" + } + ], + "id": 3755, + "name": "ExpressionStatement", + "src": "25699:17:6" + } + ], + "id": 3756, + "name": "Block", + "src": "25689:34:6" + } + ], + "id": 3757, + "name": "FunctionDefinition", + "src": "25619:104:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_mintPoolShare", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 3767, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3758, + "name": "ElementaryTypeName", + "src": "25753:4:6" + } + ], + "id": 3759, + "name": "VariableDeclaration", + "src": "25753:11:6" + } + ], + "id": 3760, + "name": "ParameterList", + "src": "25752:13:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3761, + "name": "ParameterList", + "src": "25787:0:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3850, + "type": "function (uint256)", + "value": "_mint" + }, + "id": 3762, + "name": "Identifier", + "src": "25797:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3759, + "type": "uint256", + "value": "amount" + }, + "id": 3763, + "name": "Identifier", + "src": "25803:6:6" + } + ], + "id": 3764, + "name": "FunctionCall", + "src": "25797:13:6" + } + ], + "id": 3765, + "name": "ExpressionStatement", + "src": "25797:13:6" + } + ], + "id": 3766, + "name": "Block", + "src": "25787:30:6" + } + ], + "id": 3767, + "name": "FunctionDefinition", + "src": "25729:88:6" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_burnPoolShare", + "scope": 3778, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 3777, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3768, + "name": "ElementaryTypeName", + "src": "25847:4:6" + } + ], + "id": 3769, + "name": "VariableDeclaration", + "src": "25847:11:6" + } + ], + "id": 3770, + "name": "ParameterList", + "src": "25846:13:6" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3771, + "name": "ParameterList", + "src": "25881:0:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3899, + "type": "function (uint256)", + "value": "_burn" + }, + "id": 3772, + "name": "Identifier", + "src": "25891:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3769, + "type": "uint256", + "value": "amount" + }, + "id": 3773, + "name": "Identifier", + "src": "25897:6:6" + } + ], + "id": 3774, + "name": "FunctionCall", + "src": "25891:13:6" + } + ], + "id": 3775, + "name": "ExpressionStatement", + "src": "25891:13:6" + } + ], + "id": 3776, + "name": "Block", + "src": "25881:30:6" + } + ], + "id": 3777, + "name": "FunctionDefinition", + "src": "25823:88:6" + } + ], + "id": 3778, + "name": "ContractDefinition", + "src": "854:25060:6" + } + ], + "id": 3779, + "name": "SourceUnit", + "src": "0:25915:6" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.776Z", + "devdoc": { + "details": "Used by the (Ocean version) BFactory contract as a bytecode reference to deploy new BPools. * This contract is is nearly identical to the BPool.sol contract at [1] The only difference is the \"Proxy contract functionality\" section given below. We'd inherit from BPool if we could, for simplicity. But we can't, because the proxy section needs to access private variables declared in BPool, and Solidity disallows this. Therefore the best we can do for now is clearly demarcate the proxy section. * [1] https://github.com/balancer-labs/balancer-core/contracts/.", + "methods": {}, + "title": "BPool " + }, + "userdoc": { + "methods": { + "calcInGivenOut(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcInGivenOut // // aI = tokenAmountIn // // bO = tokenBalanceOut / / bO \\ (wO / wI) \\ // // bI = tokenBalanceIn bI * | | ------------ | ^ - 1 | // // aO = tokenAmountOut aI = \\ \\ ( bO - aO ) / / // // wI = tokenWeightIn -------------------------------------------- // // wO = tokenWeightOut ( 1 - sF ) // // sF = swapFee //*********************************************************************************************" + }, + "calcOutGivenIn(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcOutGivenIn // // aO = tokenAmountOut // // bO = tokenBalanceOut // // bI = tokenBalanceIn / / bI \\ (wI / wO) \\ // // aI = tokenAmountIn aO = bO * | 1 - | -------------------------- | ^ | // // wI = tokenWeightIn \\ \\ ( bI + ( aI * ( 1 - sF )) / / // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************" + }, + "calcPoolInGivenSingleOut(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcPoolInGivenSingleOut // // pAi = poolAmountIn // / tAo \\\\ / wO \\ \\ // // bO = tokenBalanceOut // | bO - -------------------------- |\\ | ---- | \\ // // tAo = tokenAmountOut pS - || \\ 1 - ((1 - (tO / tW)) * sF)/ | ^ \\ tW / * pS | // // ps = poolSupply \\\\ -----------------------------------/ / // // wO = tokenWeightOut pAi = \\\\ bO / / // // tW = totalWeight ------------------------------------------------------------- // // sF = swapFee ( 1 - eF ) // // eF = exitFee //*********************************************************************************************" + }, + "calcPoolOutGivenSingleIn(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcPoolOutGivenSingleIn // // pAo = poolAmountOut / \\ // // tAi = tokenAmountIn /// / // wI \\ \\\\ \\ wI \\ // // wI = tokenWeightIn //| tAi *| 1 - || 1 - -- | * sF || + tBi \\ -- \\ // // tW = totalWeight pAo=|| \\ \\ \\\\ tW / // | ^ tW | * pS - pS // // tBi = tokenBalanceIn \\\\ ------------------------------------- / / // // pS = poolSupply \\\\ tBi / / // // sF = swapFee \\ / //*********************************************************************************************" + }, + "calcSingleInGivenPoolOut(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcSingleInGivenPoolOut // // tAi = tokenAmountIn //(pS + pAo)\\ / 1 \\\\ // // pS = poolSupply || --------- | ^ | --------- || * bI - bI // // pAo = poolAmountOut \\\\ pS / \\(wI / tW)// // // bI = balanceIn tAi = -------------------------------------------- // // wI = weightIn / wI \\ // // tW = totalWeight | 1 - ---- | * sF // // sF = swapFee \\ tW / //*********************************************************************************************" + }, + "calcSingleOutGivenPoolIn(uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcSingleOutGivenPoolIn // // tAo = tokenAmountOut / / \\\\ // // bO = tokenBalanceOut / // pS - (pAi * (1 - eF)) \\ / 1 \\ \\\\ // // pAi = poolAmountIn | bO - || ----------------------- | ^ | --------- | * b0 || // // ps = poolSupply \\ \\\\ pS / \\(wO / tW)/ // // // wI = tokenWeightIn tAo = \\ \\ // // // tW = totalWeight / / wO \\ \\ // // sF = swapFee * | 1 - | 1 - ---- | * sF | // // eF = exitFee \\ \\ tW / / //*********************************************************************************************" + }, + "calcSpotPrice(uint256,uint256,uint256,uint256,uint256)": { + "notice": "******************************************************************************************** // calcSpotPrice // // sP = spotPrice // // bI = tokenBalanceIn ( bI / wI ) 1 // // bO = tokenBalanceOut sP = ----------- * ---------- // // wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************" + } + } + } +} \ No newline at end of file diff --git a/artifacts/BToken.json b/artifacts/BToken.json new file mode 100644 index 000000000..f94c5416e --- /dev/null +++ b/artifacts/BToken.json @@ -0,0 +1,14550 @@ +{ + "contractName": "BToken", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "MAX_TOTAL_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BPOW_PRECISION", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BALANCE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "INIT_POOL_SUPPLY", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_OUT_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BONE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EXIT_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_IN_RATIO", + "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" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "dst", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "whom", + "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" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "amt", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "amt", + "type": "uint256" + } + ], + "name": "increaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "amt", + "type": "uint256" + } + ], + "name": "decreaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "amt", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "dst", + "type": "address" + }, + { + "name": "amt", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_TOTAL_WEIGHT\",\"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\"},{\"constant\":true,\"inputs\":[],\"name\":\"BPOW_PRECISION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"},{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"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\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"whom\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BALANCE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"INIT_POOL_SUPPLY\",\"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\":true,\"inputs\":[],\"name\":\"MAX_OUT_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BONE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EXIT_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"},{\"name\":\"dst\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_IN_RATIO\",\"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\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol\":\"BToken\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol\":{\"keccak256\":\"0x21675a0793e0be762a27e09ed3b0bd86e035c73ac3078dd841c38804445d5f5a\",\"urls\":[\"bzzr://47016ef4a80276f320b28a058fc92e7d9d93433bb5e4aa934668383cbefad77e\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol\":{\"keccak256\":\"0x84cf31d699784debbe9ec94be2086cdd2918c944473d5228c54dda10a660af8a\",\"urls\":[\"bzzr://7fcfbf954d6cdeec6709ad7543a9fa1576b788930245adc8d93030f6c72358cd\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol\":{\"keccak256\":\"0xad046b7ad912f72a90330abb3abddc3aa711077c0021d6a9d0dba2c99534e51b\",\"urls\":[\"bzzr://159aed1b631f2af168fd17235b6827859cb5d6cb7e95abeff3cc3d8079710f41\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062\"]}},\"version\":1}", + "bytecode": "0x60c0604052601360808190527f42616c616e63657220506f6f6c20546f6b656e0000000000000000000000000060a090815261003e91600391906100a3565b506040805180820190915260038082527f42505400000000000000000000000000000000000000000000000000000000006020909201918252610083916004916100a3565b506005805460ff1916601217905534801561009d57600080fd5b5061013e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100e457805160ff1916838001178555610111565b82800160010185558215610111579182015b828111156101115782518255916020019190600101906100f6565b5061011d929150610121565b5090565b61013b91905b8082111561011d5760008155600101610127565b90565b610bc88061014d6000396000f3fe608060405234801561001057600080fd5b50600436106101c6576000357c01000000000000000000000000000000000000000000000000000000009004806395d89b4111610116578063bc694ea2116100b4578063d73dd6231161008e578063d73dd623146103e4578063dd62ed3e14610410578063e4a28a5214610288578063ec0930211461043e576101c6565b8063bc694ea2146103d4578063c36596a6146102b2578063c6580d12146103dc576101c6565b8063b0e0d136116100f0578063b0e0d136146103b4578063b7b800a4146103bc578063ba019dab146103c4578063bc063e1a146103cc576101c6565b806395d89b4114610378578063992e2a9214610380578063a9059cbb14610388576101c6565b806323b872dd1161018357806370a082311161015d57806370a082311461033a57806376c7a3c714610360578063867378c5146103685780639381cd2b14610370576101c6565b806323b872dd146102ba578063313ce567146102f0578063661884631461030e576101c6565b806306fdde03146101cb578063095ea7b31461024857806309a3bbe41461028857806318160ddd146102a2578063189d00ca146102aa578063218b5382146102b2575b600080fd5b6101d3610446565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561020d5781810151838201526020016101f5565b50505050905090810190601f16801561023a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025e57600080fd5b50600160a060020a0381351690602001356104dc565b604080519115158252519081900360200190f35b610290610530565b60408051918252519081900360200190f35b61029061053d565b610290610543565b610290610557565b610274600480360360608110156102d057600080fd5b50600160a060020a03813581169160208101359091169060400135610563565b6102f86106c8565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032457600080fd5b50600160a060020a0381351690602001356106d1565b6102906004803603602081101561035057600080fd5b5035600160a060020a03166107a9565b6102906107c4565b6102906107d6565b6102906107ea565b6101d36107f7565b610290610858565b6102746004803603604081101561039e57600080fd5b50600160a060020a038135169060200135610864565b61029061087a565b61029061087f565b610290610884565b610290610889565b610290610899565b6102906108a5565b610274600480360360408110156103fa57600080fd5b50600160a060020a0381351690602001356108aa565b6102906004803603604081101561042657600080fd5b50600160a060020a038135811691602001351661092b565b610290610956565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104d25780601f106104a7576101008083540402835291602001916104d2565b820191906000526020600020905b8154815290600101906020018083116104b557829003601f168201915b5050505050905090565b336000818152600160209081526040808320600160a060020a03871680855290835281842086905581518681529151939490939092600080516020610b7d833981519152928290030190a350600192915050565b6802b5e3af16b188000081565b60025490565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600033600160a060020a038516148061059f5750600160a060020a03841660009081526001602090815260408083203384529091529020548211155b6105f3576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42544f4b454e5f4241445f43414c4c45520000000000000000000000604482015290519081900360640190fd5b6105fe848484610966565b33600160a060020a0385161480159061063c5750600160a060020a038416600090815260016020908152604080832033845290915290205460001914155b156106be57600160a060020a038416600090815260016020908152604080832033845290915290205461066f9083610a82565b600160a060020a0385811660009081526001602090815260408083203380855290835292819020859055805194855251928716939192600080516020610b7d8339815191529281900390910190a35b5060019392505050565b60055460ff1690565b336000908152600160209081526040808320600160a060020a03861684529091528120548083111561072657336000908152600160209081526040808320600160a060020a0388168452909152812055610755565b6107308184610a82565b336000908152600160209081526040808320600160a060020a03891684529091529020555b336000818152600160209081526040808320600160a060020a038916808552908352928190205481519081529051929392600080516020610b7d833981519152929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b620f4240670de0b6b3a7640000610553565b64e8d4a51000670de0b6b3a7640000610553565b68056bc75e2d6310000081565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104d25780601f106104a7576101008083540402835291602001916104d2565b6704a03ce68d21555681565b6000610871338484610966565b50600192915050565b600881565b600281565b600181565b600a670de0b6b3a7640000610553565b671bc16d674ec7ffff81565b600081565b336000908152600160209081526040808320600160a060020a03861684529091528120546108d89083610af3565b336000818152600160209081526040808320600160a060020a038916808552908352928190208590558051948552519193600080516020610b7d833981519152929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6002670de0b6b3a7640000610553565b600160a060020a0383166000908152602081905260409020548111156109d6576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152602081905260409020546109f99082610a82565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a289082610af3565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000806000610a918585610b57565b915091508015610aeb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b600082820183811015610b50576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b9392505050565b600080828410610b6d5750508082036000610b75565b505081810360015b925092905056fe8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a165627a7a723058201b923604cdea2d9e092d5ee0c7a444f90f17238a9d96539ab8019423216ee56a0029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c6576000357c01000000000000000000000000000000000000000000000000000000009004806395d89b4111610116578063bc694ea2116100b4578063d73dd6231161008e578063d73dd623146103e4578063dd62ed3e14610410578063e4a28a5214610288578063ec0930211461043e576101c6565b8063bc694ea2146103d4578063c36596a6146102b2578063c6580d12146103dc576101c6565b8063b0e0d136116100f0578063b0e0d136146103b4578063b7b800a4146103bc578063ba019dab146103c4578063bc063e1a146103cc576101c6565b806395d89b4114610378578063992e2a9214610380578063a9059cbb14610388576101c6565b806323b872dd1161018357806370a082311161015d57806370a082311461033a57806376c7a3c714610360578063867378c5146103685780639381cd2b14610370576101c6565b806323b872dd146102ba578063313ce567146102f0578063661884631461030e576101c6565b806306fdde03146101cb578063095ea7b31461024857806309a3bbe41461028857806318160ddd146102a2578063189d00ca146102aa578063218b5382146102b2575b600080fd5b6101d3610446565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561020d5781810151838201526020016101f5565b50505050905090810190601f16801561023a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025e57600080fd5b50600160a060020a0381351690602001356104dc565b604080519115158252519081900360200190f35b610290610530565b60408051918252519081900360200190f35b61029061053d565b610290610543565b610290610557565b610274600480360360608110156102d057600080fd5b50600160a060020a03813581169160208101359091169060400135610563565b6102f86106c8565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032457600080fd5b50600160a060020a0381351690602001356106d1565b6102906004803603602081101561035057600080fd5b5035600160a060020a03166107a9565b6102906107c4565b6102906107d6565b6102906107ea565b6101d36107f7565b610290610858565b6102746004803603604081101561039e57600080fd5b50600160a060020a038135169060200135610864565b61029061087a565b61029061087f565b610290610884565b610290610889565b610290610899565b6102906108a5565b610274600480360360408110156103fa57600080fd5b50600160a060020a0381351690602001356108aa565b6102906004803603604081101561042657600080fd5b50600160a060020a038135811691602001351661092b565b610290610956565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104d25780601f106104a7576101008083540402835291602001916104d2565b820191906000526020600020905b8154815290600101906020018083116104b557829003601f168201915b5050505050905090565b336000818152600160209081526040808320600160a060020a03871680855290835281842086905581518681529151939490939092600080516020610b7d833981519152928290030190a350600192915050565b6802b5e3af16b188000081565b60025490565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600033600160a060020a038516148061059f5750600160a060020a03841660009081526001602090815260408083203384529091529020548211155b6105f3576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42544f4b454e5f4241445f43414c4c45520000000000000000000000604482015290519081900360640190fd5b6105fe848484610966565b33600160a060020a0385161480159061063c5750600160a060020a038416600090815260016020908152604080832033845290915290205460001914155b156106be57600160a060020a038416600090815260016020908152604080832033845290915290205461066f9083610a82565b600160a060020a0385811660009081526001602090815260408083203380855290835292819020859055805194855251928716939192600080516020610b7d8339815191529281900390910190a35b5060019392505050565b60055460ff1690565b336000908152600160209081526040808320600160a060020a03861684529091528120548083111561072657336000908152600160209081526040808320600160a060020a0388168452909152812055610755565b6107308184610a82565b336000908152600160209081526040808320600160a060020a03891684529091529020555b336000818152600160209081526040808320600160a060020a038916808552908352928190205481519081529051929392600080516020610b7d833981519152929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b620f4240670de0b6b3a7640000610553565b64e8d4a51000670de0b6b3a7640000610553565b68056bc75e2d6310000081565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104d25780601f106104a7576101008083540402835291602001916104d2565b6704a03ce68d21555681565b6000610871338484610966565b50600192915050565b600881565b600281565b600181565b600a670de0b6b3a7640000610553565b671bc16d674ec7ffff81565b600081565b336000908152600160209081526040808320600160a060020a03861684529091528120546108d89083610af3565b336000818152600160209081526040808320600160a060020a038916808552908352928190208590558051948552519193600080516020610b7d833981519152929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6002670de0b6b3a7640000610553565b600160a060020a0383166000908152602081905260409020548111156109d6576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152602081905260409020546109f99082610a82565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a289082610af3565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000806000610a918585610b57565b915091508015610aeb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b600082820183811015610b50576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b9392505050565b600080828410610b6d5750508082036000610b75565b505081810360015b925092905056fe8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a165627a7a723058201b923604cdea2d9e092d5ee0c7a444f90f17238a9d96539ab8019423216ee56a0029", + "sourceMap": "2857:49:7:-;2812:2299;2857:49;;2812:2299;2857:49;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2912:33:7;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2951:30:7;;;-1:-1:-1;;2951:30:7;2979:2;2951:30;;;2812:2299;5:2:-1;;;;30:1;27;20:12;5:2;2812:2299:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2812:2299:7;;;-1:-1:-1;2812:2299:7;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "2812:2299:7:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2812:2299:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2988:81;;;:::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;2988:81:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3574:180;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3574:180:7;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1111:50:2;;;:::i;:::-;;;;;;;;;;;;;;;;3482:86:7;;;:::i;1403:54:2:-;;;:::i;1004:45::-;;;:::i;4544:565:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4544:565:7;;;;;;;;;;;;;;;;;:::i;3166:80::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4014:388;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4014:388:7;;;;;;;;:::i;3376:100::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3376:100:7;-1:-1:-1;;;;;3376:100:7;;:::i;840:53:2:-;;;:::i;1167:54::-;;;:::i;1228:51::-;;;:::i;3075:85:7:-;;;:::i;1519:59:2:-;;;:::i;4408:130:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4408:130:7;;;;;;;;:::i;791:42:2:-;;;:::i;743:::-;;;:::i;1286:46::-;;;:::i;899:50::-;;;:::i;1338:59::-;;;:::i;955:42::-;;;:::i;3760:248:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3760:248:7;;;;;;;;:::i;3252:118::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3252:118:7;;;;;;;;;;:::i;1464:49:2:-;;;:::i;2988:81:7:-;3057:5;3050:12;;;;;;;;-1:-1:-1;;3050:12:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3025:13;;3050:12;;3057:5;;3050:12;;3057:5;3050:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2988:81;:::o;3574:180::-;3659:10;3632:4;3648:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3648:27:7;;;;;;;;;;;:33;;;3696:30;;;;;;;3632:4;;3648:27;;3659:10;;-1:-1:-1;;;;;;;;;;;3696:30:7;;;;;;;-1:-1:-1;3743:4:7;3574:180;;;;:::o;1111:50:2:-;1152:9;1111:50;:::o;3482:86:7:-;3549:12;;3482:86;:::o;1403:54:2:-;1451:6;730;1444:13;;1403:54;:::o;1004:45::-;730:6;1004:45;:::o;4544:565:7:-;4662:4;4704:10;-1:-1:-1;;;;;4704:17:7;;;;:55;;-1:-1:-1;;;;;;4732:15:7;;;;;;:10;:15;;;;;;;;4748:10;4732:27;;;;;;;;4725:34;;;4704:55;4683:124;;;;;-1:-1:-1;;;;;4683:124:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;4817:20;4823:3;4828;4833;4817:5;:20::i;:::-;4851:10;-1:-1:-1;;;;;4851:17:7;;;;;;:63;;-1:-1:-1;;;;;;4872:15:7;;;;;;:10;:15;;;;;;;;4888:10;4872:27;;;;;;;;-1:-1:-1;;4872:42:7;;4851:63;4847:235;;;-1:-1:-1;;;;;4965:15:7;;;;;;:10;:15;;;;;;;;4981:10;4965:27;;;;;;;;4960:38;;4994:3;4960:4;:38::i;:::-;-1:-1:-1;;;;;4930:15:7;;;;;;;:10;:15;;;;;;;;4946:10;4930:27;;;;;;;;;;:68;;;5017:54;;;;;;;;;;4946:10;;-1:-1:-1;;;;;;;;;;;5017:54:7;;;;;;;;;4847:235;-1:-1:-1;5098:4:7;4544:565;;;;;:::o;3166:80::-;3230:9;;;;3166:80;:::o;4014:388::-;4124:10;4081:4;4113:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4113:27:7;;;;;;;;;;4154:14;;;4150:156;;;4195:10;4214:1;4184:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4184:27:7;;;;;;;;;:31;4150:156;;;4276:19;4281:8;4291:3;4276:4;:19::i;:::-;4257:10;4246:22;;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4246:27:7;;;;;;;;;:49;4150:156;4329:10;4346:22;;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4320:54:7;;4346:27;;;;;;;;;;;4320:54;;;;;;;;;4329:10;-1:-1:-1;;;;;;;;;;;4320:54:7;;;;;;;;;;-1:-1:-1;4391:4:7;;4014:388;-1:-1:-1;;;4014:388:7:o;3376:100::-;-1:-1:-1;;;;;3455:14:7;3432:4;3455:14;;;;;;;;;;;;3376:100::o;840:53:2:-;888:5;730:6;881:12;;1167:54;1215:6;730;1208:13;;1228:51;1269:10;1228:51;:::o;3075:85:7:-;3146:7;3139:14;;;;;;;;-1:-1:-1;;3139:14:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3114:13;;3139:14;;3146:7;;3139:14;;3146:7;3139:14;;;;;;;;;;;;;;;;;;;;;;;;1519:59:2;1560:18;1519:59;:::o;4408:130:7:-;4467:4;4483:27;4489:10;4501:3;4506;4483:5;:27::i;:::-;-1:-1:-1;4527:4:7;4408:130;;;;:::o;791:42:2:-;832:1;791:42;:::o;743:::-;784:1;743:42;:::o;1286:46::-;1327:5;1286:46;:::o;899:50::-;947:2;730:6;940:9;;1338:59;1379:18;1338:59;:::o;955:42::-;996:1;955:42;:::o;3760:248:7:-;3889:10;3827:4;3878:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3878:27:7;;;;;;;;;;3873:38;;3907:3;3873:4;:38::i;:::-;3854:10;3843:22;;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3843:27:7;;;;;;;;;;;;:68;;;3926:54;;;;;;3843:27;;-1:-1:-1;;;;;;;;;;;3926:54:7;;;;;;;;;;-1:-1:-1;3997:4:7;3760:248;;;;:::o;3252:118::-;-1:-1:-1;;;;;3343:15:7;;;3320:4;3343:15;;;:10;:15;;;;;;;;:20;;;;;;;;;;;;;3252:118::o;1464:49:2:-;1512:1;730:6;1505:8;;2340:268:7;-1:-1:-1;;;;;2418:13:7;;:8;:13;;;;;;;;;;;:20;-1:-1:-1;2418:20:7;2410:53;;;;;-1:-1:-1;;;;;2410:53:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2494:13:7;;:8;:13;;;;;;;;;;;2489:24;;2509:3;2489:4;:24::i;:::-;-1:-1:-1;;;;;2473:13:7;;;:8;:13;;;;;;;;;;;:40;;;;2544:13;;;;;;;2539:24;;2559:3;2539:4;:24::i;:::-;-1:-1:-1;;;;;2523:13:7;;;:8;:13;;;;;;;;;;;;:40;;;;2578:23;;;;;;;2523:13;;2578:23;;;;;;;;;;;;;2340:268;;;:::o;1128:195:5:-;1197:4;1218:6;1226:9;1239:14;1248:1;1251;1239:8;:14::i;:::-;1217:36;;;;1272:4;1271:5;1263:35;;;;;-1:-1:-1;;;;;1263:35:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1315:1:5;1128:195;-1:-1:-1;;;1128:195:5:o;949:173::-;1018:4;1047:5;;;1070:6;;;;1062:35;;;;;-1:-1:-1;;;;;1062:35:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1114:1;949:173;-1:-1:-1;;;949:173:5:o;1329:214::-;1402:4;1408;1437:1;1432;:6;1428:109;;-1:-1:-1;;1462:5:5;;;1469;1454:21;;1428:109;-1:-1:-1;;1514:5:5;;;1521:4;1428:109;1329:214;;;;;:::o", + "source": "// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity 0.5.7;\n\nimport './BNum.sol';\nimport 'openzeppelin-solidity/contracts/token/ERC20/IERC20.sol';\n\n// Highly opinionated token implementation\n\n// interface IERC20 {\n// event Approval(address indexed src, address indexed dst, uint amt);\n// event Transfer(address indexed src, address indexed dst, uint amt);\n\n// function totalSupply() external view returns (uint);\n// function balanceOf(address whom) external view returns (uint);\n// function allowance(address src, address dst) external view returns (uint);\n\n// function approve(address dst, uint amt) external returns (bool);\n// function transfer(address dst, uint amt) external returns (bool);\n// function transferFrom(\n// address src, address dst, uint amt\n// ) external returns (bool);\n// }\n\ncontract BTokenBase is BNum {\n\n mapping(address => uint) internal _balance;\n mapping(address => mapping(address=>uint)) internal _allowance;\n uint internal _totalSupply;\n\n event Approval(address indexed src, address indexed dst, uint amt);\n event Transfer(address indexed src, address indexed dst, uint amt);\n\n function _mint(uint amt) internal {\n _balance[address(this)] = badd(_balance[address(this)], amt);\n _totalSupply = badd(_totalSupply, amt);\n emit Transfer(address(0), address(this), amt);\n }\n\n function _burn(uint amt) internal {\n require(\n _balance[address(this)] >= amt, \n 'ERR_INSUFFICIENT_BAL'\n );\n _balance[address(this)] = bsub(_balance[address(this)], amt);\n _totalSupply = bsub(_totalSupply, amt);\n emit Transfer(address(this), address(0), amt);\n }\n\n function _move(address src, address dst, uint amt) internal {\n require(_balance[src] >= amt, 'ERR_INSUFFICIENT_BAL');\n _balance[src] = bsub(_balance[src], amt);\n _balance[dst] = badd(_balance[dst], amt);\n emit Transfer(src, dst, amt);\n }\n\n function _push(address to, uint amt) internal {\n _move(address(this), to, amt);\n }\n\n function _pull(address from, uint amt) internal {\n _move(from, address(this), amt);\n }\n}\n\ncontract BToken is BTokenBase, IERC20 {\n\n string private _name = 'Balancer Pool Token';\n string private _symbol = 'BPT';\n uint8 private _decimals = 18;\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns(uint8) {\n return _decimals;\n }\n\n function allowance(address src, address dst) external view returns (uint) {\n return _allowance[src][dst];\n }\n\n function balanceOf(address whom) external view returns (uint) {\n return _balance[whom];\n }\n\n function totalSupply() public view returns (uint) {\n return _totalSupply;\n }\n\n function approve(address dst, uint amt) external returns (bool) {\n _allowance[msg.sender][dst] = amt;\n emit Approval(msg.sender, dst, amt);\n return true;\n }\n\n function increaseApproval(address dst, uint amt) external returns (bool) {\n _allowance[msg.sender][dst] = badd(_allowance[msg.sender][dst], amt);\n emit Approval(msg.sender, dst, _allowance[msg.sender][dst]);\n return true;\n }\n\n function decreaseApproval(address dst, uint amt) external returns (bool) {\n uint oldValue = _allowance[msg.sender][dst];\n if (amt > oldValue) {\n _allowance[msg.sender][dst] = 0;\n } else {\n _allowance[msg.sender][dst] = bsub(oldValue, amt);\n }\n emit Approval(msg.sender, dst, _allowance[msg.sender][dst]);\n return true;\n }\n\n function transfer(address dst, uint amt) external returns (bool) {\n _move(msg.sender, dst, amt);\n return true;\n }\n\n function transferFrom(\n address src, \n address dst, \n uint amt\n ) \n external \n returns (bool) \n {\n require(\n msg.sender == src || amt <= _allowance[src][msg.sender], \n 'ERR_BTOKEN_BAD_CALLER'\n );\n _move(src, dst, amt);\n if (msg.sender != src && _allowance[src][msg.sender] != uint256(-1)) {\n _allowance[src][msg.sender] = bsub(_allowance[src][msg.sender], amt);\n emit Approval(msg.sender, dst, _allowance[src][msg.sender]);\n }\n return true;\n }\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol", + "exportedSymbols": { + "BToken": [ + 4285 + ], + "BTokenBase": [ + 3979 + ] + }, + "id": 4286, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3780, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "643:22:7" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol", + "file": "./BNum.sol", + "id": 3781, + "nodeType": "ImportDirective", + "scope": 4286, + "sourceUnit": 1423, + "src": "667:20:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 3782, + "nodeType": "ImportDirective", + "scope": 4286, + "sourceUnit": 7107, + "src": "688:64:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3783, + "name": "BNum", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1422, + "src": "1468:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BNum_$1422", + "typeString": "contract BNum" + } + }, + "id": 3784, + "nodeType": "InheritanceSpecifier", + "src": "1468:4:7" + } + ], + "contractDependencies": [ + 280, + 1422 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3979, + "linearizedBaseContracts": [ + 3979, + 1422, + 280 + ], + "name": "BTokenBase", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3788, + "name": "_balance", + "nodeType": "VariableDeclaration", + "scope": 3979, + "src": "1480:60:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 3787, + "keyType": { + "id": 3785, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1488:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1480:24:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 3786, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1499:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3794, + "name": "_allowance", + "nodeType": "VariableDeclaration", + "scope": 3979, + "src": "1546:62:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 3793, + "keyType": { + "id": 3789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1554:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1546:42:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 3792, + "keyType": { + "id": 3790, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1573:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1565:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 3791, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1582:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3796, + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "scope": 3979, + "src": "1614:26:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3795, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1614:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "anonymous": false, + "documentation": null, + "id": 3804, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 3803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3798, + "indexed": true, + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 3804, + "src": "1662:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1662:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3800, + "indexed": true, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 3804, + "src": "1683:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3799, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1683:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3802, + "indexed": false, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3804, + "src": "1704:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3801, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1704:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1661:52:7" + }, + "src": "1647:67:7" + }, + { + "anonymous": false, + "documentation": null, + "id": 3812, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 3811, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3806, + "indexed": true, + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 3812, + "src": "1734:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3805, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1734:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3808, + "indexed": true, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 3812, + "src": "1755:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3807, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1755:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3810, + "indexed": false, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3812, + "src": "1776:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3809, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1776:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1733:52:7" + }, + "src": "1719:67:7" + }, + { + "body": { + "id": 3849, + "nodeType": "Block", + "src": "1826:180:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3817, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "1836:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3821, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3819, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "1853:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1845:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1845:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1836:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3823, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "1867:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3827, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3825, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "1884:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1876:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1876:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1867:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3828, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3814, + "src": "1892:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3822, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "1862:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1862:34:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1836:60:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3831, + "nodeType": "ExpressionStatement", + "src": "1836:60:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3832, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "1906:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3834, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "1926:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3835, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3814, + "src": "1940:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3833, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "1921:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1921:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1906:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3838, + "nodeType": "ExpressionStatement", + "src": "1906:38:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 3841, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1976:1:7", + "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": 3840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1968:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1968:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3844, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "1988:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1980:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1980:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3846, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3814, + "src": "1995:3:7", + "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": 3839, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3812, + "src": "1959:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1959:40:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3848, + "nodeType": "EmitStatement", + "src": "1954:45:7" + } + ] + }, + "documentation": null, + "id": 3850, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3815, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3814, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3850, + "src": "1807:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3813, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1807:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1806:10:7" + }, + "returnParameters": { + "id": 3816, + "nodeType": "ParameterList", + "parameters": [], + "src": "1826:0:7" + }, + "scope": 3979, + "src": "1792:214:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3898, + "nodeType": "Block", + "src": "2046:288:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3856, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2077:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3860, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3858, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2094:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3857, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2086:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2086:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2077:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3861, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3852, + "src": "2104:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2077:30:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e53554646494349454e545f42414c", + "id": 3863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2122:22:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + }, + "value": "ERR_INSUFFICIENT_BAL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + } + ], + "id": 3855, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2056:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2056:98:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3865, + "nodeType": "ExpressionStatement", + "src": "2056:98:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3866, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2164:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3870, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3868, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2181:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3867, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2173:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2173:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2164:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3872, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2195:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3876, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3874, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2212:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2204:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2204:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2195:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3877, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3852, + "src": "2220:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3871, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "2190:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2190:34:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2164:60:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3880, + "nodeType": "ExpressionStatement", + "src": "2164:60:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3881, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "2234:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3883, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "2254:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3884, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3852, + "src": "2268:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3882, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "2249:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2249:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2234:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3887, + "nodeType": "ExpressionStatement", + "src": "2234:38:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3890, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2304:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2296:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2296:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 3893, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2319:1:7", + "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": 3892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2311:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3894, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2311:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3895, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3852, + "src": "2323:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3888, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3812, + "src": "2287:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2287:40:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3897, + "nodeType": "EmitStatement", + "src": "2282:45:7" + } + ] + }, + "documentation": null, + "id": 3899, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3852, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3899, + "src": "2027:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3851, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2027:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2026:10:7" + }, + "returnParameters": { + "id": 3854, + "nodeType": "ParameterList", + "parameters": [], + "src": "2046:0:7" + }, + "scope": 3979, + "src": "2012:322:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3945, + "nodeType": "Block", + "src": "2400:208:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3909, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2418:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3911, + "indexExpression": { + "argumentTypes": null, + "id": 3910, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3901, + "src": "2427:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2418:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3912, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3905, + "src": "2435:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2418:20:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e53554646494349454e545f42414c", + "id": 3914, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2440:22:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + }, + "value": "ERR_INSUFFICIENT_BAL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + } + ], + "id": 3908, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2410:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2410:53:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3916, + "nodeType": "ExpressionStatement", + "src": "2410:53:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3917, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2473:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3919, + "indexExpression": { + "argumentTypes": null, + "id": 3918, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3901, + "src": "2482:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2473:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3921, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2494:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3923, + "indexExpression": { + "argumentTypes": null, + "id": 3922, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3901, + "src": "2503:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2494:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3924, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3905, + "src": "2509:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3920, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "2489:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2489:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2473:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3927, + "nodeType": "ExpressionStatement", + "src": "2473:40:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3928, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2523:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3930, + "indexExpression": { + "argumentTypes": null, + "id": 3929, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3903, + "src": "2532:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2523:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3932, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2544:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3934, + "indexExpression": { + "argumentTypes": null, + "id": 3933, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3903, + "src": "2553:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2544:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3935, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3905, + "src": "2559:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3931, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "2539:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2539:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2523:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3938, + "nodeType": "ExpressionStatement", + "src": "2523:40:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3940, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3901, + "src": "2587:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3941, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3903, + "src": "2592:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3942, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3905, + "src": "2597:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3939, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3812, + "src": "2578:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2578:23:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3944, + "nodeType": "EmitStatement", + "src": "2573:28:7" + } + ] + }, + "documentation": null, + "id": 3946, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_move", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3901, + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 3946, + "src": "2355:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3900, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2355:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3903, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 3946, + "src": "2368:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3902, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2368:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3905, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3946, + "src": "2381:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3904, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2381:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2354:36:7" + }, + "returnParameters": { + "id": 3907, + "nodeType": "ParameterList", + "parameters": [], + "src": "2400:0:7" + }, + "scope": 3979, + "src": "2340:268:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3961, + "nodeType": "Block", + "src": "2660:46:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3955, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2684:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2676:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2676:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3957, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3948, + "src": "2691:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3958, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3950, + "src": "2695:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3953, + "name": "_move", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3946, + "src": "2670:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2670:29:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3960, + "nodeType": "ExpressionStatement", + "src": "2670:29:7" + } + ] + }, + "documentation": null, + "id": 3962, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_push", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3951, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3948, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3962, + "src": "2629:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3947, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3950, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3962, + "src": "2641:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3949, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2641:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:22:7" + }, + "returnParameters": { + "id": 3952, + "nodeType": "ParameterList", + "parameters": [], + "src": "2660:0:7" + }, + "scope": 3979, + "src": "2614:92:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3977, + "nodeType": "Block", + "src": "2760:48:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3970, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3964, + "src": "2776:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3972, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2790:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2782:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2782:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3974, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3966, + "src": "2797:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3969, + "name": "_move", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3946, + "src": "2770:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2770:31:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3976, + "nodeType": "ExpressionStatement", + "src": "2770:31:7" + } + ] + }, + "documentation": null, + "id": 3978, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_pull", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3964, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "2727:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3963, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2727:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3966, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "2741:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3965, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2741:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2726:24:7" + }, + "returnParameters": { + "id": 3968, + "nodeType": "ParameterList", + "parameters": [], + "src": "2760:0:7" + }, + "scope": 3979, + "src": "2712:96:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 4286, + "src": "1445:1365:7" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3980, + "name": "BTokenBase", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3979, + "src": "2831:10:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + }, + "id": 3981, + "nodeType": "InheritanceSpecifier", + "src": "2831:10:7" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3982, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7106, + "src": "2843:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$7106", + "typeString": "contract IERC20" + } + }, + "id": 3983, + "nodeType": "InheritanceSpecifier", + "src": "2843:6:7" + } + ], + "contractDependencies": [ + 280, + 1422, + 3979, + 7106 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4285, + "linearizedBaseContracts": [ + 4285, + 7106, + 3979, + 1422, + 280 + ], + "name": "BToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3986, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 4285, + "src": "2857:49:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 3984, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2857:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616c616e63657220506f6f6c20546f6b656e", + "id": 3985, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2885:21:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86726d210cafef5a97cd8551cc3cd59ead4ad6b4a08f1b0e2ca14d5024839298", + "typeString": "literal_string \"Balancer Pool Token\"" + }, + "value": "Balancer Pool Token" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 3989, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 4285, + "src": "2912:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 3987, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2912:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "425054", + "id": 3988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2940:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2c4469c3871c2223d094ce996c22463935f1f3c0f4a0177add993c1ee46e9606", + "typeString": "literal_string \"BPT\"" + }, + "value": "BPT" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 3992, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 4285, + "src": "2951:30:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3990, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2951:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 3991, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2979:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "private" + }, + { + "body": { + "id": 3999, + "nodeType": "Block", + "src": "3040:29:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3997, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3986, + "src": "3057:5:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 3996, + "id": 3998, + "nodeType": "Return", + "src": "3050:12:7" + } + ] + }, + "documentation": null, + "id": 4000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3993, + "nodeType": "ParameterList", + "parameters": [], + "src": "3001:2:7" + }, + "returnParameters": { + "id": 3996, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3995, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4000, + "src": "3025:13:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3994, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3025:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3024:15:7" + }, + "scope": 4285, + "src": "2988:81:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4007, + "nodeType": "Block", + "src": "3129:31:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4005, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3989, + "src": "3146:7:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 4004, + "id": 4006, + "nodeType": "Return", + "src": "3139:14:7" + } + ] + }, + "documentation": null, + "id": 4008, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4001, + "nodeType": "ParameterList", + "parameters": [], + "src": "3090:2:7" + }, + "returnParameters": { + "id": 4004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4003, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4008, + "src": "3114:13:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4002, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3114:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3113:15:7" + }, + "scope": 4285, + "src": "3075:85:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4015, + "nodeType": "Block", + "src": "3213:33:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4013, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3992, + "src": "3230:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 4012, + "id": 4014, + "nodeType": "Return", + "src": "3223:16:7" + } + ] + }, + "documentation": null, + "id": 4016, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4009, + "nodeType": "ParameterList", + "parameters": [], + "src": "3183:2:7" + }, + "returnParameters": { + "id": 4012, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4011, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4016, + "src": "3206:5:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4010, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3206:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3205:7:7" + }, + "scope": 4285, + "src": "3166:80:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4031, + "nodeType": "Block", + "src": "3326:44:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4025, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "3343:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4027, + "indexExpression": { + "argumentTypes": null, + "id": 4026, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4018, + "src": "3354:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3343:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4029, + "indexExpression": { + "argumentTypes": null, + "id": 4028, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4020, + "src": "3359:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3343:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4024, + "id": 4030, + "nodeType": "Return", + "src": "3336:27:7" + } + ] + }, + "documentation": null, + "id": 4032, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4018, + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 4032, + "src": "3271:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4017, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3271:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4020, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4032, + "src": "3284:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4019, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3284:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3270:26:7" + }, + "returnParameters": { + "id": 4024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4023, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4032, + "src": "3320:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4022, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3320:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3319:6:7" + }, + "scope": 4285, + "src": "3252:118:7", + "stateMutability": "view", + "superFunction": 7069, + "visibility": "external" + }, + { + "body": { + "id": 4043, + "nodeType": "Block", + "src": "3438:38:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4039, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "3455:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4041, + "indexExpression": { + "argumentTypes": null, + "id": 4040, + "name": "whom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4034, + "src": "3464:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3455:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4038, + "id": 4042, + "nodeType": "Return", + "src": "3448:21:7" + } + ] + }, + "documentation": null, + "id": 4044, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4034, + "name": "whom", + "nodeType": "VariableDeclaration", + "scope": 4044, + "src": "3395:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4033, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3395:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3394:14:7" + }, + "returnParameters": { + "id": 4038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4037, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4044, + "src": "3432:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4036, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3431:6:7" + }, + "scope": 4285, + "src": "3376:100:7", + "stateMutability": "view", + "superFunction": 7051, + "visibility": "external" + }, + { + "body": { + "id": 4051, + "nodeType": "Block", + "src": "3532:36:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4049, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "3549:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4048, + "id": 4050, + "nodeType": "Return", + "src": "3542:19:7" + } + ] + }, + "documentation": null, + "id": 4052, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4045, + "nodeType": "ParameterList", + "parameters": [], + "src": "3502:2:7" + }, + "returnParameters": { + "id": 4048, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4047, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4052, + "src": "3526:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4046, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3526:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3525:6:7" + }, + "scope": 4285, + "src": "3482:86:7", + "stateMutability": "view", + "superFunction": 7044, + "visibility": "public" + }, + { + "body": { + "id": 4079, + "nodeType": "Block", + "src": "3638:116:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4061, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "3648:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4065, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4062, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3659:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3659:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3648:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4066, + "indexExpression": { + "argumentTypes": null, + "id": 4064, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4054, + "src": "3671:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3648:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4067, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4056, + "src": "3678:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3648:33:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4069, + "nodeType": "ExpressionStatement", + "src": "3648:33:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4071, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3705:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3705:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4073, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4054, + "src": "3717:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4074, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4056, + "src": "3722:3:7", + "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": 4070, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "src": "3696:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3696:30:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4076, + "nodeType": "EmitStatement", + "src": "3691:35:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3743:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4060, + "id": 4078, + "nodeType": "Return", + "src": "3736:11:7" + } + ] + }, + "documentation": null, + "id": 4080, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4057, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4054, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4080, + "src": "3591:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4053, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3591:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4056, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 4080, + "src": "3604:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4055, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3604:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3590:23:7" + }, + "returnParameters": { + "id": 4060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4080, + "src": "3632:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4058, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3632:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3631:6:7" + }, + "scope": 4285, + "src": "3574:180:7", + "stateMutability": "nonpayable", + "superFunction": 7078, + "visibility": "external" + }, + { + "body": { + "id": 4120, + "nodeType": "Block", + "src": "3833:175:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4089, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "3843:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4093, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4090, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3854:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3854:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3843:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4094, + "indexExpression": { + "argumentTypes": null, + "id": 4092, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4082, + "src": "3866:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3843:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4096, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "3878:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4099, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4097, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3889:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3889:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3878:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4101, + "indexExpression": { + "argumentTypes": null, + "id": 4100, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4082, + "src": "3901:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3878:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4102, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4084, + "src": "3907:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4095, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "3873:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3873:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3843:68:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4105, + "nodeType": "ExpressionStatement", + "src": "3843:68:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4107, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3935:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3935:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4109, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4082, + "src": "3947:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4110, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "3952:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4113, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4111, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3963:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3963:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3952:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4115, + "indexExpression": { + "argumentTypes": null, + "id": 4114, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4082, + "src": "3975:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3952:27:7", + "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": 4106, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "src": "3926:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3926:54:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4117, + "nodeType": "EmitStatement", + "src": "3921:59:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3997:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4088, + "id": 4119, + "nodeType": "Return", + "src": "3990:11:7" + } + ] + }, + "documentation": null, + "id": 4121, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "increaseApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4085, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4082, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4121, + "src": "3786:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4081, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3786:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4084, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 4121, + "src": "3799:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4083, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3799:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3785:23:7" + }, + "returnParameters": { + "id": 4088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4087, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4121, + "src": "3827:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4086, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3827:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3826:6:7" + }, + "scope": 4285, + "src": "3760:248:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4180, + "nodeType": "Block", + "src": "4087:315:7", + "statements": [ + { + "assignments": [ + 4131 + ], + "declarations": [ + { + "constant": false, + "id": 4131, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 4180, + "src": "4097:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4130, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4097:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4138, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4132, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4113:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4135, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4133, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4124:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4124:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4113:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4137, + "indexExpression": { + "argumentTypes": null, + "id": 4136, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4123, + "src": "4136:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4113:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4097:43:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4139, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4125, + "src": "4154:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 4140, + "name": "oldValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4131, + "src": "4160:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4154:14:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4164, + "nodeType": "Block", + "src": "4232:74:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4152, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4246:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4156, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4153, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4257:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4257:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4246:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4157, + "indexExpression": { + "argumentTypes": null, + "id": 4155, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4123, + "src": "4269:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4246:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4159, + "name": "oldValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4131, + "src": "4281:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4160, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4125, + "src": "4291:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4158, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "4276:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4276:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4246:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4163, + "nodeType": "ExpressionStatement", + "src": "4246:49:7" + } + ] + }, + "id": 4165, + "nodeType": "IfStatement", + "src": "4150:156:7", + "trueBody": { + "id": 4151, + "nodeType": "Block", + "src": "4170:56:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4142, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4184:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4146, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4143, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4195:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4195:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4184:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4147, + "indexExpression": { + "argumentTypes": null, + "id": 4145, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4123, + "src": "4207:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4184:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 4148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4214:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4184:31:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4150, + "nodeType": "ExpressionStatement", + "src": "4184:31:7" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4167, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4329:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4329:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4169, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4123, + "src": "4341:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4170, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4346:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4173, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4171, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4357:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4357:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4346:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4175, + "indexExpression": { + "argumentTypes": null, + "id": 4174, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4123, + "src": "4369:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4346:27:7", + "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": 4166, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "src": "4320:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4320:54:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4177, + "nodeType": "EmitStatement", + "src": "4315:59:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4391:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4129, + "id": 4179, + "nodeType": "Return", + "src": "4384:11:7" + } + ] + }, + "documentation": null, + "id": 4181, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decreaseApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4126, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4123, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4181, + "src": "4040:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4040:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4125, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 4181, + "src": "4053:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4124, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4053:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4039:23:7" + }, + "returnParameters": { + "id": 4129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4128, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4181, + "src": "4081:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4127, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4081:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4080:6:7" + }, + "scope": 4285, + "src": "4014:388:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4199, + "nodeType": "Block", + "src": "4473:65:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4191, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4489:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4489:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4193, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4183, + "src": "4501:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4194, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4185, + "src": "4506:3:7", + "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": 4190, + "name": "_move", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3946, + "src": "4483:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4483:27:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4196, + "nodeType": "ExpressionStatement", + "src": "4483:27:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4527:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4189, + "id": 4198, + "nodeType": "Return", + "src": "4520:11:7" + } + ] + }, + "documentation": null, + "id": 4200, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4186, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4183, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4200, + "src": "4426:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4182, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4426:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4185, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 4200, + "src": "4439:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4184, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4439:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4425:23:7" + }, + "returnParameters": { + "id": 4189, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4188, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4200, + "src": "4467:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4187, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4467:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4466:6:7" + }, + "scope": 4285, + "src": "4408:130:7", + "stateMutability": "nonpayable", + "superFunction": 7060, + "visibility": "external" + }, + { + "body": { + "id": 4283, + "nodeType": "Block", + "src": "4673:436:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4212, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4704:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4704:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 4214, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4718:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4704:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4216, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "4725:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4217, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4732:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4219, + "indexExpression": { + "argumentTypes": null, + "id": 4218, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4743:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4732:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4222, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4220, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4748:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4748:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4732:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4725:34:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4704:55:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f42544f4b454e5f4241445f43414c4c4552", + "id": 4225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4774:23:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7c78c5c07128d4fb2c83ecfae573652cc351a44f64cf0f454240bdf4749e318c", + "typeString": "literal_string \"ERR_BTOKEN_BAD_CALLER\"" + }, + "value": "ERR_BTOKEN_BAD_CALLER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7c78c5c07128d4fb2c83ecfae573652cc351a44f64cf0f454240bdf4749e318c", + "typeString": "literal_string \"ERR_BTOKEN_BAD_CALLER\"" + } + ], + "id": 4211, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "4683:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:124:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4227, + "nodeType": "ExpressionStatement", + "src": "4683:124:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4229, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4823:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4230, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4204, + "src": "4828:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4231, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "4833:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4228, + "name": "_move", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3946, + "src": "4817:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4817:20:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4233, + "nodeType": "ExpressionStatement", + "src": "4817:20:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4234, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4851:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4851:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 4236, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4865:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4851:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4238, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4872:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4240, + "indexExpression": { + "argumentTypes": null, + "id": 4239, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4883:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4872:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4243, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4241, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4888:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4888:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4872:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "4911:2:7", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 4245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4912:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 4244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4903:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 4247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4903:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4872:42:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4851:63:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 4280, + "nodeType": "IfStatement", + "src": "4847:235:7", + "trueBody": { + "id": 4279, + "nodeType": "Block", + "src": "4916:166:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4250, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4930:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4254, + "indexExpression": { + "argumentTypes": null, + "id": 4251, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4941:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4930:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4255, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4252, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4946:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4946:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4930:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4257, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4965:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4259, + "indexExpression": { + "argumentTypes": null, + "id": 4258, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4976:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4965:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4262, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4260, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4981:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4981:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4965:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4263, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "4994:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4256, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "4960:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4960:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4930:68:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4266, + "nodeType": "ExpressionStatement", + "src": "4930:68:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4268, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "5026:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5026:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4270, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4204, + "src": "5038:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4271, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "5043:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4273, + "indexExpression": { + "argumentTypes": null, + "id": 4272, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "5054:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5043:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4276, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4274, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "5059:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5059:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5043:27:7", + "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": 4267, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "src": "5017:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:54:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4278, + "nodeType": "EmitStatement", + "src": "5012:59:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4281, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5098:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4210, + "id": 4282, + "nodeType": "Return", + "src": "5091:11:7" + } + ] + }, + "documentation": null, + "id": 4284, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4202, + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 4284, + "src": "4575:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4201, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4575:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4204, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4284, + "src": "4597:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4203, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4597:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4206, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 4284, + "src": "4619:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4205, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4619:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4565:68:7" + }, + "returnParameters": { + "id": 4210, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4209, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4284, + "src": "4662:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4208, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4662:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4661:6:7" + }, + "scope": 4285, + "src": "4544:565:7", + "stateMutability": "nonpayable", + "superFunction": 7089, + "visibility": "external" + } + ], + "scope": 4286, + "src": "2812:2299:7" + } + ], + "src": "643:4469:7" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol", + "exportedSymbols": { + "BToken": [ + 4285 + ], + "BTokenBase": [ + 3979 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 3780, + "name": "PragmaDirective", + "src": "643:22:7" + }, + { + "attributes": { + "SourceUnit": 1423, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol", + "file": "./BNum.sol", + "scope": 4286, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 3781, + "name": "ImportDirective", + "src": "667:20:7" + }, + { + "attributes": { + "SourceUnit": 7107, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "scope": 4286, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 3782, + "name": "ImportDirective", + "src": "688:64:7" + }, + { + "attributes": { + "contractDependencies": [ + 280, + 1422 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 3979, + 1422, + 280 + ], + "name": "BTokenBase", + "scope": 4286 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BNum", + "referencedDeclaration": 1422, + "type": "contract BNum" + }, + "id": 3783, + "name": "UserDefinedTypeName", + "src": "1468:4:7" + } + ], + "id": 3784, + "name": "InheritanceSpecifier", + "src": "1468:4:7" + }, + { + "attributes": { + "constant": false, + "name": "_balance", + "scope": 3979, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => uint256)", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 3785, + "name": "ElementaryTypeName", + "src": "1488:7:7" + }, + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3786, + "name": "ElementaryTypeName", + "src": "1499:4:7" + } + ], + "id": 3787, + "name": "Mapping", + "src": "1480:24:7" + } + ], + "id": 3788, + "name": "VariableDeclaration", + "src": "1480:60:7" + }, + { + "attributes": { + "constant": false, + "name": "_allowance", + "scope": 3979, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => mapping(address => uint256))", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => mapping(address => uint256))" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 3789, + "name": "ElementaryTypeName", + "src": "1554:7:7" + }, + { + "attributes": { + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 3790, + "name": "ElementaryTypeName", + "src": "1573:7:7" + }, + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3791, + "name": "ElementaryTypeName", + "src": "1582:4:7" + } + ], + "id": 3792, + "name": "Mapping", + "src": "1565:22:7" + } + ], + "id": 3793, + "name": "Mapping", + "src": "1546:42:7" + } + ], + "id": 3794, + "name": "VariableDeclaration", + "src": "1546:62:7" + }, + { + "attributes": { + "constant": false, + "name": "_totalSupply", + "scope": 3979, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3795, + "name": "ElementaryTypeName", + "src": "1614:4:7" + } + ], + "id": 3796, + "name": "VariableDeclaration", + "src": "1614:26:7" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "Approval" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "src", + "scope": 3804, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3797, + "name": "ElementaryTypeName", + "src": "1662:7:7" + } + ], + "id": 3798, + "name": "VariableDeclaration", + "src": "1662:19:7" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "dst", + "scope": 3804, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3799, + "name": "ElementaryTypeName", + "src": "1683:7:7" + } + ], + "id": 3800, + "name": "VariableDeclaration", + "src": "1683:19:7" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "amt", + "scope": 3804, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3801, + "name": "ElementaryTypeName", + "src": "1704:4:7" + } + ], + "id": 3802, + "name": "VariableDeclaration", + "src": "1704:8:7" + } + ], + "id": 3803, + "name": "ParameterList", + "src": "1661:52:7" + } + ], + "id": 3804, + "name": "EventDefinition", + "src": "1647:67:7" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "Transfer" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "src", + "scope": 3812, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3805, + "name": "ElementaryTypeName", + "src": "1734:7:7" + } + ], + "id": 3806, + "name": "VariableDeclaration", + "src": "1734:19:7" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "dst", + "scope": 3812, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3807, + "name": "ElementaryTypeName", + "src": "1755:7:7" + } + ], + "id": 3808, + "name": "VariableDeclaration", + "src": "1755:19:7" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "amt", + "scope": 3812, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3809, + "name": "ElementaryTypeName", + "src": "1776:4:7" + } + ], + "id": 3810, + "name": "VariableDeclaration", + "src": "1776:8:7" + } + ], + "id": 3811, + "name": "ParameterList", + "src": "1733:52:7" + } + ], + "id": 3812, + "name": "EventDefinition", + "src": "1719:67:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_mint", + "scope": 3979, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 3850, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3813, + "name": "ElementaryTypeName", + "src": "1807:4:7" + } + ], + "id": 3814, + "name": "VariableDeclaration", + "src": "1807:8:7" + } + ], + "id": 3815, + "name": "ParameterList", + "src": "1806:10:7" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3816, + "name": "ParameterList", + "src": "1826:0:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3817, + "name": "Identifier", + "src": "1836:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3818, + "name": "ElementaryTypeNameExpression", + "src": "1845:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3819, + "name": "Identifier", + "src": "1853:4:7" + } + ], + "id": 3820, + "name": "FunctionCall", + "src": "1845:13:7" + } + ], + "id": 3821, + "name": "IndexAccess", + "src": "1836:23:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 3822, + "name": "Identifier", + "src": "1862:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3823, + "name": "Identifier", + "src": "1867:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3824, + "name": "ElementaryTypeNameExpression", + "src": "1876:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3825, + "name": "Identifier", + "src": "1884:4:7" + } + ], + "id": 3826, + "name": "FunctionCall", + "src": "1876:13:7" + } + ], + "id": 3827, + "name": "IndexAccess", + "src": "1867:23:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3814, + "type": "uint256", + "value": "amt" + }, + "id": 3828, + "name": "Identifier", + "src": "1892:3:7" + } + ], + "id": 3829, + "name": "FunctionCall", + "src": "1862:34:7" + } + ], + "id": 3830, + "name": "Assignment", + "src": "1836:60:7" + } + ], + "id": 3831, + "name": "ExpressionStatement", + "src": "1836:60:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3832, + "name": "Identifier", + "src": "1906:12:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 3833, + "name": "Identifier", + "src": "1921:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3834, + "name": "Identifier", + "src": "1926:12:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3814, + "type": "uint256", + "value": "amt" + }, + "id": 3835, + "name": "Identifier", + "src": "1940:3:7" + } + ], + "id": 3836, + "name": "FunctionCall", + "src": "1921:23:7" + } + ], + "id": 3837, + "name": "Assignment", + "src": "1906:38:7" + } + ], + "id": 3838, + "name": "ExpressionStatement", + "src": "1906:38:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3812, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 3839, + "name": "Identifier", + "src": "1959:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3840, + "name": "ElementaryTypeNameExpression", + "src": "1968:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 3841, + "name": "Literal", + "src": "1976:1:7" + } + ], + "id": 3842, + "name": "FunctionCall", + "src": "1968:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3843, + "name": "ElementaryTypeNameExpression", + "src": "1980:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3844, + "name": "Identifier", + "src": "1988:4:7" + } + ], + "id": 3845, + "name": "FunctionCall", + "src": "1980:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3814, + "type": "uint256", + "value": "amt" + }, + "id": 3846, + "name": "Identifier", + "src": "1995:3:7" + } + ], + "id": 3847, + "name": "FunctionCall", + "src": "1959:40:7" + } + ], + "id": 3848, + "name": "EmitStatement", + "src": "1954:45:7" + } + ], + "id": 3849, + "name": "Block", + "src": "1826:180:7" + } + ], + "id": 3850, + "name": "FunctionDefinition", + "src": "1792:214:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_burn", + "scope": 3979, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 3899, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3851, + "name": "ElementaryTypeName", + "src": "2027:4:7" + } + ], + "id": 3852, + "name": "VariableDeclaration", + "src": "2027:8:7" + } + ], + "id": 3853, + "name": "ParameterList", + "src": "2026:10:7" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3854, + "name": "ParameterList", + "src": "2046:0:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3855, + "name": "Identifier", + "src": "2056:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3856, + "name": "Identifier", + "src": "2077:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3857, + "name": "ElementaryTypeNameExpression", + "src": "2086:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3858, + "name": "Identifier", + "src": "2094:4:7" + } + ], + "id": 3859, + "name": "FunctionCall", + "src": "2086:13:7" + } + ], + "id": 3860, + "name": "IndexAccess", + "src": "2077:23:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3852, + "type": "uint256", + "value": "amt" + }, + "id": 3861, + "name": "Identifier", + "src": "2104:3:7" + } + ], + "id": 3862, + "name": "BinaryOperation", + "src": "2077:30:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f494e53554646494349454e545f42414c", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_INSUFFICIENT_BAL\"", + "value": "ERR_INSUFFICIENT_BAL" + }, + "id": 3863, + "name": "Literal", + "src": "2122:22:7" + } + ], + "id": 3864, + "name": "FunctionCall", + "src": "2056:98:7" + } + ], + "id": 3865, + "name": "ExpressionStatement", + "src": "2056:98:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3866, + "name": "Identifier", + "src": "2164:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3867, + "name": "ElementaryTypeNameExpression", + "src": "2173:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3868, + "name": "Identifier", + "src": "2181:4:7" + } + ], + "id": 3869, + "name": "FunctionCall", + "src": "2173:13:7" + } + ], + "id": 3870, + "name": "IndexAccess", + "src": "2164:23:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 3871, + "name": "Identifier", + "src": "2190:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3872, + "name": "Identifier", + "src": "2195:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3873, + "name": "ElementaryTypeNameExpression", + "src": "2204:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3874, + "name": "Identifier", + "src": "2212:4:7" + } + ], + "id": 3875, + "name": "FunctionCall", + "src": "2204:13:7" + } + ], + "id": 3876, + "name": "IndexAccess", + "src": "2195:23:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3852, + "type": "uint256", + "value": "amt" + }, + "id": 3877, + "name": "Identifier", + "src": "2220:3:7" + } + ], + "id": 3878, + "name": "FunctionCall", + "src": "2190:34:7" + } + ], + "id": 3879, + "name": "Assignment", + "src": "2164:60:7" + } + ], + "id": 3880, + "name": "ExpressionStatement", + "src": "2164:60:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3881, + "name": "Identifier", + "src": "2234:12:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 3882, + "name": "Identifier", + "src": "2249:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3883, + "name": "Identifier", + "src": "2254:12:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3852, + "type": "uint256", + "value": "amt" + }, + "id": 3884, + "name": "Identifier", + "src": "2268:3:7" + } + ], + "id": 3885, + "name": "FunctionCall", + "src": "2249:23:7" + } + ], + "id": 3886, + "name": "Assignment", + "src": "2234:38:7" + } + ], + "id": 3887, + "name": "ExpressionStatement", + "src": "2234:38:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3812, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 3888, + "name": "Identifier", + "src": "2287:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3889, + "name": "ElementaryTypeNameExpression", + "src": "2296:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3890, + "name": "Identifier", + "src": "2304:4:7" + } + ], + "id": 3891, + "name": "FunctionCall", + "src": "2296:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3892, + "name": "ElementaryTypeNameExpression", + "src": "2311:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 3893, + "name": "Literal", + "src": "2319:1:7" + } + ], + "id": 3894, + "name": "FunctionCall", + "src": "2311:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3852, + "type": "uint256", + "value": "amt" + }, + "id": 3895, + "name": "Identifier", + "src": "2323:3:7" + } + ], + "id": 3896, + "name": "FunctionCall", + "src": "2287:40:7" + } + ], + "id": 3897, + "name": "EmitStatement", + "src": "2282:45:7" + } + ], + "id": 3898, + "name": "Block", + "src": "2046:288:7" + } + ], + "id": 3899, + "name": "FunctionDefinition", + "src": "2012:322:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_move", + "scope": 3979, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "src", + "scope": 3946, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3900, + "name": "ElementaryTypeName", + "src": "2355:7:7" + } + ], + "id": 3901, + "name": "VariableDeclaration", + "src": "2355:11:7" + }, + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 3946, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3902, + "name": "ElementaryTypeName", + "src": "2368:7:7" + } + ], + "id": 3903, + "name": "VariableDeclaration", + "src": "2368:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 3946, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3904, + "name": "ElementaryTypeName", + "src": "2381:4:7" + } + ], + "id": 3905, + "name": "VariableDeclaration", + "src": "2381:8:7" + } + ], + "id": 3906, + "name": "ParameterList", + "src": "2354:36:7" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3907, + "name": "ParameterList", + "src": "2400:0:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3908, + "name": "Identifier", + "src": "2410:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3909, + "name": "Identifier", + "src": "2418:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3901, + "type": "address", + "value": "src" + }, + "id": 3910, + "name": "Identifier", + "src": "2427:3:7" + } + ], + "id": 3911, + "name": "IndexAccess", + "src": "2418:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3905, + "type": "uint256", + "value": "amt" + }, + "id": 3912, + "name": "Identifier", + "src": "2435:3:7" + } + ], + "id": 3913, + "name": "BinaryOperation", + "src": "2418:20:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f494e53554646494349454e545f42414c", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_INSUFFICIENT_BAL\"", + "value": "ERR_INSUFFICIENT_BAL" + }, + "id": 3914, + "name": "Literal", + "src": "2440:22:7" + } + ], + "id": 3915, + "name": "FunctionCall", + "src": "2410:53:7" + } + ], + "id": 3916, + "name": "ExpressionStatement", + "src": "2410:53:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3917, + "name": "Identifier", + "src": "2473:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3901, + "type": "address", + "value": "src" + }, + "id": 3918, + "name": "Identifier", + "src": "2482:3:7" + } + ], + "id": 3919, + "name": "IndexAccess", + "src": "2473:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 3920, + "name": "Identifier", + "src": "2489:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3921, + "name": "Identifier", + "src": "2494:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3901, + "type": "address", + "value": "src" + }, + "id": 3922, + "name": "Identifier", + "src": "2503:3:7" + } + ], + "id": 3923, + "name": "IndexAccess", + "src": "2494:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3905, + "type": "uint256", + "value": "amt" + }, + "id": 3924, + "name": "Identifier", + "src": "2509:3:7" + } + ], + "id": 3925, + "name": "FunctionCall", + "src": "2489:24:7" + } + ], + "id": 3926, + "name": "Assignment", + "src": "2473:40:7" + } + ], + "id": 3927, + "name": "ExpressionStatement", + "src": "2473:40:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3928, + "name": "Identifier", + "src": "2523:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3903, + "type": "address", + "value": "dst" + }, + "id": 3929, + "name": "Identifier", + "src": "2532:3:7" + } + ], + "id": 3930, + "name": "IndexAccess", + "src": "2523:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 3931, + "name": "Identifier", + "src": "2539:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3932, + "name": "Identifier", + "src": "2544:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3903, + "type": "address", + "value": "dst" + }, + "id": 3933, + "name": "Identifier", + "src": "2553:3:7" + } + ], + "id": 3934, + "name": "IndexAccess", + "src": "2544:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3905, + "type": "uint256", + "value": "amt" + }, + "id": 3935, + "name": "Identifier", + "src": "2559:3:7" + } + ], + "id": 3936, + "name": "FunctionCall", + "src": "2539:24:7" + } + ], + "id": 3937, + "name": "Assignment", + "src": "2523:40:7" + } + ], + "id": 3938, + "name": "ExpressionStatement", + "src": "2523:40:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3812, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 3939, + "name": "Identifier", + "src": "2578:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3901, + "type": "address", + "value": "src" + }, + "id": 3940, + "name": "Identifier", + "src": "2587:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3903, + "type": "address", + "value": "dst" + }, + "id": 3941, + "name": "Identifier", + "src": "2592:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3905, + "type": "uint256", + "value": "amt" + }, + "id": 3942, + "name": "Identifier", + "src": "2597:3:7" + } + ], + "id": 3943, + "name": "FunctionCall", + "src": "2578:23:7" + } + ], + "id": 3944, + "name": "EmitStatement", + "src": "2573:28:7" + } + ], + "id": 3945, + "name": "Block", + "src": "2400:208:7" + } + ], + "id": 3946, + "name": "FunctionDefinition", + "src": "2340:268:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_push", + "scope": 3979, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "to", + "scope": 3962, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3947, + "name": "ElementaryTypeName", + "src": "2629:7:7" + } + ], + "id": 3948, + "name": "VariableDeclaration", + "src": "2629:10:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 3962, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3949, + "name": "ElementaryTypeName", + "src": "2641:4:7" + } + ], + "id": 3950, + "name": "VariableDeclaration", + "src": "2641:8:7" + } + ], + "id": 3951, + "name": "ParameterList", + "src": "2628:22:7" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3952, + "name": "ParameterList", + "src": "2660:0:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3946, + "type": "function (address,address,uint256)", + "value": "_move" + }, + "id": 3953, + "name": "Identifier", + "src": "2670:5:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3954, + "name": "ElementaryTypeNameExpression", + "src": "2676:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3955, + "name": "Identifier", + "src": "2684:4:7" + } + ], + "id": 3956, + "name": "FunctionCall", + "src": "2676:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3948, + "type": "address", + "value": "to" + }, + "id": 3957, + "name": "Identifier", + "src": "2691:2:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3950, + "type": "uint256", + "value": "amt" + }, + "id": 3958, + "name": "Identifier", + "src": "2695:3:7" + } + ], + "id": 3959, + "name": "FunctionCall", + "src": "2670:29:7" + } + ], + "id": 3960, + "name": "ExpressionStatement", + "src": "2670:29:7" + } + ], + "id": 3961, + "name": "Block", + "src": "2660:46:7" + } + ], + "id": 3962, + "name": "FunctionDefinition", + "src": "2614:92:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_pull", + "scope": 3979, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "from", + "scope": 3978, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3963, + "name": "ElementaryTypeName", + "src": "2727:7:7" + } + ], + "id": 3964, + "name": "VariableDeclaration", + "src": "2727:12:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 3978, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3965, + "name": "ElementaryTypeName", + "src": "2741:4:7" + } + ], + "id": 3966, + "name": "VariableDeclaration", + "src": "2741:8:7" + } + ], + "id": 3967, + "name": "ParameterList", + "src": "2726:24:7" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3968, + "name": "ParameterList", + "src": "2760:0:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3946, + "type": "function (address,address,uint256)", + "value": "_move" + }, + "id": 3969, + "name": "Identifier", + "src": "2770:5:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3964, + "type": "address", + "value": "from" + }, + "id": 3970, + "name": "Identifier", + "src": "2776:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3971, + "name": "ElementaryTypeNameExpression", + "src": "2782:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3972, + "name": "Identifier", + "src": "2790:4:7" + } + ], + "id": 3973, + "name": "FunctionCall", + "src": "2782:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3966, + "type": "uint256", + "value": "amt" + }, + "id": 3974, + "name": "Identifier", + "src": "2797:3:7" + } + ], + "id": 3975, + "name": "FunctionCall", + "src": "2770:31:7" + } + ], + "id": 3976, + "name": "ExpressionStatement", + "src": "2770:31:7" + } + ], + "id": 3977, + "name": "Block", + "src": "2760:48:7" + } + ], + "id": 3978, + "name": "FunctionDefinition", + "src": "2712:96:7" + } + ], + "id": 3979, + "name": "ContractDefinition", + "src": "1445:1365:7" + }, + { + "attributes": { + "contractDependencies": [ + 280, + 1422, + 3979, + 7106 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 4285, + 7106, + 3979, + 1422, + 280 + ], + "name": "BToken", + "scope": 4286 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BTokenBase", + "referencedDeclaration": 3979, + "type": "contract BTokenBase" + }, + "id": 3980, + "name": "UserDefinedTypeName", + "src": "2831:10:7" + } + ], + "id": 3981, + "name": "InheritanceSpecifier", + "src": "2831:10:7" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20", + "referencedDeclaration": 7106, + "type": "contract IERC20" + }, + "id": 3982, + "name": "UserDefinedTypeName", + "src": "2843:6:7" + } + ], + "id": 3983, + "name": "InheritanceSpecifier", + "src": "2843:6:7" + }, + { + "attributes": { + "constant": false, + "name": "_name", + "scope": 4285, + "stateVariable": true, + "storageLocation": "default", + "type": "string", + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 3984, + "name": "ElementaryTypeName", + "src": "2857:6:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "42616c616e63657220506f6f6c20546f6b656e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Balancer Pool Token\"", + "value": "Balancer Pool Token" + }, + "id": 3985, + "name": "Literal", + "src": "2885:21:7" + } + ], + "id": 3986, + "name": "VariableDeclaration", + "src": "2857:49:7" + }, + { + "attributes": { + "constant": false, + "name": "_symbol", + "scope": 4285, + "stateVariable": true, + "storageLocation": "default", + "type": "string", + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 3987, + "name": "ElementaryTypeName", + "src": "2912:6:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "425054", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"BPT\"", + "value": "BPT" + }, + "id": 3988, + "name": "Literal", + "src": "2940:5:7" + } + ], + "id": 3989, + "name": "VariableDeclaration", + "src": "2912:33:7" + }, + { + "attributes": { + "constant": false, + "name": "_decimals", + "scope": 4285, + "stateVariable": true, + "storageLocation": "default", + "type": "uint8", + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 3990, + "name": "ElementaryTypeName", + "src": "2951:5:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3138", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 18", + "value": "18" + }, + "id": 3991, + "name": "Literal", + "src": "2979:2:7" + } + ], + "id": 3992, + "name": "VariableDeclaration", + "src": "2951:30:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "name", + "scope": 4285, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3993, + "name": "ParameterList", + "src": "3001:2:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4000, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 3994, + "name": "ElementaryTypeName", + "src": "3025:6:7" + } + ], + "id": 3995, + "name": "VariableDeclaration", + "src": "3025:13:7" + } + ], + "id": 3996, + "name": "ParameterList", + "src": "3024:15:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 3996 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3986, + "type": "string storage ref", + "value": "_name" + }, + "id": 3997, + "name": "Identifier", + "src": "3057:5:7" + } + ], + "id": 3998, + "name": "Return", + "src": "3050:12:7" + } + ], + "id": 3999, + "name": "Block", + "src": "3040:29:7" + } + ], + "id": 4000, + "name": "FunctionDefinition", + "src": "2988:81:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "symbol", + "scope": 4285, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4001, + "name": "ParameterList", + "src": "3090:2:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4008, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 4002, + "name": "ElementaryTypeName", + "src": "3114:6:7" + } + ], + "id": 4003, + "name": "VariableDeclaration", + "src": "3114:13:7" + } + ], + "id": 4004, + "name": "ParameterList", + "src": "3113:15:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 4004 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3989, + "type": "string storage ref", + "value": "_symbol" + }, + "id": 4005, + "name": "Identifier", + "src": "3146:7:7" + } + ], + "id": 4006, + "name": "Return", + "src": "3139:14:7" + } + ], + "id": 4007, + "name": "Block", + "src": "3129:31:7" + } + ], + "id": 4008, + "name": "FunctionDefinition", + "src": "3075:85:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "decimals", + "scope": 4285, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4009, + "name": "ParameterList", + "src": "3183:2:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4016, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 4010, + "name": "ElementaryTypeName", + "src": "3206:5:7" + } + ], + "id": 4011, + "name": "VariableDeclaration", + "src": "3206:5:7" + } + ], + "id": 4012, + "name": "ParameterList", + "src": "3205:7:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 4012 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3992, + "type": "uint8", + "value": "_decimals" + }, + "id": 4013, + "name": "Identifier", + "src": "3230:9:7" + } + ], + "id": 4014, + "name": "Return", + "src": "3223:16:7" + } + ], + "id": 4015, + "name": "Block", + "src": "3213:33:7" + } + ], + "id": 4016, + "name": "FunctionDefinition", + "src": "3166:80:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "allowance", + "scope": 4285, + "stateMutability": "view", + "superFunction": 7069, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "src", + "scope": 4032, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4017, + "name": "ElementaryTypeName", + "src": "3271:7:7" + } + ], + "id": 4018, + "name": "VariableDeclaration", + "src": "3271:11:7" + }, + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4032, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4019, + "name": "ElementaryTypeName", + "src": "3284:7:7" + } + ], + "id": 4020, + "name": "VariableDeclaration", + "src": "3284:11:7" + } + ], + "id": 4021, + "name": "ParameterList", + "src": "3270:26:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4032, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4022, + "name": "ElementaryTypeName", + "src": "3320:4:7" + } + ], + "id": 4023, + "name": "VariableDeclaration", + "src": "3320:4:7" + } + ], + "id": 4024, + "name": "ParameterList", + "src": "3319:6:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 4024 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4025, + "name": "Identifier", + "src": "3343:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4018, + "type": "address", + "value": "src" + }, + "id": 4026, + "name": "Identifier", + "src": "3354:3:7" + } + ], + "id": 4027, + "name": "IndexAccess", + "src": "3343:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4020, + "type": "address", + "value": "dst" + }, + "id": 4028, + "name": "Identifier", + "src": "3359:3:7" + } + ], + "id": 4029, + "name": "IndexAccess", + "src": "3343:20:7" + } + ], + "id": 4030, + "name": "Return", + "src": "3336:27:7" + } + ], + "id": 4031, + "name": "Block", + "src": "3326:44:7" + } + ], + "id": 4032, + "name": "FunctionDefinition", + "src": "3252:118:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "balanceOf", + "scope": 4285, + "stateMutability": "view", + "superFunction": 7051, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "whom", + "scope": 4044, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4033, + "name": "ElementaryTypeName", + "src": "3395:7:7" + } + ], + "id": 4034, + "name": "VariableDeclaration", + "src": "3395:12:7" + } + ], + "id": 4035, + "name": "ParameterList", + "src": "3394:14:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4044, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4036, + "name": "ElementaryTypeName", + "src": "3432:4:7" + } + ], + "id": 4037, + "name": "VariableDeclaration", + "src": "3432:4:7" + } + ], + "id": 4038, + "name": "ParameterList", + "src": "3431:6:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 4038 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 4039, + "name": "Identifier", + "src": "3455:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4034, + "type": "address", + "value": "whom" + }, + "id": 4040, + "name": "Identifier", + "src": "3464:4:7" + } + ], + "id": 4041, + "name": "IndexAccess", + "src": "3455:14:7" + } + ], + "id": 4042, + "name": "Return", + "src": "3448:21:7" + } + ], + "id": 4043, + "name": "Block", + "src": "3438:38:7" + } + ], + "id": 4044, + "name": "FunctionDefinition", + "src": "3376:100:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "totalSupply", + "scope": 4285, + "stateMutability": "view", + "superFunction": 7044, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4045, + "name": "ParameterList", + "src": "3502:2:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4052, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4046, + "name": "ElementaryTypeName", + "src": "3526:4:7" + } + ], + "id": 4047, + "name": "VariableDeclaration", + "src": "3526:4:7" + } + ], + "id": 4048, + "name": "ParameterList", + "src": "3525:6:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 4048 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 4049, + "name": "Identifier", + "src": "3549:12:7" + } + ], + "id": 4050, + "name": "Return", + "src": "3542:19:7" + } + ], + "id": 4051, + "name": "Block", + "src": "3532:36:7" + } + ], + "id": 4052, + "name": "FunctionDefinition", + "src": "3482:86:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "approve", + "scope": 4285, + "stateMutability": "nonpayable", + "superFunction": 7078, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4080, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4053, + "name": "ElementaryTypeName", + "src": "3591:7:7" + } + ], + "id": 4054, + "name": "VariableDeclaration", + "src": "3591:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 4080, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4055, + "name": "ElementaryTypeName", + "src": "3604:4:7" + } + ], + "id": 4056, + "name": "VariableDeclaration", + "src": "3604:8:7" + } + ], + "id": 4057, + "name": "ParameterList", + "src": "3590:23:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4080, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4058, + "name": "ElementaryTypeName", + "src": "3632:4:7" + } + ], + "id": 4059, + "name": "VariableDeclaration", + "src": "3632:4:7" + } + ], + "id": 4060, + "name": "ParameterList", + "src": "3631:6:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4061, + "name": "Identifier", + "src": "3648:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4062, + "name": "Identifier", + "src": "3659:3:7" + } + ], + "id": 4063, + "name": "MemberAccess", + "src": "3659:10:7" + } + ], + "id": 4065, + "name": "IndexAccess", + "src": "3648:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4054, + "type": "address", + "value": "dst" + }, + "id": 4064, + "name": "Identifier", + "src": "3671:3:7" + } + ], + "id": 4066, + "name": "IndexAccess", + "src": "3648:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4056, + "type": "uint256", + "value": "amt" + }, + "id": 4067, + "name": "Identifier", + "src": "3678:3:7" + } + ], + "id": 4068, + "name": "Assignment", + "src": "3648:33:7" + } + ], + "id": 4069, + "name": "ExpressionStatement", + "src": "3648:33:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 4070, + "name": "Identifier", + "src": "3696:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4071, + "name": "Identifier", + "src": "3705:3:7" + } + ], + "id": 4072, + "name": "MemberAccess", + "src": "3705:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4054, + "type": "address", + "value": "dst" + }, + "id": 4073, + "name": "Identifier", + "src": "3717:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4056, + "type": "uint256", + "value": "amt" + }, + "id": 4074, + "name": "Identifier", + "src": "3722:3:7" + } + ], + "id": 4075, + "name": "FunctionCall", + "src": "3696:30:7" + } + ], + "id": 4076, + "name": "EmitStatement", + "src": "3691:35:7" + }, + { + "attributes": { + "functionReturnParameters": 4060 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4077, + "name": "Literal", + "src": "3743:4:7" + } + ], + "id": 4078, + "name": "Return", + "src": "3736:11:7" + } + ], + "id": 4079, + "name": "Block", + "src": "3638:116:7" + } + ], + "id": 4080, + "name": "FunctionDefinition", + "src": "3574:180:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "increaseApproval", + "scope": 4285, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4121, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4081, + "name": "ElementaryTypeName", + "src": "3786:7:7" + } + ], + "id": 4082, + "name": "VariableDeclaration", + "src": "3786:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 4121, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4083, + "name": "ElementaryTypeName", + "src": "3799:4:7" + } + ], + "id": 4084, + "name": "VariableDeclaration", + "src": "3799:8:7" + } + ], + "id": 4085, + "name": "ParameterList", + "src": "3785:23:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4121, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4086, + "name": "ElementaryTypeName", + "src": "3827:4:7" + } + ], + "id": 4087, + "name": "VariableDeclaration", + "src": "3827:4:7" + } + ], + "id": 4088, + "name": "ParameterList", + "src": "3826:6:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4089, + "name": "Identifier", + "src": "3843:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4090, + "name": "Identifier", + "src": "3854:3:7" + } + ], + "id": 4091, + "name": "MemberAccess", + "src": "3854:10:7" + } + ], + "id": 4093, + "name": "IndexAccess", + "src": "3843:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4082, + "type": "address", + "value": "dst" + }, + "id": 4092, + "name": "Identifier", + "src": "3866:3:7" + } + ], + "id": 4094, + "name": "IndexAccess", + "src": "3843:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 4095, + "name": "Identifier", + "src": "3873:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4096, + "name": "Identifier", + "src": "3878:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4097, + "name": "Identifier", + "src": "3889:3:7" + } + ], + "id": 4098, + "name": "MemberAccess", + "src": "3889:10:7" + } + ], + "id": 4099, + "name": "IndexAccess", + "src": "3878:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4082, + "type": "address", + "value": "dst" + }, + "id": 4100, + "name": "Identifier", + "src": "3901:3:7" + } + ], + "id": 4101, + "name": "IndexAccess", + "src": "3878:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4084, + "type": "uint256", + "value": "amt" + }, + "id": 4102, + "name": "Identifier", + "src": "3907:3:7" + } + ], + "id": 4103, + "name": "FunctionCall", + "src": "3873:38:7" + } + ], + "id": 4104, + "name": "Assignment", + "src": "3843:68:7" + } + ], + "id": 4105, + "name": "ExpressionStatement", + "src": "3843:68:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 4106, + "name": "Identifier", + "src": "3926:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4107, + "name": "Identifier", + "src": "3935:3:7" + } + ], + "id": 4108, + "name": "MemberAccess", + "src": "3935:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4082, + "type": "address", + "value": "dst" + }, + "id": 4109, + "name": "Identifier", + "src": "3947:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4110, + "name": "Identifier", + "src": "3952:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4111, + "name": "Identifier", + "src": "3963:3:7" + } + ], + "id": 4112, + "name": "MemberAccess", + "src": "3963:10:7" + } + ], + "id": 4113, + "name": "IndexAccess", + "src": "3952:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4082, + "type": "address", + "value": "dst" + }, + "id": 4114, + "name": "Identifier", + "src": "3975:3:7" + } + ], + "id": 4115, + "name": "IndexAccess", + "src": "3952:27:7" + } + ], + "id": 4116, + "name": "FunctionCall", + "src": "3926:54:7" + } + ], + "id": 4117, + "name": "EmitStatement", + "src": "3921:59:7" + }, + { + "attributes": { + "functionReturnParameters": 4088 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4118, + "name": "Literal", + "src": "3997:4:7" + } + ], + "id": 4119, + "name": "Return", + "src": "3990:11:7" + } + ], + "id": 4120, + "name": "Block", + "src": "3833:175:7" + } + ], + "id": 4121, + "name": "FunctionDefinition", + "src": "3760:248:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "decreaseApproval", + "scope": 4285, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4181, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4122, + "name": "ElementaryTypeName", + "src": "4040:7:7" + } + ], + "id": 4123, + "name": "VariableDeclaration", + "src": "4040:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 4181, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4124, + "name": "ElementaryTypeName", + "src": "4053:4:7" + } + ], + "id": 4125, + "name": "VariableDeclaration", + "src": "4053:8:7" + } + ], + "id": 4126, + "name": "ParameterList", + "src": "4039:23:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4181, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4127, + "name": "ElementaryTypeName", + "src": "4081:4:7" + } + ], + "id": 4128, + "name": "VariableDeclaration", + "src": "4081:4:7" + } + ], + "id": 4129, + "name": "ParameterList", + "src": "4080:6:7" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 4131 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "oldValue", + "scope": 4180, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4130, + "name": "ElementaryTypeName", + "src": "4097:4:7" + } + ], + "id": 4131, + "name": "VariableDeclaration", + "src": "4097:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4132, + "name": "Identifier", + "src": "4113:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4133, + "name": "Identifier", + "src": "4124:3:7" + } + ], + "id": 4134, + "name": "MemberAccess", + "src": "4124:10:7" + } + ], + "id": 4135, + "name": "IndexAccess", + "src": "4113:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4123, + "type": "address", + "value": "dst" + }, + "id": 4136, + "name": "Identifier", + "src": "4136:3:7" + } + ], + "id": 4137, + "name": "IndexAccess", + "src": "4113:27:7" + } + ], + "id": 4138, + "name": "VariableDeclarationStatement", + "src": "4097:43:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4125, + "type": "uint256", + "value": "amt" + }, + "id": 4139, + "name": "Identifier", + "src": "4154:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4131, + "type": "uint256", + "value": "oldValue" + }, + "id": 4140, + "name": "Identifier", + "src": "4160:8:7" + } + ], + "id": 4141, + "name": "BinaryOperation", + "src": "4154:14:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4142, + "name": "Identifier", + "src": "4184:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4143, + "name": "Identifier", + "src": "4195:3:7" + } + ], + "id": 4144, + "name": "MemberAccess", + "src": "4195:10:7" + } + ], + "id": 4146, + "name": "IndexAccess", + "src": "4184:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4123, + "type": "address", + "value": "dst" + }, + "id": 4145, + "name": "Identifier", + "src": "4207:3:7" + } + ], + "id": 4147, + "name": "IndexAccess", + "src": "4184:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4148, + "name": "Literal", + "src": "4214:1:7" + } + ], + "id": 4149, + "name": "Assignment", + "src": "4184:31:7" + } + ], + "id": 4150, + "name": "ExpressionStatement", + "src": "4184:31:7" + } + ], + "id": 4151, + "name": "Block", + "src": "4170:56:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4152, + "name": "Identifier", + "src": "4246:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4153, + "name": "Identifier", + "src": "4257:3:7" + } + ], + "id": 4154, + "name": "MemberAccess", + "src": "4257:10:7" + } + ], + "id": 4156, + "name": "IndexAccess", + "src": "4246:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4123, + "type": "address", + "value": "dst" + }, + "id": 4155, + "name": "Identifier", + "src": "4269:3:7" + } + ], + "id": 4157, + "name": "IndexAccess", + "src": "4246:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 4158, + "name": "Identifier", + "src": "4276:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4131, + "type": "uint256", + "value": "oldValue" + }, + "id": 4159, + "name": "Identifier", + "src": "4281:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4125, + "type": "uint256", + "value": "amt" + }, + "id": 4160, + "name": "Identifier", + "src": "4291:3:7" + } + ], + "id": 4161, + "name": "FunctionCall", + "src": "4276:19:7" + } + ], + "id": 4162, + "name": "Assignment", + "src": "4246:49:7" + } + ], + "id": 4163, + "name": "ExpressionStatement", + "src": "4246:49:7" + } + ], + "id": 4164, + "name": "Block", + "src": "4232:74:7" + } + ], + "id": 4165, + "name": "IfStatement", + "src": "4150:156:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 4166, + "name": "Identifier", + "src": "4320:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4167, + "name": "Identifier", + "src": "4329:3:7" + } + ], + "id": 4168, + "name": "MemberAccess", + "src": "4329:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4123, + "type": "address", + "value": "dst" + }, + "id": 4169, + "name": "Identifier", + "src": "4341:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4170, + "name": "Identifier", + "src": "4346:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4171, + "name": "Identifier", + "src": "4357:3:7" + } + ], + "id": 4172, + "name": "MemberAccess", + "src": "4357:10:7" + } + ], + "id": 4173, + "name": "IndexAccess", + "src": "4346:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4123, + "type": "address", + "value": "dst" + }, + "id": 4174, + "name": "Identifier", + "src": "4369:3:7" + } + ], + "id": 4175, + "name": "IndexAccess", + "src": "4346:27:7" + } + ], + "id": 4176, + "name": "FunctionCall", + "src": "4320:54:7" + } + ], + "id": 4177, + "name": "EmitStatement", + "src": "4315:59:7" + }, + { + "attributes": { + "functionReturnParameters": 4129 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4178, + "name": "Literal", + "src": "4391:4:7" + } + ], + "id": 4179, + "name": "Return", + "src": "4384:11:7" + } + ], + "id": 4180, + "name": "Block", + "src": "4087:315:7" + } + ], + "id": 4181, + "name": "FunctionDefinition", + "src": "4014:388:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "transfer", + "scope": 4285, + "stateMutability": "nonpayable", + "superFunction": 7060, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4200, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4182, + "name": "ElementaryTypeName", + "src": "4426:7:7" + } + ], + "id": 4183, + "name": "VariableDeclaration", + "src": "4426:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 4200, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4184, + "name": "ElementaryTypeName", + "src": "4439:4:7" + } + ], + "id": 4185, + "name": "VariableDeclaration", + "src": "4439:8:7" + } + ], + "id": 4186, + "name": "ParameterList", + "src": "4425:23:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4200, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4187, + "name": "ElementaryTypeName", + "src": "4467:4:7" + } + ], + "id": 4188, + "name": "VariableDeclaration", + "src": "4467:4:7" + } + ], + "id": 4189, + "name": "ParameterList", + "src": "4466:6:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3946, + "type": "function (address,address,uint256)", + "value": "_move" + }, + "id": 4190, + "name": "Identifier", + "src": "4483:5:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4191, + "name": "Identifier", + "src": "4489:3:7" + } + ], + "id": 4192, + "name": "MemberAccess", + "src": "4489:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4183, + "type": "address", + "value": "dst" + }, + "id": 4193, + "name": "Identifier", + "src": "4501:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4185, + "type": "uint256", + "value": "amt" + }, + "id": 4194, + "name": "Identifier", + "src": "4506:3:7" + } + ], + "id": 4195, + "name": "FunctionCall", + "src": "4483:27:7" + } + ], + "id": 4196, + "name": "ExpressionStatement", + "src": "4483:27:7" + }, + { + "attributes": { + "functionReturnParameters": 4189 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4197, + "name": "Literal", + "src": "4527:4:7" + } + ], + "id": 4198, + "name": "Return", + "src": "4520:11:7" + } + ], + "id": 4199, + "name": "Block", + "src": "4473:65:7" + } + ], + "id": 4200, + "name": "FunctionDefinition", + "src": "4408:130:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "transferFrom", + "scope": 4285, + "stateMutability": "nonpayable", + "superFunction": 7089, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "src", + "scope": 4284, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4201, + "name": "ElementaryTypeName", + "src": "4575:7:7" + } + ], + "id": 4202, + "name": "VariableDeclaration", + "src": "4575:11:7" + }, + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4284, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4203, + "name": "ElementaryTypeName", + "src": "4597:7:7" + } + ], + "id": 4204, + "name": "VariableDeclaration", + "src": "4597:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 4284, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4205, + "name": "ElementaryTypeName", + "src": "4619:4:7" + } + ], + "id": 4206, + "name": "VariableDeclaration", + "src": "4619:8:7" + } + ], + "id": 4207, + "name": "ParameterList", + "src": "4565:68:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4284, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4208, + "name": "ElementaryTypeName", + "src": "4662:4:7" + } + ], + "id": 4209, + "name": "VariableDeclaration", + "src": "4662:4:7" + } + ], + "id": 4210, + "name": "ParameterList", + "src": "4661:6:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7c78c5c07128d4fb2c83ecfae573652cc351a44f64cf0f454240bdf4749e318c", + "typeString": "literal_string \"ERR_BTOKEN_BAD_CALLER\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4211, + "name": "Identifier", + "src": "4683:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "||", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4212, + "name": "Identifier", + "src": "4704:3:7" + } + ], + "id": 4213, + "name": "MemberAccess", + "src": "4704:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4214, + "name": "Identifier", + "src": "4718:3:7" + } + ], + "id": 4215, + "name": "BinaryOperation", + "src": "4704:17:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4206, + "type": "uint256", + "value": "amt" + }, + "id": 4216, + "name": "Identifier", + "src": "4725:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4217, + "name": "Identifier", + "src": "4732:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4218, + "name": "Identifier", + "src": "4743:3:7" + } + ], + "id": 4219, + "name": "IndexAccess", + "src": "4732:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4220, + "name": "Identifier", + "src": "4748:3:7" + } + ], + "id": 4221, + "name": "MemberAccess", + "src": "4748:10:7" + } + ], + "id": 4222, + "name": "IndexAccess", + "src": "4732:27:7" + } + ], + "id": 4223, + "name": "BinaryOperation", + "src": "4725:34:7" + } + ], + "id": 4224, + "name": "BinaryOperation", + "src": "4704:55:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f42544f4b454e5f4241445f43414c4c4552", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_BTOKEN_BAD_CALLER\"", + "value": "ERR_BTOKEN_BAD_CALLER" + }, + "id": 4225, + "name": "Literal", + "src": "4774:23:7" + } + ], + "id": 4226, + "name": "FunctionCall", + "src": "4683:124:7" + } + ], + "id": 4227, + "name": "ExpressionStatement", + "src": "4683:124:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3946, + "type": "function (address,address,uint256)", + "value": "_move" + }, + "id": 4228, + "name": "Identifier", + "src": "4817:5:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4229, + "name": "Identifier", + "src": "4823:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4204, + "type": "address", + "value": "dst" + }, + "id": 4230, + "name": "Identifier", + "src": "4828:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4206, + "type": "uint256", + "value": "amt" + }, + "id": 4231, + "name": "Identifier", + "src": "4833:3:7" + } + ], + "id": 4232, + "name": "FunctionCall", + "src": "4817:20:7" + } + ], + "id": 4233, + "name": "ExpressionStatement", + "src": "4817:20:7" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "&&", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4234, + "name": "Identifier", + "src": "4851:3:7" + } + ], + "id": 4235, + "name": "MemberAccess", + "src": "4851:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4236, + "name": "Identifier", + "src": "4865:3:7" + } + ], + "id": 4237, + "name": "BinaryOperation", + "src": "4851:17:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4238, + "name": "Identifier", + "src": "4872:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4239, + "name": "Identifier", + "src": "4883:3:7" + } + ], + "id": 4240, + "name": "IndexAccess", + "src": "4872:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4241, + "name": "Identifier", + "src": "4888:3:7" + } + ], + "id": 4242, + "name": "MemberAccess", + "src": "4888:10:7" + } + ], + "id": 4243, + "name": "IndexAccess", + "src": "4872:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(uint256)", + "value": "uint256" + }, + "id": 4244, + "name": "ElementaryTypeNameExpression", + "src": "4903:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "-", + "prefix": true, + "type": "int_const -1" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 4245, + "name": "Literal", + "src": "4912:1:7" + } + ], + "id": 4246, + "name": "UnaryOperation", + "src": "4911:2:7" + } + ], + "id": 4247, + "name": "FunctionCall", + "src": "4903:11:7" + } + ], + "id": 4248, + "name": "BinaryOperation", + "src": "4872:42:7" + } + ], + "id": 4249, + "name": "BinaryOperation", + "src": "4851:63:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4250, + "name": "Identifier", + "src": "4930:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4251, + "name": "Identifier", + "src": "4941:3:7" + } + ], + "id": 4254, + "name": "IndexAccess", + "src": "4930:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4252, + "name": "Identifier", + "src": "4946:3:7" + } + ], + "id": 4253, + "name": "MemberAccess", + "src": "4946:10:7" + } + ], + "id": 4255, + "name": "IndexAccess", + "src": "4930:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 4256, + "name": "Identifier", + "src": "4960:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4257, + "name": "Identifier", + "src": "4965:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4258, + "name": "Identifier", + "src": "4976:3:7" + } + ], + "id": 4259, + "name": "IndexAccess", + "src": "4965:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4260, + "name": "Identifier", + "src": "4981:3:7" + } + ], + "id": 4261, + "name": "MemberAccess", + "src": "4981:10:7" + } + ], + "id": 4262, + "name": "IndexAccess", + "src": "4965:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4206, + "type": "uint256", + "value": "amt" + }, + "id": 4263, + "name": "Identifier", + "src": "4994:3:7" + } + ], + "id": 4264, + "name": "FunctionCall", + "src": "4960:38:7" + } + ], + "id": 4265, + "name": "Assignment", + "src": "4930:68:7" + } + ], + "id": 4266, + "name": "ExpressionStatement", + "src": "4930:68:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 4267, + "name": "Identifier", + "src": "5017:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4268, + "name": "Identifier", + "src": "5026:3:7" + } + ], + "id": 4269, + "name": "MemberAccess", + "src": "5026:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4204, + "type": "address", + "value": "dst" + }, + "id": 4270, + "name": "Identifier", + "src": "5038:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4271, + "name": "Identifier", + "src": "5043:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4272, + "name": "Identifier", + "src": "5054:3:7" + } + ], + "id": 4273, + "name": "IndexAccess", + "src": "5043:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4274, + "name": "Identifier", + "src": "5059:3:7" + } + ], + "id": 4275, + "name": "MemberAccess", + "src": "5059:10:7" + } + ], + "id": 4276, + "name": "IndexAccess", + "src": "5043:27:7" + } + ], + "id": 4277, + "name": "FunctionCall", + "src": "5017:54:7" + } + ], + "id": 4278, + "name": "EmitStatement", + "src": "5012:59:7" + } + ], + "id": 4279, + "name": "Block", + "src": "4916:166:7" + } + ], + "id": 4280, + "name": "IfStatement", + "src": "4847:235:7" + }, + { + "attributes": { + "functionReturnParameters": 4210 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4281, + "name": "Literal", + "src": "5098:4:7" + } + ], + "id": 4282, + "name": "Return", + "src": "5091:11:7" + } + ], + "id": 4283, + "name": "Block", + "src": "4673:436:7" + } + ], + "id": 4284, + "name": "FunctionDefinition", + "src": "4544:565:7" + } + ], + "id": 4285, + "name": "ContractDefinition", + "src": "2812:2299:7" + } + ], + "id": 4286, + "name": "SourceUnit", + "src": "643:4469:7" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.807Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/BTokenBase.json b/artifacts/BTokenBase.json new file mode 100644 index 000000000..37b92af45 --- /dev/null +++ b/artifacts/BTokenBase.json @@ -0,0 +1,14333 @@ +{ + "contractName": "BTokenBase", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "MAX_TOTAL_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BPOW_PRECISION", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BALANCE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "INIT_POOL_SUPPLY", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_OUT_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BOUND_TOKENS", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MIN_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_BPOW_BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BONE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EXIT_FEE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_WEIGHT", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_IN_RATIO", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "src", + "type": "address" + }, + { + "indexed": true, + "name": "dst", + "type": "address" + }, + { + "indexed": false, + "name": "amt", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "src", + "type": "address" + }, + { + "indexed": true, + "name": "dst", + "type": "address" + }, + { + "indexed": false, + "name": "amt", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"MAX_TOTAL_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BPOW_PRECISION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BALANCE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"INIT_POOL_SUPPLY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_OUT_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BONE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EXIT_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_IN_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol\":\"BTokenBase\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BConst.sol\":{\"keccak256\":\"0x21675a0793e0be762a27e09ed3b0bd86e035c73ac3078dd841c38804445d5f5a\",\"urls\":[\"bzzr://47016ef4a80276f320b28a058fc92e7d9d93433bb5e4aa934668383cbefad77e\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol\":{\"keccak256\":\"0x84cf31d699784debbe9ec94be2086cdd2918c944473d5228c54dda10a660af8a\",\"urls\":[\"bzzr://7fcfbf954d6cdeec6709ad7543a9fa1576b788930245adc8d93030f6c72358cd\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol\":{\"keccak256\":\"0xad046b7ad912f72a90330abb3abddc3aa711077c0021d6a9d0dba2c99534e51b\",\"urls\":[\"bzzr://159aed1b631f2af168fd17235b6827859cb5d6cb7e95abeff3cc3d8079710f41\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061027c806100206000396000f3fe608060405234801561001057600080fd5b506004361061011d576000357c010000000000000000000000000000000000000000000000000000000090048063b7b800a4116100b4578063c36596a611610083578063c36596a614610144578063c6580d1214610194578063e4a28a5214610122578063ec0930211461019c5761011d565b8063b7b800a414610174578063ba019dab1461017c578063bc063e1a14610184578063bc694ea21461018c5761011d565b8063867378c5116100f0578063867378c5146101545780639381cd2b1461015c578063992e2a9214610164578063b0e0d1361461016c5761011d565b806309a3bbe414610122578063189d00ca1461013c578063218b53821461014457806376c7a3c71461014c575b600080fd5b61012a6101a4565b60408051918252519081900360200190f35b61012a6101b1565b61012a6101c5565b61012a6101d1565b61012a6101e3565b61012a6101f7565b61012a610204565b61012a610210565b61012a610215565b61012a61021a565b61012a61021f565b61012a61022f565b61012a61023b565b61012a610240565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b620f4240670de0b6b3a76400006101c1565b64e8d4a51000670de0b6b3a76400006101c1565b68056bc75e2d6310000081565b6704a03ce68d21555681565b600881565b600281565b600181565b600a670de0b6b3a76400006101c1565b671bc16d674ec7ffff81565b600081565b6002670de0b6b3a76400006101c156fea165627a7a7230582016a1a4909f6a1629d8743896d15c5e4d54c0498b5f1fb59ef25b9b7fd59bea3f0029", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061011d576000357c010000000000000000000000000000000000000000000000000000000090048063b7b800a4116100b4578063c36596a611610083578063c36596a614610144578063c6580d1214610194578063e4a28a5214610122578063ec0930211461019c5761011d565b8063b7b800a414610174578063ba019dab1461017c578063bc063e1a14610184578063bc694ea21461018c5761011d565b8063867378c5116100f0578063867378c5146101545780639381cd2b1461015c578063992e2a9214610164578063b0e0d1361461016c5761011d565b806309a3bbe414610122578063189d00ca1461013c578063218b53821461014457806376c7a3c71461014c575b600080fd5b61012a6101a4565b60408051918252519081900360200190f35b61012a6101b1565b61012a6101c5565b61012a6101d1565b61012a6101e3565b61012a6101f7565b61012a610204565b61012a610210565b61012a610215565b61012a61021a565b61012a61021f565b61012a61022f565b61012a61023b565b61012a610240565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b620f4240670de0b6b3a76400006101c1565b64e8d4a51000670de0b6b3a76400006101c1565b68056bc75e2d6310000081565b6704a03ce68d21555681565b600881565b600281565b600181565b600a670de0b6b3a76400006101c1565b671bc16d674ec7ffff81565b600081565b6002670de0b6b3a76400006101c156fea165627a7a7230582016a1a4909f6a1629d8743896d15c5e4d54c0498b5f1fb59ef25b9b7fd59bea3f0029", + "sourceMap": "1445:1365:7:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1445:1365:7;;;;;;;", + "deployedSourceMap": "1445:1365:7:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1445:1365:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1111:50:2;;;:::i;:::-;;;;;;;;;;;;;;;;1403:54;;;:::i;1004:45::-;;;:::i;840:53::-;;;:::i;1167:54::-;;;:::i;1228:51::-;;;:::i;1519:59::-;;;:::i;791:42::-;;;:::i;743:::-;;;:::i;1286:46::-;;;:::i;899:50::-;;;:::i;1338:59::-;;;:::i;955:42::-;;;:::i;1464:49::-;;;:::i;1111:50::-;1152:9;1111:50;:::o;1403:54::-;1451:6;730;1444:13;;1403:54;:::o;1004:45::-;730:6;1004:45;:::o;840:53::-;888:5;730:6;881:12;;1167:54;1215:6;730;1208:13;;1228:51;1269:10;1228:51;:::o;1519:59::-;1560:18;1519:59;:::o;791:42::-;832:1;791:42;:::o;743:::-;784:1;743:42;:::o;1286:46::-;1327:5;1286:46;:::o;899:50::-;947:2;730:6;940:9;;1338:59;1379:18;1338:59;:::o;955:42::-;996:1;955:42;:::o;1464:49::-;1512:1;730:6;1505:8;", + "source": "// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity 0.5.7;\n\nimport './BNum.sol';\nimport 'openzeppelin-solidity/contracts/token/ERC20/IERC20.sol';\n\n// Highly opinionated token implementation\n\n// interface IERC20 {\n// event Approval(address indexed src, address indexed dst, uint amt);\n// event Transfer(address indexed src, address indexed dst, uint amt);\n\n// function totalSupply() external view returns (uint);\n// function balanceOf(address whom) external view returns (uint);\n// function allowance(address src, address dst) external view returns (uint);\n\n// function approve(address dst, uint amt) external returns (bool);\n// function transfer(address dst, uint amt) external returns (bool);\n// function transferFrom(\n// address src, address dst, uint amt\n// ) external returns (bool);\n// }\n\ncontract BTokenBase is BNum {\n\n mapping(address => uint) internal _balance;\n mapping(address => mapping(address=>uint)) internal _allowance;\n uint internal _totalSupply;\n\n event Approval(address indexed src, address indexed dst, uint amt);\n event Transfer(address indexed src, address indexed dst, uint amt);\n\n function _mint(uint amt) internal {\n _balance[address(this)] = badd(_balance[address(this)], amt);\n _totalSupply = badd(_totalSupply, amt);\n emit Transfer(address(0), address(this), amt);\n }\n\n function _burn(uint amt) internal {\n require(\n _balance[address(this)] >= amt, \n 'ERR_INSUFFICIENT_BAL'\n );\n _balance[address(this)] = bsub(_balance[address(this)], amt);\n _totalSupply = bsub(_totalSupply, amt);\n emit Transfer(address(this), address(0), amt);\n }\n\n function _move(address src, address dst, uint amt) internal {\n require(_balance[src] >= amt, 'ERR_INSUFFICIENT_BAL');\n _balance[src] = bsub(_balance[src], amt);\n _balance[dst] = badd(_balance[dst], amt);\n emit Transfer(src, dst, amt);\n }\n\n function _push(address to, uint amt) internal {\n _move(address(this), to, amt);\n }\n\n function _pull(address from, uint amt) internal {\n _move(from, address(this), amt);\n }\n}\n\ncontract BToken is BTokenBase, IERC20 {\n\n string private _name = 'Balancer Pool Token';\n string private _symbol = 'BPT';\n uint8 private _decimals = 18;\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns(uint8) {\n return _decimals;\n }\n\n function allowance(address src, address dst) external view returns (uint) {\n return _allowance[src][dst];\n }\n\n function balanceOf(address whom) external view returns (uint) {\n return _balance[whom];\n }\n\n function totalSupply() public view returns (uint) {\n return _totalSupply;\n }\n\n function approve(address dst, uint amt) external returns (bool) {\n _allowance[msg.sender][dst] = amt;\n emit Approval(msg.sender, dst, amt);\n return true;\n }\n\n function increaseApproval(address dst, uint amt) external returns (bool) {\n _allowance[msg.sender][dst] = badd(_allowance[msg.sender][dst], amt);\n emit Approval(msg.sender, dst, _allowance[msg.sender][dst]);\n return true;\n }\n\n function decreaseApproval(address dst, uint amt) external returns (bool) {\n uint oldValue = _allowance[msg.sender][dst];\n if (amt > oldValue) {\n _allowance[msg.sender][dst] = 0;\n } else {\n _allowance[msg.sender][dst] = bsub(oldValue, amt);\n }\n emit Approval(msg.sender, dst, _allowance[msg.sender][dst]);\n return true;\n }\n\n function transfer(address dst, uint amt) external returns (bool) {\n _move(msg.sender, dst, amt);\n return true;\n }\n\n function transferFrom(\n address src, \n address dst, \n uint amt\n ) \n external \n returns (bool) \n {\n require(\n msg.sender == src || amt <= _allowance[src][msg.sender], \n 'ERR_BTOKEN_BAD_CALLER'\n );\n _move(src, dst, amt);\n if (msg.sender != src && _allowance[src][msg.sender] != uint256(-1)) {\n _allowance[src][msg.sender] = bsub(_allowance[src][msg.sender], amt);\n emit Approval(msg.sender, dst, _allowance[src][msg.sender]);\n }\n return true;\n }\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol", + "exportedSymbols": { + "BToken": [ + 4285 + ], + "BTokenBase": [ + 3979 + ] + }, + "id": 4286, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3780, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "643:22:7" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol", + "file": "./BNum.sol", + "id": 3781, + "nodeType": "ImportDirective", + "scope": 4286, + "sourceUnit": 1423, + "src": "667:20:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 3782, + "nodeType": "ImportDirective", + "scope": 4286, + "sourceUnit": 7107, + "src": "688:64:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3783, + "name": "BNum", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1422, + "src": "1468:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BNum_$1422", + "typeString": "contract BNum" + } + }, + "id": 3784, + "nodeType": "InheritanceSpecifier", + "src": "1468:4:7" + } + ], + "contractDependencies": [ + 280, + 1422 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3979, + "linearizedBaseContracts": [ + 3979, + 1422, + 280 + ], + "name": "BTokenBase", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3788, + "name": "_balance", + "nodeType": "VariableDeclaration", + "scope": 3979, + "src": "1480:60:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 3787, + "keyType": { + "id": 3785, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1488:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1480:24:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 3786, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1499:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3794, + "name": "_allowance", + "nodeType": "VariableDeclaration", + "scope": 3979, + "src": "1546:62:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 3793, + "keyType": { + "id": 3789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1554:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1546:42:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 3792, + "keyType": { + "id": 3790, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1573:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1565:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 3791, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1582:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3796, + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "scope": 3979, + "src": "1614:26:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3795, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1614:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "anonymous": false, + "documentation": null, + "id": 3804, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 3803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3798, + "indexed": true, + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 3804, + "src": "1662:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1662:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3800, + "indexed": true, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 3804, + "src": "1683:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3799, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1683:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3802, + "indexed": false, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3804, + "src": "1704:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3801, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1704:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1661:52:7" + }, + "src": "1647:67:7" + }, + { + "anonymous": false, + "documentation": null, + "id": 3812, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 3811, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3806, + "indexed": true, + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 3812, + "src": "1734:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3805, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1734:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3808, + "indexed": true, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 3812, + "src": "1755:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3807, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1755:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3810, + "indexed": false, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3812, + "src": "1776:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3809, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1776:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1733:52:7" + }, + "src": "1719:67:7" + }, + { + "body": { + "id": 3849, + "nodeType": "Block", + "src": "1826:180:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3817, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "1836:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3821, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3819, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "1853:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1845:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1845:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1836:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3823, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "1867:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3827, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3825, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "1884:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1876:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1876:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1867:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3828, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3814, + "src": "1892:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3822, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "1862:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1862:34:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1836:60:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3831, + "nodeType": "ExpressionStatement", + "src": "1836:60:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3832, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "1906:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3834, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "1926:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3835, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3814, + "src": "1940:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3833, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "1921:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1921:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1906:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3838, + "nodeType": "ExpressionStatement", + "src": "1906:38:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 3841, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1976:1:7", + "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": 3840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1968:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1968:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3844, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "1988:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1980:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1980:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3846, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3814, + "src": "1995:3:7", + "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": 3839, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3812, + "src": "1959:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1959:40:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3848, + "nodeType": "EmitStatement", + "src": "1954:45:7" + } + ] + }, + "documentation": null, + "id": 3850, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3815, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3814, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3850, + "src": "1807:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3813, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1807:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1806:10:7" + }, + "returnParameters": { + "id": 3816, + "nodeType": "ParameterList", + "parameters": [], + "src": "1826:0:7" + }, + "scope": 3979, + "src": "1792:214:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3898, + "nodeType": "Block", + "src": "2046:288:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3856, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2077:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3860, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3858, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2094:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3857, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2086:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2086:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2077:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3861, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3852, + "src": "2104:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2077:30:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e53554646494349454e545f42414c", + "id": 3863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2122:22:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + }, + "value": "ERR_INSUFFICIENT_BAL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + } + ], + "id": 3855, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2056:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2056:98:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3865, + "nodeType": "ExpressionStatement", + "src": "2056:98:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3866, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2164:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3870, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3868, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2181:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3867, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2173:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2173:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2164:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3872, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2195:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3876, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3874, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2212:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2204:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2204:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2195:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3877, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3852, + "src": "2220:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3871, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "2190:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2190:34:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2164:60:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3880, + "nodeType": "ExpressionStatement", + "src": "2164:60:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3881, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "2234:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3883, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "2254:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3884, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3852, + "src": "2268:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3882, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "2249:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2249:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2234:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3887, + "nodeType": "ExpressionStatement", + "src": "2234:38:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3890, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2304:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2296:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2296:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 3893, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2319:1:7", + "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": 3892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2311:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3894, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2311:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3895, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3852, + "src": "2323:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3888, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3812, + "src": "2287:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2287:40:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3897, + "nodeType": "EmitStatement", + "src": "2282:45:7" + } + ] + }, + "documentation": null, + "id": 3899, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3853, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3852, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3899, + "src": "2027:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3851, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2027:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2026:10:7" + }, + "returnParameters": { + "id": 3854, + "nodeType": "ParameterList", + "parameters": [], + "src": "2046:0:7" + }, + "scope": 3979, + "src": "2012:322:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3945, + "nodeType": "Block", + "src": "2400:208:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3909, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2418:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3911, + "indexExpression": { + "argumentTypes": null, + "id": 3910, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3901, + "src": "2427:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2418:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3912, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3905, + "src": "2435:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2418:20:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e53554646494349454e545f42414c", + "id": 3914, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2440:22:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + }, + "value": "ERR_INSUFFICIENT_BAL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + } + ], + "id": 3908, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2410:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2410:53:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3916, + "nodeType": "ExpressionStatement", + "src": "2410:53:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3917, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2473:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3919, + "indexExpression": { + "argumentTypes": null, + "id": 3918, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3901, + "src": "2482:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2473:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3921, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2494:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3923, + "indexExpression": { + "argumentTypes": null, + "id": 3922, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3901, + "src": "2503:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2494:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3924, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3905, + "src": "2509:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3920, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "2489:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2489:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2473:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3927, + "nodeType": "ExpressionStatement", + "src": "2473:40:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3928, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2523:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3930, + "indexExpression": { + "argumentTypes": null, + "id": 3929, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3903, + "src": "2532:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2523:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3932, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "2544:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3934, + "indexExpression": { + "argumentTypes": null, + "id": 3933, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3903, + "src": "2553:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2544:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3935, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3905, + "src": "2559:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3931, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "2539:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2539:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2523:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3938, + "nodeType": "ExpressionStatement", + "src": "2523:40:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3940, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3901, + "src": "2587:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3941, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3903, + "src": "2592:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3942, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3905, + "src": "2597:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3939, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3812, + "src": "2578:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2578:23:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3944, + "nodeType": "EmitStatement", + "src": "2573:28:7" + } + ] + }, + "documentation": null, + "id": 3946, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_move", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3901, + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 3946, + "src": "2355:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3900, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2355:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3903, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 3946, + "src": "2368:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3902, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2368:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3905, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3946, + "src": "2381:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3904, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2381:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2354:36:7" + }, + "returnParameters": { + "id": 3907, + "nodeType": "ParameterList", + "parameters": [], + "src": "2400:0:7" + }, + "scope": 3979, + "src": "2340:268:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3961, + "nodeType": "Block", + "src": "2660:46:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3955, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2684:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2676:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2676:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3957, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3948, + "src": "2691:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3958, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3950, + "src": "2695:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3953, + "name": "_move", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3946, + "src": "2670:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2670:29:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3960, + "nodeType": "ExpressionStatement", + "src": "2670:29:7" + } + ] + }, + "documentation": null, + "id": 3962, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_push", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3951, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3948, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 3962, + "src": "2629:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3947, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3950, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3962, + "src": "2641:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3949, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2641:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:22:7" + }, + "returnParameters": { + "id": 3952, + "nodeType": "ParameterList", + "parameters": [], + "src": "2660:0:7" + }, + "scope": 3979, + "src": "2614:92:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 3977, + "nodeType": "Block", + "src": "2760:48:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3970, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3964, + "src": "2776:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3972, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7149, + "src": "2790:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "id": 3971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2782:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 3973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2782:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3974, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3966, + "src": "2797:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3969, + "name": "_move", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3946, + "src": "2770:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2770:31:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3976, + "nodeType": "ExpressionStatement", + "src": "2770:31:7" + } + ] + }, + "documentation": null, + "id": 3978, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_pull", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3964, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "2727:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3963, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2727:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3966, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 3978, + "src": "2741:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3965, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2741:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2726:24:7" + }, + "returnParameters": { + "id": 3968, + "nodeType": "ParameterList", + "parameters": [], + "src": "2760:0:7" + }, + "scope": 3979, + "src": "2712:96:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 4286, + "src": "1445:1365:7" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3980, + "name": "BTokenBase", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3979, + "src": "2831:10:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + }, + "id": 3981, + "nodeType": "InheritanceSpecifier", + "src": "2831:10:7" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3982, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7106, + "src": "2843:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$7106", + "typeString": "contract IERC20" + } + }, + "id": 3983, + "nodeType": "InheritanceSpecifier", + "src": "2843:6:7" + } + ], + "contractDependencies": [ + 280, + 1422, + 3979, + 7106 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4285, + "linearizedBaseContracts": [ + 4285, + 7106, + 3979, + 1422, + 280 + ], + "name": "BToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3986, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 4285, + "src": "2857:49:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 3984, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2857:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616c616e63657220506f6f6c20546f6b656e", + "id": 3985, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2885:21:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86726d210cafef5a97cd8551cc3cd59ead4ad6b4a08f1b0e2ca14d5024839298", + "typeString": "literal_string \"Balancer Pool Token\"" + }, + "value": "Balancer Pool Token" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 3989, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 4285, + "src": "2912:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 3987, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2912:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "425054", + "id": 3988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2940:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2c4469c3871c2223d094ce996c22463935f1f3c0f4a0177add993c1ee46e9606", + "typeString": "literal_string \"BPT\"" + }, + "value": "BPT" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 3992, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 4285, + "src": "2951:30:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3990, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2951:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 3991, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2979:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "private" + }, + { + "body": { + "id": 3999, + "nodeType": "Block", + "src": "3040:29:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3997, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3986, + "src": "3057:5:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 3996, + "id": 3998, + "nodeType": "Return", + "src": "3050:12:7" + } + ] + }, + "documentation": null, + "id": 4000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3993, + "nodeType": "ParameterList", + "parameters": [], + "src": "3001:2:7" + }, + "returnParameters": { + "id": 3996, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3995, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4000, + "src": "3025:13:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3994, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3025:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3024:15:7" + }, + "scope": 4285, + "src": "2988:81:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4007, + "nodeType": "Block", + "src": "3129:31:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4005, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3989, + "src": "3146:7:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 4004, + "id": 4006, + "nodeType": "Return", + "src": "3139:14:7" + } + ] + }, + "documentation": null, + "id": 4008, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4001, + "nodeType": "ParameterList", + "parameters": [], + "src": "3090:2:7" + }, + "returnParameters": { + "id": 4004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4003, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4008, + "src": "3114:13:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4002, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3114:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3113:15:7" + }, + "scope": 4285, + "src": "3075:85:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4015, + "nodeType": "Block", + "src": "3213:33:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4013, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3992, + "src": "3230:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 4012, + "id": 4014, + "nodeType": "Return", + "src": "3223:16:7" + } + ] + }, + "documentation": null, + "id": 4016, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4009, + "nodeType": "ParameterList", + "parameters": [], + "src": "3183:2:7" + }, + "returnParameters": { + "id": 4012, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4011, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4016, + "src": "3206:5:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4010, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3206:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3205:7:7" + }, + "scope": 4285, + "src": "3166:80:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4031, + "nodeType": "Block", + "src": "3326:44:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4025, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "3343:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4027, + "indexExpression": { + "argumentTypes": null, + "id": 4026, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4018, + "src": "3354:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3343:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4029, + "indexExpression": { + "argumentTypes": null, + "id": 4028, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4020, + "src": "3359:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3343:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4024, + "id": 4030, + "nodeType": "Return", + "src": "3336:27:7" + } + ] + }, + "documentation": null, + "id": 4032, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4018, + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 4032, + "src": "3271:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4017, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3271:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4020, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4032, + "src": "3284:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4019, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3284:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3270:26:7" + }, + "returnParameters": { + "id": 4024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4023, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4032, + "src": "3320:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4022, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3320:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3319:6:7" + }, + "scope": 4285, + "src": "3252:118:7", + "stateMutability": "view", + "superFunction": 7069, + "visibility": "external" + }, + { + "body": { + "id": 4043, + "nodeType": "Block", + "src": "3438:38:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4039, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3788, + "src": "3455:8:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4041, + "indexExpression": { + "argumentTypes": null, + "id": 4040, + "name": "whom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4034, + "src": "3464:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3455:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4038, + "id": 4042, + "nodeType": "Return", + "src": "3448:21:7" + } + ] + }, + "documentation": null, + "id": 4044, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4034, + "name": "whom", + "nodeType": "VariableDeclaration", + "scope": 4044, + "src": "3395:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4033, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3395:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3394:14:7" + }, + "returnParameters": { + "id": 4038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4037, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4044, + "src": "3432:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4036, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3431:6:7" + }, + "scope": 4285, + "src": "3376:100:7", + "stateMutability": "view", + "superFunction": 7051, + "visibility": "external" + }, + { + "body": { + "id": 4051, + "nodeType": "Block", + "src": "3532:36:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4049, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3796, + "src": "3549:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4048, + "id": 4050, + "nodeType": "Return", + "src": "3542:19:7" + } + ] + }, + "documentation": null, + "id": 4052, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4045, + "nodeType": "ParameterList", + "parameters": [], + "src": "3502:2:7" + }, + "returnParameters": { + "id": 4048, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4047, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4052, + "src": "3526:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4046, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3526:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3525:6:7" + }, + "scope": 4285, + "src": "3482:86:7", + "stateMutability": "view", + "superFunction": 7044, + "visibility": "public" + }, + { + "body": { + "id": 4079, + "nodeType": "Block", + "src": "3638:116:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4061, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "3648:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4065, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4062, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3659:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3659:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3648:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4066, + "indexExpression": { + "argumentTypes": null, + "id": 4064, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4054, + "src": "3671:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3648:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4067, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4056, + "src": "3678:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3648:33:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4069, + "nodeType": "ExpressionStatement", + "src": "3648:33:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4071, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3705:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3705:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4073, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4054, + "src": "3717:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4074, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4056, + "src": "3722:3:7", + "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": 4070, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "src": "3696:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3696:30:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4076, + "nodeType": "EmitStatement", + "src": "3691:35:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3743:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4060, + "id": 4078, + "nodeType": "Return", + "src": "3736:11:7" + } + ] + }, + "documentation": null, + "id": 4080, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4057, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4054, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4080, + "src": "3591:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4053, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3591:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4056, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 4080, + "src": "3604:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4055, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3604:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3590:23:7" + }, + "returnParameters": { + "id": 4060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4080, + "src": "3632:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4058, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3632:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3631:6:7" + }, + "scope": 4285, + "src": "3574:180:7", + "stateMutability": "nonpayable", + "superFunction": 7078, + "visibility": "external" + }, + { + "body": { + "id": 4120, + "nodeType": "Block", + "src": "3833:175:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4089, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "3843:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4093, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4090, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3854:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3854:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3843:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4094, + "indexExpression": { + "argumentTypes": null, + "id": 4092, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4082, + "src": "3866:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3843:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4096, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "3878:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4099, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4097, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3889:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3889:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3878:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4101, + "indexExpression": { + "argumentTypes": null, + "id": 4100, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4082, + "src": "3901:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3878:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4102, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4084, + "src": "3907:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4095, + "name": "badd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "3873:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3873:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3843:68:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4105, + "nodeType": "ExpressionStatement", + "src": "3843:68:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4107, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3935:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3935:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4109, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4082, + "src": "3947:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4110, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "3952:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4113, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4111, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3963:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3963:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3952:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4115, + "indexExpression": { + "argumentTypes": null, + "id": 4114, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4082, + "src": "3975:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3952:27:7", + "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": 4106, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "src": "3926:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3926:54:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4117, + "nodeType": "EmitStatement", + "src": "3921:59:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3997:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4088, + "id": 4119, + "nodeType": "Return", + "src": "3990:11:7" + } + ] + }, + "documentation": null, + "id": 4121, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "increaseApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4085, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4082, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4121, + "src": "3786:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4081, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3786:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4084, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 4121, + "src": "3799:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4083, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3799:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3785:23:7" + }, + "returnParameters": { + "id": 4088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4087, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4121, + "src": "3827:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4086, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3827:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3826:6:7" + }, + "scope": 4285, + "src": "3760:248:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4180, + "nodeType": "Block", + "src": "4087:315:7", + "statements": [ + { + "assignments": [ + 4131 + ], + "declarations": [ + { + "constant": false, + "id": 4131, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 4180, + "src": "4097:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4130, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4097:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4138, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4132, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4113:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4135, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4133, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4124:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4124:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4113:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4137, + "indexExpression": { + "argumentTypes": null, + "id": 4136, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4123, + "src": "4136:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4113:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4097:43:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4139, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4125, + "src": "4154:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 4140, + "name": "oldValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4131, + "src": "4160:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4154:14:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4164, + "nodeType": "Block", + "src": "4232:74:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4152, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4246:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4156, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4153, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4257:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4257:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4246:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4157, + "indexExpression": { + "argumentTypes": null, + "id": 4155, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4123, + "src": "4269:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4246:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4159, + "name": "oldValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4131, + "src": "4281:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4160, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4125, + "src": "4291:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4158, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "4276:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4276:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4246:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4163, + "nodeType": "ExpressionStatement", + "src": "4246:49:7" + } + ] + }, + "id": 4165, + "nodeType": "IfStatement", + "src": "4150:156:7", + "trueBody": { + "id": 4151, + "nodeType": "Block", + "src": "4170:56:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4142, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4184:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4146, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4143, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4195:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4195:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4184:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4147, + "indexExpression": { + "argumentTypes": null, + "id": 4145, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4123, + "src": "4207:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4184:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 4148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4214:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4184:31:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4150, + "nodeType": "ExpressionStatement", + "src": "4184:31:7" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4167, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4329:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4329:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4169, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4123, + "src": "4341:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4170, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4346:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4173, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4171, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4357:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4357:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4346:22:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4175, + "indexExpression": { + "argumentTypes": null, + "id": 4174, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4123, + "src": "4369:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4346:27:7", + "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": 4166, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "src": "4320:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4320:54:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4177, + "nodeType": "EmitStatement", + "src": "4315:59:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4391:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4129, + "id": 4179, + "nodeType": "Return", + "src": "4384:11:7" + } + ] + }, + "documentation": null, + "id": 4181, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decreaseApproval", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4126, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4123, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4181, + "src": "4040:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4040:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4125, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 4181, + "src": "4053:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4124, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4053:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4039:23:7" + }, + "returnParameters": { + "id": 4129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4128, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4181, + "src": "4081:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4127, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4081:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4080:6:7" + }, + "scope": 4285, + "src": "4014:388:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4199, + "nodeType": "Block", + "src": "4473:65:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4191, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4489:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4489:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4193, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4183, + "src": "4501:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4194, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4185, + "src": "4506:3:7", + "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": 4190, + "name": "_move", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3946, + "src": "4483:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4483:27:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4196, + "nodeType": "ExpressionStatement", + "src": "4483:27:7" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4527:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4189, + "id": 4198, + "nodeType": "Return", + "src": "4520:11:7" + } + ] + }, + "documentation": null, + "id": 4200, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4186, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4183, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4200, + "src": "4426:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4182, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4426:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4185, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 4200, + "src": "4439:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4184, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4439:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4425:23:7" + }, + "returnParameters": { + "id": 4189, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4188, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4200, + "src": "4467:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4187, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4467:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4466:6:7" + }, + "scope": 4285, + "src": "4408:130:7", + "stateMutability": "nonpayable", + "superFunction": 7060, + "visibility": "external" + }, + { + "body": { + "id": 4283, + "nodeType": "Block", + "src": "4673:436:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4212, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4704:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4704:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 4214, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4718:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4704:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4216, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "4725:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4217, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4732:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4219, + "indexExpression": { + "argumentTypes": null, + "id": 4218, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4743:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4732:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4222, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4220, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4748:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4748:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4732:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4725:34:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4704:55:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f42544f4b454e5f4241445f43414c4c4552", + "id": 4225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4774:23:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7c78c5c07128d4fb2c83ecfae573652cc351a44f64cf0f454240bdf4749e318c", + "typeString": "literal_string \"ERR_BTOKEN_BAD_CALLER\"" + }, + "value": "ERR_BTOKEN_BAD_CALLER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7c78c5c07128d4fb2c83ecfae573652cc351a44f64cf0f454240bdf4749e318c", + "typeString": "literal_string \"ERR_BTOKEN_BAD_CALLER\"" + } + ], + "id": 4211, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "4683:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4683:124:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4227, + "nodeType": "ExpressionStatement", + "src": "4683:124:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4229, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4823:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4230, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4204, + "src": "4828:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4231, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "4833:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4228, + "name": "_move", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3946, + "src": "4817:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4817:20:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4233, + "nodeType": "ExpressionStatement", + "src": "4817:20:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4234, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4851:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4851:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 4236, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4865:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4851:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4238, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4872:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4240, + "indexExpression": { + "argumentTypes": null, + "id": 4239, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4883:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4872:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4243, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4241, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4888:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4888:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4872:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "4911:2:7", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 4245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4912:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 4244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4903:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 4247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4903:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4872:42:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4851:63:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 4280, + "nodeType": "IfStatement", + "src": "4847:235:7", + "trueBody": { + "id": 4279, + "nodeType": "Block", + "src": "4916:166:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4250, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4930:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4254, + "indexExpression": { + "argumentTypes": null, + "id": 4251, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4941:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4930:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4255, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4252, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4946:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4946:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4930:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4257, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "4965:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4259, + "indexExpression": { + "argumentTypes": null, + "id": 4258, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "4976:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4965:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4262, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4260, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4981:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4981:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4965:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4263, + "name": "amt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "4994:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4256, + "name": "bsub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "4960:4:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4960:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4930:68:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4266, + "nodeType": "ExpressionStatement", + "src": "4930:68:7" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4268, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "5026:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5026:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4270, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4204, + "src": "5038:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4271, + "name": "_allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3794, + "src": "5043:10:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4273, + "indexExpression": { + "argumentTypes": null, + "id": 4272, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4202, + "src": "5054:3:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5043:15:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4276, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4274, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "5059:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5059:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5043:27:7", + "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": 4267, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "src": "5017:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5017:54:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4278, + "nodeType": "EmitStatement", + "src": "5012:59:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4281, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5098:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 4210, + "id": 4282, + "nodeType": "Return", + "src": "5091:11:7" + } + ] + }, + "documentation": null, + "id": 4284, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4202, + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 4284, + "src": "4575:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4201, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4575:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4204, + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 4284, + "src": "4597:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4203, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4597:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4206, + "name": "amt", + "nodeType": "VariableDeclaration", + "scope": 4284, + "src": "4619:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4205, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4619:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4565:68:7" + }, + "returnParameters": { + "id": 4210, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4209, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4284, + "src": "4662:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4208, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4662:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4661:6:7" + }, + "scope": 4285, + "src": "4544:565:7", + "stateMutability": "nonpayable", + "superFunction": 7089, + "visibility": "external" + } + ], + "scope": 4286, + "src": "2812:2299:7" + } + ], + "src": "643:4469:7" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BToken.sol", + "exportedSymbols": { + "BToken": [ + 4285 + ], + "BTokenBase": [ + 3979 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 3780, + "name": "PragmaDirective", + "src": "643:22:7" + }, + { + "attributes": { + "SourceUnit": 1423, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/balancer/BNum.sol", + "file": "./BNum.sol", + "scope": 4286, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 3781, + "name": "ImportDirective", + "src": "667:20:7" + }, + { + "attributes": { + "SourceUnit": 7107, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "scope": 4286, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 3782, + "name": "ImportDirective", + "src": "688:64:7" + }, + { + "attributes": { + "contractDependencies": [ + 280, + 1422 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 3979, + 1422, + 280 + ], + "name": "BTokenBase", + "scope": 4286 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BNum", + "referencedDeclaration": 1422, + "type": "contract BNum" + }, + "id": 3783, + "name": "UserDefinedTypeName", + "src": "1468:4:7" + } + ], + "id": 3784, + "name": "InheritanceSpecifier", + "src": "1468:4:7" + }, + { + "attributes": { + "constant": false, + "name": "_balance", + "scope": 3979, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => uint256)", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 3785, + "name": "ElementaryTypeName", + "src": "1488:7:7" + }, + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3786, + "name": "ElementaryTypeName", + "src": "1499:4:7" + } + ], + "id": 3787, + "name": "Mapping", + "src": "1480:24:7" + } + ], + "id": 3788, + "name": "VariableDeclaration", + "src": "1480:60:7" + }, + { + "attributes": { + "constant": false, + "name": "_allowance", + "scope": 3979, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => mapping(address => uint256))", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => mapping(address => uint256))" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 3789, + "name": "ElementaryTypeName", + "src": "1554:7:7" + }, + { + "attributes": { + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 3790, + "name": "ElementaryTypeName", + "src": "1573:7:7" + }, + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3791, + "name": "ElementaryTypeName", + "src": "1582:4:7" + } + ], + "id": 3792, + "name": "Mapping", + "src": "1565:22:7" + } + ], + "id": 3793, + "name": "Mapping", + "src": "1546:42:7" + } + ], + "id": 3794, + "name": "VariableDeclaration", + "src": "1546:62:7" + }, + { + "attributes": { + "constant": false, + "name": "_totalSupply", + "scope": 3979, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3795, + "name": "ElementaryTypeName", + "src": "1614:4:7" + } + ], + "id": 3796, + "name": "VariableDeclaration", + "src": "1614:26:7" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "Approval" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "src", + "scope": 3804, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3797, + "name": "ElementaryTypeName", + "src": "1662:7:7" + } + ], + "id": 3798, + "name": "VariableDeclaration", + "src": "1662:19:7" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "dst", + "scope": 3804, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3799, + "name": "ElementaryTypeName", + "src": "1683:7:7" + } + ], + "id": 3800, + "name": "VariableDeclaration", + "src": "1683:19:7" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "amt", + "scope": 3804, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3801, + "name": "ElementaryTypeName", + "src": "1704:4:7" + } + ], + "id": 3802, + "name": "VariableDeclaration", + "src": "1704:8:7" + } + ], + "id": 3803, + "name": "ParameterList", + "src": "1661:52:7" + } + ], + "id": 3804, + "name": "EventDefinition", + "src": "1647:67:7" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "Transfer" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "src", + "scope": 3812, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3805, + "name": "ElementaryTypeName", + "src": "1734:7:7" + } + ], + "id": 3806, + "name": "VariableDeclaration", + "src": "1734:19:7" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "dst", + "scope": 3812, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3807, + "name": "ElementaryTypeName", + "src": "1755:7:7" + } + ], + "id": 3808, + "name": "VariableDeclaration", + "src": "1755:19:7" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "amt", + "scope": 3812, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3809, + "name": "ElementaryTypeName", + "src": "1776:4:7" + } + ], + "id": 3810, + "name": "VariableDeclaration", + "src": "1776:8:7" + } + ], + "id": 3811, + "name": "ParameterList", + "src": "1733:52:7" + } + ], + "id": 3812, + "name": "EventDefinition", + "src": "1719:67:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_mint", + "scope": 3979, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 3850, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3813, + "name": "ElementaryTypeName", + "src": "1807:4:7" + } + ], + "id": 3814, + "name": "VariableDeclaration", + "src": "1807:8:7" + } + ], + "id": 3815, + "name": "ParameterList", + "src": "1806:10:7" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3816, + "name": "ParameterList", + "src": "1826:0:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3817, + "name": "Identifier", + "src": "1836:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3818, + "name": "ElementaryTypeNameExpression", + "src": "1845:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3819, + "name": "Identifier", + "src": "1853:4:7" + } + ], + "id": 3820, + "name": "FunctionCall", + "src": "1845:13:7" + } + ], + "id": 3821, + "name": "IndexAccess", + "src": "1836:23:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 3822, + "name": "Identifier", + "src": "1862:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3823, + "name": "Identifier", + "src": "1867:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3824, + "name": "ElementaryTypeNameExpression", + "src": "1876:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3825, + "name": "Identifier", + "src": "1884:4:7" + } + ], + "id": 3826, + "name": "FunctionCall", + "src": "1876:13:7" + } + ], + "id": 3827, + "name": "IndexAccess", + "src": "1867:23:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3814, + "type": "uint256", + "value": "amt" + }, + "id": 3828, + "name": "Identifier", + "src": "1892:3:7" + } + ], + "id": 3829, + "name": "FunctionCall", + "src": "1862:34:7" + } + ], + "id": 3830, + "name": "Assignment", + "src": "1836:60:7" + } + ], + "id": 3831, + "name": "ExpressionStatement", + "src": "1836:60:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3832, + "name": "Identifier", + "src": "1906:12:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 3833, + "name": "Identifier", + "src": "1921:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3834, + "name": "Identifier", + "src": "1926:12:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3814, + "type": "uint256", + "value": "amt" + }, + "id": 3835, + "name": "Identifier", + "src": "1940:3:7" + } + ], + "id": 3836, + "name": "FunctionCall", + "src": "1921:23:7" + } + ], + "id": 3837, + "name": "Assignment", + "src": "1906:38:7" + } + ], + "id": 3838, + "name": "ExpressionStatement", + "src": "1906:38:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3812, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 3839, + "name": "Identifier", + "src": "1959:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3840, + "name": "ElementaryTypeNameExpression", + "src": "1968:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 3841, + "name": "Literal", + "src": "1976:1:7" + } + ], + "id": 3842, + "name": "FunctionCall", + "src": "1968:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3843, + "name": "ElementaryTypeNameExpression", + "src": "1980:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3844, + "name": "Identifier", + "src": "1988:4:7" + } + ], + "id": 3845, + "name": "FunctionCall", + "src": "1980:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3814, + "type": "uint256", + "value": "amt" + }, + "id": 3846, + "name": "Identifier", + "src": "1995:3:7" + } + ], + "id": 3847, + "name": "FunctionCall", + "src": "1959:40:7" + } + ], + "id": 3848, + "name": "EmitStatement", + "src": "1954:45:7" + } + ], + "id": 3849, + "name": "Block", + "src": "1826:180:7" + } + ], + "id": 3850, + "name": "FunctionDefinition", + "src": "1792:214:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_burn", + "scope": 3979, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 3899, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3851, + "name": "ElementaryTypeName", + "src": "2027:4:7" + } + ], + "id": 3852, + "name": "VariableDeclaration", + "src": "2027:8:7" + } + ], + "id": 3853, + "name": "ParameterList", + "src": "2026:10:7" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3854, + "name": "ParameterList", + "src": "2046:0:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3855, + "name": "Identifier", + "src": "2056:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3856, + "name": "Identifier", + "src": "2077:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3857, + "name": "ElementaryTypeNameExpression", + "src": "2086:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3858, + "name": "Identifier", + "src": "2094:4:7" + } + ], + "id": 3859, + "name": "FunctionCall", + "src": "2086:13:7" + } + ], + "id": 3860, + "name": "IndexAccess", + "src": "2077:23:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3852, + "type": "uint256", + "value": "amt" + }, + "id": 3861, + "name": "Identifier", + "src": "2104:3:7" + } + ], + "id": 3862, + "name": "BinaryOperation", + "src": "2077:30:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f494e53554646494349454e545f42414c", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_INSUFFICIENT_BAL\"", + "value": "ERR_INSUFFICIENT_BAL" + }, + "id": 3863, + "name": "Literal", + "src": "2122:22:7" + } + ], + "id": 3864, + "name": "FunctionCall", + "src": "2056:98:7" + } + ], + "id": 3865, + "name": "ExpressionStatement", + "src": "2056:98:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3866, + "name": "Identifier", + "src": "2164:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3867, + "name": "ElementaryTypeNameExpression", + "src": "2173:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3868, + "name": "Identifier", + "src": "2181:4:7" + } + ], + "id": 3869, + "name": "FunctionCall", + "src": "2173:13:7" + } + ], + "id": 3870, + "name": "IndexAccess", + "src": "2164:23:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 3871, + "name": "Identifier", + "src": "2190:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3872, + "name": "Identifier", + "src": "2195:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3873, + "name": "ElementaryTypeNameExpression", + "src": "2204:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3874, + "name": "Identifier", + "src": "2212:4:7" + } + ], + "id": 3875, + "name": "FunctionCall", + "src": "2204:13:7" + } + ], + "id": 3876, + "name": "IndexAccess", + "src": "2195:23:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3852, + "type": "uint256", + "value": "amt" + }, + "id": 3877, + "name": "Identifier", + "src": "2220:3:7" + } + ], + "id": 3878, + "name": "FunctionCall", + "src": "2190:34:7" + } + ], + "id": 3879, + "name": "Assignment", + "src": "2164:60:7" + } + ], + "id": 3880, + "name": "ExpressionStatement", + "src": "2164:60:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3881, + "name": "Identifier", + "src": "2234:12:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 3882, + "name": "Identifier", + "src": "2249:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 3883, + "name": "Identifier", + "src": "2254:12:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3852, + "type": "uint256", + "value": "amt" + }, + "id": 3884, + "name": "Identifier", + "src": "2268:3:7" + } + ], + "id": 3885, + "name": "FunctionCall", + "src": "2249:23:7" + } + ], + "id": 3886, + "name": "Assignment", + "src": "2234:38:7" + } + ], + "id": 3887, + "name": "ExpressionStatement", + "src": "2234:38:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3812, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 3888, + "name": "Identifier", + "src": "2287:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3889, + "name": "ElementaryTypeNameExpression", + "src": "2296:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3890, + "name": "Identifier", + "src": "2304:4:7" + } + ], + "id": 3891, + "name": "FunctionCall", + "src": "2296:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3892, + "name": "ElementaryTypeNameExpression", + "src": "2311:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 3893, + "name": "Literal", + "src": "2319:1:7" + } + ], + "id": 3894, + "name": "FunctionCall", + "src": "2311:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3852, + "type": "uint256", + "value": "amt" + }, + "id": 3895, + "name": "Identifier", + "src": "2323:3:7" + } + ], + "id": 3896, + "name": "FunctionCall", + "src": "2287:40:7" + } + ], + "id": 3897, + "name": "EmitStatement", + "src": "2282:45:7" + } + ], + "id": 3898, + "name": "Block", + "src": "2046:288:7" + } + ], + "id": 3899, + "name": "FunctionDefinition", + "src": "2012:322:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_move", + "scope": 3979, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "src", + "scope": 3946, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3900, + "name": "ElementaryTypeName", + "src": "2355:7:7" + } + ], + "id": 3901, + "name": "VariableDeclaration", + "src": "2355:11:7" + }, + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 3946, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3902, + "name": "ElementaryTypeName", + "src": "2368:7:7" + } + ], + "id": 3903, + "name": "VariableDeclaration", + "src": "2368:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 3946, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3904, + "name": "ElementaryTypeName", + "src": "2381:4:7" + } + ], + "id": 3905, + "name": "VariableDeclaration", + "src": "2381:8:7" + } + ], + "id": 3906, + "name": "ParameterList", + "src": "2354:36:7" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3907, + "name": "ParameterList", + "src": "2400:0:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6d886dfa4c52985ff7e07248f8343de807c72a722ad596b432ce38fd268e3469", + "typeString": "literal_string \"ERR_INSUFFICIENT_BAL\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 3908, + "name": "Identifier", + "src": "2410:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3909, + "name": "Identifier", + "src": "2418:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3901, + "type": "address", + "value": "src" + }, + "id": 3910, + "name": "Identifier", + "src": "2427:3:7" + } + ], + "id": 3911, + "name": "IndexAccess", + "src": "2418:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3905, + "type": "uint256", + "value": "amt" + }, + "id": 3912, + "name": "Identifier", + "src": "2435:3:7" + } + ], + "id": 3913, + "name": "BinaryOperation", + "src": "2418:20:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f494e53554646494349454e545f42414c", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_INSUFFICIENT_BAL\"", + "value": "ERR_INSUFFICIENT_BAL" + }, + "id": 3914, + "name": "Literal", + "src": "2440:22:7" + } + ], + "id": 3915, + "name": "FunctionCall", + "src": "2410:53:7" + } + ], + "id": 3916, + "name": "ExpressionStatement", + "src": "2410:53:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3917, + "name": "Identifier", + "src": "2473:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3901, + "type": "address", + "value": "src" + }, + "id": 3918, + "name": "Identifier", + "src": "2482:3:7" + } + ], + "id": 3919, + "name": "IndexAccess", + "src": "2473:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 3920, + "name": "Identifier", + "src": "2489:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3921, + "name": "Identifier", + "src": "2494:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3901, + "type": "address", + "value": "src" + }, + "id": 3922, + "name": "Identifier", + "src": "2503:3:7" + } + ], + "id": 3923, + "name": "IndexAccess", + "src": "2494:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3905, + "type": "uint256", + "value": "amt" + }, + "id": 3924, + "name": "Identifier", + "src": "2509:3:7" + } + ], + "id": 3925, + "name": "FunctionCall", + "src": "2489:24:7" + } + ], + "id": 3926, + "name": "Assignment", + "src": "2473:40:7" + } + ], + "id": 3927, + "name": "ExpressionStatement", + "src": "2473:40:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3928, + "name": "Identifier", + "src": "2523:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3903, + "type": "address", + "value": "dst" + }, + "id": 3929, + "name": "Identifier", + "src": "2532:3:7" + } + ], + "id": 3930, + "name": "IndexAccess", + "src": "2523:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 3931, + "name": "Identifier", + "src": "2539:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 3932, + "name": "Identifier", + "src": "2544:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3903, + "type": "address", + "value": "dst" + }, + "id": 3933, + "name": "Identifier", + "src": "2553:3:7" + } + ], + "id": 3934, + "name": "IndexAccess", + "src": "2544:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3905, + "type": "uint256", + "value": "amt" + }, + "id": 3935, + "name": "Identifier", + "src": "2559:3:7" + } + ], + "id": 3936, + "name": "FunctionCall", + "src": "2539:24:7" + } + ], + "id": 3937, + "name": "Assignment", + "src": "2523:40:7" + } + ], + "id": 3938, + "name": "ExpressionStatement", + "src": "2523:40:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3812, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 3939, + "name": "Identifier", + "src": "2578:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3901, + "type": "address", + "value": "src" + }, + "id": 3940, + "name": "Identifier", + "src": "2587:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3903, + "type": "address", + "value": "dst" + }, + "id": 3941, + "name": "Identifier", + "src": "2592:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3905, + "type": "uint256", + "value": "amt" + }, + "id": 3942, + "name": "Identifier", + "src": "2597:3:7" + } + ], + "id": 3943, + "name": "FunctionCall", + "src": "2578:23:7" + } + ], + "id": 3944, + "name": "EmitStatement", + "src": "2573:28:7" + } + ], + "id": 3945, + "name": "Block", + "src": "2400:208:7" + } + ], + "id": 3946, + "name": "FunctionDefinition", + "src": "2340:268:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_push", + "scope": 3979, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "to", + "scope": 3962, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3947, + "name": "ElementaryTypeName", + "src": "2629:7:7" + } + ], + "id": 3948, + "name": "VariableDeclaration", + "src": "2629:10:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 3962, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3949, + "name": "ElementaryTypeName", + "src": "2641:4:7" + } + ], + "id": 3950, + "name": "VariableDeclaration", + "src": "2641:8:7" + } + ], + "id": 3951, + "name": "ParameterList", + "src": "2628:22:7" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3952, + "name": "ParameterList", + "src": "2660:0:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3946, + "type": "function (address,address,uint256)", + "value": "_move" + }, + "id": 3953, + "name": "Identifier", + "src": "2670:5:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3954, + "name": "ElementaryTypeNameExpression", + "src": "2676:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3955, + "name": "Identifier", + "src": "2684:4:7" + } + ], + "id": 3956, + "name": "FunctionCall", + "src": "2676:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3948, + "type": "address", + "value": "to" + }, + "id": 3957, + "name": "Identifier", + "src": "2691:2:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3950, + "type": "uint256", + "value": "amt" + }, + "id": 3958, + "name": "Identifier", + "src": "2695:3:7" + } + ], + "id": 3959, + "name": "FunctionCall", + "src": "2670:29:7" + } + ], + "id": 3960, + "name": "ExpressionStatement", + "src": "2670:29:7" + } + ], + "id": 3961, + "name": "Block", + "src": "2660:46:7" + } + ], + "id": 3962, + "name": "FunctionDefinition", + "src": "2614:92:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_pull", + "scope": 3979, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "from", + "scope": 3978, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 3963, + "name": "ElementaryTypeName", + "src": "2727:7:7" + } + ], + "id": 3964, + "name": "VariableDeclaration", + "src": "2727:12:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 3978, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 3965, + "name": "ElementaryTypeName", + "src": "2741:4:7" + } + ], + "id": 3966, + "name": "VariableDeclaration", + "src": "2741:8:7" + } + ], + "id": 3967, + "name": "ParameterList", + "src": "2726:24:7" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3968, + "name": "ParameterList", + "src": "2760:0:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3946, + "type": "function (address,address,uint256)", + "value": "_move" + }, + "id": 3969, + "name": "Identifier", + "src": "2770:5:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3964, + "type": "address", + "value": "from" + }, + "id": 3970, + "name": "Identifier", + "src": "2776:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BTokenBase_$3979", + "typeString": "contract BTokenBase" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 3971, + "name": "ElementaryTypeNameExpression", + "src": "2782:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7149, + "type": "contract BTokenBase", + "value": "this" + }, + "id": 3972, + "name": "Identifier", + "src": "2790:4:7" + } + ], + "id": 3973, + "name": "FunctionCall", + "src": "2782:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3966, + "type": "uint256", + "value": "amt" + }, + "id": 3974, + "name": "Identifier", + "src": "2797:3:7" + } + ], + "id": 3975, + "name": "FunctionCall", + "src": "2770:31:7" + } + ], + "id": 3976, + "name": "ExpressionStatement", + "src": "2770:31:7" + } + ], + "id": 3977, + "name": "Block", + "src": "2760:48:7" + } + ], + "id": 3978, + "name": "FunctionDefinition", + "src": "2712:96:7" + } + ], + "id": 3979, + "name": "ContractDefinition", + "src": "1445:1365:7" + }, + { + "attributes": { + "contractDependencies": [ + 280, + 1422, + 3979, + 7106 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 4285, + 7106, + 3979, + 1422, + 280 + ], + "name": "BToken", + "scope": 4286 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BTokenBase", + "referencedDeclaration": 3979, + "type": "contract BTokenBase" + }, + "id": 3980, + "name": "UserDefinedTypeName", + "src": "2831:10:7" + } + ], + "id": 3981, + "name": "InheritanceSpecifier", + "src": "2831:10:7" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20", + "referencedDeclaration": 7106, + "type": "contract IERC20" + }, + "id": 3982, + "name": "UserDefinedTypeName", + "src": "2843:6:7" + } + ], + "id": 3983, + "name": "InheritanceSpecifier", + "src": "2843:6:7" + }, + { + "attributes": { + "constant": false, + "name": "_name", + "scope": 4285, + "stateVariable": true, + "storageLocation": "default", + "type": "string", + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 3984, + "name": "ElementaryTypeName", + "src": "2857:6:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "42616c616e63657220506f6f6c20546f6b656e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Balancer Pool Token\"", + "value": "Balancer Pool Token" + }, + "id": 3985, + "name": "Literal", + "src": "2885:21:7" + } + ], + "id": 3986, + "name": "VariableDeclaration", + "src": "2857:49:7" + }, + { + "attributes": { + "constant": false, + "name": "_symbol", + "scope": 4285, + "stateVariable": true, + "storageLocation": "default", + "type": "string", + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 3987, + "name": "ElementaryTypeName", + "src": "2912:6:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "425054", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"BPT\"", + "value": "BPT" + }, + "id": 3988, + "name": "Literal", + "src": "2940:5:7" + } + ], + "id": 3989, + "name": "VariableDeclaration", + "src": "2912:33:7" + }, + { + "attributes": { + "constant": false, + "name": "_decimals", + "scope": 4285, + "stateVariable": true, + "storageLocation": "default", + "type": "uint8", + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 3990, + "name": "ElementaryTypeName", + "src": "2951:5:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3138", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 18", + "value": "18" + }, + "id": 3991, + "name": "Literal", + "src": "2979:2:7" + } + ], + "id": 3992, + "name": "VariableDeclaration", + "src": "2951:30:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "name", + "scope": 4285, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 3993, + "name": "ParameterList", + "src": "3001:2:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4000, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 3994, + "name": "ElementaryTypeName", + "src": "3025:6:7" + } + ], + "id": 3995, + "name": "VariableDeclaration", + "src": "3025:13:7" + } + ], + "id": 3996, + "name": "ParameterList", + "src": "3024:15:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 3996 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3986, + "type": "string storage ref", + "value": "_name" + }, + "id": 3997, + "name": "Identifier", + "src": "3057:5:7" + } + ], + "id": 3998, + "name": "Return", + "src": "3050:12:7" + } + ], + "id": 3999, + "name": "Block", + "src": "3040:29:7" + } + ], + "id": 4000, + "name": "FunctionDefinition", + "src": "2988:81:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "symbol", + "scope": 4285, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4001, + "name": "ParameterList", + "src": "3090:2:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4008, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 4002, + "name": "ElementaryTypeName", + "src": "3114:6:7" + } + ], + "id": 4003, + "name": "VariableDeclaration", + "src": "3114:13:7" + } + ], + "id": 4004, + "name": "ParameterList", + "src": "3113:15:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 4004 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3989, + "type": "string storage ref", + "value": "_symbol" + }, + "id": 4005, + "name": "Identifier", + "src": "3146:7:7" + } + ], + "id": 4006, + "name": "Return", + "src": "3139:14:7" + } + ], + "id": 4007, + "name": "Block", + "src": "3129:31:7" + } + ], + "id": 4008, + "name": "FunctionDefinition", + "src": "3075:85:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "decimals", + "scope": 4285, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4009, + "name": "ParameterList", + "src": "3183:2:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4016, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 4010, + "name": "ElementaryTypeName", + "src": "3206:5:7" + } + ], + "id": 4011, + "name": "VariableDeclaration", + "src": "3206:5:7" + } + ], + "id": 4012, + "name": "ParameterList", + "src": "3205:7:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 4012 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3992, + "type": "uint8", + "value": "_decimals" + }, + "id": 4013, + "name": "Identifier", + "src": "3230:9:7" + } + ], + "id": 4014, + "name": "Return", + "src": "3223:16:7" + } + ], + "id": 4015, + "name": "Block", + "src": "3213:33:7" + } + ], + "id": 4016, + "name": "FunctionDefinition", + "src": "3166:80:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "allowance", + "scope": 4285, + "stateMutability": "view", + "superFunction": 7069, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "src", + "scope": 4032, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4017, + "name": "ElementaryTypeName", + "src": "3271:7:7" + } + ], + "id": 4018, + "name": "VariableDeclaration", + "src": "3271:11:7" + }, + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4032, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4019, + "name": "ElementaryTypeName", + "src": "3284:7:7" + } + ], + "id": 4020, + "name": "VariableDeclaration", + "src": "3284:11:7" + } + ], + "id": 4021, + "name": "ParameterList", + "src": "3270:26:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4032, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4022, + "name": "ElementaryTypeName", + "src": "3320:4:7" + } + ], + "id": 4023, + "name": "VariableDeclaration", + "src": "3320:4:7" + } + ], + "id": 4024, + "name": "ParameterList", + "src": "3319:6:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 4024 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4025, + "name": "Identifier", + "src": "3343:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4018, + "type": "address", + "value": "src" + }, + "id": 4026, + "name": "Identifier", + "src": "3354:3:7" + } + ], + "id": 4027, + "name": "IndexAccess", + "src": "3343:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4020, + "type": "address", + "value": "dst" + }, + "id": 4028, + "name": "Identifier", + "src": "3359:3:7" + } + ], + "id": 4029, + "name": "IndexAccess", + "src": "3343:20:7" + } + ], + "id": 4030, + "name": "Return", + "src": "3336:27:7" + } + ], + "id": 4031, + "name": "Block", + "src": "3326:44:7" + } + ], + "id": 4032, + "name": "FunctionDefinition", + "src": "3252:118:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "balanceOf", + "scope": 4285, + "stateMutability": "view", + "superFunction": 7051, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "whom", + "scope": 4044, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4033, + "name": "ElementaryTypeName", + "src": "3395:7:7" + } + ], + "id": 4034, + "name": "VariableDeclaration", + "src": "3395:12:7" + } + ], + "id": 4035, + "name": "ParameterList", + "src": "3394:14:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4044, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4036, + "name": "ElementaryTypeName", + "src": "3432:4:7" + } + ], + "id": 4037, + "name": "VariableDeclaration", + "src": "3432:4:7" + } + ], + "id": 4038, + "name": "ParameterList", + "src": "3431:6:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 4038 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3788, + "type": "mapping(address => uint256)", + "value": "_balance" + }, + "id": 4039, + "name": "Identifier", + "src": "3455:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4034, + "type": "address", + "value": "whom" + }, + "id": 4040, + "name": "Identifier", + "src": "3464:4:7" + } + ], + "id": 4041, + "name": "IndexAccess", + "src": "3455:14:7" + } + ], + "id": 4042, + "name": "Return", + "src": "3448:21:7" + } + ], + "id": 4043, + "name": "Block", + "src": "3438:38:7" + } + ], + "id": 4044, + "name": "FunctionDefinition", + "src": "3376:100:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "totalSupply", + "scope": 4285, + "stateMutability": "view", + "superFunction": 7044, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4045, + "name": "ParameterList", + "src": "3502:2:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4052, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4046, + "name": "ElementaryTypeName", + "src": "3526:4:7" + } + ], + "id": 4047, + "name": "VariableDeclaration", + "src": "3526:4:7" + } + ], + "id": 4048, + "name": "ParameterList", + "src": "3525:6:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 4048 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3796, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 4049, + "name": "Identifier", + "src": "3549:12:7" + } + ], + "id": 4050, + "name": "Return", + "src": "3542:19:7" + } + ], + "id": 4051, + "name": "Block", + "src": "3532:36:7" + } + ], + "id": 4052, + "name": "FunctionDefinition", + "src": "3482:86:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "approve", + "scope": 4285, + "stateMutability": "nonpayable", + "superFunction": 7078, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4080, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4053, + "name": "ElementaryTypeName", + "src": "3591:7:7" + } + ], + "id": 4054, + "name": "VariableDeclaration", + "src": "3591:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 4080, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4055, + "name": "ElementaryTypeName", + "src": "3604:4:7" + } + ], + "id": 4056, + "name": "VariableDeclaration", + "src": "3604:8:7" + } + ], + "id": 4057, + "name": "ParameterList", + "src": "3590:23:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4080, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4058, + "name": "ElementaryTypeName", + "src": "3632:4:7" + } + ], + "id": 4059, + "name": "VariableDeclaration", + "src": "3632:4:7" + } + ], + "id": 4060, + "name": "ParameterList", + "src": "3631:6:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4061, + "name": "Identifier", + "src": "3648:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4062, + "name": "Identifier", + "src": "3659:3:7" + } + ], + "id": 4063, + "name": "MemberAccess", + "src": "3659:10:7" + } + ], + "id": 4065, + "name": "IndexAccess", + "src": "3648:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4054, + "type": "address", + "value": "dst" + }, + "id": 4064, + "name": "Identifier", + "src": "3671:3:7" + } + ], + "id": 4066, + "name": "IndexAccess", + "src": "3648:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4056, + "type": "uint256", + "value": "amt" + }, + "id": 4067, + "name": "Identifier", + "src": "3678:3:7" + } + ], + "id": 4068, + "name": "Assignment", + "src": "3648:33:7" + } + ], + "id": 4069, + "name": "ExpressionStatement", + "src": "3648:33:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 4070, + "name": "Identifier", + "src": "3696:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4071, + "name": "Identifier", + "src": "3705:3:7" + } + ], + "id": 4072, + "name": "MemberAccess", + "src": "3705:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4054, + "type": "address", + "value": "dst" + }, + "id": 4073, + "name": "Identifier", + "src": "3717:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4056, + "type": "uint256", + "value": "amt" + }, + "id": 4074, + "name": "Identifier", + "src": "3722:3:7" + } + ], + "id": 4075, + "name": "FunctionCall", + "src": "3696:30:7" + } + ], + "id": 4076, + "name": "EmitStatement", + "src": "3691:35:7" + }, + { + "attributes": { + "functionReturnParameters": 4060 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4077, + "name": "Literal", + "src": "3743:4:7" + } + ], + "id": 4078, + "name": "Return", + "src": "3736:11:7" + } + ], + "id": 4079, + "name": "Block", + "src": "3638:116:7" + } + ], + "id": 4080, + "name": "FunctionDefinition", + "src": "3574:180:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "increaseApproval", + "scope": 4285, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4121, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4081, + "name": "ElementaryTypeName", + "src": "3786:7:7" + } + ], + "id": 4082, + "name": "VariableDeclaration", + "src": "3786:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 4121, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4083, + "name": "ElementaryTypeName", + "src": "3799:4:7" + } + ], + "id": 4084, + "name": "VariableDeclaration", + "src": "3799:8:7" + } + ], + "id": 4085, + "name": "ParameterList", + "src": "3785:23:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4121, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4086, + "name": "ElementaryTypeName", + "src": "3827:4:7" + } + ], + "id": 4087, + "name": "VariableDeclaration", + "src": "3827:4:7" + } + ], + "id": 4088, + "name": "ParameterList", + "src": "3826:6:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4089, + "name": "Identifier", + "src": "3843:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4090, + "name": "Identifier", + "src": "3854:3:7" + } + ], + "id": 4091, + "name": "MemberAccess", + "src": "3854:10:7" + } + ], + "id": 4093, + "name": "IndexAccess", + "src": "3843:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4082, + "type": "address", + "value": "dst" + }, + "id": 4092, + "name": "Identifier", + "src": "3866:3:7" + } + ], + "id": 4094, + "name": "IndexAccess", + "src": "3843:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1001, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "badd" + }, + "id": 4095, + "name": "Identifier", + "src": "3873:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4096, + "name": "Identifier", + "src": "3878:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4097, + "name": "Identifier", + "src": "3889:3:7" + } + ], + "id": 4098, + "name": "MemberAccess", + "src": "3889:10:7" + } + ], + "id": 4099, + "name": "IndexAccess", + "src": "3878:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4082, + "type": "address", + "value": "dst" + }, + "id": 4100, + "name": "Identifier", + "src": "3901:3:7" + } + ], + "id": 4101, + "name": "IndexAccess", + "src": "3878:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4084, + "type": "uint256", + "value": "amt" + }, + "id": 4102, + "name": "Identifier", + "src": "3907:3:7" + } + ], + "id": 4103, + "name": "FunctionCall", + "src": "3873:38:7" + } + ], + "id": 4104, + "name": "Assignment", + "src": "3843:68:7" + } + ], + "id": 4105, + "name": "ExpressionStatement", + "src": "3843:68:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 4106, + "name": "Identifier", + "src": "3926:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4107, + "name": "Identifier", + "src": "3935:3:7" + } + ], + "id": 4108, + "name": "MemberAccess", + "src": "3935:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4082, + "type": "address", + "value": "dst" + }, + "id": 4109, + "name": "Identifier", + "src": "3947:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4110, + "name": "Identifier", + "src": "3952:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4111, + "name": "Identifier", + "src": "3963:3:7" + } + ], + "id": 4112, + "name": "MemberAccess", + "src": "3963:10:7" + } + ], + "id": 4113, + "name": "IndexAccess", + "src": "3952:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4082, + "type": "address", + "value": "dst" + }, + "id": 4114, + "name": "Identifier", + "src": "3975:3:7" + } + ], + "id": 4115, + "name": "IndexAccess", + "src": "3952:27:7" + } + ], + "id": 4116, + "name": "FunctionCall", + "src": "3926:54:7" + } + ], + "id": 4117, + "name": "EmitStatement", + "src": "3921:59:7" + }, + { + "attributes": { + "functionReturnParameters": 4088 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4118, + "name": "Literal", + "src": "3997:4:7" + } + ], + "id": 4119, + "name": "Return", + "src": "3990:11:7" + } + ], + "id": 4120, + "name": "Block", + "src": "3833:175:7" + } + ], + "id": 4121, + "name": "FunctionDefinition", + "src": "3760:248:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "decreaseApproval", + "scope": 4285, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4181, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4122, + "name": "ElementaryTypeName", + "src": "4040:7:7" + } + ], + "id": 4123, + "name": "VariableDeclaration", + "src": "4040:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 4181, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4124, + "name": "ElementaryTypeName", + "src": "4053:4:7" + } + ], + "id": 4125, + "name": "VariableDeclaration", + "src": "4053:8:7" + } + ], + "id": 4126, + "name": "ParameterList", + "src": "4039:23:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4181, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4127, + "name": "ElementaryTypeName", + "src": "4081:4:7" + } + ], + "id": 4128, + "name": "VariableDeclaration", + "src": "4081:4:7" + } + ], + "id": 4129, + "name": "ParameterList", + "src": "4080:6:7" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 4131 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "oldValue", + "scope": 4180, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4130, + "name": "ElementaryTypeName", + "src": "4097:4:7" + } + ], + "id": 4131, + "name": "VariableDeclaration", + "src": "4097:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4132, + "name": "Identifier", + "src": "4113:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4133, + "name": "Identifier", + "src": "4124:3:7" + } + ], + "id": 4134, + "name": "MemberAccess", + "src": "4124:10:7" + } + ], + "id": 4135, + "name": "IndexAccess", + "src": "4113:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4123, + "type": "address", + "value": "dst" + }, + "id": 4136, + "name": "Identifier", + "src": "4136:3:7" + } + ], + "id": 4137, + "name": "IndexAccess", + "src": "4113:27:7" + } + ], + "id": 4138, + "name": "VariableDeclarationStatement", + "src": "4097:43:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4125, + "type": "uint256", + "value": "amt" + }, + "id": 4139, + "name": "Identifier", + "src": "4154:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4131, + "type": "uint256", + "value": "oldValue" + }, + "id": 4140, + "name": "Identifier", + "src": "4160:8:7" + } + ], + "id": 4141, + "name": "BinaryOperation", + "src": "4154:14:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4142, + "name": "Identifier", + "src": "4184:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4143, + "name": "Identifier", + "src": "4195:3:7" + } + ], + "id": 4144, + "name": "MemberAccess", + "src": "4195:10:7" + } + ], + "id": 4146, + "name": "IndexAccess", + "src": "4184:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4123, + "type": "address", + "value": "dst" + }, + "id": 4145, + "name": "Identifier", + "src": "4207:3:7" + } + ], + "id": 4147, + "name": "IndexAccess", + "src": "4184:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4148, + "name": "Literal", + "src": "4214:1:7" + } + ], + "id": 4149, + "name": "Assignment", + "src": "4184:31:7" + } + ], + "id": 4150, + "name": "ExpressionStatement", + "src": "4184:31:7" + } + ], + "id": 4151, + "name": "Block", + "src": "4170:56:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4152, + "name": "Identifier", + "src": "4246:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4153, + "name": "Identifier", + "src": "4257:3:7" + } + ], + "id": 4154, + "name": "MemberAccess", + "src": "4257:10:7" + } + ], + "id": 4156, + "name": "IndexAccess", + "src": "4246:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4123, + "type": "address", + "value": "dst" + }, + "id": 4155, + "name": "Identifier", + "src": "4269:3:7" + } + ], + "id": 4157, + "name": "IndexAccess", + "src": "4246:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 4158, + "name": "Identifier", + "src": "4276:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4131, + "type": "uint256", + "value": "oldValue" + }, + "id": 4159, + "name": "Identifier", + "src": "4281:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4125, + "type": "uint256", + "value": "amt" + }, + "id": 4160, + "name": "Identifier", + "src": "4291:3:7" + } + ], + "id": 4161, + "name": "FunctionCall", + "src": "4276:19:7" + } + ], + "id": 4162, + "name": "Assignment", + "src": "4246:49:7" + } + ], + "id": 4163, + "name": "ExpressionStatement", + "src": "4246:49:7" + } + ], + "id": 4164, + "name": "Block", + "src": "4232:74:7" + } + ], + "id": 4165, + "name": "IfStatement", + "src": "4150:156:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 4166, + "name": "Identifier", + "src": "4320:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4167, + "name": "Identifier", + "src": "4329:3:7" + } + ], + "id": 4168, + "name": "MemberAccess", + "src": "4329:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4123, + "type": "address", + "value": "dst" + }, + "id": 4169, + "name": "Identifier", + "src": "4341:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4170, + "name": "Identifier", + "src": "4346:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4171, + "name": "Identifier", + "src": "4357:3:7" + } + ], + "id": 4172, + "name": "MemberAccess", + "src": "4357:10:7" + } + ], + "id": 4173, + "name": "IndexAccess", + "src": "4346:22:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4123, + "type": "address", + "value": "dst" + }, + "id": 4174, + "name": "Identifier", + "src": "4369:3:7" + } + ], + "id": 4175, + "name": "IndexAccess", + "src": "4346:27:7" + } + ], + "id": 4176, + "name": "FunctionCall", + "src": "4320:54:7" + } + ], + "id": 4177, + "name": "EmitStatement", + "src": "4315:59:7" + }, + { + "attributes": { + "functionReturnParameters": 4129 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4178, + "name": "Literal", + "src": "4391:4:7" + } + ], + "id": 4179, + "name": "Return", + "src": "4384:11:7" + } + ], + "id": 4180, + "name": "Block", + "src": "4087:315:7" + } + ], + "id": 4181, + "name": "FunctionDefinition", + "src": "4014:388:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "transfer", + "scope": 4285, + "stateMutability": "nonpayable", + "superFunction": 7060, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4200, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4182, + "name": "ElementaryTypeName", + "src": "4426:7:7" + } + ], + "id": 4183, + "name": "VariableDeclaration", + "src": "4426:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 4200, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4184, + "name": "ElementaryTypeName", + "src": "4439:4:7" + } + ], + "id": 4185, + "name": "VariableDeclaration", + "src": "4439:8:7" + } + ], + "id": 4186, + "name": "ParameterList", + "src": "4425:23:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4200, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4187, + "name": "ElementaryTypeName", + "src": "4467:4:7" + } + ], + "id": 4188, + "name": "VariableDeclaration", + "src": "4467:4:7" + } + ], + "id": 4189, + "name": "ParameterList", + "src": "4466:6:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3946, + "type": "function (address,address,uint256)", + "value": "_move" + }, + "id": 4190, + "name": "Identifier", + "src": "4483:5:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4191, + "name": "Identifier", + "src": "4489:3:7" + } + ], + "id": 4192, + "name": "MemberAccess", + "src": "4489:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4183, + "type": "address", + "value": "dst" + }, + "id": 4193, + "name": "Identifier", + "src": "4501:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4185, + "type": "uint256", + "value": "amt" + }, + "id": 4194, + "name": "Identifier", + "src": "4506:3:7" + } + ], + "id": 4195, + "name": "FunctionCall", + "src": "4483:27:7" + } + ], + "id": 4196, + "name": "ExpressionStatement", + "src": "4483:27:7" + }, + { + "attributes": { + "functionReturnParameters": 4189 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4197, + "name": "Literal", + "src": "4527:4:7" + } + ], + "id": 4198, + "name": "Return", + "src": "4520:11:7" + } + ], + "id": 4199, + "name": "Block", + "src": "4473:65:7" + } + ], + "id": 4200, + "name": "FunctionDefinition", + "src": "4408:130:7" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "transferFrom", + "scope": 4285, + "stateMutability": "nonpayable", + "superFunction": 7089, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "src", + "scope": 4284, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4201, + "name": "ElementaryTypeName", + "src": "4575:7:7" + } + ], + "id": 4202, + "name": "VariableDeclaration", + "src": "4575:11:7" + }, + { + "attributes": { + "constant": false, + "name": "dst", + "scope": 4284, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4203, + "name": "ElementaryTypeName", + "src": "4597:7:7" + } + ], + "id": 4204, + "name": "VariableDeclaration", + "src": "4597:11:7" + }, + { + "attributes": { + "constant": false, + "name": "amt", + "scope": 4284, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4205, + "name": "ElementaryTypeName", + "src": "4619:4:7" + } + ], + "id": 4206, + "name": "VariableDeclaration", + "src": "4619:8:7" + } + ], + "id": 4207, + "name": "ParameterList", + "src": "4565:68:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 4284, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4208, + "name": "ElementaryTypeName", + "src": "4662:4:7" + } + ], + "id": 4209, + "name": "VariableDeclaration", + "src": "4662:4:7" + } + ], + "id": 4210, + "name": "ParameterList", + "src": "4661:6:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7c78c5c07128d4fb2c83ecfae573652cc351a44f64cf0f454240bdf4749e318c", + "typeString": "literal_string \"ERR_BTOKEN_BAD_CALLER\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4211, + "name": "Identifier", + "src": "4683:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "||", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4212, + "name": "Identifier", + "src": "4704:3:7" + } + ], + "id": 4213, + "name": "MemberAccess", + "src": "4704:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4214, + "name": "Identifier", + "src": "4718:3:7" + } + ], + "id": 4215, + "name": "BinaryOperation", + "src": "4704:17:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4206, + "type": "uint256", + "value": "amt" + }, + "id": 4216, + "name": "Identifier", + "src": "4725:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4217, + "name": "Identifier", + "src": "4732:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4218, + "name": "Identifier", + "src": "4743:3:7" + } + ], + "id": 4219, + "name": "IndexAccess", + "src": "4732:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4220, + "name": "Identifier", + "src": "4748:3:7" + } + ], + "id": 4221, + "name": "MemberAccess", + "src": "4748:10:7" + } + ], + "id": 4222, + "name": "IndexAccess", + "src": "4732:27:7" + } + ], + "id": 4223, + "name": "BinaryOperation", + "src": "4725:34:7" + } + ], + "id": 4224, + "name": "BinaryOperation", + "src": "4704:55:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552525f42544f4b454e5f4241445f43414c4c4552", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR_BTOKEN_BAD_CALLER\"", + "value": "ERR_BTOKEN_BAD_CALLER" + }, + "id": 4225, + "name": "Literal", + "src": "4774:23:7" + } + ], + "id": 4226, + "name": "FunctionCall", + "src": "4683:124:7" + } + ], + "id": 4227, + "name": "ExpressionStatement", + "src": "4683:124:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3946, + "type": "function (address,address,uint256)", + "value": "_move" + }, + "id": 4228, + "name": "Identifier", + "src": "4817:5:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4229, + "name": "Identifier", + "src": "4823:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4204, + "type": "address", + "value": "dst" + }, + "id": 4230, + "name": "Identifier", + "src": "4828:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4206, + "type": "uint256", + "value": "amt" + }, + "id": 4231, + "name": "Identifier", + "src": "4833:3:7" + } + ], + "id": 4232, + "name": "FunctionCall", + "src": "4817:20:7" + } + ], + "id": 4233, + "name": "ExpressionStatement", + "src": "4817:20:7" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "&&", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4234, + "name": "Identifier", + "src": "4851:3:7" + } + ], + "id": 4235, + "name": "MemberAccess", + "src": "4851:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4236, + "name": "Identifier", + "src": "4865:3:7" + } + ], + "id": 4237, + "name": "BinaryOperation", + "src": "4851:17:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4238, + "name": "Identifier", + "src": "4872:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4239, + "name": "Identifier", + "src": "4883:3:7" + } + ], + "id": 4240, + "name": "IndexAccess", + "src": "4872:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4241, + "name": "Identifier", + "src": "4888:3:7" + } + ], + "id": 4242, + "name": "MemberAccess", + "src": "4888:10:7" + } + ], + "id": 4243, + "name": "IndexAccess", + "src": "4872:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(uint256)", + "value": "uint256" + }, + "id": 4244, + "name": "ElementaryTypeNameExpression", + "src": "4903:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "-", + "prefix": true, + "type": "int_const -1" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 4245, + "name": "Literal", + "src": "4912:1:7" + } + ], + "id": 4246, + "name": "UnaryOperation", + "src": "4911:2:7" + } + ], + "id": 4247, + "name": "FunctionCall", + "src": "4903:11:7" + } + ], + "id": 4248, + "name": "BinaryOperation", + "src": "4872:42:7" + } + ], + "id": 4249, + "name": "BinaryOperation", + "src": "4851:63:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4250, + "name": "Identifier", + "src": "4930:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4251, + "name": "Identifier", + "src": "4941:3:7" + } + ], + "id": 4254, + "name": "IndexAccess", + "src": "4930:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4252, + "name": "Identifier", + "src": "4946:3:7" + } + ], + "id": 4253, + "name": "MemberAccess", + "src": "4946:10:7" + } + ], + "id": 4255, + "name": "IndexAccess", + "src": "4930:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1028, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "bsub" + }, + "id": 4256, + "name": "Identifier", + "src": "4960:4:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4257, + "name": "Identifier", + "src": "4965:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4258, + "name": "Identifier", + "src": "4976:3:7" + } + ], + "id": 4259, + "name": "IndexAccess", + "src": "4965:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4260, + "name": "Identifier", + "src": "4981:3:7" + } + ], + "id": 4261, + "name": "MemberAccess", + "src": "4981:10:7" + } + ], + "id": 4262, + "name": "IndexAccess", + "src": "4965:27:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4206, + "type": "uint256", + "value": "amt" + }, + "id": 4263, + "name": "Identifier", + "src": "4994:3:7" + } + ], + "id": 4264, + "name": "FunctionCall", + "src": "4960:38:7" + } + ], + "id": 4265, + "name": "Assignment", + "src": "4930:68:7" + } + ], + "id": 4266, + "name": "ExpressionStatement", + "src": "4930:68:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + 7105 + ], + "referencedDeclaration": 7105, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 4267, + "name": "Identifier", + "src": "5017:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4268, + "name": "Identifier", + "src": "5026:3:7" + } + ], + "id": 4269, + "name": "MemberAccess", + "src": "5026:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4204, + "type": "address", + "value": "dst" + }, + "id": 4270, + "name": "Identifier", + "src": "5038:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3794, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowance" + }, + "id": 4271, + "name": "Identifier", + "src": "5043:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4202, + "type": "address", + "value": "src" + }, + "id": 4272, + "name": "Identifier", + "src": "5054:3:7" + } + ], + "id": 4273, + "name": "IndexAccess", + "src": "5043:15:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4274, + "name": "Identifier", + "src": "5059:3:7" + } + ], + "id": 4275, + "name": "MemberAccess", + "src": "5059:10:7" + } + ], + "id": 4276, + "name": "IndexAccess", + "src": "5043:27:7" + } + ], + "id": 4277, + "name": "FunctionCall", + "src": "5017:54:7" + } + ], + "id": 4278, + "name": "EmitStatement", + "src": "5012:59:7" + } + ], + "id": 4279, + "name": "Block", + "src": "4916:166:7" + } + ], + "id": 4280, + "name": "IfStatement", + "src": "4847:235:7" + }, + { + "attributes": { + "functionReturnParameters": 4210 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4281, + "name": "Literal", + "src": "5098:4:7" + } + ], + "id": 4282, + "name": "Return", + "src": "5091:11:7" + } + ], + "id": 4283, + "name": "Block", + "src": "4673:436:7" + } + ], + "id": 4284, + "name": "FunctionDefinition", + "src": "4544:565:7" + } + ], + "id": 4285, + "name": "ContractDefinition", + "src": "2812:2299:7" + } + ], + "id": 4286, + "name": "SourceUnit", + "src": "643:4469:7" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.814Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/Context.json b/artifacts/Context.json new file mode 100644 index 000000000..39f1e66ab --- /dev/null +++ b/artifacts/Context.json @@ -0,0 +1,666 @@ +{ + "contractName": "Context", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"openzeppelin-solidity/contracts/GSN/Context.sol\":\"Context\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzzr://51482c01bddf23793bddee43b60ab9578a62948a4f2082def24ea792a553b055\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n", + "sourcePath": "openzeppelin-solidity/contracts/GSN/Context.sol", + "ast": { + "absolutePath": "openzeppelin-solidity/contracts/GSN/Context.sol", + "exportedSymbols": { + "Context": [ + 6327 + ] + }, + "id": 6328, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6302, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:15" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 6327, + "linearizedBaseContracts": [ + 6327 + ], + "name": "Context", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 6305, + "nodeType": "Block", + "src": "726:3:15", + "statements": [] + }, + "documentation": null, + "id": 6306, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6303, + "nodeType": "ParameterList", + "parameters": [], + "src": "714:2:15" + }, + "returnParameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [], + "src": "726:0:15" + }, + "scope": 6327, + "src": "702:27:15", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6314, + "nodeType": "Block", + "src": "850:34:15", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 6311, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "867:3:15", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "867:10:15", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 6310, + "id": 6313, + "nodeType": "Return", + "src": "860:17:15" + } + ] + }, + "documentation": null, + "id": 6315, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgSender", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6307, + "nodeType": "ParameterList", + "parameters": [], + "src": "807:2:15" + }, + "returnParameters": { + "id": 6310, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6309, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6315, + "src": "833:15:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 6308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "833:15:15", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "832:17:15" + }, + "scope": 6327, + "src": "788:96:15", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6325, + "nodeType": "Block", + "src": "947:165:15", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6320, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7159, + "src": "957:4:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$6327", + "typeString": "contract Context" + } + }, + "id": 6321, + "nodeType": "ExpressionStatement", + "src": "957:4:15" + }, + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 6322, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "1097:3:15", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1097:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "functionReturnParameters": 6319, + "id": 6324, + "nodeType": "Return", + "src": "1090:15:15" + } + ] + }, + "documentation": null, + "id": 6326, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgData", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6316, + "nodeType": "ParameterList", + "parameters": [], + "src": "907:2:15" + }, + "returnParameters": { + "id": 6319, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6318, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6326, + "src": "933:12:15", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6317, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "933:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "932:14:15" + }, + "scope": 6327, + "src": "890:222:15", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 6328, + "src": "525:589:15" + } + ], + "src": "0:1115:15" + }, + "legacyAST": { + "attributes": { + "absolutePath": "openzeppelin-solidity/contracts/GSN/Context.sol", + "exportedSymbols": { + "Context": [ + 6327 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ] + }, + "id": 6302, + "name": "PragmaDirective", + "src": "0:23:15" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 6327 + ], + "name": "Context", + "scope": 6328 + }, + "children": [ + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "modifiers": [ + null + ], + "name": "", + "scope": 6327, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6303, + "name": "ParameterList", + "src": "714:2:15" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6304, + "name": "ParameterList", + "src": "726:0:15" + }, + { + "attributes": { + "statements": [ + null + ] + }, + "children": [], + "id": 6305, + "name": "Block", + "src": "726:3:15" + } + ], + "id": 6306, + "name": "FunctionDefinition", + "src": "702:27:15" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_msgSender", + "scope": 6327, + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6307, + "name": "ParameterList", + "src": "807:2:15" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6315, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 6308, + "name": "ElementaryTypeName", + "src": "833:15:15" + } + ], + "id": 6309, + "name": "VariableDeclaration", + "src": "833:15:15" + } + ], + "id": 6310, + "name": "ParameterList", + "src": "832:17:15" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6310 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 6311, + "name": "Identifier", + "src": "867:3:15" + } + ], + "id": 6312, + "name": "MemberAccess", + "src": "867:10:15" + } + ], + "id": 6313, + "name": "Return", + "src": "860:17:15" + } + ], + "id": 6314, + "name": "Block", + "src": "850:34:15" + } + ], + "id": 6315, + "name": "FunctionDefinition", + "src": "788:96:15" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_msgData", + "scope": 6327, + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6316, + "name": "ParameterList", + "src": "907:2:15" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6326, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 6317, + "name": "ElementaryTypeName", + "src": "933:5:15" + } + ], + "id": 6318, + "name": "VariableDeclaration", + "src": "933:12:15" + } + ], + "id": 6319, + "name": "ParameterList", + "src": "932:14:15" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7159, + "type": "contract Context", + "value": "this" + }, + "id": 6320, + "name": "Identifier", + "src": "957:4:15" + } + ], + "id": 6321, + "name": "ExpressionStatement", + "src": "957:4:15" + }, + { + "attributes": { + "functionReturnParameters": 6319 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "data", + "referencedDeclaration": null, + "type": "bytes calldata" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 6322, + "name": "Identifier", + "src": "1097:3:15" + } + ], + "id": 6323, + "name": "MemberAccess", + "src": "1097:8:15" + } + ], + "id": 6324, + "name": "Return", + "src": "1090:15:15" + } + ], + "id": 6325, + "name": "Block", + "src": "947:165:15" + } + ], + "id": 6326, + "name": "FunctionDefinition", + "src": "890:222:15" + } + ], + "id": 6327, + "name": "ContractDefinition", + "src": "525:589:15" + } + ], + "id": 6328, + "name": "SourceUnit", + "src": "0:1115:15" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.853Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/DTFactory.json b/artifacts/DTFactory.json new file mode 100644 index 000000000..778b74b45 --- /dev/null +++ b/artifacts/DTFactory.json @@ -0,0 +1,4726 @@ +{ + "contractName": "DTFactory", + "abi": [ + { + "inputs": [ + { + "name": "_template", + "type": "address" + }, + { + "name": "_collector", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "newTokenAddress", + "type": "address" + }, + { + "indexed": true, + "name": "templateAddress", + "type": "address" + }, + { + "indexed": true, + "name": "tokenName", + "type": "string" + } + ], + "name": "TokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "name": "tokenName", + "type": "string" + }, + { + "indexed": false, + "name": "tokenSymbol", + "type": "string" + }, + { + "indexed": false, + "name": "tokenCap", + "type": "uint256" + }, + { + "indexed": true, + "name": "registeredBy", + "type": "address" + }, + { + "indexed": true, + "name": "blob", + "type": "string" + } + ], + "name": "TokenRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "instance", + "type": "address" + } + ], + "name": "InstanceDeployed", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "blob", + "type": "string" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "symbol", + "type": "string" + }, + { + "name": "cap", + "type": "uint256" + } + ], + "name": "createToken", + "outputs": [ + { + "name": "token", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCurrentTokenCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getTokenTemplate", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"getTokenTemplate\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentTokenCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"blob\",\"type\":\"string\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"},{\"name\":\"cap\",\"type\":\"uint256\"}],\"name\":\"createToken\",\"outputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_template\",\"type\":\"address\"},{\"name\":\"_collector\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"newTokenAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"templateAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenName\",\"type\":\"string\"}],\"name\":\"TokenCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenName\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"tokenSymbol\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"tokenCap\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"registeredBy\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"blob\",\"type\":\"string\"}],\"name\":\"TokenRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"instance\",\"type\":\"address\"}],\"name\":\"InstanceDeployed\",\"type\":\"event\"}],\"devdoc\":{\"author\":\"Ocean Protocol Team\",\"details\":\"Implementation of Ocean DataTokens Factory * DTFactory deploys DataToken proxy contracts. New DataToken proxy contracts are links to the template contract's bytecode. Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.\",\"methods\":{\"constructor\":{\"details\":\"constructor Called on contract deployment. Could not be called with zero address parameters.\",\"params\":{\"_collector\":\"refers to the community fee collector address\",\"_template\":\"refers to the address of a deployed DataToken contract.\"}},\"createToken(string,string,string,uint256)\":{\"details\":\"Deploys new DataToken proxy contract. Template contract address could not be a zero address.\",\"params\":{\"blob\":\"any string that hold data/metadata for the new token\",\"cap\":\"the maximum total supply\",\"name\":\"token name\",\"symbol\":\"token symbol\"},\"return\":\"address of a new proxy DataToken contract\"},\"getCurrentTokenCount()\":{\"details\":\"get the current token count.\",\"return\":\"the current token count\"},\"getTokenTemplate()\":{\"details\":\"get the token template address\",\"return\":\"the template address\"}},\"title\":\"DTFactory contract\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/DTFactory.sol\":\"DTFactory\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/DTFactory.sol\":{\"keccak256\":\"0x8cf30689a380ec195de52dcee8a0263de862a457ee218d46a3fcb996edc48d89\",\"urls\":[\"bzzr://fb1f26c6ff8246dc38c4ce651fe17c85c8f9e64b3b1344b13c9ec9253202af1f\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol\":{\"keccak256\":\"0x022ebed2ba4949e96a05cc394cf690d8fd3190a4733cebe8cbe930ac25cfde18\",\"urls\":[\"bzzr://2fa3d5cae14f0af7d78f6e1d13bc41854082c03ab2f86462ebb09afda88ee6e9\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/utils/Deployer.sol\":{\"keccak256\":\"0x60ebf25d36c0ee9d310c74eda954a474b0d867f23f57d3b8923d9ee7cc313dcc\",\"urls\":[\"bzzr://81ebb3c5acb99bc74b4bd7ee9897282cb2c983344195645cec8bc2e642680c53\"]}},\"version\":1}", + "bytecode": "0x6080604052600160025534801561001557600080fd5b50604051604080610a278339810180604052604081101561003557600080fd5b508051602090910151600160a060020a0382161580159061005e5750600160a060020a03811615155b6100b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260418152602001806109e66041913960600191505060405180910390fd5b60008054600160a060020a03938416600160a060020a031991821617909155600180549290931691161790556108f8806100ee6000396000f3fe608060405234801561001057600080fd5b506004361061005d577c01000000000000000000000000000000000000000000000000000000006000350463490aad768114610062578063c6cf868a14610086578063efbe8fd1146100a0575b600080fd5b61006a610256565b60408051600160a060020a039092168252519081900360200190f35b61008e610265565b60408051918252519081900360200190f35b61006a600480360360808110156100b657600080fd5b8101906020810181356401000000008111156100d157600080fd5b8201836020820111156100e357600080fd5b8035906020019184600183028401116401000000008311171561010557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561015857600080fd5b82018360208201111561016a57600080fd5b8035906020019184600183028401116401000000008311171561018c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156101df57600080fd5b8201836020820111156101f157600080fd5b8035906020019184600183028401116401000000008311171561021357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061026b915050565b600054600160a060020a031690565b60025490565b6000816102c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806108716022913960400191505060405180910390fd5b6000546102d890600160a060020a0316610791565b9050600160a060020a038116610339576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180610893603a913960400191505060405180910390fd5b6001546040517f9070d2f8000000000000000000000000000000000000000000000000000000008152336044820181905260648201859052600160a060020a0392831660a4830181905260c060048401908152885160c485015288518695861694639070d2f8948b948b9491938b938f939182916024810191608482019160e4019060208c019080838360005b838110156103de5781810151838201526020016103c6565b50505050905090810190601f16801561040b5780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b019080838360005b8381101561043e578181015183820152602001610426565b50505050905090810190601f16801561046b5780820380516001836020036101000a031916815260200191505b50848103825286518152865160209182019188019080838360005b8381101561049e578181015183820152602001610486565b50505050905090810190601f1680156104cb5780820380516001836020036101000a031916815260200191505b509950505050505050505050602060405180830381600087803b1580156104f157600080fd5b505af1158015610505573d6000803e3d6000fd5b505050506040513d602081101561051b57600080fd5b5051610572576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610843602e913960400191505060405180910390fd5b846040518082805190602001908083835b602083106105a25780518252601f199092019160209182019101610583565b5181516020939093036101000a60001901801990911692169190911790526040519201829003822060008054919550600160a060020a039182169450908716927fb51c8cbe199ffe8b0d1d39b62d473569750653cb18b165f77ae423b3900180ad9250a4856040518082805190602001908083835b602083106106365780518252601f199092019160209182019101610617565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902033600160a060020a031683600160a060020a03167f437e99a69c634128e67a85656b80d03b028ba37525b15070606e5c28e846984a888888604051808060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156106e25781810151838201526020016106ca565b50505050905090810190601f16801561070f5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561074257818101518382015260200161072a565b50505050905090810190601f16801561076f5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a450600280546001019055949350505050565b6040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081526c010000000000000000000000008202601482018190527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000602883015260009160378184f060408051600160a060020a038316815290519194507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c925081900360200190a15091905056fe4454466163746f72793a20556e61626c6520746f20696e697469616c697a6520746f6b656e20696e7374616e63654454466163746f72793a207a65726f20636170206973206e6f7420616c6c6f7765644454466163746f72793a204661696c656420746f20706572666f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656ea165627a7a7230582050cb08867ca283c5cf5e15e424d2902135b9a94ccf4d077865da83e7e1cd43c000294454466163746f72793a20496e76616c69642074656d706c61746520746f6b656e2f636f6d6d756e6974792066656520636f6c6c6563746f722061646472657373", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061005d577c01000000000000000000000000000000000000000000000000000000006000350463490aad768114610062578063c6cf868a14610086578063efbe8fd1146100a0575b600080fd5b61006a610256565b60408051600160a060020a039092168252519081900360200190f35b61008e610265565b60408051918252519081900360200190f35b61006a600480360360808110156100b657600080fd5b8101906020810181356401000000008111156100d157600080fd5b8201836020820111156100e357600080fd5b8035906020019184600183028401116401000000008311171561010557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561015857600080fd5b82018360208201111561016a57600080fd5b8035906020019184600183028401116401000000008311171561018c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156101df57600080fd5b8201836020820111156101f157600080fd5b8035906020019184600183028401116401000000008311171561021357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061026b915050565b600054600160a060020a031690565b60025490565b6000816102c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806108716022913960400191505060405180910390fd5b6000546102d890600160a060020a0316610791565b9050600160a060020a038116610339576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180610893603a913960400191505060405180910390fd5b6001546040517f9070d2f8000000000000000000000000000000000000000000000000000000008152336044820181905260648201859052600160a060020a0392831660a4830181905260c060048401908152885160c485015288518695861694639070d2f8948b948b9491938b938f939182916024810191608482019160e4019060208c019080838360005b838110156103de5781810151838201526020016103c6565b50505050905090810190601f16801561040b5780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b019080838360005b8381101561043e578181015183820152602001610426565b50505050905090810190601f16801561046b5780820380516001836020036101000a031916815260200191505b50848103825286518152865160209182019188019080838360005b8381101561049e578181015183820152602001610486565b50505050905090810190601f1680156104cb5780820380516001836020036101000a031916815260200191505b509950505050505050505050602060405180830381600087803b1580156104f157600080fd5b505af1158015610505573d6000803e3d6000fd5b505050506040513d602081101561051b57600080fd5b5051610572576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180610843602e913960400191505060405180910390fd5b846040518082805190602001908083835b602083106105a25780518252601f199092019160209182019101610583565b5181516020939093036101000a60001901801990911692169190911790526040519201829003822060008054919550600160a060020a039182169450908716927fb51c8cbe199ffe8b0d1d39b62d473569750653cb18b165f77ae423b3900180ad9250a4856040518082805190602001908083835b602083106106365780518252601f199092019160209182019101610617565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902033600160a060020a031683600160a060020a03167f437e99a69c634128e67a85656b80d03b028ba37525b15070606e5c28e846984a888888604051808060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156106e25781810151838201526020016106ca565b50505050905090810190601f16801561070f5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561074257818101518382015260200161072a565b50505050905090810190601f16801561076f5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a450600280546001019055949350505050565b6040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081526c010000000000000000000000008202601482018190527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000602883015260009160378184f060408051600160a060020a038316815290519194507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c925081900360200190a15091905056fe4454466163746f72793a20556e61626c6520746f20696e697469616c697a6520746f6b656e20696e7374616e63654454466163746f72793a207a65726f20636170206973206e6f7420616c6c6f7765644454466163746f72793a204661696c656420746f20706572666f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656ea165627a7a7230582050cb08867ca283c5cf5e15e424d2902135b9a94ccf4d077865da83e7e1cd43c00029", + "sourceMap": "629:3010:0:-;;;780:1;744:37;;1438:351;8:9:-1;5:2;;;30:1;27;20:12;5:2;1438:351:0;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1438:351:0;;;;;;;-1:-1:-1;;;;;1549:23:0;;;;;;:63;;-1:-1:-1;;;;;;1588:24:0;;;;1549:63;1528:175;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1713:13;:25;;-1:-1:-1;;;;;1713:25:0;;;-1:-1:-1;;;;;;1713:25:0;;;;;;;;1748:34;;;;;;;;;;;629:3010;;;;;;", + "deployedSourceMap": "629:3010:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;629:3010:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3540:97;;;:::i;:::-;;;;-1:-1:-1;;;;;3540:97:0;;;;;;;;;;;;;;3334:105;;;:::i;:::-;;;;;;;;;;;;;;;;2164:1068;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;2164:1068:0;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;2164:1068:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2164:1068:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2164:1068:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;2164:1068:0;;;;;;;;-1:-1:-1;2164:1068:0;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;2164:1068:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2164:1068:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2164:1068:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;2164:1068:0;;;;;;;;-1:-1:-1;2164:1068:0;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;2164:1068:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2164:1068:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2164:1068:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;2164:1068:0;;-1:-1:-1;;2164:1068:0;;;-1:-1:-1;2164:1068:0;;-1:-1:-1;;2164:1068:0:i;3540:97::-;3591:7;3617:13;-1:-1:-1;;;;;3617:13:0;3540:97;:::o;3334:105::-;3415:17;;3334:105;:::o;2164:1068::-;2330:13;2380:8;2359:89;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2474:13;;2467:21;;-1:-1:-1;;;;;2474:13:0;2467:6;:21::i;:::-;2459:29;-1:-1:-1;;;;;;2520:19:0;;2499:124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2875:21;;2716:194;;;;;2804:10;2716:194;;;;;;;;;;;;-1:-1:-1;;;;;2875:21:0;;;2716:194;;;;;;;;;;;;;;;;;;;;;2679:5;;2716:24;;;;;2758:4;;2780:6;;2804:10;;2832:3;;2853:4;;2716:194;;;;;;;;;;;;;;;;;;;;;2633:28;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;2716:194:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2716:194:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2716:194:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2716:194:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2716:194:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2716:194:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2716:194:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2716:194:0;2695:287;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3032:4;2997:40;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;2997:40:0;;;;;;;;;-1:-1:-1;3017:13:0;;2997:40;;-1:-1:-1;;;;;;3017:13:0;;;;-1:-1:-1;2997:40:0;;;;;;-1:-1:-1;2997:40:0;3179:4;3052:141;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;3052:141:0;;;;;;;;;;;;;;;;3155:10;-1:-1:-1;;;;;3052:141:0;3081:5;-1:-1:-1;;;;;3052:141:0;;3100:4;3118:6;3138:3;3052:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3052:141:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3052:141:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3052:141:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3203:17:0;:22;;3224:1;3203:22;;;2164:1068;;-1:-1:-1;;;;2164:1068:0:o;811:963:14:-;1415:4;1409:11;1445:66;1431:81;;944:15;;;1541:4;1530:16;;1523:37;;;1596:66;1589:4;1578:16;;1571:92;889:16;;1703:4;1409:11;889:16;1686:22;1732:35;;;-1:-1:-1;;;;;1732:35:14;;;;;;1674:34;;-1:-1:-1;1732:35:14;;-1:-1:-1;1732:35:14;;;;;;;811:963;;;;:::o", + "source": "pragma solidity 0.5.7;\n// Copyright BigchainDB GmbH and Ocean Protocol contributors\n// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)\n// Code is Apache-2.0 and docs are CC-BY-4.0\n\nimport './utils/Deployer.sol';\nimport './interfaces/IERC20Template.sol';\n\n/**\n * @title DTFactory contract\n * @author Ocean Protocol Team\n *\n * @dev Implementation of Ocean DataTokens Factory\n *\n * DTFactory deploys DataToken proxy contracts.\n * New DataToken proxy contracts are links to the template contract's bytecode.\n * Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.\n */\ncontract DTFactory is Deployer {\n address private tokenTemplate;\n address private communityFeeCollector;\n uint256 private currentTokenCount = 1;\n\n event TokenCreated(\n address indexed newTokenAddress,\n address indexed templateAddress,\n string indexed tokenName\n );\n\n event TokenRegistered(\n address indexed tokenAddress,\n string tokenName,\n string tokenSymbol,\n uint256 tokenCap,\n address indexed registeredBy,\n string indexed blob\n );\n\n /**\n * @dev constructor\n * Called on contract deployment. Could not be called with zero address parameters.\n * @param _template refers to the address of a deployed DataToken contract.\n * @param _collector refers to the community fee collector address\n */\n constructor(\n address _template,\n address _collector\n ) public {\n require(\n _template != address(0) &&\n _collector != address(0),\n 'DTFactory: Invalid template token/community fee collector address'\n );\n tokenTemplate = _template;\n communityFeeCollector = _collector;\n }\n\n /**\n * @dev Deploys new DataToken proxy contract.\n * Template contract address could not be a zero address.\n * @param blob any string that hold data/metadata for the new token\n * @param name token name\n * @param symbol token symbol\n * @param cap the maximum total supply\n * @return address of a new proxy DataToken contract\n */\n function createToken(\n string memory blob,\n string memory name,\n string memory symbol,\n uint256 cap\n )\n public\n returns (address token)\n {\n require(\n cap != 0,\n 'DTFactory: zero cap is not allowed'\n );\n\n token = deploy(tokenTemplate);\n\n require(\n token != address(0),\n 'DTFactory: Failed to perform minimal deploy of a new token'\n );\n IERC20Template tokenInstance = IERC20Template(token);\n require(\n tokenInstance.initialize(\n name,\n symbol,\n msg.sender,\n cap,\n blob,\n communityFeeCollector\n ),\n 'DTFactory: Unable to initialize token instance'\n );\n emit TokenCreated(token, tokenTemplate, name);\n emit TokenRegistered(\n token,\n name,\n symbol,\n cap,\n msg.sender,\n blob\n );\n currentTokenCount += 1;\n }\n\n /**\n * @dev get the current token count.\n * @return the current token count\n */\n function getCurrentTokenCount() external view returns (uint256) {\n return currentTokenCount;\n }\n\n /**\n * @dev get the token template address\n * @return the template address\n */\n function getTokenTemplate() external view returns (address) {\n return tokenTemplate;\n }\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/DTFactory.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/DTFactory.sol", + "exportedSymbols": { + "DTFactory": [ + 158 + ] + }, + "id": 159, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "0:22:0" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/utils/Deployer.sol", + "file": "./utils/Deployer.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 159, + "sourceUnit": 6301, + "src": "185:30:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "./interfaces/IERC20Template.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 159, + "sourceUnit": 5659, + "src": "216:41:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4, + "name": "Deployer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6300, + "src": "651:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Deployer_$6300", + "typeString": "contract Deployer" + } + }, + "id": 5, + "nodeType": "InheritanceSpecifier", + "src": "651:8:0" + } + ], + "contractDependencies": [ + 6300 + ], + "contractKind": "contract", + "documentation": "@title DTFactory contract\n@author Ocean Protocol Team\n * @dev Implementation of Ocean DataTokens Factory\n * DTFactory deploys DataToken proxy contracts.\n New DataToken proxy contracts are links to the template contract's bytecode.\n Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.", + "fullyImplemented": true, + "id": 158, + "linearizedBaseContracts": [ + 158, + 6300 + ], + "name": "DTFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 7, + "name": "tokenTemplate", + "nodeType": "VariableDeclaration", + "scope": 158, + "src": "666:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "666:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 9, + "name": "communityFeeCollector", + "nodeType": "VariableDeclaration", + "scope": 158, + "src": "701:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "701:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 12, + "name": "currentTokenCount", + "nodeType": "VariableDeclaration", + "scope": 158, + "src": "744:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "744:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31", + "id": 11, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "780:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "visibility": "private" + }, + { + "anonymous": false, + "documentation": null, + "id": 20, + "name": "TokenCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14, + "indexed": true, + "name": "newTokenAddress", + "nodeType": "VariableDeclaration", + "scope": 20, + "src": "816:31:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "816:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "indexed": true, + "name": "templateAddress", + "nodeType": "VariableDeclaration", + "scope": 20, + "src": "857:31:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "857:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18, + "indexed": true, + "name": "tokenName", + "nodeType": "VariableDeclaration", + "scope": 20, + "src": "898:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 17, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "898:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "806:122:0" + }, + "src": "788:141:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 34, + "name": "TokenRegistered", + "nodeType": "EventDefinition", + "parameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22, + "indexed": true, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "966:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 24, + "indexed": false, + "name": "tokenName", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "1004:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 23, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1004:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 26, + "indexed": false, + "name": "tokenSymbol", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "1030:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 25, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1030:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 28, + "indexed": false, + "name": "tokenCap", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "1058:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1058:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 30, + "indexed": true, + "name": "registeredBy", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "1084:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1084:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 32, + "indexed": true, + "name": "blob", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "1122:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 31, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1122:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "956:191:0" + }, + "src": "935:213:0" + }, + { + "body": { + "id": 64, + "nodeType": "Block", + "src": "1518:271:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 42, + "name": "_template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 36, + "src": "1549:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 44, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1570:1:0", + "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": 43, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1562:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1562:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1549:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 51, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 47, + "name": "_collector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1588:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 49, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1610:1:0", + "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": 48, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1602:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 50, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1602:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1588:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1549:63:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4454466163746f72793a20496e76616c69642074656d706c61746520746f6b656e2f636f6d6d756e6974792066656520636f6c6c6563746f722061646472657373", + "id": 53, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1626:67:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4ad3e5f7655ba83235e545811343b3f1c7739bd2f1b726cbd7686d420baf2813", + "typeString": "literal_string \"DTFactory: Invalid template token/community fee collector address\"" + }, + "value": "DTFactory: Invalid template token/community fee collector address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4ad3e5f7655ba83235e545811343b3f1c7739bd2f1b726cbd7686d420baf2813", + "typeString": "literal_string \"DTFactory: Invalid template token/community fee collector address\"" + } + ], + "id": 41, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1528:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 54, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1528:175:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 55, + "nodeType": "ExpressionStatement", + "src": "1528:175:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 58, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 56, + "name": "tokenTemplate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "1713:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 57, + "name": "_template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 36, + "src": "1729:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1713:25:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 59, + "nodeType": "ExpressionStatement", + "src": "1713:25:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 62, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 60, + "name": "communityFeeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "1748:21:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 61, + "name": "_collector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1772:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1748:34:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 63, + "nodeType": "ExpressionStatement", + "src": "1748:34:0" + } + ] + }, + "documentation": "@dev constructor\n Called on contract deployment. Could not be called with zero address parameters.\n@param _template refers to the address of a deployed DataToken contract.\n@param _collector refers to the community fee collector address", + "id": 65, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 39, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 36, + "name": "_template", + "nodeType": "VariableDeclaration", + "scope": 65, + "src": "1459:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 35, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1459:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 38, + "name": "_collector", + "nodeType": "VariableDeclaration", + "scope": 65, + "src": "1486:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 37, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1486:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1449:61:0" + }, + "returnParameters": { + "id": 40, + "nodeType": "ParameterList", + "parameters": [], + "src": "1518:0:0" + }, + "scope": 158, + "src": "1438:351:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 140, + "nodeType": "Block", + "src": "2349:883:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 81, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 79, + "name": "cap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "2380:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 80, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2387:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2380:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4454466163746f72793a207a65726f20636170206973206e6f7420616c6c6f776564", + "id": 82, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2402:36:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_275103c39c8e014c8efbcc9e9b88606200c5ae2f95e8ff4229101e5d34ee3597", + "typeString": "literal_string \"DTFactory: zero cap is not allowed\"" + }, + "value": "DTFactory: zero cap is not allowed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_275103c39c8e014c8efbcc9e9b88606200c5ae2f95e8ff4229101e5d34ee3597", + "typeString": "literal_string \"DTFactory: zero cap is not allowed\"" + } + ], + "id": 78, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2359:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 83, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2359:89:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 84, + "nodeType": "ExpressionStatement", + "src": "2359:89:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 85, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 76, + "src": "2459:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 87, + "name": "tokenTemplate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "2474:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 86, + "name": "deploy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6299, + "src": "2467:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_address_$", + "typeString": "function (address) returns (address)" + } + }, + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2467:21:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2459:29:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 90, + "nodeType": "ExpressionStatement", + "src": "2459:29:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 92, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 76, + "src": "2520:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2537:1:0", + "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": 93, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2529:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2529:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2520:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4454466163746f72793a204661696c656420746f20706572666f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656e", + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2553:60:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_864bea267bbab0e2823533999ec879a0c10c7f940117c7fd1687efd3993a56e3", + "typeString": "literal_string \"DTFactory: Failed to perform minimal deploy of a new token\"" + }, + "value": "DTFactory: Failed to perform minimal deploy of a new token" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_864bea267bbab0e2823533999ec879a0c10c7f940117c7fd1687efd3993a56e3", + "typeString": "literal_string \"DTFactory: Failed to perform minimal deploy of a new token\"" + } + ], + "id": 91, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2499:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 98, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2499:124:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 99, + "nodeType": "ExpressionStatement", + "src": "2499:124:0" + }, + { + "assignments": [ + 101 + ], + "declarations": [ + { + "constant": false, + "id": 101, + "name": "tokenInstance", + "nodeType": "VariableDeclaration", + "scope": 140, + "src": "2633:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + }, + "typeName": { + "contractScope": null, + "id": 100, + "name": "IERC20Template", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5658, + "src": "2633:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 105, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 103, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 76, + "src": "2679:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 102, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "2664:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2664:21:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2633:52:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 109, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69, + "src": "2758:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 110, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 71, + "src": "2780:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 111, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "2804:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2804:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 113, + "name": "cap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "2832:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 114, + "name": "blob", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "2853:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 115, + "name": "communityFeeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "2875:21:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 107, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "2716:13:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 5569, + "src": "2716:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (string memory,string memory,address,uint256,string memory,address) external returns (bool)" + } + }, + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2716:194:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4454466163746f72793a20556e61626c6520746f20696e697469616c697a6520746f6b656e20696e7374616e6365", + "id": 117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2924:48:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0d4ad5d97b72e5d205f3629b55676990eb71b941b9757afabcf7e9a4e3e2cbe3", + "typeString": "literal_string \"DTFactory: Unable to initialize token instance\"" + }, + "value": "DTFactory: Unable to initialize token instance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0d4ad5d97b72e5d205f3629b55676990eb71b941b9757afabcf7e9a4e3e2cbe3", + "typeString": "literal_string \"DTFactory: Unable to initialize token instance\"" + } + ], + "id": 106, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2695:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2695:287:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 119, + "nodeType": "ExpressionStatement", + "src": "2695:287:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 121, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 76, + "src": "3010:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 122, + "name": "tokenTemplate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "3017:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 123, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69, + "src": "3032:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 120, + "name": "TokenCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "2997:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,address,string memory)" + } + }, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2997:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 125, + "nodeType": "EmitStatement", + "src": "2992:45:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 127, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 76, + "src": "3081:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 128, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 69, + "src": "3100:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 129, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 71, + "src": "3118:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 130, + "name": "cap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "3138:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 131, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3155:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3155:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 133, + "name": "blob", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "3179:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 126, + "name": "TokenRegistered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 34, + "src": "3052:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory,string memory,uint256,address,string memory)" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3052:141:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 135, + "nodeType": "EmitStatement", + "src": "3047:146:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 136, + "name": "currentTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "3203:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3224:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3203:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "3203:22:0" + } + ] + }, + "documentation": "@dev Deploys new DataToken proxy contract.\n Template contract address could not be a zero address.\n@param blob any string that hold data/metadata for the new token\n@param name token name\n@param symbol token symbol\n@param cap the maximum total supply\n@return address of a new proxy DataToken contract", + "id": 141, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 74, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 67, + "name": "blob", + "nodeType": "VariableDeclaration", + "scope": 141, + "src": "2194:18:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 66, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2194:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 69, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 141, + "src": "2222:18:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 68, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2222:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 71, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 141, + "src": "2250:20:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 70, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2250:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 73, + "name": "cap", + "nodeType": "VariableDeclaration", + "scope": 141, + "src": "2280:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 72, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2280:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2184:113:0" + }, + "returnParameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 76, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 141, + "src": "2330:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2330:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2329:15:0" + }, + "scope": 158, + "src": "2164:1068:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 148, + "nodeType": "Block", + "src": "3398:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 146, + "name": "currentTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12, + "src": "3415:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 145, + "id": 147, + "nodeType": "Return", + "src": "3408:24:0" + } + ] + }, + "documentation": "@dev get the current token count.\n@return the current token count", + "id": 149, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentTokenCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 142, + "nodeType": "ParameterList", + "parameters": [], + "src": "3363:2:0" + }, + "returnParameters": { + "id": 145, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 144, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 149, + "src": "3389:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 143, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3389:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3388:9:0" + }, + "scope": 158, + "src": "3334:105:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 156, + "nodeType": "Block", + "src": "3600:37:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 154, + "name": "tokenTemplate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "3617:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 153, + "id": 155, + "nodeType": "Return", + "src": "3610:20:0" + } + ] + }, + "documentation": "@dev get the token template address\n@return the template address", + "id": 157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokenTemplate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 150, + "nodeType": "ParameterList", + "parameters": [], + "src": "3565:2:0" + }, + "returnParameters": { + "id": 153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 152, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 157, + "src": "3591:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3591:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3590:9:0" + }, + "scope": 158, + "src": "3540:97:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 159, + "src": "629:3010:0" + } + ], + "src": "0:3640:0" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/DTFactory.sol", + "exportedSymbols": { + "DTFactory": [ + 158 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "0:22:0" + }, + { + "attributes": { + "SourceUnit": 6301, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/utils/Deployer.sol", + "file": "./utils/Deployer.sol", + "scope": 159, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "185:30:0" + }, + { + "attributes": { + "SourceUnit": 5659, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "./interfaces/IERC20Template.sol", + "scope": 159, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 3, + "name": "ImportDirective", + "src": "216:41:0" + }, + { + "attributes": { + "contractDependencies": [ + 6300 + ], + "contractKind": "contract", + "documentation": "@title DTFactory contract\n@author Ocean Protocol Team\n * @dev Implementation of Ocean DataTokens Factory\n * DTFactory deploys DataToken proxy contracts.\n New DataToken proxy contracts are links to the template contract's bytecode.\n Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 158, + 6300 + ], + "name": "DTFactory", + "scope": 159 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Deployer", + "referencedDeclaration": 6300, + "type": "contract Deployer" + }, + "id": 4, + "name": "UserDefinedTypeName", + "src": "651:8:0" + } + ], + "id": 5, + "name": "InheritanceSpecifier", + "src": "651:8:0" + }, + { + "attributes": { + "constant": false, + "name": "tokenTemplate", + "scope": 158, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6, + "name": "ElementaryTypeName", + "src": "666:7:0" + } + ], + "id": 7, + "name": "VariableDeclaration", + "src": "666:29:0" + }, + { + "attributes": { + "constant": false, + "name": "communityFeeCollector", + "scope": 158, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 8, + "name": "ElementaryTypeName", + "src": "701:7:0" + } + ], + "id": 9, + "name": "VariableDeclaration", + "src": "701:37:0" + }, + { + "attributes": { + "constant": false, + "name": "currentTokenCount", + "scope": 158, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 10, + "name": "ElementaryTypeName", + "src": "744:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 11, + "name": "Literal", + "src": "780:1:0" + } + ], + "id": 12, + "name": "VariableDeclaration", + "src": "744:37:0" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "TokenCreated" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "newTokenAddress", + "scope": 20, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 13, + "name": "ElementaryTypeName", + "src": "816:7:0" + } + ], + "id": 14, + "name": "VariableDeclaration", + "src": "816:31:0" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "templateAddress", + "scope": 20, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 15, + "name": "ElementaryTypeName", + "src": "857:7:0" + } + ], + "id": 16, + "name": "VariableDeclaration", + "src": "857:31:0" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "tokenName", + "scope": 20, + "stateVariable": false, + "storageLocation": "default", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 17, + "name": "ElementaryTypeName", + "src": "898:6:0" + } + ], + "id": 18, + "name": "VariableDeclaration", + "src": "898:24:0" + } + ], + "id": 19, + "name": "ParameterList", + "src": "806:122:0" + } + ], + "id": 20, + "name": "EventDefinition", + "src": "788:141:0" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "TokenRegistered" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "tokenAddress", + "scope": 34, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 21, + "name": "ElementaryTypeName", + "src": "966:7:0" + } + ], + "id": 22, + "name": "VariableDeclaration", + "src": "966:28:0" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "tokenName", + "scope": 34, + "stateVariable": false, + "storageLocation": "default", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 23, + "name": "ElementaryTypeName", + "src": "1004:6:0" + } + ], + "id": 24, + "name": "VariableDeclaration", + "src": "1004:16:0" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "tokenSymbol", + "scope": 34, + "stateVariable": false, + "storageLocation": "default", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 25, + "name": "ElementaryTypeName", + "src": "1030:6:0" + } + ], + "id": 26, + "name": "VariableDeclaration", + "src": "1030:18:0" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "tokenCap", + "scope": 34, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 27, + "name": "ElementaryTypeName", + "src": "1058:7:0" + } + ], + "id": 28, + "name": "VariableDeclaration", + "src": "1058:16:0" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "registeredBy", + "scope": 34, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 29, + "name": "ElementaryTypeName", + "src": "1084:7:0" + } + ], + "id": 30, + "name": "VariableDeclaration", + "src": "1084:28:0" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "blob", + "scope": 34, + "stateVariable": false, + "storageLocation": "default", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 31, + "name": "ElementaryTypeName", + "src": "1122:6:0" + } + ], + "id": 32, + "name": "VariableDeclaration", + "src": "1122:19:0" + } + ], + "id": 33, + "name": "ParameterList", + "src": "956:191:0" + } + ], + "id": 34, + "name": "EventDefinition", + "src": "935:213:0" + }, + { + "attributes": { + "documentation": "@dev constructor\n Called on contract deployment. Could not be called with zero address parameters.\n@param _template refers to the address of a deployed DataToken contract.\n@param _collector refers to the community fee collector address", + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "modifiers": [ + null + ], + "name": "", + "scope": 158, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_template", + "scope": 65, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 35, + "name": "ElementaryTypeName", + "src": "1459:7:0" + } + ], + "id": 36, + "name": "VariableDeclaration", + "src": "1459:17:0" + }, + { + "attributes": { + "constant": false, + "name": "_collector", + "scope": 65, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 37, + "name": "ElementaryTypeName", + "src": "1486:7:0" + } + ], + "id": 38, + "name": "VariableDeclaration", + "src": "1486:18:0" + } + ], + "id": 39, + "name": "ParameterList", + "src": "1449:61:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 40, + "name": "ParameterList", + "src": "1518:0:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4ad3e5f7655ba83235e545811343b3f1c7739bd2f1b726cbd7686d420baf2813", + "typeString": "literal_string \"DTFactory: Invalid template token/community fee collector address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 41, + "name": "Identifier", + "src": "1528:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "&&", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 36, + "type": "address", + "value": "_template" + }, + "id": 42, + "name": "Identifier", + "src": "1549:9:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 43, + "name": "ElementaryTypeNameExpression", + "src": "1562:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 44, + "name": "Literal", + "src": "1570:1:0" + } + ], + "id": 45, + "name": "FunctionCall", + "src": "1562:10:0" + } + ], + "id": 46, + "name": "BinaryOperation", + "src": "1549:23:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 38, + "type": "address", + "value": "_collector" + }, + "id": 47, + "name": "Identifier", + "src": "1588:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 48, + "name": "ElementaryTypeNameExpression", + "src": "1602:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 49, + "name": "Literal", + "src": "1610:1:0" + } + ], + "id": 50, + "name": "FunctionCall", + "src": "1602:10:0" + } + ], + "id": 51, + "name": "BinaryOperation", + "src": "1588:24:0" + } + ], + "id": 52, + "name": "BinaryOperation", + "src": "1549:63:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4454466163746f72793a20496e76616c69642074656d706c61746520746f6b656e2f636f6d6d756e6974792066656520636f6c6c6563746f722061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DTFactory: Invalid template token/community fee collector address\"", + "value": "DTFactory: Invalid template token/community fee collector address" + }, + "id": 53, + "name": "Literal", + "src": "1626:67:0" + } + ], + "id": 54, + "name": "FunctionCall", + "src": "1528:175:0" + } + ], + "id": 55, + "name": "ExpressionStatement", + "src": "1528:175:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7, + "type": "address", + "value": "tokenTemplate" + }, + "id": 56, + "name": "Identifier", + "src": "1713:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 36, + "type": "address", + "value": "_template" + }, + "id": 57, + "name": "Identifier", + "src": "1729:9:0" + } + ], + "id": 58, + "name": "Assignment", + "src": "1713:25:0" + } + ], + "id": 59, + "name": "ExpressionStatement", + "src": "1713:25:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 9, + "type": "address", + "value": "communityFeeCollector" + }, + "id": 60, + "name": "Identifier", + "src": "1748:21:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 38, + "type": "address", + "value": "_collector" + }, + "id": 61, + "name": "Identifier", + "src": "1772:10:0" + } + ], + "id": 62, + "name": "Assignment", + "src": "1748:34:0" + } + ], + "id": 63, + "name": "ExpressionStatement", + "src": "1748:34:0" + } + ], + "id": 64, + "name": "Block", + "src": "1518:271:0" + } + ], + "id": 65, + "name": "FunctionDefinition", + "src": "1438:351:0" + }, + { + "attributes": { + "documentation": "@dev Deploys new DataToken proxy contract.\n Template contract address could not be a zero address.\n@param blob any string that hold data/metadata for the new token\n@param name token name\n@param symbol token symbol\n@param cap the maximum total supply\n@return address of a new proxy DataToken contract", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "createToken", + "scope": 158, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "blob", + "scope": 141, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 66, + "name": "ElementaryTypeName", + "src": "2194:6:0" + } + ], + "id": 67, + "name": "VariableDeclaration", + "src": "2194:18:0" + }, + { + "attributes": { + "constant": false, + "name": "name", + "scope": 141, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 68, + "name": "ElementaryTypeName", + "src": "2222:6:0" + } + ], + "id": 69, + "name": "VariableDeclaration", + "src": "2222:18:0" + }, + { + "attributes": { + "constant": false, + "name": "symbol", + "scope": 141, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 70, + "name": "ElementaryTypeName", + "src": "2250:6:0" + } + ], + "id": 71, + "name": "VariableDeclaration", + "src": "2250:20:0" + }, + { + "attributes": { + "constant": false, + "name": "cap", + "scope": 141, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 72, + "name": "ElementaryTypeName", + "src": "2280:7:0" + } + ], + "id": 73, + "name": "VariableDeclaration", + "src": "2280:11:0" + } + ], + "id": 74, + "name": "ParameterList", + "src": "2184:113:0" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "token", + "scope": 141, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 75, + "name": "ElementaryTypeName", + "src": "2330:7:0" + } + ], + "id": 76, + "name": "VariableDeclaration", + "src": "2330:13:0" + } + ], + "id": 77, + "name": "ParameterList", + "src": "2329:15:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_275103c39c8e014c8efbcc9e9b88606200c5ae2f95e8ff4229101e5d34ee3597", + "typeString": "literal_string \"DTFactory: zero cap is not allowed\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 78, + "name": "Identifier", + "src": "2359:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 73, + "type": "uint256", + "value": "cap" + }, + "id": 79, + "name": "Identifier", + "src": "2380:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 80, + "name": "Literal", + "src": "2387:1:0" + } + ], + "id": 81, + "name": "BinaryOperation", + "src": "2380:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4454466163746f72793a207a65726f20636170206973206e6f7420616c6c6f776564", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DTFactory: zero cap is not allowed\"", + "value": "DTFactory: zero cap is not allowed" + }, + "id": 82, + "name": "Literal", + "src": "2402:36:0" + } + ], + "id": 83, + "name": "FunctionCall", + "src": "2359:89:0" + } + ], + "id": 84, + "name": "ExpressionStatement", + "src": "2359:89:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 76, + "type": "address", + "value": "token" + }, + "id": 85, + "name": "Identifier", + "src": "2459:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6299, + "type": "function (address) returns (address)", + "value": "deploy" + }, + "id": 86, + "name": "Identifier", + "src": "2467:6:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7, + "type": "address", + "value": "tokenTemplate" + }, + "id": 87, + "name": "Identifier", + "src": "2474:13:0" + } + ], + "id": 88, + "name": "FunctionCall", + "src": "2467:21:0" + } + ], + "id": 89, + "name": "Assignment", + "src": "2459:29:0" + } + ], + "id": 90, + "name": "ExpressionStatement", + "src": "2459:29:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_864bea267bbab0e2823533999ec879a0c10c7f940117c7fd1687efd3993a56e3", + "typeString": "literal_string \"DTFactory: Failed to perform minimal deploy of a new token\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 91, + "name": "Identifier", + "src": "2499:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 76, + "type": "address", + "value": "token" + }, + "id": 92, + "name": "Identifier", + "src": "2520:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 93, + "name": "ElementaryTypeNameExpression", + "src": "2529:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 94, + "name": "Literal", + "src": "2537:1:0" + } + ], + "id": 95, + "name": "FunctionCall", + "src": "2529:10:0" + } + ], + "id": 96, + "name": "BinaryOperation", + "src": "2520:19:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4454466163746f72793a204661696c656420746f20706572666f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DTFactory: Failed to perform minimal deploy of a new token\"", + "value": "DTFactory: Failed to perform minimal deploy of a new token" + }, + "id": 97, + "name": "Literal", + "src": "2553:60:0" + } + ], + "id": 98, + "name": "FunctionCall", + "src": "2499:124:0" + } + ], + "id": 99, + "name": "ExpressionStatement", + "src": "2499:124:0" + }, + { + "attributes": { + "assignments": [ + 101 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenInstance", + "scope": 140, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IERC20Template", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20Template", + "referencedDeclaration": 5658, + "type": "contract IERC20Template" + }, + "id": 100, + "name": "UserDefinedTypeName", + "src": "2633:14:0" + } + ], + "id": 101, + "name": "VariableDeclaration", + "src": "2633:28:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 102, + "name": "Identifier", + "src": "2664:14:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 76, + "type": "address", + "value": "token" + }, + "id": 103, + "name": "Identifier", + "src": "2679:5:0" + } + ], + "id": 104, + "name": "FunctionCall", + "src": "2664:21:0" + } + ], + "id": 105, + "name": "VariableDeclarationStatement", + "src": "2633:52:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0d4ad5d97b72e5d205f3629b55676990eb71b941b9757afabcf7e9a4e3e2cbe3", + "typeString": "literal_string \"DTFactory: Unable to initialize token instance\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 106, + "name": "Identifier", + "src": "2695:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "initialize", + "referencedDeclaration": 5569, + "type": "function (string memory,string memory,address,uint256,string memory,address) external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 101, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 107, + "name": "Identifier", + "src": "2716:13:0" + } + ], + "id": 108, + "name": "MemberAccess", + "src": "2716:24:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 69, + "type": "string memory", + "value": "name" + }, + "id": 109, + "name": "Identifier", + "src": "2758:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 71, + "type": "string memory", + "value": "symbol" + }, + "id": 110, + "name": "Identifier", + "src": "2780:6:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 111, + "name": "Identifier", + "src": "2804:3:0" + } + ], + "id": 112, + "name": "MemberAccess", + "src": "2804:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 73, + "type": "uint256", + "value": "cap" + }, + "id": 113, + "name": "Identifier", + "src": "2832:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 67, + "type": "string memory", + "value": "blob" + }, + "id": 114, + "name": "Identifier", + "src": "2853:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 9, + "type": "address", + "value": "communityFeeCollector" + }, + "id": 115, + "name": "Identifier", + "src": "2875:21:0" + } + ], + "id": 116, + "name": "FunctionCall", + "src": "2716:194:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4454466163746f72793a20556e61626c6520746f20696e697469616c697a6520746f6b656e20696e7374616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DTFactory: Unable to initialize token instance\"", + "value": "DTFactory: Unable to initialize token instance" + }, + "id": 117, + "name": "Literal", + "src": "2924:48:0" + } + ], + "id": 118, + "name": "FunctionCall", + "src": "2695:287:0" + } + ], + "id": 119, + "name": "ExpressionStatement", + "src": "2695:287:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 20, + "type": "function (address,address,string memory)", + "value": "TokenCreated" + }, + "id": 120, + "name": "Identifier", + "src": "2997:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 76, + "type": "address", + "value": "token" + }, + "id": 121, + "name": "Identifier", + "src": "3010:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7, + "type": "address", + "value": "tokenTemplate" + }, + "id": 122, + "name": "Identifier", + "src": "3017:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 69, + "type": "string memory", + "value": "name" + }, + "id": 123, + "name": "Identifier", + "src": "3032:4:0" + } + ], + "id": 124, + "name": "FunctionCall", + "src": "2997:40:0" + } + ], + "id": 125, + "name": "EmitStatement", + "src": "2992:45:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 34, + "type": "function (address,string memory,string memory,uint256,address,string memory)", + "value": "TokenRegistered" + }, + "id": 126, + "name": "Identifier", + "src": "3052:15:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 76, + "type": "address", + "value": "token" + }, + "id": 127, + "name": "Identifier", + "src": "3081:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 69, + "type": "string memory", + "value": "name" + }, + "id": 128, + "name": "Identifier", + "src": "3100:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 71, + "type": "string memory", + "value": "symbol" + }, + "id": 129, + "name": "Identifier", + "src": "3118:6:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 73, + "type": "uint256", + "value": "cap" + }, + "id": 130, + "name": "Identifier", + "src": "3138:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 131, + "name": "Identifier", + "src": "3155:3:0" + } + ], + "id": 132, + "name": "MemberAccess", + "src": "3155:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 67, + "type": "string memory", + "value": "blob" + }, + "id": 133, + "name": "Identifier", + "src": "3179:4:0" + } + ], + "id": 134, + "name": "FunctionCall", + "src": "3052:141:0" + } + ], + "id": 135, + "name": "EmitStatement", + "src": "3047:146:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 12, + "type": "uint256", + "value": "currentTokenCount" + }, + "id": 136, + "name": "Identifier", + "src": "3203:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 137, + "name": "Literal", + "src": "3224:1:0" + } + ], + "id": 138, + "name": "Assignment", + "src": "3203:22:0" + } + ], + "id": 139, + "name": "ExpressionStatement", + "src": "3203:22:0" + } + ], + "id": 140, + "name": "Block", + "src": "2349:883:0" + } + ], + "id": 141, + "name": "FunctionDefinition", + "src": "2164:1068:0" + }, + { + "attributes": { + "documentation": "@dev get the current token count.\n@return the current token count", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getCurrentTokenCount", + "scope": 158, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 142, + "name": "ParameterList", + "src": "3363:2:0" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 149, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 143, + "name": "ElementaryTypeName", + "src": "3389:7:0" + } + ], + "id": 144, + "name": "VariableDeclaration", + "src": "3389:7:0" + } + ], + "id": 145, + "name": "ParameterList", + "src": "3388:9:0" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 145 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 12, + "type": "uint256", + "value": "currentTokenCount" + }, + "id": 146, + "name": "Identifier", + "src": "3415:17:0" + } + ], + "id": 147, + "name": "Return", + "src": "3408:24:0" + } + ], + "id": 148, + "name": "Block", + "src": "3398:41:0" + } + ], + "id": 149, + "name": "FunctionDefinition", + "src": "3334:105:0" + }, + { + "attributes": { + "documentation": "@dev get the token template address\n@return the template address", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getTokenTemplate", + "scope": 158, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 150, + "name": "ParameterList", + "src": "3565:2:0" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 157, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 151, + "name": "ElementaryTypeName", + "src": "3591:7:0" + } + ], + "id": 152, + "name": "VariableDeclaration", + "src": "3591:7:0" + } + ], + "id": 153, + "name": "ParameterList", + "src": "3590:9:0" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 153 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7, + "type": "address", + "value": "tokenTemplate" + }, + "id": 154, + "name": "Identifier", + "src": "3617:13:0" + } + ], + "id": 155, + "name": "Return", + "src": "3610:20:0" + } + ], + "id": 156, + "name": "Block", + "src": "3600:37:0" + } + ], + "id": 157, + "name": "FunctionDefinition", + "src": "3540:97:0" + } + ], + "id": 158, + "name": "ContractDefinition", + "src": "629:3010:0" + } + ], + "id": 159, + "name": "SourceUnit", + "src": "0:3640:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.755Z", + "devdoc": { + "author": "Ocean Protocol Team", + "details": "Implementation of Ocean DataTokens Factory * DTFactory deploys DataToken proxy contracts. New DataToken proxy contracts are links to the template contract's bytecode. Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.", + "methods": { + "constructor": { + "details": "constructor Called on contract deployment. Could not be called with zero address parameters.", + "params": { + "_collector": "refers to the community fee collector address", + "_template": "refers to the address of a deployed DataToken contract." + } + }, + "createToken(string,string,string,uint256)": { + "details": "Deploys new DataToken proxy contract. Template contract address could not be a zero address.", + "params": { + "blob": "any string that hold data/metadata for the new token", + "cap": "the maximum total supply", + "name": "token name", + "symbol": "token symbol" + }, + "return": "address of a new proxy DataToken contract" + }, + "getCurrentTokenCount()": { + "details": "get the current token count.", + "return": "the current token count" + }, + "getTokenTemplate()": { + "details": "get the token template address", + "return": "the template address" + } + }, + "title": "DTFactory contract" + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/DataTokenTemplate.json b/artifacts/DataTokenTemplate.json new file mode 100644 index 000000000..d882f6d29 --- /dev/null +++ b/artifacts/DataTokenTemplate.json @@ -0,0 +1,15147 @@ +{ + "contractName": "DataTokenTemplate", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "amount", + "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": "sender", + "type": "address" + }, + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BASE_MARKET_FEE_PERCENTAGE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BASE_COMMUNITY_FEE_PERCENTAGE", + "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": "BASE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "name", + "type": "string" + }, + { + "name": "symbol", + "type": "string" + }, + { + "name": "minterAddress", + "type": "address" + }, + { + "name": "cap", + "type": "uint256" + }, + { + "name": "blob", + "type": "string" + }, + { + "name": "feeCollector", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "consumer", + "type": "address" + }, + { + "indexed": true, + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "name": "serviceId", + "type": "uint256" + }, + { + "indexed": false, + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": true, + "name": "mrktFeeCollector", + "type": "address" + }, + { + "indexed": false, + "name": "marketFee", + "type": "uint256" + } + ], + "name": "OrderStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "orderTxId", + "type": "bytes32" + }, + { + "indexed": true, + "name": "consumer", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "name": "serviceId", + "type": "uint256" + }, + { + "indexed": true, + "name": "provider", + "type": "address" + }, + { + "indexed": false, + "name": "timestamp", + "type": "uint256" + } + ], + "name": "OrderFinished", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "currentMinter", + "type": "address" + }, + { + "indexed": false, + "name": "newMinter", + "type": "address" + } + ], + "name": "MinterProposed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "currentMinter", + "type": "address" + }, + { + "indexed": false, + "name": "newMinter", + "type": "address" + } + ], + "name": "MinterApproved", + "type": "event" + }, + { + "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": "name", + "type": "string" + }, + { + "name": "symbol", + "type": "string" + }, + { + "name": "minterAddress", + "type": "address" + }, + { + "name": "cap", + "type": "uint256" + }, + { + "name": "blob", + "type": "string" + }, + { + "name": "feeCollector", + "type": "address" + } + ], + "name": "initialize", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "consumer", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "serviceId", + "type": "uint256" + }, + { + "name": "mrktFeeCollector", + "type": "address" + } + ], + "name": "startOrder", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "orderTxId", + "type": "bytes32" + }, + { + "name": "consumer", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "serviceId", + "type": "uint256" + } + ], + "name": "finishOrder", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newMinter", + "type": "address" + } + ], + "name": "proposeMinter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "approveMinter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blob", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "cap", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isMinter", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "minter", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "amount", + "type": "uint256" + }, + { + "name": "feePercentage", + "type": "uint256" + } + ], + "name": "calculateFee", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minter\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"amount\",\"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\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE_MARKET_FEE_PERCENTAGE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"feePercentage\",\"type\":\"uint256\"}],\"name\":\"calculateFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"cap\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newMinter\",\"type\":\"address\"}],\"name\":\"proposeMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"orderTxId\",\"type\":\"bytes32\"},{\"name\":\"consumer\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"serviceId\",\"type\":\"uint256\"}],\"name\":\"finishOrder\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"},{\"name\":\"minterAddress\",\"type\":\"address\"},{\"name\":\"cap\",\"type\":\"uint256\"},{\"name\":\"blob\",\"type\":\"string\"},{\"name\":\"feeCollector\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isMinter\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"consumer\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"serviceId\",\"type\":\"uint256\"},{\"name\":\"mrktFeeCollector\",\"type\":\"address\"}],\"name\":\"startOrder\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE_COMMUNITY_FEE_PERCENTAGE\",\"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\":false,\"inputs\":[],\"name\":\"approveMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blob\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"},{\"name\":\"minterAddress\",\"type\":\"address\"},{\"name\":\"cap\",\"type\":\"uint256\"},{\"name\":\"blob\",\"type\":\"string\"},{\"name\":\"feeCollector\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"consumer\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"serviceId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"mrktFeeCollector\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"marketFee\",\"type\":\"uint256\"}],\"name\":\"OrderStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"orderTxId\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"consumer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"serviceId\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"OrderFinished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"currentMinter\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newMinter\",\"type\":\"address\"}],\"name\":\"MinterProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"currentMinter\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newMinter\",\"type\":\"address\"}],\"name\":\"MinterApproved\",\"type\":\"event\"},{\"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\":{\"details\":\"DataTokenTemplate is an ERC20 compliant token template Used by the factory contract as a bytecode reference to deploy new DataTokens.\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address.\"},\"approveMinter()\":{\"details\":\"approveMinter It approves a new token minter address. Only the current minter can call it.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"blob()\":{\"details\":\"blob It returns the blob (e.g https://123.com).\",\"return\":\"DataToken blob.\"},\"calculateFee(uint256,uint256)\":{\"details\":\"calculateFee giving a fee percentage, and amount it calculates the actual fee\",\"params\":{\"amount\":\"the amount of token\",\"feePercentage\":\"the fee percentage \"},\"return\":\"the token fee.\"},\"cap()\":{\"details\":\"cap it returns the capital.\",\"return\":\"DataToken cap.\"},\"constructor\":{\"details\":\"constructor Called prior contract deployment\",\"params\":{\"blob\":\"data string refering to the resolver for the metadata\",\"cap\":\"the total ERC20 cap\",\"feeCollector\":\"it is the community fee collector address\",\"minterAddress\":\"refers to an address that has minter role\",\"name\":\"refers to a template DataToken name\",\"symbol\":\"refers to a template DataToken symbol\"}},\"decimals()\":{\"details\":\"decimals It returns the token decimals. how many supported decimal points\",\"return\":\"DataToken decimals.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"finishOrder(bytes32,address,uint256,uint256)\":{\"details\":\"finishOrder called by provider prior completing service delivery only if there is a partial or full refund.\",\"params\":{\"amount\":\"refers to amount of tokens that is going to be transfered.\",\"consumer\":\"refers to an address that has consumed that service.\",\"orderTxId\":\"refers to the transaction Id of startOrder acts as a payment reference.\",\"serviceId\":\"service index in the metadata.\"}},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"initialize(string,string,address,uint256,string,address)\":{\"details\":\"initialize Called prior contract initialization (e.g creating new DataToken instance) Calls private _initialize function. Only if contract is not initialized.\",\"params\":{\"blob\":\"data string refering to the resolver for the metadata\",\"cap\":\"the total ERC20 cap\",\"feeCollector\":\"it is the community fee collector address\",\"minterAddress\":\"refers to an address that has minter rights\",\"name\":\"refers to a new DataToken name\",\"symbol\":\"refers to a nea DataToken symbol\"}},\"isInitialized()\":{\"details\":\"isInitialized It checks whether the contract is initialized.\",\"return\":\"true if the contract is initialized.\"},\"isMinter(address)\":{\"details\":\"isMinter It takes the address and checks whether it has a minter role.\",\"params\":{\"account\":\"refers to the address.\"},\"return\":\"true if account has a minter role.\"},\"mint(address,uint256)\":{\"details\":\"mint Only the minter address can call it. msg.value should be higher than zero and gt or eq minting fee\",\"params\":{\"account\":\"refers to an address that token is going to be minted to.\",\"value\":\"refers to amount of tokens that is going to be minted.\"}},\"minter()\":{\"details\":\"minter\",\"return\":\"minter's address.\"},\"name()\":{\"details\":\"name It returns the token name.\",\"return\":\"DataToken name.\"},\"proposeMinter(address)\":{\"details\":\"proposeMinter It proposes a new token minter address. Only the current minter can call it.\",\"params\":{\"newMinter\":\"refers to a new token minter address.\"}},\"startOrder(address,uint256,uint256,address)\":{\"details\":\"startOrder called by payer or consumer prior ordering a service consume on a marketplace.\",\"params\":{\"amount\":\"refers to amount of tokens that is going to be transfered.\",\"consumer\":\"is the consumer address (payer could be different address)\",\"mrktFeeCollector\":\"marketplace fee collector\",\"serviceId\":\"service index in the metadata\"}},\"symbol()\":{\"details\":\"symbol It returns the token symbol.\",\"return\":\"DataToken symbol.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for `sender`'s tokens of at least `amount`.\"}},\"title\":\"DataTokenTemplate \"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/templates/DataTokenTemplate.sol\":\"DataTokenTemplate\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol\":{\"keccak256\":\"0x022ebed2ba4949e96a05cc394cf690d8fd3190a4733cebe8cbe930ac25cfde18\",\"urls\":[\"bzzr://2fa3d5cae14f0af7d78f6e1d13bc41854082c03ab2f86462ebb09afda88ee6e9\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/templates/DataTokenTemplate.sol\":{\"keccak256\":\"0x7906d99e47c873638ddfd3028ca89e957cc88b7fe1dac260b12a550168180dfd\",\"urls\":[\"bzzr://6839f11b24fc3fac56d410b5057e1221c18c0f70467fa0a701ca72cee24a8624\"]},\"openzeppelin-solidity/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzzr://51482c01bddf23793bddee43b60ab9578a62948a4f2082def24ea792a553b055\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzzr://292843005e754e752644f767477ec5ad7a1ffc91ddb18c38b8079c62f3993cad\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xb15af804e2bc97db51e4e103f13de9fe13f87e6b835d7a88c897966c0e58506e\",\"urls\":[\"bzzr://6200c125af376381ae6c5415b8f3c1cb83889be20a7a51d67ac607487a10313b\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062\"]}},\"version\":1}", + "bytecode": "0x60806040526007805460a060020a60ff02191690553480156200002157600080fd5b5060405162001f0738038062001f07833981018060405260c08110156200004757600080fd5b8101908080516401000000008111156200006057600080fd5b820160208101848111156200007457600080fd5b81516401000000008111828201871017156200008f57600080fd5b50509291906020018051640100000000811115620000ac57600080fd5b82016020810184811115620000c057600080fd5b8151640100000000811182820187101715620000db57600080fd5b505060208201516040830151606090930180519295919491926401000000008111156200010757600080fd5b820160208101848111156200011b57600080fd5b81516401000000008111828201871017156200013657600080fd5b505060209091015190925090506200015c86868686868664010000000062000169810204565b5050505050505062000439565b6000600160a060020a038516620001cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603081526020018062001e446030913960400191505060405180910390fd5b600854600160a060020a03161562000230576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f81526020018062001ed8602f913960400191505060405180910390fd5b600160a060020a03821662000291576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604081526020018062001e746040913960400191505060405180910390fd5b83620002e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018062001eb46024913960400191505060405180910390fd5b60068490558651620003039060039060208a019062000394565b5082516200031990600590602086019062000394565b5085516200032f90600490602089019062000394565b505060088054600160a060020a0319908116600160a060020a039687161790915560078054740100000000000000000000000000000000000000009216929095169190911760a060020a60ff02191681179384905560ff930492909216949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620003d757805160ff191683800117855562000407565b8280016001018555821562000407579182015b8281111562000407578251825591602001919060010190620003ea565b506200041592915062000419565b5090565b6200043691905b8082111562000415576000815560010162000420565b90565b6119fb80620004496000396000f3fe608060405234801561001057600080fd5b50600436106101ab576000357c01000000000000000000000000000000000000000000000000000000009004806370a08231116100fb578063aa271e1a116100b4578063dd62ed3e1161008e578063dd62ed3e1461060a578063eb40024b14610638578063ec342ad014610640578063fde0e7a814610648576101ab565b8063aa271e1a146105aa578063ab63d2b2146105d0578063b2263a5d146102e1576101ab565b806370a08231146103ba5780638ca0c059146103e05780639070d2f81461041857806395d89b411461054a578063a457c2d714610552578063a9059cbb1461057e576101ab565b8063313ce56711610168578063392e53cd11610142578063392e53cd14610332578063395093511461033a57806340c10f191461036657806350d2fcc414610394576101ab565b8063313ce567146102e957806334e7312214610307578063355274ea1461032a576101ab565b806306fdde03146101b0578063075461721461022d578063095ea7b31461025157806318160ddd1461029157806323b872dd146102ab578063294541c7146102e1575b600080fd5b6101b8610650565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f25781810151838201526020016101da565b50505050905090810190601f16801561021f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102356106e7565b60408051600160a060020a039092168252519081900360200190f35b61027d6004803603604081101561026757600080fd5b50600160a060020a0381351690602001356106f6565b604080519115158252519081900360200190f35b610299610714565b60408051918252519081900360200190f35b61027d600480360360608110156102c157600080fd5b50600160a060020a0381358116916020810135909116906040013561071a565b6102996107a7565b6102f16107b2565b6040805160ff9092168252519081900360200190f35b6102996004803603604081101561031d57600080fd5b50803590602001356107b7565b610299610802565b61027d610808565b61027d6004803603604081101561035057600080fd5b50600160a060020a038135169060200135610829565b6103926004803603604081101561037c57600080fd5b50600160a060020a03813516906020013561087d565b005b610392600480360360208110156103aa57600080fd5b5035600160a060020a0316610948565b610299600480360360208110156103d057600080fd5b5035600160a060020a0316610a01565b610392600480360360808110156103f657600080fd5b50803590600160a060020a036020820135169060408101359060600135610a1c565b61027d600480360360c081101561042e57600080fd5b81019060208101813564010000000081111561044957600080fd5b82018360208201111561045b57600080fd5b8035906020019184600183028401116401000000008311171561047d57600080fd5b91939092909160208101903564010000000081111561049b57600080fd5b8201836020820111156104ad57600080fd5b803590602001918460018302840111640100000000831117156104cf57600080fd5b91939092600160a060020a0383351692602081013592919060608101906040013564010000000081111561050257600080fd5b82018360208201111561051457600080fd5b8035906020019184600183028401116401000000008311171561053657600080fd5b919350915035600160a060020a0316610ac3565b6101b8610bde565b61027d6004803603604081101561056857600080fd5b50600160a060020a038135169060200135610c3f565b61027d6004803603604081101561059457600080fd5b50600160a060020a038135169060200135610cad565b61027d600480360360208110156105c057600080fd5b5035600160a060020a0316610cc1565b610392600480360360808110156105e657600080fd5b50600160a060020a0381358116916020810135916040820135916060013516610cd5565b6102996004803603604081101561062057600080fd5b50600160a060020a0381358116916020013516610dd7565b610392610e02565b610299610ece565b6101b8610eda565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b820191906000526020600020905b8154815290600101906020018083116106bf57829003601f168201915b505050505090505b90565b600854600160a060020a031690565b600061070a610703610f3b565b8484610f3f565b5060015b92915050565b60025490565b6000610727848484611031565b61079d84610733610f3b565b6107988560405180606001604052806028815260200161190b60289139600160a060020a038a16600090815260016020526040812090610771610f3b565b600160a060020a03168152602081019190915260400160002054919063ffffffff61119316565b610f3f565b5060019392505050565b66038d7ea4c6800081565b601290565b6000826107c65750600061070e565b816107d35750600061070e565b6107fb670de0b6b3a76400006107ef858563ffffffff61122d16565b9063ffffffff61128916565b9392505050565b60065490565b60075474010000000000000000000000000000000000000000900460ff1690565b600061070a610836610f3b565b846107988560016000610847610f3b565b600160a060020a03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6112cb16565b600854600160a060020a031633146108c95760405160e560020a62461bcd0281526004018080602001828103825260218152602001806117b46021913960400191505060405180910390fd5b6006546108e4826108d8610714565b9063ffffffff6112cb16565b111561093a576040805160e560020a62461bcd02815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a2063617020657863656564656400604482015290519081900360640190fd5b6109448282611328565b5050565b600854600160a060020a031633146109945760405160e560020a62461bcd0281526004018080602001828103825260218152602001806117b46021913960400191505060405180910390fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117918290556040805133815292909116602083015280517fa24c529cc8b2d85b7dfb2ed0b4d7e9a816546212138b5d223bee13481e21be6b9281900390910190a150565b600160a060020a031660009081526020819052604090205490565b8115610a6a57610a2c8383610cad565b610a6a5760405160e560020a62461bcd0281526004018080602001828103825260298152602001806117fb6029913960400191505060405180910390fd5b604080518581526020810184905280820183905242606082015290513391600160a060020a038616917f46872661d5d7765097d3a97ca99b7cbfa68b54b6d51904168974901ee607a26d9181900360800190a350505050565b60075460009074010000000000000000000000000000000000000000900460ff1615610b235760405160e560020a62461bcd02815260040180806020018281038252603581526020018061177f6035913960400191505060405180910390fd5b610bd08a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b908190840183828082843760009201919091525050604080516020601f8b018190048102820181019092528981528c93508b9250908a908a90819084018382808284376000920191909152508a925061141b915050565b9a9950505050505050505050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b600061070a610c4c610f3b565b84610798856040518060600160405280602581526020016119ab6025913960016000610c76610f3b565b600160a060020a03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61119316565b600061070a610cba610f3b565b8484611031565b600854600160a060020a0391821691161490565b600080610cef856103e8670de0b6b3a76400005b046107b7565b600754909150610d0890600160a060020a031682610cad565b50600160a060020a03831615610d3b57610d2d856103e8670de0b6b3a7640000610ce9565b9150610d398383610cad565b505b6000610d4d828463ffffffff6112cb16565b600854909150610d7590600160a060020a0316610d70888463ffffffff6115f716565b610cad565b5060408051878152602081018790524281830152606081018590529051600160a060020a03808716923392918b16917fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9181900360800190a450505050505050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600954600160a060020a03163314610e4e5760405160e560020a62461bcd0281526004018080602001828103825260328152602001806118946032913960400191505060405180910390fd5b60085460095460408051600160a060020a03938416815292909116602083015280517f96ab0400119a548d3cc4c74e857d0d9c427fe9df20d3d0d99af10cc292e6c8869281900390910190a1600980546008805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b670de0b6b3a764000081565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b3390565b600160a060020a038316610f875760405160e560020a62461bcd0281526004018080602001828103825260248152602001806119876024913960400191505060405180910390fd5b600160a060020a038216610fcf5760405160e560020a62461bcd02815260040180806020018281038252602281526020018061175d6022913960400191505060405180910390fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600160a060020a0383166110795760405160e560020a62461bcd0281526004018080602001828103825260258152602001806119626025913960400191505060405180910390fd5b600160a060020a0382166110c15760405160e560020a62461bcd02815260040180806020018281038252602381526020018061173a6023913960400191505060405180910390fd5b611104816040518060600160405280602681526020016117d560269139600160a060020a038616600090815260208190526040902054919063ffffffff61119316565b600160a060020a038085166000908152602081905260408082209390935590841681522054611139908263ffffffff6112cb16565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156112255760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111ea5781810151838201526020016111d2565b50505050905090810190601f1680156112175780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008261123c5750600061070e565b8282028284828161124957fe5b04146107fb5760405160e560020a62461bcd0281526004018080602001828103825260218152602001806118c66021913960400191505060405180910390fd5b60006107fb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611639565b6000828201838110156107fb576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600160a060020a038216611386576040805160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254611399908263ffffffff6112cb16565b600255600160a060020a0382166000908152602081905260409020546113c5908263ffffffff6112cb16565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000600160a060020a0385166114655760405160e560020a62461bcd0281526004018080602001828103825260308152602001806118246030913960400191505060405180910390fd5b600854600160a060020a0316156114b05760405160e560020a62461bcd02815260040180806020018281038252602f815260200180611933602f913960400191505060405180910390fd5b600160a060020a0382166114f85760405160e560020a62461bcd0281526004018080602001828103825260408152602001806118546040913960400191505060405180910390fd5b836115375760405160e560020a62461bcd0281526004018080602001828103825260248152602001806118e76024913960400191505060405180910390fd5b6006849055865161154f9060039060208a01906116a1565b5082516115639060059060208601906116a1565b5085516115779060049060208901906116a1565b50506008805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a039687161790915560078054740100000000000000000000000000000000000000009216929095169190911774ff0000000000000000000000000000000000000000191681179384905560ff930492909216949350505050565b60006107fb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611193565b6000818361168b5760405160e560020a62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156111ea5781810151838201526020016111d2565b50600083858161169757fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106116e257805160ff191683800117855561170f565b8280016001018555821561170f579182015b8281111561170f5782518255916020019190600101906116f4565b5061171b92915061171f565b5090565b6106e491905b8082111561171b576000815560010161172556fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737344617461546f6b656e54656d706c6174653a20746f6b656e20696e7374616e636520616c726561647920696e697469616c697a656444617461546f6b656e54656d706c6174653a20696e76616c6964206d696e74657245524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636544617461546f6b656e54656d706c6174653a206661696c656420746f2066696e697368206f7264657244617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f206164647265737344617461546f6b656e54656d706c6174653a20496e76616c696420636f6d6d756e6974792066656520636f6c6c6563746f722c207a65726f206164647265737344617461546f6b656e54656d706c6174653a20696e76616c69642070726f706f736564206d696e7465722061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7744617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c756545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636544617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa165627a7a7230582072a200dec30d2c046df4abec99086249317d98ad043c2edadfadf40d8e77331c002944617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f206164647265737344617461546f6b656e54656d706c6174653a20496e76616c696420636f6d6d756e6974792066656520636f6c6c6563746f722c207a65726f206164647265737344617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c756544617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f2061646472657373", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ab576000357c01000000000000000000000000000000000000000000000000000000009004806370a08231116100fb578063aa271e1a116100b4578063dd62ed3e1161008e578063dd62ed3e1461060a578063eb40024b14610638578063ec342ad014610640578063fde0e7a814610648576101ab565b8063aa271e1a146105aa578063ab63d2b2146105d0578063b2263a5d146102e1576101ab565b806370a08231146103ba5780638ca0c059146103e05780639070d2f81461041857806395d89b411461054a578063a457c2d714610552578063a9059cbb1461057e576101ab565b8063313ce56711610168578063392e53cd11610142578063392e53cd14610332578063395093511461033a57806340c10f191461036657806350d2fcc414610394576101ab565b8063313ce567146102e957806334e7312214610307578063355274ea1461032a576101ab565b806306fdde03146101b0578063075461721461022d578063095ea7b31461025157806318160ddd1461029157806323b872dd146102ab578063294541c7146102e1575b600080fd5b6101b8610650565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f25781810151838201526020016101da565b50505050905090810190601f16801561021f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102356106e7565b60408051600160a060020a039092168252519081900360200190f35b61027d6004803603604081101561026757600080fd5b50600160a060020a0381351690602001356106f6565b604080519115158252519081900360200190f35b610299610714565b60408051918252519081900360200190f35b61027d600480360360608110156102c157600080fd5b50600160a060020a0381358116916020810135909116906040013561071a565b6102996107a7565b6102f16107b2565b6040805160ff9092168252519081900360200190f35b6102996004803603604081101561031d57600080fd5b50803590602001356107b7565b610299610802565b61027d610808565b61027d6004803603604081101561035057600080fd5b50600160a060020a038135169060200135610829565b6103926004803603604081101561037c57600080fd5b50600160a060020a03813516906020013561087d565b005b610392600480360360208110156103aa57600080fd5b5035600160a060020a0316610948565b610299600480360360208110156103d057600080fd5b5035600160a060020a0316610a01565b610392600480360360808110156103f657600080fd5b50803590600160a060020a036020820135169060408101359060600135610a1c565b61027d600480360360c081101561042e57600080fd5b81019060208101813564010000000081111561044957600080fd5b82018360208201111561045b57600080fd5b8035906020019184600183028401116401000000008311171561047d57600080fd5b91939092909160208101903564010000000081111561049b57600080fd5b8201836020820111156104ad57600080fd5b803590602001918460018302840111640100000000831117156104cf57600080fd5b91939092600160a060020a0383351692602081013592919060608101906040013564010000000081111561050257600080fd5b82018360208201111561051457600080fd5b8035906020019184600183028401116401000000008311171561053657600080fd5b919350915035600160a060020a0316610ac3565b6101b8610bde565b61027d6004803603604081101561056857600080fd5b50600160a060020a038135169060200135610c3f565b61027d6004803603604081101561059457600080fd5b50600160a060020a038135169060200135610cad565b61027d600480360360208110156105c057600080fd5b5035600160a060020a0316610cc1565b610392600480360360808110156105e657600080fd5b50600160a060020a0381358116916020810135916040820135916060013516610cd5565b6102996004803603604081101561062057600080fd5b50600160a060020a0381358116916020013516610dd7565b610392610e02565b610299610ece565b6101b8610eda565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b820191906000526020600020905b8154815290600101906020018083116106bf57829003601f168201915b505050505090505b90565b600854600160a060020a031690565b600061070a610703610f3b565b8484610f3f565b5060015b92915050565b60025490565b6000610727848484611031565b61079d84610733610f3b565b6107988560405180606001604052806028815260200161190b60289139600160a060020a038a16600090815260016020526040812090610771610f3b565b600160a060020a03168152602081019190915260400160002054919063ffffffff61119316565b610f3f565b5060019392505050565b66038d7ea4c6800081565b601290565b6000826107c65750600061070e565b816107d35750600061070e565b6107fb670de0b6b3a76400006107ef858563ffffffff61122d16565b9063ffffffff61128916565b9392505050565b60065490565b60075474010000000000000000000000000000000000000000900460ff1690565b600061070a610836610f3b565b846107988560016000610847610f3b565b600160a060020a03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6112cb16565b600854600160a060020a031633146108c95760405160e560020a62461bcd0281526004018080602001828103825260218152602001806117b46021913960400191505060405180910390fd5b6006546108e4826108d8610714565b9063ffffffff6112cb16565b111561093a576040805160e560020a62461bcd02815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a2063617020657863656564656400604482015290519081900360640190fd5b6109448282611328565b5050565b600854600160a060020a031633146109945760405160e560020a62461bcd0281526004018080602001828103825260218152602001806117b46021913960400191505060405180910390fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117918290556040805133815292909116602083015280517fa24c529cc8b2d85b7dfb2ed0b4d7e9a816546212138b5d223bee13481e21be6b9281900390910190a150565b600160a060020a031660009081526020819052604090205490565b8115610a6a57610a2c8383610cad565b610a6a5760405160e560020a62461bcd0281526004018080602001828103825260298152602001806117fb6029913960400191505060405180910390fd5b604080518581526020810184905280820183905242606082015290513391600160a060020a038616917f46872661d5d7765097d3a97ca99b7cbfa68b54b6d51904168974901ee607a26d9181900360800190a350505050565b60075460009074010000000000000000000000000000000000000000900460ff1615610b235760405160e560020a62461bcd02815260040180806020018281038252603581526020018061177f6035913960400191505060405180910390fd5b610bd08a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b908190840183828082843760009201919091525050604080516020601f8b018190048102820181019092528981528c93508b9250908a908a90819084018382808284376000920191909152508a925061141b915050565b9a9950505050505050505050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b600061070a610c4c610f3b565b84610798856040518060600160405280602581526020016119ab6025913960016000610c76610f3b565b600160a060020a03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61119316565b600061070a610cba610f3b565b8484611031565b600854600160a060020a0391821691161490565b600080610cef856103e8670de0b6b3a76400005b046107b7565b600754909150610d0890600160a060020a031682610cad565b50600160a060020a03831615610d3b57610d2d856103e8670de0b6b3a7640000610ce9565b9150610d398383610cad565b505b6000610d4d828463ffffffff6112cb16565b600854909150610d7590600160a060020a0316610d70888463ffffffff6115f716565b610cad565b5060408051878152602081018790524281830152606081018590529051600160a060020a03808716923392918b16917fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9181900360800190a450505050505050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600954600160a060020a03163314610e4e5760405160e560020a62461bcd0281526004018080602001828103825260328152602001806118946032913960400191505060405180910390fd5b60085460095460408051600160a060020a03938416815292909116602083015280517f96ab0400119a548d3cc4c74e857d0d9c427fe9df20d3d0d99af10cc292e6c8869281900390910190a1600980546008805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b670de0b6b3a764000081565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106dc5780601f106106b1576101008083540402835291602001916106dc565b3390565b600160a060020a038316610f875760405160e560020a62461bcd0281526004018080602001828103825260248152602001806119876024913960400191505060405180910390fd5b600160a060020a038216610fcf5760405160e560020a62461bcd02815260040180806020018281038252602281526020018061175d6022913960400191505060405180910390fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600160a060020a0383166110795760405160e560020a62461bcd0281526004018080602001828103825260258152602001806119626025913960400191505060405180910390fd5b600160a060020a0382166110c15760405160e560020a62461bcd02815260040180806020018281038252602381526020018061173a6023913960400191505060405180910390fd5b611104816040518060600160405280602681526020016117d560269139600160a060020a038616600090815260208190526040902054919063ffffffff61119316565b600160a060020a038085166000908152602081905260408082209390935590841681522054611139908263ffffffff6112cb16565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156112255760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111ea5781810151838201526020016111d2565b50505050905090810190601f1680156112175780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008261123c5750600061070e565b8282028284828161124957fe5b04146107fb5760405160e560020a62461bcd0281526004018080602001828103825260218152602001806118c66021913960400191505060405180910390fd5b60006107fb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611639565b6000828201838110156107fb576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600160a060020a038216611386576040805160e560020a62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254611399908263ffffffff6112cb16565b600255600160a060020a0382166000908152602081905260409020546113c5908263ffffffff6112cb16565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000600160a060020a0385166114655760405160e560020a62461bcd0281526004018080602001828103825260308152602001806118246030913960400191505060405180910390fd5b600854600160a060020a0316156114b05760405160e560020a62461bcd02815260040180806020018281038252602f815260200180611933602f913960400191505060405180910390fd5b600160a060020a0382166114f85760405160e560020a62461bcd0281526004018080602001828103825260408152602001806118546040913960400191505060405180910390fd5b836115375760405160e560020a62461bcd0281526004018080602001828103825260248152602001806118e76024913960400191505060405180910390fd5b6006849055865161154f9060039060208a01906116a1565b5082516115639060059060208601906116a1565b5085516115779060049060208901906116a1565b50506008805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a039687161790915560078054740100000000000000000000000000000000000000009216929095169190911774ff0000000000000000000000000000000000000000191681179384905560ff930492909216949350505050565b60006107fb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611193565b6000818361168b5760405160e560020a62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156111ea5781810151838201526020016111d2565b50600083858161169757fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106116e257805160ff191683800117855561170f565b8280016001018555821561170f579182015b8281111561170f5782518255916020019190600101906116f4565b5061171b92915061171f565b5090565b6106e491905b8082111561171b576000815560010161172556fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737344617461546f6b656e54656d706c6174653a20746f6b656e20696e7374616e636520616c726561647920696e697469616c697a656444617461546f6b656e54656d706c6174653a20696e76616c6964206d696e74657245524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636544617461546f6b656e54656d706c6174653a206661696c656420746f2066696e697368206f7264657244617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f206164647265737344617461546f6b656e54656d706c6174653a20496e76616c696420636f6d6d756e6974792066656520636f6c6c6563746f722c207a65726f206164647265737344617461546f6b656e54656d706c6174653a20696e76616c69642070726f706f736564206d696e7465722061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7744617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c756545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636544617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa165627a7a7230582072a200dec30d2c046df4abec99086249317d98ad043c2edadfadf40d8e77331c0029", + "sourceMap": "488:11133:13:-;;;775:35;;;-1:-1:-1;;;;;;775:35:13;;;2543:369;5:2:-1;;;;30:1;27;20:12;5:2;2543:369:13;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;2543:369:13;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;0:372;;2543:369:13;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;-1:-1;;2543:369:13;;;;;;;;;;;;;;;;;;;;19:11:-1;11:20;;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;-1:-1;;2543:369:13;;;;;;;-1:-1:-1;2543:369:13;-1:-1:-1;2758:147:13;2783:4;2801:6;2821:13;2848:3;2543:369;;2758:11;;;;:147;:::i;:::-;;2543:369;;;;;;488:11133;;4397:980;4624:4;-1:-1:-1;;;;;4665:27:13;;4644:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4799:7;;-1:-1:-1;;;;;4799:7:13;:21;4778:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4926:26:13;;4905:137;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5074:8;5053:91;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5154:4;:10;;;5174:12;;;;:5;;:12;;;;;:::i;:::-;-1:-1:-1;5196:12:13;;;;:5;;:12;;;;;:::i;:::-;-1:-1:-1;5218:16:13;;;;:7;;:16;;;;;:::i;:::-;-1:-1:-1;;5244:7:13;:23;;-1:-1:-1;;;;;;5244:23:13;;;-1:-1:-1;;;;;5244:23:13;;;;;;;5277:22;:37;;5324:18;5277:37;;;;;;;;;;-1:-1:-1;;;;;;5324:18:13;;;;;;;;5359:11;;;;;;;4397:980;-1:-1:-1;;;;4397:980:13:o;488:11133::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;488:11133:13;;;-1:-1:-1;488:11133:13;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "488:11133:13:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;488:11133:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9432:82;;;:::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;9432:82:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10744:109;;;:::i;:::-;;;;-1:-1:-1;;;;;10744:109:13;;;;;;;;;;;;;;2500:149:18;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2500:149:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1559:89;;;:::i;:::-;;;;;;;;;;;;;;;;3107:300;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3107:300:18;;;;;;;;;;;;;;;;;:::i;998:64:13:-;;;:::i;10089:82::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;11345:274;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11345:274:13;;;;;;;:::i;10275:75::-;;;:::i;11013:88::-;;;:::i;3802:207:18:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3802:207:18;;;;;;;;:::i;5694:271:13:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;5694:271:13;;;;;;;;:::i;:::-;;8602:221;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8602:221:13;-1:-1:-1;;;;;8602:221:13;;:::i;1706:108:18:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1706:108:18;-1:-1:-1;;;;;1706:108:18;;:::i;7826:565:13:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;7826:565:13;;;-1:-1:-1;;;;;7826:565:13;;;;;;;;;;;;;;;:::i;3489:442::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;3489:442:13;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;3489:442:13;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3489:442:13;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;3489:442:13;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;3489:442:13;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3489:442:13;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;3489:442:13;;;;-1:-1:-1;;;;;3489:442:13;;;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;3489:442:13;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;3489:442:13;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;3489:442:13;;-1:-1:-1;3489:442:13;-1:-1:-1;3489:442:13;-1:-1:-1;;;;;3489:442:13;;:::i;9629:86::-;;;:::i;4496:258:18:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4496:258:18;;;;;;;;:::i;2017:155::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2017:155:18;;;;;;;;:::i;10562:107:13:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10562:107:13;-1:-1:-1;;;;;10562:107:13;;:::i;6374:953::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;6374:953:13;;;;;;;;;;;;;;;;;;;;:::i;2230:132:18:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2230:132:18;;;;;;;;;;:::i;8972:351:13:-;;;:::i;882:37::-;;;:::i;9840:82::-;;;:::i;9432:::-;9502:5;9495:12;;;;;;;;-1:-1:-1;;9495:12:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9470:13;;9495:12;;9502:5;;9495:12;;9502:5;9495:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9432:82;;:::o;10744:109::-;10839:7;;-1:-1:-1;;;;;10839:7:13;10744:109;:::o;2500:149:18:-;2566:4;2582:39;2591:12;:10;:12::i;:::-;2605:7;2614:6;2582:8;:39::i;:::-;-1:-1:-1;2638:4:18;2500:149;;;;;:::o;1559:89::-;1629:12;;1559:89;:::o;3107:300::-;3196:4;3212:36;3222:6;3230:9;3241:6;3212:9;:36::i;:::-;3258:121;3267:6;3275:12;:10;:12::i;:::-;3289:89;3327:6;3289:89;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3289:19:18;;;;;;:11;:19;;;;;;3309:12;:10;:12::i;:::-;-1:-1:-1;;;;;3289:33:18;;;;;;;;;;;;-1:-1:-1;3289:33:18;;;:89;;:37;:89;:::i;:::-;3258:8;:121::i;:::-;-1:-1:-1;3396:4:18;3107:300;;;;;:::o;998:64:13:-;1051:11;998:64;:::o;10089:82::-;723:2;10089:82;:::o;11345:274::-;11472:7;11498:11;11495:24;;-1:-1:-1;11518:1:13;11511:8;;11495:24;11532:18;11529:31;;-1:-1:-1;11559:1:13;11552:8;;11529:31;11577:35;913:6;11577:25;:6;11588:13;11577:25;:10;:25;:::i;:::-;:29;:35;:29;:35;:::i;:::-;11570:42;11345:274;-1:-1:-1;;;11345:274:13:o;10275:75::-;10339:4;;10275:75;:::o;11013:88::-;11083:11;;;;;;;;11013:88::o;3802:207:18:-;3882:4;3898:83;3907:12;:10;:12::i;:::-;3921:7;3930:50;3969:10;3930:11;:25;3942:12;:10;:12::i;:::-;-1:-1:-1;;;;;3930:25:18;;;;;;;;;;;;;;;;;-1:-1:-1;3930:25:18;;;:34;;;;;;;;;;;:50;:38;:50;:::i;5694:271:13:-;2003:7;;-1:-1:-1;;;;;2003:7:13;1989:10;:21;1968:102;;;;-1:-1:-1;;;;;1968:102:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5865:4;;5837:24;5855:5;5837:13;:11;:13::i;:::-;:17;:24;:17;:24;:::i;:::-;:32;;5816:111;;;;;-1:-1:-1;;;;;5816:111:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;5937:21;5943:7;5952:5;5937;:21::i;:::-;5694:271;;:::o;8602:221::-;2003:7;;-1:-1:-1;;;;;2003:7:13;1989:10;:21;1968:102;;;;-1:-1:-1;;;;;1968:102:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8697:15;:27;;-1:-1:-1;;8697:27:13;-1:-1:-1;;;;;8697:27:13;;;;;;;;;;;8739:77;;;8767:10;8739:77;;8791:15;;;;8739:77;;;;;;;;;;;;;;;;8602:221;:::o;1706:108:18:-;-1:-1:-1;;;;;1789:18:18;1763:7;1789:18;;;;;;;;;;;;1706:108::o;7826:565:13:-;7995:11;;7990:159;;8048:26;8057:8;8067:6;8048:8;:26::i;:::-;8023:126;;;;-1:-1:-1;;;;;8023:126:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8173:211;;;;;;;;;;;;;;;;;;8359:15;8173:211;;;;;;8292:10;;-1:-1:-1;;;;;8173:211:13;;;;;;;;;;;;7826:565;;;;:::o;3489:442::-;1818:11;;3750:4;;1818:11;;;;;1817:12;1796:112;;;;-1:-1:-1;;;;;1796:112:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3777:147;3802:4;;3777:147;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;;3777:147:13;;;;137:4:-1;3777:147:13;;;;;;;;;;;;;;;;;;-1:-1:-1;3820:6:13;;-1:-1:-1;3820:6:13;;;;3777:147;;3820:6;;;;3777:147;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;;3777:147:13;;;;137:4:-1;3777:147:13;;;;;;;;;;;;;;;;;3840:13;;-1:-1:-1;3867:3:13;;-1:-1:-1;3777:147:13;3884:4;;;;;;3777:147;;3884:4;;;;3777:147;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;3902:12:13;;-1:-1:-1;3777:11:13;;-1:-1:-1;;3777:147:13:i;:::-;3770:154;3489:442;-1:-1:-1;;;;;;;;;;3489:442:13:o;9629:86::-;9701:7;9694:14;;;;;;;;-1:-1:-1;;9694:14:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9669:13;;9694:14;;9701:7;;9694:14;;9701:7;9694:14;;;;;;;;;;;;;;;;;;;;;;;;4496:258:18;4581:4;4597:129;4606:12;:10;:12::i;:::-;4620:7;4629:96;4668:15;4629:96;;;;;;;;;;;;;;;;;:11;:25;4641:12;:10;:12::i;:::-;-1:-1:-1;;;;;4629:25:18;;;;;;;;;;;;;;;;;-1:-1:-1;4629:25:18;;;:34;;;;;;;;;;;:96;;:38;:96;:::i;2017:155::-;2086:4;2102:42;2112:12;:10;:12::i;:::-;2126:9;2137:6;2102:9;:42::i;10562:107:13:-;10643:7;;-1:-1:-1;;;;;10643:18:13;;;:7;;:18;;10562:107::o;6374:953::-;6542:17;;6596:86;6622:6;988:4;913:6;981:11;;6596:12;:86::i;:::-;6701:22;;6573:109;;-1:-1:-1;6692:46:13;;-1:-1:-1;;;;;6701:22:13;6573:109;6692:8;:46::i;:::-;-1:-1:-1;;;;;;6751:30:13;;;6748:217;;6808:95;6838:6;1058:4;913:6;1051:11;;6808:95;6796:107;;6917:37;6926:16;6944:9;6917:8;:37::i;:::-;;6748:217;6974:16;6993:27;:12;7010:9;6993:27;:16;:27;:::i;:::-;7039:7;;6974:46;;-1:-1:-1;7030:39:13;;-1:-1:-1;;;;;7039:7:13;7048:20;:6;6974:46;7048:20;:10;:20;:::i;:::-;7030:8;:39::i;:::-;-1:-1:-1;7084:236:13;;;;;;;;;;;;7242:15;7084:236;;;;;;;;;;;;-1:-1:-1;;;;;7084:236:13;;;;7132:10;;7084:236;;;;;;;;;;;;;6374:953;;;;;;;:::o;2230:132:18:-;-1:-1:-1;;;;;2328:18:18;;;2302:7;2328:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;2230:132::o;8972:351:13:-;9063:15;;-1:-1:-1;;;;;9063:15:13;9049:10;:29;9028:126;;;;-1:-1:-1;;;;;9028:126:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9197:7;;9218:15;;9169:74;;;-1:-1:-1;;;;;9197:7:13;;;9169:74;;9218:15;;;;9169:74;;;;;;;;;;;;;;;;9263:15;;;9253:7;:25;;-1:-1:-1;;9253:25:13;;;-1:-1:-1;;;;;9263:15:13;;9253:25;;;;9288:28;;;8972:351::o;882:37::-;913:6;882:37;:::o;9840:82::-;9910:5;9903:12;;;;;;;;-1:-1:-1;;9903:12:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9878:13;;9903:12;;9910:5;;9903:12;;9910:5;9903:12;;;;;;;;;;;;;;;;;;;;;;;;788:96:15;867:10;788:96;:::o;7350:332:18:-;-1:-1:-1;;;;;7443:19:18;;7435:68;;;;-1:-1:-1;;;;;7435:68:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7521:21:18;;7513:68;;;;-1:-1:-1;;;;;7513:68:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7592:18:18;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;7643:32;;;;;;;;;;;;;;;;;7350:332;;;:::o;5228:464::-;-1:-1:-1;;;;;5325:20:18;;5317:70;;;;-1:-1:-1;;;;;5317:70:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5405:23:18;;5397:71;;;;-1:-1:-1;;;;;5397:71:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5499;5521:6;5499:71;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5499:17:18;;:9;:17;;;;;;;;;;;;:71;;:21;:71;:::i;:::-;-1:-1:-1;;;;;5479:17:18;;;:9;:17;;;;;;;;;;;:91;;;;5603:20;;;;;;;:32;;5628:6;5603:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;5580:20:18;;;:9;:20;;;;;;;;;;;;:55;;;;5650:35;;;;;;;5580:20;;5650:35;;;;;;;;;;;;;5228:464;;;:::o;1732:187:16:-;1818:7;1853:12;1845:6;;;;1837:29;;;;-1:-1:-1;;;;;1837:29:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1837:29:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1888:5:16;;;1732:187::o;2159:459::-;2217:7;2458:6;2454:45;;-1:-1:-1;2487:1:16;2480:8;;2454:45;2521:5;;;2525:1;2521;:5;:1;2544:5;;;;;:10;2536:56;;;;-1:-1:-1;;;;;2536:56:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3073:130;3131:7;3157:39;3161:1;3164;3157:39;;;;;;;;;;;;;;;;;:3;:39::i;834:176::-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;;;938:46:16;;;;;;;;;;;;;;;;;;;;;;;;;;;5962:302:18;-1:-1:-1;;;;;6037:21:18;;6029:65;;;;;-1:-1:-1;;;;;6029:65:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;6120:12;;:24;;6137:6;6120:24;:16;:24;:::i;:::-;6105:12;:39;-1:-1:-1;;;;;6175:18:18;;:9;:18;;;;;;;;;;;:30;;6198:6;6175:30;:22;:30;:::i;:::-;-1:-1:-1;;;;;6154:18:18;;:9;:18;;;;;;;;;;;:51;;;;6220:37;;;;;;;6154:18;;:9;;6220:37;;;;;;;;;;5962:302;;:::o;4397:980:13:-;4624:4;-1:-1:-1;;;;;4665:27:13;;4644:123;;;;-1:-1:-1;;;;;4644:123:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4799:7;;-1:-1:-1;;;;;4799:7:13;:21;4778:116;;;;-1:-1:-1;;;;;4778:116:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4926:26:13;;4905:137;;;;-1:-1:-1;;;;;4905:137:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5074:8;5053:91;;;;-1:-1:-1;;;;;5053:91:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5154:4;:10;;;5174:12;;;;:5;;:12;;;;;:::i;:::-;-1:-1:-1;5196:12:13;;;;:5;;:12;;;;;:::i;:::-;-1:-1:-1;5218:16:13;;;;:7;;:16;;;;;:::i;:::-;-1:-1:-1;;5244:7:13;:23;;-1:-1:-1;;5244:23:13;;;-1:-1:-1;;;;;5244:23:13;;;;;;;5277:22;:37;;5324:18;5277:37;;;;;;;;;;-1:-1:-1;;5324:18:13;;;;;;;;5359:11;;;;;;;4397:980;-1:-1:-1;;;;4397:980:13:o;1274:134:16:-;1332:7;1358:43;1362:1;1365;1358:43;;;;;;;;;;;;;;;;;:3;:43::i;3718:338::-;3804:7;3904:12;3897:5;3889:28;;;;-1:-1:-1;;;;;3889:28:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;3889:28:16;;3927:9;3943:1;3939;:5;;;;;;;3718:338;-1:-1:-1;;;;;3718:338:16:o;488:11133:13:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;488:11133:13;;;-1:-1:-1;488:11133:13;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;", + "source": "pragma solidity 0.5.7;\n// Copyright BigchainDB GmbH and Ocean Protocol contributors\n// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)\n// Code is Apache-2.0 and docs are CC-BY-4.0\n\nimport '../interfaces/IERC20Template.sol';\nimport 'openzeppelin-solidity/contracts/token/ERC20/ERC20.sol';\n\n\n/**\n* @title DataTokenTemplate\n* \n* @dev DataTokenTemplate is an ERC20 compliant token template\n* Used by the factory contract as a bytecode reference to \n* deploy new DataTokens.\n*/\ncontract DataTokenTemplate is IERC20Template, ERC20 {\n using SafeMath for uint256;\n\n string private _name;\n string private _symbol;\n string private _blob;\n uint256 private _cap;\n uint8 private constant _decimals = 18;\n address private _communityFeeCollector;\n bool private initialized = false;\n address private _minter;\n address private _proposedMinter;\n uint256 public constant BASE = 10**18;\n uint256 public constant BASE_COMMUNITY_FEE_PERCENTAGE = BASE / 1000;\n uint256 public constant BASE_MARKET_FEE_PERCENTAGE = BASE / 1000;\n\n event OrderStarted(\n address indexed consumer,\n address indexed payer,\n uint256 amount, \n uint256 serviceId, \n uint256 timestamp,\n address indexed mrktFeeCollector,\n uint256 marketFee\n );\n\n event OrderFinished(\n bytes32 orderTxId, \n address indexed consumer,\n uint256 amount, \n uint256 serviceId, \n address indexed provider,\n uint256 timestamp\n );\n\n event MinterProposed(\n address currentMinter,\n address newMinter\n );\n\n event MinterApproved(\n address currentMinter,\n address newMinter\n );\n\n modifier onlyNotInitialized() {\n require(\n !initialized,\n 'DataTokenTemplate: token instance already initialized'\n );\n _;\n }\n \n modifier onlyMinter() {\n require(\n msg.sender == _minter,\n 'DataTokenTemplate: invalid minter' \n );\n _;\n }\n\n /**\n * @dev constructor\n * Called prior contract deployment\n * @param name refers to a template DataToken name\n * @param symbol refers to a template DataToken symbol\n * @param minterAddress refers to an address that has minter role\n * @param cap the total ERC20 cap\n * @param blob data string refering to the resolver for the metadata\n * @param feeCollector it is the community fee collector address\n */\n constructor(\n string memory name,\n string memory symbol,\n address minterAddress,\n uint256 cap,\n string memory blob,\n address feeCollector\n )\n public\n {\n _initialize(\n name,\n symbol,\n minterAddress,\n cap,\n blob,\n feeCollector\n );\n }\n \n /**\n * @dev initialize\n * Called prior contract initialization (e.g creating new DataToken instance)\n * Calls private _initialize function. Only if contract is not initialized.\n * @param name refers to a new DataToken name\n * @param symbol refers to a nea DataToken symbol\n * @param minterAddress refers to an address that has minter rights\n * @param cap the total ERC20 cap\n * @param blob data string refering to the resolver for the metadata\n * @param feeCollector it is the community fee collector address\n */\n function initialize(\n string calldata name,\n string calldata symbol,\n address minterAddress,\n uint256 cap,\n string calldata blob,\n address feeCollector\n ) \n external\n onlyNotInitialized\n returns(bool)\n {\n return _initialize(\n name,\n symbol,\n minterAddress,\n cap,\n blob,\n feeCollector\n );\n }\n\n /**\n * @dev _initialize\n * Private function called on contract initialization.\n * @param name refers to a new DataToken name\n * @param symbol refers to a nea DataToken symbol\n * @param minterAddress refers to an address that has minter rights\n * @param cap the total ERC20 cap\n * @param blob data string refering to the resolver for the metadata\n * @param feeCollector it is the community fee collector address\n */\n function _initialize(\n string memory name,\n string memory symbol,\n address minterAddress,\n uint256 cap,\n string memory blob,\n address feeCollector\n )\n private\n returns(bool)\n {\n require(\n minterAddress != address(0), \n 'DataTokenTemplate: Invalid minter, zero address'\n );\n\n require(\n _minter == address(0), \n 'DataTokenTemplate: Invalid minter, zero address'\n );\n\n require(\n feeCollector != address(0),\n 'DataTokenTemplate: Invalid community fee collector, zero address'\n );\n\n require(\n cap != 0,\n 'DataTokenTemplate: Invalid cap value'\n );\n _cap = cap;\n _name = name;\n _blob = blob;\n _symbol = symbol;\n _minter = minterAddress;\n _communityFeeCollector = feeCollector;\n initialized = true;\n return initialized;\n }\n\n /**\n * @dev mint\n * Only the minter address can call it.\n * msg.value should be higher than zero and gt or eq minting fee\n * @param account refers to an address that token is going to be minted to.\n * @param value refers to amount of tokens that is going to be minted.\n */\n function mint(\n address account,\n uint256 value\n ) \n external \n onlyMinter \n {\n require(\n totalSupply().add(value) <= _cap, \n 'DataTokenTemplate: cap exceeded'\n );\n _mint(account, value);\n }\n\n /**\n * @dev startOrder\n * called by payer or consumer prior ordering a service consume on a marketplace.\n * @param consumer is the consumer address (payer could be different address)\n * @param amount refers to amount of tokens that is going to be transfered.\n * @param serviceId service index in the metadata\n * @param mrktFeeCollector marketplace fee collector\n */\n function startOrder(\n address consumer,\n uint256 amount,\n uint256 serviceId,\n address mrktFeeCollector\n )\n external\n {\n uint256 marketFee = 0;\n uint256 communityFee = calculateFee(\n amount, \n BASE_COMMUNITY_FEE_PERCENTAGE\n );\n transfer(_communityFeeCollector, communityFee);\n if(mrktFeeCollector != address(0)){\n marketFee = calculateFee(\n amount, \n BASE_MARKET_FEE_PERCENTAGE\n );\n transfer(mrktFeeCollector, marketFee);\n }\n uint256 totalFee = communityFee.add(marketFee);\n transfer(_minter, amount.sub(totalFee));\n emit OrderStarted(\n consumer,\n msg.sender,\n amount,\n serviceId,\n /* solium-disable-next-line */\n block.timestamp,\n mrktFeeCollector,\n marketFee\n );\n }\n\n /**\n * @dev finishOrder\n * called by provider prior completing service delivery only\n * if there is a partial or full refund.\n * @param orderTxId refers to the transaction Id of startOrder acts \n * as a payment reference.\n * @param consumer refers to an address that has consumed that service.\n * @param amount refers to amount of tokens that is going to be transfered.\n * @param serviceId service index in the metadata.\n */\n function finishOrder(\n bytes32 orderTxId, \n address consumer, \n uint256 amount,\n uint256 serviceId\n )\n external\n {\n if ( amount != 0 ) \n require(\n transfer(consumer, amount),\n 'DataTokenTemplate: failed to finish order'\n );\n \n emit OrderFinished(\n orderTxId, \n consumer, \n amount, \n serviceId, \n msg.sender,\n /* solium-disable-next-line */\n block.timestamp\n );\n }\n\n /**\n * @dev proposeMinter\n * It proposes a new token minter address.\n * Only the current minter can call it.\n * @param newMinter refers to a new token minter address.\n */\n function proposeMinter(address newMinter) \n external \n onlyMinter \n {\n _proposedMinter = newMinter;\n emit MinterProposed(\n msg.sender,\n _proposedMinter\n );\n }\n\n /**\n * @dev approveMinter\n * It approves a new token minter address.\n * Only the current minter can call it.\n */\n function approveMinter()\n external\n {\n require(\n msg.sender == _proposedMinter,\n 'DataTokenTemplate: invalid proposed minter address'\n );\n emit MinterApproved(\n _minter,\n _proposedMinter\n );\n _minter = _proposedMinter;\n _proposedMinter = address(0);\n }\n\n /**\n * @dev name\n * It returns the token name.\n * @return DataToken name.\n */\n function name() external view returns(string memory) {\n return _name;\n }\n\n /**\n * @dev symbol\n * It returns the token symbol.\n * @return DataToken symbol.\n */\n function symbol() external view returns(string memory) {\n return _symbol;\n }\n\n /**\n * @dev blob\n * It returns the blob (e.g https://123.com).\n * @return DataToken blob.\n */\n function blob() external view returns(string memory) {\n return _blob;\n }\n\n /**\n * @dev decimals\n * It returns the token decimals.\n * how many supported decimal points\n * @return DataToken decimals.\n */\n function decimals() external view returns(uint8) {\n return _decimals;\n }\n\n /**\n * @dev cap\n * it returns the capital.\n * @return DataToken cap.\n */\n function cap() external view returns (uint256) {\n return _cap;\n }\n\n /**\n * @dev isMinter\n * It takes the address and checks whether it has a minter role.\n * @param account refers to the address.\n * @return true if account has a minter role.\n */\n function isMinter(address account) external view returns(bool) {\n return (_minter == account);\n } \n\n /**\n * @dev minter\n * @return minter's address.\n */\n function minter()\n external\n view \n returns(address)\n {\n return _minter;\n }\n\n /**\n * @dev isInitialized\n * It checks whether the contract is initialized.\n * @return true if the contract is initialized.\n */ \n function isInitialized() external view returns(bool) {\n return initialized;\n }\n\n /**\n * @dev calculateFee\n * giving a fee percentage, and amount it calculates the actual fee\n * @param amount the amount of token\n * @param feePercentage the fee percentage \n * @return the token fee.\n */ \n function calculateFee(\n uint256 amount,\n uint256 feePercentage\n )\n public\n pure\n returns(uint256)\n {\n if(amount == 0) return 0;\n if(feePercentage == 0) return 0;\n return amount.mul(feePercentage).div(BASE);\n }\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/templates/DataTokenTemplate.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/templates/DataTokenTemplate.sol", + "exportedSymbols": { + "DataTokenTemplate": [ + 6272 + ] + }, + "id": 6273, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5748, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "0:22:13" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "../interfaces/IERC20Template.sol", + "id": 5749, + "nodeType": "ImportDirective", + "scope": 6273, + "sourceUnit": 5659, + "src": "185:42:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "id": 5750, + "nodeType": "ImportDirective", + "scope": 6273, + "sourceUnit": 7038, + "src": "228:63:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 5751, + "name": "IERC20Template", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5658, + "src": "518:14:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 5752, + "nodeType": "InheritanceSpecifier", + "src": "518:14:13" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 5753, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7037, + "src": "534:5:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$7037", + "typeString": "contract ERC20" + } + }, + "id": 5754, + "nodeType": "InheritanceSpecifier", + "src": "534:5:13" + } + ], + "contractDependencies": [ + 5658, + 6327, + 7037, + 7106 + ], + "contractKind": "contract", + "documentation": "@title DataTokenTemplate\n \n@dev DataTokenTemplate is an ERC20 compliant token template\n Used by the factory contract as a bytecode reference to \n deploy new DataTokens.", + "fullyImplemented": true, + "id": 6272, + "linearizedBaseContracts": [ + 6272, + 7037, + 7106, + 6327, + 5658 + ], + "name": "DataTokenTemplate", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5757, + "libraryName": { + "contractScope": null, + "id": 5755, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6514, + "src": "552:8:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6514", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "546:27:13", + "typeName": { + "id": 5756, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "565:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 5759, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "579:21:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 5758, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "579:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 5761, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "606:23:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 5760, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "606:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 5763, + "name": "_blob", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "635:21:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 5762, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "635:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 5765, + "name": "_cap", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "662:20:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5764, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "662:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": true, + "id": 5768, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "688:37:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5766, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "688:5:13", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 5767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "723:2:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 5770, + "name": "_communityFeeCollector", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "731:38:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5769, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "731:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 5773, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "775:35:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5771, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "775:4:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 5772, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "805:5:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 5775, + "name": "_minter", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "816:23:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5774, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "816:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 5777, + "name": "_proposedMinter", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "845:31:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5776, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "845:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": true, + "id": 5782, + "name": "BASE", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "882:37:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "882:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + }, + "id": 5781, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 5779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "913:2:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3138", + "id": 5780, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "917:2:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "src": "913:6:13", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 5787, + "name": "BASE_COMMUNITY_FEE_PERCENTAGE", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "925:67:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "925:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5786, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5784, + "name": "BASE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5782, + "src": "981:4:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030", + "id": 5785, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "988:4:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "981:11:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 5792, + "name": "BASE_MARKET_FEE_PERCENTAGE", + "nodeType": "VariableDeclaration", + "scope": 6272, + "src": "998:64:13", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5788, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "998:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5789, + "name": "BASE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5782, + "src": "1051:4:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030", + "id": 5790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1058:4:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "1051:11:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 5808, + "name": "OrderStarted", + "nodeType": "EventDefinition", + "parameters": { + "id": 5807, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5794, + "indexed": true, + "name": "consumer", + "nodeType": "VariableDeclaration", + "scope": 5808, + "src": "1101:24:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5793, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1101:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5796, + "indexed": true, + "name": "payer", + "nodeType": "VariableDeclaration", + "scope": 5808, + "src": "1139:21:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1139:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5798, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 5808, + "src": "1174:14:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5797, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1174:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5800, + "indexed": false, + "name": "serviceId", + "nodeType": "VariableDeclaration", + "scope": 5808, + "src": "1203:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1203:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5802, + "indexed": false, + "name": "timestamp", + "nodeType": "VariableDeclaration", + "scope": 5808, + "src": "1235:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5801, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1235:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5804, + "indexed": true, + "name": "mrktFeeCollector", + "nodeType": "VariableDeclaration", + "scope": 5808, + "src": "1266:32:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5803, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1266:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5806, + "indexed": false, + "name": "marketFee", + "nodeType": "VariableDeclaration", + "scope": 5808, + "src": "1312:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5805, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1312:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1087:248:13" + }, + "src": "1069:267:13" + }, + { + "anonymous": false, + "documentation": null, + "id": 5822, + "name": "OrderFinished", + "nodeType": "EventDefinition", + "parameters": { + "id": 5821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5810, + "indexed": false, + "name": "orderTxId", + "nodeType": "VariableDeclaration", + "scope": 5822, + "src": "1375:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5809, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1375:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5812, + "indexed": true, + "name": "consumer", + "nodeType": "VariableDeclaration", + "scope": 5822, + "src": "1407:24:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5811, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1407:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5814, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 5822, + "src": "1445:14:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5813, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1445:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5816, + "indexed": false, + "name": "serviceId", + "nodeType": "VariableDeclaration", + "scope": 5822, + "src": "1474:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5815, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1474:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5818, + "indexed": true, + "name": "provider", + "nodeType": "VariableDeclaration", + "scope": 5822, + "src": "1506:24:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1506:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5820, + "indexed": false, + "name": "timestamp", + "nodeType": "VariableDeclaration", + "scope": 5822, + "src": "1544:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5819, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1544:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1361:206:13" + }, + "src": "1342:226:13" + }, + { + "anonymous": false, + "documentation": null, + "id": 5828, + "name": "MinterProposed", + "nodeType": "EventDefinition", + "parameters": { + "id": 5827, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5824, + "indexed": false, + "name": "currentMinter", + "nodeType": "VariableDeclaration", + "scope": 5828, + "src": "1604:21:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5823, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1604:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5826, + "indexed": false, + "name": "newMinter", + "nodeType": "VariableDeclaration", + "scope": 5828, + "src": "1635:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5825, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1635:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1594:64:13" + }, + "src": "1574:85:13" + }, + { + "anonymous": false, + "documentation": null, + "id": 5834, + "name": "MinterApproved", + "nodeType": "EventDefinition", + "parameters": { + "id": 5833, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5830, + "indexed": false, + "name": "currentMinter", + "nodeType": "VariableDeclaration", + "scope": 5834, + "src": "1695:21:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5829, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1695:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5832, + "indexed": false, + "name": "newMinter", + "nodeType": "VariableDeclaration", + "scope": 5834, + "src": "1726:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5831, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1726:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1685:64:13" + }, + "src": "1665:85:13" + }, + { + "body": { + "id": 5843, + "nodeType": "Block", + "src": "1786:140:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1817:12:13", + "subExpression": { + "argumentTypes": null, + "id": 5837, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1818:11:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e54656d706c6174653a20746f6b656e20696e7374616e636520616c726561647920696e697469616c697a6564", + "id": 5839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1843:55:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3fbe4c86a4c4d9736fd0d2a9400f74e8d124de74cfedc7affa27132fa840428d", + "typeString": "literal_string \"DataTokenTemplate: token instance already initialized\"" + }, + "value": "DataTokenTemplate: token instance already initialized" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fbe4c86a4c4d9736fd0d2a9400f74e8d124de74cfedc7affa27132fa840428d", + "typeString": "literal_string \"DataTokenTemplate: token instance already initialized\"" + } + ], + "id": 5836, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1796:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1796:112:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5841, + "nodeType": "ExpressionStatement", + "src": "1796:112:13" + }, + { + "id": 5842, + "nodeType": "PlaceholderStatement", + "src": "1918:1:13" + } + ] + }, + "documentation": null, + "id": 5844, + "name": "onlyNotInitialized", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5835, + "nodeType": "ParameterList", + "parameters": [], + "src": "1783:2:13" + }, + "src": "1756:170:13", + "visibility": "internal" + }, + { + "body": { + "id": 5855, + "nodeType": "Block", + "src": "1958:130:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5847, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "1989:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1989:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5849, + "name": "_minter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5775, + "src": "2003:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1989:21:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e54656d706c6174653a20696e76616c6964206d696e746572", + "id": 5851, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2024:35:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_40e35c5de830427b1e8c63a3538e0f1b39d02b02870d69ff7c4ee4488565fe71", + "typeString": "literal_string \"DataTokenTemplate: invalid minter\"" + }, + "value": "DataTokenTemplate: invalid minter" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_40e35c5de830427b1e8c63a3538e0f1b39d02b02870d69ff7c4ee4488565fe71", + "typeString": "literal_string \"DataTokenTemplate: invalid minter\"" + } + ], + "id": 5846, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1968:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1968:102:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5853, + "nodeType": "ExpressionStatement", + "src": "1968:102:13" + }, + { + "id": 5854, + "nodeType": "PlaceholderStatement", + "src": "2080:1:13" + } + ] + }, + "documentation": null, + "id": 5856, + "name": "onlyMinter", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5845, + "nodeType": "ParameterList", + "parameters": [], + "src": "1955:2:13" + }, + "src": "1936:152:13", + "visibility": "internal" + }, + { + "body": { + "id": 5880, + "nodeType": "Block", + "src": "2748:164:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5872, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5858, + "src": "2783:4:13", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 5873, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5860, + "src": "2801:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 5874, + "name": "minterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5862, + "src": "2821:13:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5875, + "name": "cap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5864, + "src": "2848:3:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5876, + "name": "blob", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5866, + "src": "2865:4:13", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 5877, + "name": "feeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5868, + "src": "2883:12:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5871, + "name": "_initialize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5992, + "src": "2758:11:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (string memory,string memory,address,uint256,string memory,address) returns (bool)" + } + }, + "id": 5878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2758:147:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5879, + "nodeType": "ExpressionStatement", + "src": "2758:147:13" + } + ] + }, + "documentation": "@dev constructor\n Called prior contract deployment\n@param name refers to a template DataToken name\n@param symbol refers to a template DataToken symbol\n@param minterAddress refers to an address that has minter role\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", + "id": 5881, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5869, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5858, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 5881, + "src": "2564:18:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5857, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2564:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5860, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 5881, + "src": "2592:20:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5859, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2592:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5862, + "name": "minterAddress", + "nodeType": "VariableDeclaration", + "scope": 5881, + "src": "2622:21:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5861, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2622:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5864, + "name": "cap", + "nodeType": "VariableDeclaration", + "scope": 5881, + "src": "2653:11:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2653:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5866, + "name": "blob", + "nodeType": "VariableDeclaration", + "scope": 5881, + "src": "2674:18:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5865, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2674:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5868, + "name": "feeCollector", + "nodeType": "VariableDeclaration", + "scope": 5881, + "src": "2702:20:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2702:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2554:174:13" + }, + "returnParameters": { + "id": 5870, + "nodeType": "ParameterList", + "parameters": [], + "src": "2748:0:13" + }, + "scope": 6272, + "src": "2543:369:13", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5909, + "nodeType": "Block", + "src": "3760:171:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5901, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5883, + "src": "3802:4:13", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + { + "argumentTypes": null, + "id": 5902, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5885, + "src": "3820:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + { + "argumentTypes": null, + "id": 5903, + "name": "minterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5887, + "src": "3840:13:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5904, + "name": "cap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "3867:3:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5905, + "name": "blob", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5891, + "src": "3884:4:13", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + { + "argumentTypes": null, + "id": 5906, + "name": "feeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5893, + "src": "3902:12:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5900, + "name": "_initialize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5992, + "src": "3777:11:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_string_memory_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (string memory,string memory,address,uint256,string memory,address) returns (bool)" + } + }, + "id": 5907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3777:147:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5899, + "id": 5908, + "nodeType": "Return", + "src": "3770:154:13" + } + ] + }, + "documentation": "@dev initialize\n Called prior contract initialization (e.g creating new DataToken instance)\n Calls private _initialize function. Only if contract is not initialized.\n@param name refers to a new DataToken name\n@param symbol refers to a nea DataToken symbol\n@param minterAddress refers to an address that has minter rights\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", + "id": 5910, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 5896, + "modifierName": { + "argumentTypes": null, + "id": 5895, + "name": "onlyNotInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5844, + "src": "3715:18:13", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3715:18:13" + } + ], + "name": "initialize", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5894, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5883, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 5910, + "src": "3518:20:13", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5882, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3518:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5885, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 5910, + "src": "3548:22:13", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5884, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3548:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5887, + "name": "minterAddress", + "nodeType": "VariableDeclaration", + "scope": 5910, + "src": "3580:21:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5886, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3580:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5889, + "name": "cap", + "nodeType": "VariableDeclaration", + "scope": 5910, + "src": "3611:11:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5888, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3611:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5891, + "name": "blob", + "nodeType": "VariableDeclaration", + "scope": 5910, + "src": "3632:20:13", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5890, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3632:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5893, + "name": "feeCollector", + "nodeType": "VariableDeclaration", + "scope": 5910, + "src": "3662:20:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5892, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3662:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3508:180:13" + }, + "returnParameters": { + "id": 5899, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5898, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5910, + "src": "3750:4:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5897, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3750:4:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3749:6:13" + }, + "scope": 6272, + "src": "3489:442:13", + "stateMutability": "nonpayable", + "superFunction": 5569, + "visibility": "external" + }, + { + "body": { + "id": 5991, + "nodeType": "Block", + "src": "4634:743:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5928, + "name": "minterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5916, + "src": "4665:13:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 5930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4690:1:13", + "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": 5929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4682:7:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 5931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4682:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4665:27:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f2061646472657373", + "id": 5933, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4707:50:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_79b023297db239e06df0b00bacc5eecb1d80c9686a2e70ed8293de6723d3cfa6", + "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" + }, + "value": "DataTokenTemplate: Invalid minter, zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_79b023297db239e06df0b00bacc5eecb1d80c9686a2e70ed8293de6723d3cfa6", + "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" + } + ], + "id": 5927, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "4644:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4644:123:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5935, + "nodeType": "ExpressionStatement", + "src": "4644:123:13" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5937, + "name": "_minter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5775, + "src": "4799:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 5939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4818:1:13", + "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": 5938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4810:7:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 5940, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4810:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4799:21:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f2061646472657373", + "id": 5942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4835:49:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9b9e16289fbb5851262a16209ee436929da92a7a333eeb45338a6bda1fc88b5", + "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" + }, + "value": "DataTokenTemplate: Invalid minter, zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9b9e16289fbb5851262a16209ee436929da92a7a333eeb45338a6bda1fc88b5", + "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" + } + ], + "id": 5936, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "4778:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4778:116:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5944, + "nodeType": "ExpressionStatement", + "src": "4778:116:13" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5946, + "name": "feeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5922, + "src": "4926:12:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 5948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4950:1:13", + "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": 5947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4942:7:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 5949, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4942:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4926:26:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c696420636f6d6d756e6974792066656520636f6c6c6563746f722c207a65726f2061646472657373", + "id": 5951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4966:66:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_79b4d95ff9378609f77ba871e4eb20868d893b58fb0b84eff9a61c2168cec2e8", + "typeString": "literal_string \"DataTokenTemplate: Invalid community fee collector, zero address\"" + }, + "value": "DataTokenTemplate: Invalid community fee collector, zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_79b4d95ff9378609f77ba871e4eb20868d893b58fb0b84eff9a61c2168cec2e8", + "typeString": "literal_string \"DataTokenTemplate: Invalid community fee collector, zero address\"" + } + ], + "id": 5945, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "4905:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4905:137:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5953, + "nodeType": "ExpressionStatement", + "src": "4905:137:13" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5955, + "name": "cap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5918, + "src": "5074:3:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5081:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5074:8:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c7565", + "id": 5958, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5096:38:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_931eb4f9c6ddf66acc5bb36f4acf3bb199deea0451b189ecfb6b4e252da29b03", + "typeString": "literal_string \"DataTokenTemplate: Invalid cap value\"" + }, + "value": "DataTokenTemplate: Invalid cap value" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_931eb4f9c6ddf66acc5bb36f4acf3bb199deea0451b189ecfb6b4e252da29b03", + "typeString": "literal_string \"DataTokenTemplate: Invalid cap value\"" + } + ], + "id": 5954, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "5053:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5053:91:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5960, + "nodeType": "ExpressionStatement", + "src": "5053:91:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 5963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5961, + "name": "_cap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5765, + "src": "5154:4:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5962, + "name": "cap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5918, + "src": "5161:3:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5154:10:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5964, + "nodeType": "ExpressionStatement", + "src": "5154:10:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 5967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5965, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5759, + "src": "5174:5:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5966, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5912, + "src": "5182:4:13", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "5174:12:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 5968, + "nodeType": "ExpressionStatement", + "src": "5174:12:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 5971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5969, + "name": "_blob", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5763, + "src": "5196:5:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5970, + "name": "blob", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5920, + "src": "5204:4:13", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "5196:12:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 5972, + "nodeType": "ExpressionStatement", + "src": "5196:12:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 5975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5973, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5761, + "src": "5218:7:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5974, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5914, + "src": "5228:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "5218:16:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 5976, + "nodeType": "ExpressionStatement", + "src": "5218:16:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 5979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5977, + "name": "_minter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5775, + "src": "5244:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5978, + "name": "minterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5916, + "src": "5254:13:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5244:23:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5980, + "nodeType": "ExpressionStatement", + "src": "5244:23:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 5983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5981, + "name": "_communityFeeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5770, + "src": "5277:22:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5982, + "name": "feeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5922, + "src": "5302:12:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5277:37:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5984, + "nodeType": "ExpressionStatement", + "src": "5277:37:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 5987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5985, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "5324:11:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5338:4:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5324:18:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5988, + "nodeType": "ExpressionStatement", + "src": "5324:18:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 5989, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "5359:11:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5926, + "id": 5990, + "nodeType": "Return", + "src": "5352:18:13" + } + ] + }, + "documentation": "@dev _initialize\n Private function called on contract initialization.\n@param name refers to a new DataToken name\n@param symbol refers to a nea DataToken symbol\n@param minterAddress refers to an address that has minter rights\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", + "id": 5992, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_initialize", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5912, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 5992, + "src": "4427:18:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5911, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4427:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5914, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 5992, + "src": "4455:20:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5913, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4455:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5916, + "name": "minterAddress", + "nodeType": "VariableDeclaration", + "scope": 5992, + "src": "4485:21:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5915, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4485:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5918, + "name": "cap", + "nodeType": "VariableDeclaration", + "scope": 5992, + "src": "4516:11:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5917, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4516:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5920, + "name": "blob", + "nodeType": "VariableDeclaration", + "scope": 5992, + "src": "4537:18:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5919, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4537:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5922, + "name": "feeCollector", + "nodeType": "VariableDeclaration", + "scope": 5992, + "src": "4565:20:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5921, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4565:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4417:174:13" + }, + "returnParameters": { + "id": 5926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5925, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5992, + "src": "4624:4:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5924, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4624:4:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4623:6:13" + }, + "scope": 6272, + "src": "4397:980:13", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + { + "body": { + "id": 6017, + "nodeType": "Block", + "src": "5806:159:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6005, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5996, + "src": "5855:5:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6002, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6664, + "src": "5837:11:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5837:13:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6354, + "src": "5837:17:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5837:24:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 6007, + "name": "_cap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5765, + "src": "5865:4:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5837:32:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e54656d706c6174653a20636170206578636565646564", + "id": 6009, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5884:33:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_db37e28d4a1d757900849adc30f19972d8f520005ecc78e1ba1f3c9b13636ae7", + "typeString": "literal_string \"DataTokenTemplate: cap exceeded\"" + }, + "value": "DataTokenTemplate: cap exceeded" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_db37e28d4a1d757900849adc30f19972d8f520005ecc78e1ba1f3c9b13636ae7", + "typeString": "literal_string \"DataTokenTemplate: cap exceeded\"" + } + ], + "id": 6001, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "5816:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5816:111:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6011, + "nodeType": "ExpressionStatement", + "src": "5816:111:13" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6013, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5994, + "src": "5943:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6014, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5996, + "src": "5952:5:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6012, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6921, + "src": "5937:5:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 6015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5937:21:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6016, + "nodeType": "ExpressionStatement", + "src": "5937:21:13" + } + ] + }, + "documentation": "@dev mint\n Only the minter address can call it.\n msg.value should be higher than zero and gt or eq minting fee\n@param account refers to an address that token is going to be minted to.\n@param value refers to amount of tokens that is going to be minted.", + "id": 6018, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 5999, + "modifierName": { + "argumentTypes": null, + "id": 5998, + "name": "onlyMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5856, + "src": "5790:10:13", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5790:10:13" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5997, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5994, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 6018, + "src": "5717:15:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5993, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5717:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5996, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 6018, + "src": "5742:13:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5995, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5742:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5707:54:13" + }, + "returnParameters": { + "id": 6000, + "nodeType": "ParameterList", + "parameters": [], + "src": "5806:0:13" + }, + "scope": 6272, + "src": "5694:271:13", + "stateMutability": "nonpayable", + "superFunction": 5576, + "visibility": "external" + }, + { + "body": { + "id": 6091, + "nodeType": "Block", + "src": "6532:795:13", + "statements": [ + { + "assignments": [ + 6030 + ], + "declarations": [ + { + "constant": false, + "id": 6030, + "name": "marketFee", + "nodeType": "VariableDeclaration", + "scope": 6091, + "src": "6542:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6542:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6032, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 6031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6562:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6542:21:13" + }, + { + "assignments": [ + 6034 + ], + "declarations": [ + { + "constant": false, + "id": 6034, + "name": "communityFee", + "nodeType": "VariableDeclaration", + "scope": 6091, + "src": "6573:20:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6033, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6573:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6039, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6036, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6022, + "src": "6622:6:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 6037, + "name": "BASE_COMMUNITY_FEE_PERCENTAGE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5787, + "src": "6643:29:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6035, + "name": "calculateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6271, + "src": "6596:12:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6596:86:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6573:109:13" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6041, + "name": "_communityFeeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5770, + "src": "6701:22:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6042, + "name": "communityFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6034, + "src": "6725:12:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6040, + "name": "transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "6692:8:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 6043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6692:46:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6044, + "nodeType": "ExpressionStatement", + "src": "6692:46:13" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6045, + "name": "mrktFeeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6026, + "src": "6751:16:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6047, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6779:1:13", + "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": 6046, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6771:7:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6048, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6771:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6751:30:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6063, + "nodeType": "IfStatement", + "src": "6748:217:13", + "trueBody": { + "id": 6062, + "nodeType": "Block", + "src": "6782:183:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6050, + "name": "marketFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6030, + "src": "6796:9:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6052, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6022, + "src": "6838:6:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 6053, + "name": "BASE_MARKET_FEE_PERCENTAGE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5792, + "src": "6863:26:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6051, + "name": "calculateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6271, + "src": "6808:12:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6808:95:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6796:107:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6056, + "nodeType": "ExpressionStatement", + "src": "6796:107:13" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6058, + "name": "mrktFeeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6026, + "src": "6926:16:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6059, + "name": "marketFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6030, + "src": "6944:9:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6057, + "name": "transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "6917:8:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 6060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6917:37:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6061, + "nodeType": "ExpressionStatement", + "src": "6917:37:13" + } + ] + } + }, + { + "assignments": [ + 6065 + ], + "declarations": [ + { + "constant": false, + "id": 6065, + "name": "totalFee", + "nodeType": "VariableDeclaration", + "scope": 6091, + "src": "6974:16:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6064, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6974:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6070, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6068, + "name": "marketFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6030, + "src": "7010:9:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 6066, + "name": "communityFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6034, + "src": "6993:12:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6354, + "src": "6993:16:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6993:27:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6974:46:13" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6072, + "name": "_minter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5775, + "src": "7039:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6075, + "name": "totalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6065, + "src": "7059:8:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 6073, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6022, + "src": "7048:6:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6370, + "src": "7048:10:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7048:20:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6071, + "name": "transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "7030:8:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 6077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7030:39:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6078, + "nodeType": "ExpressionStatement", + "src": "7030:39:13" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6080, + "name": "consumer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6020, + "src": "7110:8:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 6081, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "7132:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7132:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 6083, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6022, + "src": "7156:6:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 6084, + "name": "serviceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6024, + "src": "7176:9:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 6085, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7111, + "src": "7242:5:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7242:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 6087, + "name": "mrktFeeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6026, + "src": "7271:16:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6088, + "name": "marketFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6030, + "src": "7301:9:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6079, + "name": "OrderStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5808, + "src": "7084:12:13", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint256,address,uint256)" + } + }, + "id": 6089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7084:236:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6090, + "nodeType": "EmitStatement", + "src": "7079:241:13" + } + ] + }, + "documentation": "@dev startOrder\n called by payer or consumer prior ordering a service consume on a marketplace.\n@param consumer is the consumer address (payer could be different address)\n@param amount refers to amount of tokens that is going to be transfered.\n@param serviceId service index in the metadata\n@param mrktFeeCollector marketplace fee collector", + "id": 6092, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "startOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6020, + "name": "consumer", + "nodeType": "VariableDeclaration", + "scope": 6092, + "src": "6403:16:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6019, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6403:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6022, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 6092, + "src": "6429:14:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6021, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6429:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6024, + "name": "serviceId", + "nodeType": "VariableDeclaration", + "scope": 6092, + "src": "6453:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6453:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6026, + "name": "mrktFeeCollector", + "nodeType": "VariableDeclaration", + "scope": 6092, + "src": "6480:24:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6025, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6480:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6393:117:13" + }, + "returnParameters": { + "id": 6028, + "nodeType": "ParameterList", + "parameters": [], + "src": "6532:0:13" + }, + "scope": 6272, + "src": "6374:953:13", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 6126, + "nodeType": "Block", + "src": "7980:411:13", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6103, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6098, + "src": "7995:6:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 6104, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8005:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7995:11:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6114, + "nodeType": "IfStatement", + "src": "7990:159:13", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6108, + "name": "consumer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6096, + "src": "8057:8:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6109, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6098, + "src": "8067:6:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6107, + "name": "transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "8048:8:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 6110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8048:26:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e54656d706c6174653a206661696c656420746f2066696e697368206f72646572", + "id": 6111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8092:43:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5beb845327406b92f3857bb14436e4b6862cb87998aca33ed8309c1bf98b5e76", + "typeString": "literal_string \"DataTokenTemplate: failed to finish order\"" + }, + "value": "DataTokenTemplate: failed to finish order" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5beb845327406b92f3857bb14436e4b6862cb87998aca33ed8309c1bf98b5e76", + "typeString": "literal_string \"DataTokenTemplate: failed to finish order\"" + } + ], + "id": 6106, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "8023:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8023:126:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6113, + "nodeType": "ExpressionStatement", + "src": "8023:126:13" + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6116, + "name": "orderTxId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6094, + "src": "8200:9:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 6117, + "name": "consumer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6096, + "src": "8224:8:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6118, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6098, + "src": "8247:6:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 6119, + "name": "serviceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6100, + "src": "8268:9:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 6120, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "8292:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8292:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 6122, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7111, + "src": "8359:5:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8359:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6115, + "name": "OrderFinished", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5822, + "src": "8173:13:13", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,address,uint256,uint256,address,uint256)" + } + }, + "id": 6124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8173:211:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6125, + "nodeType": "EmitStatement", + "src": "8168:216:13" + } + ] + }, + "documentation": "@dev finishOrder\n called by provider prior completing service delivery only\n if there is a partial or full refund.\n@param orderTxId refers to the transaction Id of startOrder acts \n as a payment reference.\n@param consumer refers to an address that has consumed that service.\n@param amount refers to amount of tokens that is going to be transfered.\n@param serviceId service index in the metadata.", + "id": 6127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "finishOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6094, + "name": "orderTxId", + "nodeType": "VariableDeclaration", + "scope": 6127, + "src": "7856:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6093, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7856:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6096, + "name": "consumer", + "nodeType": "VariableDeclaration", + "scope": 6127, + "src": "7884:16:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6095, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7884:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6098, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 6127, + "src": "7911:14:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6097, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7911:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6100, + "name": "serviceId", + "nodeType": "VariableDeclaration", + "scope": 6127, + "src": "7935:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6099, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7935:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7846:112:13" + }, + "returnParameters": { + "id": 6102, + "nodeType": "ParameterList", + "parameters": [], + "src": "7980:0:13" + }, + "scope": 6272, + "src": "7826:565:13", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 6144, + "nodeType": "Block", + "src": "8687:136:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6134, + "name": "_proposedMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5777, + "src": "8697:15:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6135, + "name": "newMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "8715:9:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8697:27:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6137, + "nodeType": "ExpressionStatement", + "src": "8697:27:13" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 6139, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "8767:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8767:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 6141, + "name": "_proposedMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5777, + "src": "8791:15:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6138, + "name": "MinterProposed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5828, + "src": "8739:14:13", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 6142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8739:77:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6143, + "nodeType": "EmitStatement", + "src": "8734:82:13" + } + ] + }, + "documentation": "@dev proposeMinter\n It proposes a new token minter address.\n Only the current minter can call it.\n@param newMinter refers to a new token minter address.", + "id": 6145, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 6132, + "modifierName": { + "argumentTypes": null, + "id": 6131, + "name": "onlyMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5856, + "src": "8671:10:13", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8671:10:13" + } + ], + "name": "proposeMinter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6129, + "name": "newMinter", + "nodeType": "VariableDeclaration", + "scope": 6145, + "src": "8625:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8625:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8624:19:13" + }, + "returnParameters": { + "id": 6133, + "nodeType": "ParameterList", + "parameters": [], + "src": "8687:0:13" + }, + "scope": 6272, + "src": "8602:221:13", + "stateMutability": "nonpayable", + "superFunction": 5654, + "visibility": "external" + }, + { + "body": { + "id": 6171, + "nodeType": "Block", + "src": "9018:305:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 6149, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "9049:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9049:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 6151, + "name": "_proposedMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5777, + "src": "9063:15:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9049:29:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e54656d706c6174653a20696e76616c69642070726f706f736564206d696e7465722061646472657373", + "id": 6153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9092:52:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7af8769e1ae364fd1070260138caf964484121753b4fb103f09e0f3de065c059", + "typeString": "literal_string \"DataTokenTemplate: invalid proposed minter address\"" + }, + "value": "DataTokenTemplate: invalid proposed minter address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7af8769e1ae364fd1070260138caf964484121753b4fb103f09e0f3de065c059", + "typeString": "literal_string \"DataTokenTemplate: invalid proposed minter address\"" + } + ], + "id": 6148, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "9028:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9028:126:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6155, + "nodeType": "ExpressionStatement", + "src": "9028:126:13" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6157, + "name": "_minter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5775, + "src": "9197:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6158, + "name": "_proposedMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5777, + "src": "9218:15:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6156, + "name": "MinterApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5834, + "src": "9169:14:13", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 6159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9169:74:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6160, + "nodeType": "EmitStatement", + "src": "9164:79:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 6163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6161, + "name": "_minter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5775, + "src": "9253:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6162, + "name": "_proposedMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5777, + "src": "9263:15:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9253:25:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6164, + "nodeType": "ExpressionStatement", + "src": "9253:25:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 6169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6165, + "name": "_proposedMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5777, + "src": "9288:15:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9314:1:13", + "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": 6166, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9306:7:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6168, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9306:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "9288:28:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6170, + "nodeType": "ExpressionStatement", + "src": "9288:28:13" + } + ] + }, + "documentation": "@dev approveMinter\n It approves a new token minter address.\n Only the current minter can call it.", + "id": 6172, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approveMinter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6146, + "nodeType": "ParameterList", + "parameters": [], + "src": "8994:2:13" + }, + "returnParameters": { + "id": 6147, + "nodeType": "ParameterList", + "parameters": [], + "src": "9018:0:13" + }, + "scope": 6272, + "src": "8972:351:13", + "stateMutability": "nonpayable", + "superFunction": 5657, + "visibility": "external" + }, + { + "body": { + "id": 6179, + "nodeType": "Block", + "src": "9485:29:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6177, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5759, + "src": "9502:5:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 6176, + "id": 6178, + "nodeType": "Return", + "src": "9495:12:13" + } + ] + }, + "documentation": "@dev name\n It returns the token name.\n@return DataToken name.", + "id": 6180, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6173, + "nodeType": "ParameterList", + "parameters": [], + "src": "9445:2:13" + }, + "returnParameters": { + "id": 6176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6175, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6180, + "src": "9470:13:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6174, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9470:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9469:15:13" + }, + "scope": 6272, + "src": "9432:82:13", + "stateMutability": "view", + "superFunction": 5586, + "visibility": "external" + }, + { + "body": { + "id": 6187, + "nodeType": "Block", + "src": "9684:31:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6185, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5761, + "src": "9701:7:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 6184, + "id": 6186, + "nodeType": "Return", + "src": "9694:14:13" + } + ] + }, + "documentation": "@dev symbol\n It returns the token symbol.\n@return DataToken symbol.", + "id": 6188, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6181, + "nodeType": "ParameterList", + "parameters": [], + "src": "9644:2:13" + }, + "returnParameters": { + "id": 6184, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6183, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6188, + "src": "9669:13:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6182, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9669:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9668:15:13" + }, + "scope": 6272, + "src": "9629:86:13", + "stateMutability": "view", + "superFunction": 5591, + "visibility": "external" + }, + { + "body": { + "id": 6195, + "nodeType": "Block", + "src": "9893:29:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6193, + "name": "_blob", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5763, + "src": "9910:5:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 6192, + "id": 6194, + "nodeType": "Return", + "src": "9903:12:13" + } + ] + }, + "documentation": "@dev blob\n It returns the blob (e.g https://123.com).\n@return DataToken blob.", + "id": 6196, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "blob", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6189, + "nodeType": "ParameterList", + "parameters": [], + "src": "9853:2:13" + }, + "returnParameters": { + "id": 6192, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6191, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "9878:13:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6190, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9878:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9877:15:13" + }, + "scope": 6272, + "src": "9840:82:13", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 6203, + "nodeType": "Block", + "src": "10138:33:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6201, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5768, + "src": "10155:9:13", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 6200, + "id": 6202, + "nodeType": "Return", + "src": "10148:16:13" + } + ] + }, + "documentation": "@dev decimals\n It returns the token decimals.\n how many supported decimal points\n@return DataToken decimals.", + "id": 6204, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6197, + "nodeType": "ParameterList", + "parameters": [], + "src": "10106:2:13" + }, + "returnParameters": { + "id": 6200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6199, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6204, + "src": "10131:5:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6198, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10131:5:13", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10130:7:13" + }, + "scope": 6272, + "src": "10089:82:13", + "stateMutability": "view", + "superFunction": 5596, + "visibility": "external" + }, + { + "body": { + "id": 6211, + "nodeType": "Block", + "src": "10322:28:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6209, + "name": "_cap", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5765, + "src": "10339:4:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6208, + "id": 6210, + "nodeType": "Return", + "src": "10332:11:13" + } + ] + }, + "documentation": "@dev cap\n it returns the capital.\n@return DataToken cap.", + "id": 6212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "cap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6205, + "nodeType": "ParameterList", + "parameters": [], + "src": "10287:2:13" + }, + "returnParameters": { + "id": 6208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6207, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6212, + "src": "10313:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10313:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10312:9:13" + }, + "scope": 6272, + "src": "10275:75:13", + "stateMutability": "view", + "superFunction": 5601, + "visibility": "external" + }, + { + "body": { + "id": 6224, + "nodeType": "Block", + "src": "10625:44:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6219, + "name": "_minter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5775, + "src": "10643:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 6220, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "10654:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "10643:18:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 6222, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10642:20:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 6218, + "id": 6223, + "nodeType": "Return", + "src": "10635:27:13" + } + ] + }, + "documentation": "@dev isMinter\n It takes the address and checks whether it has a minter role.\n@param account refers to the address.\n@return true if account has a minter role.", + "id": 6225, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isMinter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6214, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 6225, + "src": "10580:15:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10580:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10579:17:13" + }, + "returnParameters": { + "id": 6218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6217, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6225, + "src": "10619:4:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6216, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10619:4:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10618:6:13" + }, + "scope": 6272, + "src": "10562:107:13", + "stateMutability": "view", + "superFunction": 5608, + "visibility": "external" + }, + { + "body": { + "id": 6232, + "nodeType": "Block", + "src": "10822:31:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6230, + "name": "_minter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5775, + "src": "10839:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6229, + "id": 6231, + "nodeType": "Return", + "src": "10832:14:13" + } + ] + }, + "documentation": "@dev minter\n@return minter's address.", + "id": 6233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "minter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6226, + "nodeType": "ParameterList", + "parameters": [], + "src": "10759:2:13" + }, + "returnParameters": { + "id": 6229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6228, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6233, + "src": "10809:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6227, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10809:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10808:9:13" + }, + "scope": 6272, + "src": "10744:109:13", + "stateMutability": "view", + "superFunction": 5581, + "visibility": "external" + }, + { + "body": { + "id": 6240, + "nodeType": "Block", + "src": "11066:35:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6238, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "11083:11:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 6237, + "id": 6239, + "nodeType": "Return", + "src": "11076:18:13" + } + ] + }, + "documentation": "@dev isInitialized\n It checks whether the contract is initialized.\n@return true if the contract is initialized.", + "id": 6241, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isInitialized", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6234, + "nodeType": "ParameterList", + "parameters": [], + "src": "11035:2:13" + }, + "returnParameters": { + "id": 6237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6236, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6241, + "src": "11060:4:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6235, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11060:4:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11059:6:13" + }, + "scope": 6272, + "src": "11013:88:13", + "stateMutability": "view", + "superFunction": 5613, + "visibility": "external" + }, + { + "body": { + "id": 6270, + "nodeType": "Block", + "src": "11485:134:13", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6250, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6243, + "src": "11498:6:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 6251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11508:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11498:11:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6255, + "nodeType": "IfStatement", + "src": "11495:24:13", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 6253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11518:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 6249, + "id": 6254, + "nodeType": "Return", + "src": "11511:8:13" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6256, + "name": "feePercentage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6245, + "src": "11532:13:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 6257, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11549:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11532:18:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6261, + "nodeType": "IfStatement", + "src": "11529:31:13", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 6259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11559:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 6249, + "id": 6260, + "nodeType": "Return", + "src": "11552:8:13" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6267, + "name": "BASE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5782, + "src": "11607:4:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6264, + "name": "feePercentage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6245, + "src": "11588:13:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 6262, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6243, + "src": "11577:6:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 6431, + "src": "11577:10:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11577:25:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 6447, + "src": "11577:29:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11577:35:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6249, + "id": 6269, + "nodeType": "Return", + "src": "11570:42:13" + } + ] + }, + "documentation": "@dev calculateFee\n giving a fee percentage, and amount it calculates the actual fee\n@param amount the amount of token\n@param feePercentage the fee percentage \n@return the token fee.", + "id": 6271, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateFee", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6246, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6243, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "11376:14:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11376:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6245, + "name": "feePercentage", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "11400:21:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6244, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11400:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11366:61:13" + }, + "returnParameters": { + "id": 6249, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6248, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "11472:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11472:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11471:9:13" + }, + "scope": 6272, + "src": "11345:274:13", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 6273, + "src": "488:11133:13" + } + ], + "src": "0:11622:13" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/templates/DataTokenTemplate.sol", + "exportedSymbols": { + "DataTokenTemplate": [ + 6272 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 5748, + "name": "PragmaDirective", + "src": "0:22:13" + }, + { + "attributes": { + "SourceUnit": 5659, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "../interfaces/IERC20Template.sol", + "scope": 6273, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 5749, + "name": "ImportDirective", + "src": "185:42:13" + }, + { + "attributes": { + "SourceUnit": 7038, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "scope": 6273, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 5750, + "name": "ImportDirective", + "src": "228:63:13" + }, + { + "attributes": { + "contractDependencies": [ + 5658, + 6327, + 7037, + 7106 + ], + "contractKind": "contract", + "documentation": "@title DataTokenTemplate\n \n@dev DataTokenTemplate is an ERC20 compliant token template\n Used by the factory contract as a bytecode reference to \n deploy new DataTokens.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 6272, + 7037, + 7106, + 6327, + 5658 + ], + "name": "DataTokenTemplate", + "scope": 6273 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20Template", + "referencedDeclaration": 5658, + "type": "contract IERC20Template" + }, + "id": 5751, + "name": "UserDefinedTypeName", + "src": "518:14:13" + } + ], + "id": 5752, + "name": "InheritanceSpecifier", + "src": "518:14:13" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC20", + "referencedDeclaration": 7037, + "type": "contract ERC20" + }, + "id": 5753, + "name": "UserDefinedTypeName", + "src": "534:5:13" + } + ], + "id": 5754, + "name": "InheritanceSpecifier", + "src": "534:5:13" + }, + { + "children": [ + { + "attributes": { + "contractScope": null, + "name": "SafeMath", + "referencedDeclaration": 6514, + "type": "library SafeMath" + }, + "id": 5755, + "name": "UserDefinedTypeName", + "src": "552:8:13" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5756, + "name": "ElementaryTypeName", + "src": "565:7:13" + } + ], + "id": 5757, + "name": "UsingForDirective", + "src": "546:27:13" + }, + { + "attributes": { + "constant": false, + "name": "_name", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "string", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5758, + "name": "ElementaryTypeName", + "src": "579:6:13" + } + ], + "id": 5759, + "name": "VariableDeclaration", + "src": "579:21:13" + }, + { + "attributes": { + "constant": false, + "name": "_symbol", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "string", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5760, + "name": "ElementaryTypeName", + "src": "606:6:13" + } + ], + "id": 5761, + "name": "VariableDeclaration", + "src": "606:23:13" + }, + { + "attributes": { + "constant": false, + "name": "_blob", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "string", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5762, + "name": "ElementaryTypeName", + "src": "635:6:13" + } + ], + "id": 5763, + "name": "VariableDeclaration", + "src": "635:21:13" + }, + { + "attributes": { + "constant": false, + "name": "_cap", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5764, + "name": "ElementaryTypeName", + "src": "662:7:13" + } + ], + "id": 5765, + "name": "VariableDeclaration", + "src": "662:20:13" + }, + { + "attributes": { + "constant": true, + "name": "_decimals", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "uint8", + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 5766, + "name": "ElementaryTypeName", + "src": "688:5:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3138", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 18", + "value": "18" + }, + "id": 5767, + "name": "Literal", + "src": "723:2:13" + } + ], + "id": 5768, + "name": "VariableDeclaration", + "src": "688:37:13" + }, + { + "attributes": { + "constant": false, + "name": "_communityFeeCollector", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5769, + "name": "ElementaryTypeName", + "src": "731:7:13" + } + ], + "id": 5770, + "name": "VariableDeclaration", + "src": "731:38:13" + }, + { + "attributes": { + "constant": false, + "name": "initialized", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "bool", + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 5771, + "name": "ElementaryTypeName", + "src": "775:4:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 5772, + "name": "Literal", + "src": "805:5:13" + } + ], + "id": 5773, + "name": "VariableDeclaration", + "src": "775:35:13" + }, + { + "attributes": { + "constant": false, + "name": "_minter", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5774, + "name": "ElementaryTypeName", + "src": "816:7:13" + } + ], + "id": 5775, + "name": "VariableDeclaration", + "src": "816:23:13" + }, + { + "attributes": { + "constant": false, + "name": "_proposedMinter", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5776, + "name": "ElementaryTypeName", + "src": "845:7:13" + } + ], + "id": 5777, + "name": "VariableDeclaration", + "src": "845:31:13" + }, + { + "attributes": { + "constant": true, + "name": "BASE", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5778, + "name": "ElementaryTypeName", + "src": "882:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "**", + "type": "int_const 1000000000000000000" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3130", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 10", + "value": "10" + }, + "id": 5779, + "name": "Literal", + "src": "913:2:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3138", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 18", + "value": "18" + }, + "id": 5780, + "name": "Literal", + "src": "917:2:13" + } + ], + "id": 5781, + "name": "BinaryOperation", + "src": "913:6:13" + } + ], + "id": 5782, + "name": "VariableDeclaration", + "src": "882:37:13" + }, + { + "attributes": { + "constant": true, + "name": "BASE_COMMUNITY_FEE_PERCENTAGE", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5783, + "name": "ElementaryTypeName", + "src": "925:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5782, + "type": "uint256", + "value": "BASE" + }, + "id": 5784, + "name": "Identifier", + "src": "981:4:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "31303030", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 1000", + "value": "1000" + }, + "id": 5785, + "name": "Literal", + "src": "988:4:13" + } + ], + "id": 5786, + "name": "BinaryOperation", + "src": "981:11:13" + } + ], + "id": 5787, + "name": "VariableDeclaration", + "src": "925:67:13" + }, + { + "attributes": { + "constant": true, + "name": "BASE_MARKET_FEE_PERCENTAGE", + "scope": 6272, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5788, + "name": "ElementaryTypeName", + "src": "998:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5782, + "type": "uint256", + "value": "BASE" + }, + "id": 5789, + "name": "Identifier", + "src": "1051:4:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "31303030", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 1000", + "value": "1000" + }, + "id": 5790, + "name": "Literal", + "src": "1058:4:13" + } + ], + "id": 5791, + "name": "BinaryOperation", + "src": "1051:11:13" + } + ], + "id": 5792, + "name": "VariableDeclaration", + "src": "998:64:13" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "OrderStarted" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "consumer", + "scope": 5808, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5793, + "name": "ElementaryTypeName", + "src": "1101:7:13" + } + ], + "id": 5794, + "name": "VariableDeclaration", + "src": "1101:24:13" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "payer", + "scope": 5808, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5795, + "name": "ElementaryTypeName", + "src": "1139:7:13" + } + ], + "id": 5796, + "name": "VariableDeclaration", + "src": "1139:21:13" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "amount", + "scope": 5808, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5797, + "name": "ElementaryTypeName", + "src": "1174:7:13" + } + ], + "id": 5798, + "name": "VariableDeclaration", + "src": "1174:14:13" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "serviceId", + "scope": 5808, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5799, + "name": "ElementaryTypeName", + "src": "1203:7:13" + } + ], + "id": 5800, + "name": "VariableDeclaration", + "src": "1203:17:13" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "timestamp", + "scope": 5808, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5801, + "name": "ElementaryTypeName", + "src": "1235:7:13" + } + ], + "id": 5802, + "name": "VariableDeclaration", + "src": "1235:17:13" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "mrktFeeCollector", + "scope": 5808, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5803, + "name": "ElementaryTypeName", + "src": "1266:7:13" + } + ], + "id": 5804, + "name": "VariableDeclaration", + "src": "1266:32:13" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "marketFee", + "scope": 5808, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5805, + "name": "ElementaryTypeName", + "src": "1312:7:13" + } + ], + "id": 5806, + "name": "VariableDeclaration", + "src": "1312:17:13" + } + ], + "id": 5807, + "name": "ParameterList", + "src": "1087:248:13" + } + ], + "id": 5808, + "name": "EventDefinition", + "src": "1069:267:13" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "OrderFinished" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": false, + "name": "orderTxId", + "scope": 5822, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5809, + "name": "ElementaryTypeName", + "src": "1375:7:13" + } + ], + "id": 5810, + "name": "VariableDeclaration", + "src": "1375:17:13" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "consumer", + "scope": 5822, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5811, + "name": "ElementaryTypeName", + "src": "1407:7:13" + } + ], + "id": 5812, + "name": "VariableDeclaration", + "src": "1407:24:13" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "amount", + "scope": 5822, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5813, + "name": "ElementaryTypeName", + "src": "1445:7:13" + } + ], + "id": 5814, + "name": "VariableDeclaration", + "src": "1445:14:13" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "serviceId", + "scope": 5822, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5815, + "name": "ElementaryTypeName", + "src": "1474:7:13" + } + ], + "id": 5816, + "name": "VariableDeclaration", + "src": "1474:17:13" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "provider", + "scope": 5822, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5817, + "name": "ElementaryTypeName", + "src": "1506:7:13" + } + ], + "id": 5818, + "name": "VariableDeclaration", + "src": "1506:24:13" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "timestamp", + "scope": 5822, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5819, + "name": "ElementaryTypeName", + "src": "1544:7:13" + } + ], + "id": 5820, + "name": "VariableDeclaration", + "src": "1544:17:13" + } + ], + "id": 5821, + "name": "ParameterList", + "src": "1361:206:13" + } + ], + "id": 5822, + "name": "EventDefinition", + "src": "1342:226:13" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "MinterProposed" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": false, + "name": "currentMinter", + "scope": 5828, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5823, + "name": "ElementaryTypeName", + "src": "1604:7:13" + } + ], + "id": 5824, + "name": "VariableDeclaration", + "src": "1604:21:13" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "newMinter", + "scope": 5828, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5825, + "name": "ElementaryTypeName", + "src": "1635:7:13" + } + ], + "id": 5826, + "name": "VariableDeclaration", + "src": "1635:17:13" + } + ], + "id": 5827, + "name": "ParameterList", + "src": "1594:64:13" + } + ], + "id": 5828, + "name": "EventDefinition", + "src": "1574:85:13" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "MinterApproved" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": false, + "name": "currentMinter", + "scope": 5834, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5829, + "name": "ElementaryTypeName", + "src": "1695:7:13" + } + ], + "id": 5830, + "name": "VariableDeclaration", + "src": "1695:21:13" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "newMinter", + "scope": 5834, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5831, + "name": "ElementaryTypeName", + "src": "1726:7:13" + } + ], + "id": 5832, + "name": "VariableDeclaration", + "src": "1726:17:13" + } + ], + "id": 5833, + "name": "ParameterList", + "src": "1685:64:13" + } + ], + "id": 5834, + "name": "EventDefinition", + "src": "1665:85:13" + }, + { + "attributes": { + "documentation": null, + "name": "onlyNotInitialized", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5835, + "name": "ParameterList", + "src": "1783:2:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fbe4c86a4c4d9736fd0d2a9400f74e8d124de74cfedc7affa27132fa840428d", + "typeString": "literal_string \"DataTokenTemplate: token instance already initialized\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5836, + "name": "Identifier", + "src": "1796:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!", + "prefix": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5773, + "type": "bool", + "value": "initialized" + }, + "id": 5837, + "name": "Identifier", + "src": "1818:11:13" + } + ], + "id": 5838, + "name": "UnaryOperation", + "src": "1817:12:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e54656d706c6174653a20746f6b656e20696e7374616e636520616c726561647920696e697469616c697a6564", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataTokenTemplate: token instance already initialized\"", + "value": "DataTokenTemplate: token instance already initialized" + }, + "id": 5839, + "name": "Literal", + "src": "1843:55:13" + } + ], + "id": 5840, + "name": "FunctionCall", + "src": "1796:112:13" + } + ], + "id": 5841, + "name": "ExpressionStatement", + "src": "1796:112:13" + }, + { + "id": 5842, + "name": "PlaceholderStatement", + "src": "1918:1:13" + } + ], + "id": 5843, + "name": "Block", + "src": "1786:140:13" + } + ], + "id": 5844, + "name": "ModifierDefinition", + "src": "1756:170:13" + }, + { + "attributes": { + "documentation": null, + "name": "onlyMinter", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5845, + "name": "ParameterList", + "src": "1955:2:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_40e35c5de830427b1e8c63a3538e0f1b39d02b02870d69ff7c4ee4488565fe71", + "typeString": "literal_string \"DataTokenTemplate: invalid minter\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5846, + "name": "Identifier", + "src": "1968:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5847, + "name": "Identifier", + "src": "1989:3:13" + } + ], + "id": 5848, + "name": "MemberAccess", + "src": "1989:10:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5775, + "type": "address", + "value": "_minter" + }, + "id": 5849, + "name": "Identifier", + "src": "2003:7:13" + } + ], + "id": 5850, + "name": "BinaryOperation", + "src": "1989:21:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e54656d706c6174653a20696e76616c6964206d696e746572", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataTokenTemplate: invalid minter\"", + "value": "DataTokenTemplate: invalid minter" + }, + "id": 5851, + "name": "Literal", + "src": "2024:35:13" + } + ], + "id": 5852, + "name": "FunctionCall", + "src": "1968:102:13" + } + ], + "id": 5853, + "name": "ExpressionStatement", + "src": "1968:102:13" + }, + { + "id": 5854, + "name": "PlaceholderStatement", + "src": "2080:1:13" + } + ], + "id": 5855, + "name": "Block", + "src": "1958:130:13" + } + ], + "id": 5856, + "name": "ModifierDefinition", + "src": "1936:152:13" + }, + { + "attributes": { + "documentation": "@dev constructor\n Called prior contract deployment\n@param name refers to a template DataToken name\n@param symbol refers to a template DataToken symbol\n@param minterAddress refers to an address that has minter role\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "modifiers": [ + null + ], + "name": "", + "scope": 6272, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "name", + "scope": 5881, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5857, + "name": "ElementaryTypeName", + "src": "2564:6:13" + } + ], + "id": 5858, + "name": "VariableDeclaration", + "src": "2564:18:13" + }, + { + "attributes": { + "constant": false, + "name": "symbol", + "scope": 5881, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5859, + "name": "ElementaryTypeName", + "src": "2592:6:13" + } + ], + "id": 5860, + "name": "VariableDeclaration", + "src": "2592:20:13" + }, + { + "attributes": { + "constant": false, + "name": "minterAddress", + "scope": 5881, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5861, + "name": "ElementaryTypeName", + "src": "2622:7:13" + } + ], + "id": 5862, + "name": "VariableDeclaration", + "src": "2622:21:13" + }, + { + "attributes": { + "constant": false, + "name": "cap", + "scope": 5881, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5863, + "name": "ElementaryTypeName", + "src": "2653:7:13" + } + ], + "id": 5864, + "name": "VariableDeclaration", + "src": "2653:11:13" + }, + { + "attributes": { + "constant": false, + "name": "blob", + "scope": 5881, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5865, + "name": "ElementaryTypeName", + "src": "2674:6:13" + } + ], + "id": 5866, + "name": "VariableDeclaration", + "src": "2674:18:13" + }, + { + "attributes": { + "constant": false, + "name": "feeCollector", + "scope": 5881, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5867, + "name": "ElementaryTypeName", + "src": "2702:7:13" + } + ], + "id": 5868, + "name": "VariableDeclaration", + "src": "2702:20:13" + } + ], + "id": 5869, + "name": "ParameterList", + "src": "2554:174:13" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5870, + "name": "ParameterList", + "src": "2748:0:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5992, + "type": "function (string memory,string memory,address,uint256,string memory,address) returns (bool)", + "value": "_initialize" + }, + "id": 5871, + "name": "Identifier", + "src": "2758:11:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5858, + "type": "string memory", + "value": "name" + }, + "id": 5872, + "name": "Identifier", + "src": "2783:4:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5860, + "type": "string memory", + "value": "symbol" + }, + "id": 5873, + "name": "Identifier", + "src": "2801:6:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5862, + "type": "address", + "value": "minterAddress" + }, + "id": 5874, + "name": "Identifier", + "src": "2821:13:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5864, + "type": "uint256", + "value": "cap" + }, + "id": 5875, + "name": "Identifier", + "src": "2848:3:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5866, + "type": "string memory", + "value": "blob" + }, + "id": 5876, + "name": "Identifier", + "src": "2865:4:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5868, + "type": "address", + "value": "feeCollector" + }, + "id": 5877, + "name": "Identifier", + "src": "2883:12:13" + } + ], + "id": 5878, + "name": "FunctionCall", + "src": "2758:147:13" + } + ], + "id": 5879, + "name": "ExpressionStatement", + "src": "2758:147:13" + } + ], + "id": 5880, + "name": "Block", + "src": "2748:164:13" + } + ], + "id": 5881, + "name": "FunctionDefinition", + "src": "2543:369:13" + }, + { + "attributes": { + "documentation": "@dev initialize\n Called prior contract initialization (e.g creating new DataToken instance)\n Calls private _initialize function. Only if contract is not initialized.\n@param name refers to a new DataToken name\n@param symbol refers to a nea DataToken symbol\n@param minterAddress refers to an address that has minter rights\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "initialize", + "scope": 6272, + "stateMutability": "nonpayable", + "superFunction": 5569, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "name", + "scope": 5910, + "stateVariable": false, + "storageLocation": "calldata", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5882, + "name": "ElementaryTypeName", + "src": "3518:6:13" + } + ], + "id": 5883, + "name": "VariableDeclaration", + "src": "3518:20:13" + }, + { + "attributes": { + "constant": false, + "name": "symbol", + "scope": 5910, + "stateVariable": false, + "storageLocation": "calldata", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5884, + "name": "ElementaryTypeName", + "src": "3548:6:13" + } + ], + "id": 5885, + "name": "VariableDeclaration", + "src": "3548:22:13" + }, + { + "attributes": { + "constant": false, + "name": "minterAddress", + "scope": 5910, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5886, + "name": "ElementaryTypeName", + "src": "3580:7:13" + } + ], + "id": 5887, + "name": "VariableDeclaration", + "src": "3580:21:13" + }, + { + "attributes": { + "constant": false, + "name": "cap", + "scope": 5910, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5888, + "name": "ElementaryTypeName", + "src": "3611:7:13" + } + ], + "id": 5889, + "name": "VariableDeclaration", + "src": "3611:11:13" + }, + { + "attributes": { + "constant": false, + "name": "blob", + "scope": 5910, + "stateVariable": false, + "storageLocation": "calldata", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5890, + "name": "ElementaryTypeName", + "src": "3632:6:13" + } + ], + "id": 5891, + "name": "VariableDeclaration", + "src": "3632:20:13" + }, + { + "attributes": { + "constant": false, + "name": "feeCollector", + "scope": 5910, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5892, + "name": "ElementaryTypeName", + "src": "3662:7:13" + } + ], + "id": 5893, + "name": "VariableDeclaration", + "src": "3662:20:13" + } + ], + "id": 5894, + "name": "ParameterList", + "src": "3508:180:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5910, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 5897, + "name": "ElementaryTypeName", + "src": "3750:4:13" + } + ], + "id": 5898, + "name": "VariableDeclaration", + "src": "3750:4:13" + } + ], + "id": 5899, + "name": "ParameterList", + "src": "3749:6:13" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5844, + "type": "modifier ()", + "value": "onlyNotInitialized" + }, + "id": 5895, + "name": "Identifier", + "src": "3715:18:13" + } + ], + "id": 5896, + "name": "ModifierInvocation", + "src": "3715:18:13" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 5899 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5992, + "type": "function (string memory,string memory,address,uint256,string memory,address) returns (bool)", + "value": "_initialize" + }, + "id": 5900, + "name": "Identifier", + "src": "3777:11:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5883, + "type": "string calldata", + "value": "name" + }, + "id": 5901, + "name": "Identifier", + "src": "3802:4:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5885, + "type": "string calldata", + "value": "symbol" + }, + "id": 5902, + "name": "Identifier", + "src": "3820:6:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5887, + "type": "address", + "value": "minterAddress" + }, + "id": 5903, + "name": "Identifier", + "src": "3840:13:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5889, + "type": "uint256", + "value": "cap" + }, + "id": 5904, + "name": "Identifier", + "src": "3867:3:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5891, + "type": "string calldata", + "value": "blob" + }, + "id": 5905, + "name": "Identifier", + "src": "3884:4:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5893, + "type": "address", + "value": "feeCollector" + }, + "id": 5906, + "name": "Identifier", + "src": "3902:12:13" + } + ], + "id": 5907, + "name": "FunctionCall", + "src": "3777:147:13" + } + ], + "id": 5908, + "name": "Return", + "src": "3770:154:13" + } + ], + "id": 5909, + "name": "Block", + "src": "3760:171:13" + } + ], + "id": 5910, + "name": "FunctionDefinition", + "src": "3489:442:13" + }, + { + "attributes": { + "documentation": "@dev _initialize\n Private function called on contract initialization.\n@param name refers to a new DataToken name\n@param symbol refers to a nea DataToken symbol\n@param minterAddress refers to an address that has minter rights\n@param cap the total ERC20 cap\n@param blob data string refering to the resolver for the metadata\n@param feeCollector it is the community fee collector address", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_initialize", + "scope": 6272, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "private" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "name", + "scope": 5992, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5911, + "name": "ElementaryTypeName", + "src": "4427:6:13" + } + ], + "id": 5912, + "name": "VariableDeclaration", + "src": "4427:18:13" + }, + { + "attributes": { + "constant": false, + "name": "symbol", + "scope": 5992, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5913, + "name": "ElementaryTypeName", + "src": "4455:6:13" + } + ], + "id": 5914, + "name": "VariableDeclaration", + "src": "4455:20:13" + }, + { + "attributes": { + "constant": false, + "name": "minterAddress", + "scope": 5992, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5915, + "name": "ElementaryTypeName", + "src": "4485:7:13" + } + ], + "id": 5916, + "name": "VariableDeclaration", + "src": "4485:21:13" + }, + { + "attributes": { + "constant": false, + "name": "cap", + "scope": 5992, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5917, + "name": "ElementaryTypeName", + "src": "4516:7:13" + } + ], + "id": 5918, + "name": "VariableDeclaration", + "src": "4516:11:13" + }, + { + "attributes": { + "constant": false, + "name": "blob", + "scope": 5992, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5919, + "name": "ElementaryTypeName", + "src": "4537:6:13" + } + ], + "id": 5920, + "name": "VariableDeclaration", + "src": "4537:18:13" + }, + { + "attributes": { + "constant": false, + "name": "feeCollector", + "scope": 5992, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5921, + "name": "ElementaryTypeName", + "src": "4565:7:13" + } + ], + "id": 5922, + "name": "VariableDeclaration", + "src": "4565:20:13" + } + ], + "id": 5923, + "name": "ParameterList", + "src": "4417:174:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5992, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 5924, + "name": "ElementaryTypeName", + "src": "4624:4:13" + } + ], + "id": 5925, + "name": "VariableDeclaration", + "src": "4624:4:13" + } + ], + "id": 5926, + "name": "ParameterList", + "src": "4623:6:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_79b023297db239e06df0b00bacc5eecb1d80c9686a2e70ed8293de6723d3cfa6", + "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5927, + "name": "Identifier", + "src": "4644:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5916, + "type": "address", + "value": "minterAddress" + }, + "id": 5928, + "name": "Identifier", + "src": "4665:13:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 5929, + "name": "ElementaryTypeNameExpression", + "src": "4682:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5930, + "name": "Literal", + "src": "4690:1:13" + } + ], + "id": 5931, + "name": "FunctionCall", + "src": "4682:10:13" + } + ], + "id": 5932, + "name": "BinaryOperation", + "src": "4665:27:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c20207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"", + "value": "DataTokenTemplate: Invalid minter, zero address" + }, + "id": 5933, + "name": "Literal", + "src": "4707:50:13" + } + ], + "id": 5934, + "name": "FunctionCall", + "src": "4644:123:13" + } + ], + "id": 5935, + "name": "ExpressionStatement", + "src": "4644:123:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9b9e16289fbb5851262a16209ee436929da92a7a333eeb45338a6bda1fc88b5", + "typeString": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5936, + "name": "Identifier", + "src": "4778:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5775, + "type": "address", + "value": "_minter" + }, + "id": 5937, + "name": "Identifier", + "src": "4799:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 5938, + "name": "ElementaryTypeNameExpression", + "src": "4810:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5939, + "name": "Literal", + "src": "4818:1:13" + } + ], + "id": 5940, + "name": "FunctionCall", + "src": "4810:10:13" + } + ], + "id": 5941, + "name": "BinaryOperation", + "src": "4799:21:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206d696e7465722c207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataTokenTemplate: Invalid minter, zero address\"", + "value": "DataTokenTemplate: Invalid minter, zero address" + }, + "id": 5942, + "name": "Literal", + "src": "4835:49:13" + } + ], + "id": 5943, + "name": "FunctionCall", + "src": "4778:116:13" + } + ], + "id": 5944, + "name": "ExpressionStatement", + "src": "4778:116:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_79b4d95ff9378609f77ba871e4eb20868d893b58fb0b84eff9a61c2168cec2e8", + "typeString": "literal_string \"DataTokenTemplate: Invalid community fee collector, zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5945, + "name": "Identifier", + "src": "4905:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5922, + "type": "address", + "value": "feeCollector" + }, + "id": 5946, + "name": "Identifier", + "src": "4926:12:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 5947, + "name": "ElementaryTypeNameExpression", + "src": "4942:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5948, + "name": "Literal", + "src": "4950:1:13" + } + ], + "id": 5949, + "name": "FunctionCall", + "src": "4942:10:13" + } + ], + "id": 5950, + "name": "BinaryOperation", + "src": "4926:26:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e54656d706c6174653a20496e76616c696420636f6d6d756e6974792066656520636f6c6c6563746f722c207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataTokenTemplate: Invalid community fee collector, zero address\"", + "value": "DataTokenTemplate: Invalid community fee collector, zero address" + }, + "id": 5951, + "name": "Literal", + "src": "4966:66:13" + } + ], + "id": 5952, + "name": "FunctionCall", + "src": "4905:137:13" + } + ], + "id": 5953, + "name": "ExpressionStatement", + "src": "4905:137:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_931eb4f9c6ddf66acc5bb36f4acf3bb199deea0451b189ecfb6b4e252da29b03", + "typeString": "literal_string \"DataTokenTemplate: Invalid cap value\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5954, + "name": "Identifier", + "src": "5053:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5918, + "type": "uint256", + "value": "cap" + }, + "id": 5955, + "name": "Identifier", + "src": "5074:3:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5956, + "name": "Literal", + "src": "5081:1:13" + } + ], + "id": 5957, + "name": "BinaryOperation", + "src": "5074:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076616c7565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataTokenTemplate: Invalid cap value\"", + "value": "DataTokenTemplate: Invalid cap value" + }, + "id": 5958, + "name": "Literal", + "src": "5096:38:13" + } + ], + "id": 5959, + "name": "FunctionCall", + "src": "5053:91:13" + } + ], + "id": 5960, + "name": "ExpressionStatement", + "src": "5053:91:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5765, + "type": "uint256", + "value": "_cap" + }, + "id": 5961, + "name": "Identifier", + "src": "5154:4:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5918, + "type": "uint256", + "value": "cap" + }, + "id": 5962, + "name": "Identifier", + "src": "5161:3:13" + } + ], + "id": 5963, + "name": "Assignment", + "src": "5154:10:13" + } + ], + "id": 5964, + "name": "ExpressionStatement", + "src": "5154:10:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "string storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5759, + "type": "string storage ref", + "value": "_name" + }, + "id": 5965, + "name": "Identifier", + "src": "5174:5:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5912, + "type": "string memory", + "value": "name" + }, + "id": 5966, + "name": "Identifier", + "src": "5182:4:13" + } + ], + "id": 5967, + "name": "Assignment", + "src": "5174:12:13" + } + ], + "id": 5968, + "name": "ExpressionStatement", + "src": "5174:12:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "string storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5763, + "type": "string storage ref", + "value": "_blob" + }, + "id": 5969, + "name": "Identifier", + "src": "5196:5:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5920, + "type": "string memory", + "value": "blob" + }, + "id": 5970, + "name": "Identifier", + "src": "5204:4:13" + } + ], + "id": 5971, + "name": "Assignment", + "src": "5196:12:13" + } + ], + "id": 5972, + "name": "ExpressionStatement", + "src": "5196:12:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "string storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5761, + "type": "string storage ref", + "value": "_symbol" + }, + "id": 5973, + "name": "Identifier", + "src": "5218:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5914, + "type": "string memory", + "value": "symbol" + }, + "id": 5974, + "name": "Identifier", + "src": "5228:6:13" + } + ], + "id": 5975, + "name": "Assignment", + "src": "5218:16:13" + } + ], + "id": 5976, + "name": "ExpressionStatement", + "src": "5218:16:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5775, + "type": "address", + "value": "_minter" + }, + "id": 5977, + "name": "Identifier", + "src": "5244:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5916, + "type": "address", + "value": "minterAddress" + }, + "id": 5978, + "name": "Identifier", + "src": "5254:13:13" + } + ], + "id": 5979, + "name": "Assignment", + "src": "5244:23:13" + } + ], + "id": 5980, + "name": "ExpressionStatement", + "src": "5244:23:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5770, + "type": "address", + "value": "_communityFeeCollector" + }, + "id": 5981, + "name": "Identifier", + "src": "5277:22:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5922, + "type": "address", + "value": "feeCollector" + }, + "id": 5982, + "name": "Identifier", + "src": "5302:12:13" + } + ], + "id": 5983, + "name": "Assignment", + "src": "5277:37:13" + } + ], + "id": 5984, + "name": "ExpressionStatement", + "src": "5277:37:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5773, + "type": "bool", + "value": "initialized" + }, + "id": 5985, + "name": "Identifier", + "src": "5324:11:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 5986, + "name": "Literal", + "src": "5338:4:13" + } + ], + "id": 5987, + "name": "Assignment", + "src": "5324:18:13" + } + ], + "id": 5988, + "name": "ExpressionStatement", + "src": "5324:18:13" + }, + { + "attributes": { + "functionReturnParameters": 5926 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5773, + "type": "bool", + "value": "initialized" + }, + "id": 5989, + "name": "Identifier", + "src": "5359:11:13" + } + ], + "id": 5990, + "name": "Return", + "src": "5352:18:13" + } + ], + "id": 5991, + "name": "Block", + "src": "4634:743:13" + } + ], + "id": 5992, + "name": "FunctionDefinition", + "src": "4397:980:13" + }, + { + "attributes": { + "documentation": "@dev mint\n Only the minter address can call it.\n msg.value should be higher than zero and gt or eq minting fee\n@param account refers to an address that token is going to be minted to.\n@param value refers to amount of tokens that is going to be minted.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "mint", + "scope": 6272, + "stateMutability": "nonpayable", + "superFunction": 5576, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "account", + "scope": 6018, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5993, + "name": "ElementaryTypeName", + "src": "5717:7:13" + } + ], + "id": 5994, + "name": "VariableDeclaration", + "src": "5717:15:13" + }, + { + "attributes": { + "constant": false, + "name": "value", + "scope": 6018, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5995, + "name": "ElementaryTypeName", + "src": "5742:7:13" + } + ], + "id": 5996, + "name": "VariableDeclaration", + "src": "5742:13:13" + } + ], + "id": 5997, + "name": "ParameterList", + "src": "5707:54:13" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6000, + "name": "ParameterList", + "src": "5806:0:13" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5856, + "type": "modifier ()", + "value": "onlyMinter" + }, + "id": 5998, + "name": "Identifier", + "src": "5790:10:13" + } + ], + "id": 5999, + "name": "ModifierInvocation", + "src": "5790:10:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_db37e28d4a1d757900849adc30f19972d8f520005ecc78e1ba1f3c9b13636ae7", + "typeString": "literal_string \"DataTokenTemplate: cap exceeded\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6001, + "name": "Identifier", + "src": "5816:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 6354, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6664, + "type": "function () view returns (uint256)", + "value": "totalSupply" + }, + "id": 6002, + "name": "Identifier", + "src": "5837:11:13" + } + ], + "id": 6003, + "name": "FunctionCall", + "src": "5837:13:13" + } + ], + "id": 6004, + "name": "MemberAccess", + "src": "5837:17:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5996, + "type": "uint256", + "value": "value" + }, + "id": 6005, + "name": "Identifier", + "src": "5855:5:13" + } + ], + "id": 6006, + "name": "FunctionCall", + "src": "5837:24:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5765, + "type": "uint256", + "value": "_cap" + }, + "id": 6007, + "name": "Identifier", + "src": "5865:4:13" + } + ], + "id": 6008, + "name": "BinaryOperation", + "src": "5837:32:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e54656d706c6174653a20636170206578636565646564", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataTokenTemplate: cap exceeded\"", + "value": "DataTokenTemplate: cap exceeded" + }, + "id": 6009, + "name": "Literal", + "src": "5884:33:13" + } + ], + "id": 6010, + "name": "FunctionCall", + "src": "5816:111:13" + } + ], + "id": 6011, + "name": "ExpressionStatement", + "src": "5816:111:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6921, + "type": "function (address,uint256)", + "value": "_mint" + }, + "id": 6012, + "name": "Identifier", + "src": "5937:5:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5994, + "type": "address", + "value": "account" + }, + "id": 6013, + "name": "Identifier", + "src": "5943:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5996, + "type": "uint256", + "value": "value" + }, + "id": 6014, + "name": "Identifier", + "src": "5952:5:13" + } + ], + "id": 6015, + "name": "FunctionCall", + "src": "5937:21:13" + } + ], + "id": 6016, + "name": "ExpressionStatement", + "src": "5937:21:13" + } + ], + "id": 6017, + "name": "Block", + "src": "5806:159:13" + } + ], + "id": 6018, + "name": "FunctionDefinition", + "src": "5694:271:13" + }, + { + "attributes": { + "documentation": "@dev startOrder\n called by payer or consumer prior ordering a service consume on a marketplace.\n@param consumer is the consumer address (payer could be different address)\n@param amount refers to amount of tokens that is going to be transfered.\n@param serviceId service index in the metadata\n@param mrktFeeCollector marketplace fee collector", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "startOrder", + "scope": 6272, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "consumer", + "scope": 6092, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6019, + "name": "ElementaryTypeName", + "src": "6403:7:13" + } + ], + "id": 6020, + "name": "VariableDeclaration", + "src": "6403:16:13" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 6092, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6021, + "name": "ElementaryTypeName", + "src": "6429:7:13" + } + ], + "id": 6022, + "name": "VariableDeclaration", + "src": "6429:14:13" + }, + { + "attributes": { + "constant": false, + "name": "serviceId", + "scope": 6092, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6023, + "name": "ElementaryTypeName", + "src": "6453:7:13" + } + ], + "id": 6024, + "name": "VariableDeclaration", + "src": "6453:17:13" + }, + { + "attributes": { + "constant": false, + "name": "mrktFeeCollector", + "scope": 6092, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6025, + "name": "ElementaryTypeName", + "src": "6480:7:13" + } + ], + "id": 6026, + "name": "VariableDeclaration", + "src": "6480:24:13" + } + ], + "id": 6027, + "name": "ParameterList", + "src": "6393:117:13" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6028, + "name": "ParameterList", + "src": "6532:0:13" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 6030 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "marketFee", + "scope": 6091, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6029, + "name": "ElementaryTypeName", + "src": "6542:7:13" + } + ], + "id": 6030, + "name": "VariableDeclaration", + "src": "6542:17:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6031, + "name": "Literal", + "src": "6562:1:13" + } + ], + "id": 6032, + "name": "VariableDeclarationStatement", + "src": "6542:21:13" + }, + { + "attributes": { + "assignments": [ + 6034 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "communityFee", + "scope": 6091, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6033, + "name": "ElementaryTypeName", + "src": "6573:7:13" + } + ], + "id": 6034, + "name": "VariableDeclaration", + "src": "6573:20:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6271, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "calculateFee" + }, + "id": 6035, + "name": "Identifier", + "src": "6596:12:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6022, + "type": "uint256", + "value": "amount" + }, + "id": 6036, + "name": "Identifier", + "src": "6622:6:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5787, + "type": "uint256", + "value": "BASE_COMMUNITY_FEE_PERCENTAGE" + }, + "id": 6037, + "name": "Identifier", + "src": "6643:29:13" + } + ], + "id": 6038, + "name": "FunctionCall", + "src": "6596:86:13" + } + ], + "id": 6039, + "name": "VariableDeclarationStatement", + "src": "6573:109:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6695, + "type": "function (address,uint256) returns (bool)", + "value": "transfer" + }, + "id": 6040, + "name": "Identifier", + "src": "6692:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5770, + "type": "address", + "value": "_communityFeeCollector" + }, + "id": 6041, + "name": "Identifier", + "src": "6701:22:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6034, + "type": "uint256", + "value": "communityFee" + }, + "id": 6042, + "name": "Identifier", + "src": "6725:12:13" + } + ], + "id": 6043, + "name": "FunctionCall", + "src": "6692:46:13" + } + ], + "id": 6044, + "name": "ExpressionStatement", + "src": "6692:46:13" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6026, + "type": "address", + "value": "mrktFeeCollector" + }, + "id": 6045, + "name": "Identifier", + "src": "6751:16:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6046, + "name": "ElementaryTypeNameExpression", + "src": "6771:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6047, + "name": "Literal", + "src": "6779:1:13" + } + ], + "id": 6048, + "name": "FunctionCall", + "src": "6771:10:13" + } + ], + "id": 6049, + "name": "BinaryOperation", + "src": "6751:30:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6030, + "type": "uint256", + "value": "marketFee" + }, + "id": 6050, + "name": "Identifier", + "src": "6796:9:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6271, + "type": "function (uint256,uint256) pure returns (uint256)", + "value": "calculateFee" + }, + "id": 6051, + "name": "Identifier", + "src": "6808:12:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6022, + "type": "uint256", + "value": "amount" + }, + "id": 6052, + "name": "Identifier", + "src": "6838:6:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5792, + "type": "uint256", + "value": "BASE_MARKET_FEE_PERCENTAGE" + }, + "id": 6053, + "name": "Identifier", + "src": "6863:26:13" + } + ], + "id": 6054, + "name": "FunctionCall", + "src": "6808:95:13" + } + ], + "id": 6055, + "name": "Assignment", + "src": "6796:107:13" + } + ], + "id": 6056, + "name": "ExpressionStatement", + "src": "6796:107:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6695, + "type": "function (address,uint256) returns (bool)", + "value": "transfer" + }, + "id": 6057, + "name": "Identifier", + "src": "6917:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6026, + "type": "address", + "value": "mrktFeeCollector" + }, + "id": 6058, + "name": "Identifier", + "src": "6926:16:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6030, + "type": "uint256", + "value": "marketFee" + }, + "id": 6059, + "name": "Identifier", + "src": "6944:9:13" + } + ], + "id": 6060, + "name": "FunctionCall", + "src": "6917:37:13" + } + ], + "id": 6061, + "name": "ExpressionStatement", + "src": "6917:37:13" + } + ], + "id": 6062, + "name": "Block", + "src": "6782:183:13" + } + ], + "id": 6063, + "name": "IfStatement", + "src": "6748:217:13" + }, + { + "attributes": { + "assignments": [ + 6065 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "totalFee", + "scope": 6091, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6064, + "name": "ElementaryTypeName", + "src": "6974:7:13" + } + ], + "id": 6065, + "name": "VariableDeclaration", + "src": "6974:16:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 6354, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6034, + "type": "uint256", + "value": "communityFee" + }, + "id": 6066, + "name": "Identifier", + "src": "6993:12:13" + } + ], + "id": 6067, + "name": "MemberAccess", + "src": "6993:16:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6030, + "type": "uint256", + "value": "marketFee" + }, + "id": 6068, + "name": "Identifier", + "src": "7010:9:13" + } + ], + "id": 6069, + "name": "FunctionCall", + "src": "6993:27:13" + } + ], + "id": 6070, + "name": "VariableDeclarationStatement", + "src": "6974:46:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6695, + "type": "function (address,uint256) returns (bool)", + "value": "transfer" + }, + "id": 6071, + "name": "Identifier", + "src": "7030:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5775, + "type": "address", + "value": "_minter" + }, + "id": 6072, + "name": "Identifier", + "src": "7039:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 6370, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6022, + "type": "uint256", + "value": "amount" + }, + "id": 6073, + "name": "Identifier", + "src": "7048:6:13" + } + ], + "id": 6074, + "name": "MemberAccess", + "src": "7048:10:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6065, + "type": "uint256", + "value": "totalFee" + }, + "id": 6075, + "name": "Identifier", + "src": "7059:8:13" + } + ], + "id": 6076, + "name": "FunctionCall", + "src": "7048:20:13" + } + ], + "id": 6077, + "name": "FunctionCall", + "src": "7030:39:13" + } + ], + "id": 6078, + "name": "ExpressionStatement", + "src": "7030:39:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5808, + "type": "function (address,address,uint256,uint256,uint256,address,uint256)", + "value": "OrderStarted" + }, + "id": 6079, + "name": "Identifier", + "src": "7084:12:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6020, + "type": "address", + "value": "consumer" + }, + "id": 6080, + "name": "Identifier", + "src": "7110:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 6081, + "name": "Identifier", + "src": "7132:3:13" + } + ], + "id": 6082, + "name": "MemberAccess", + "src": "7132:10:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6022, + "type": "uint256", + "value": "amount" + }, + "id": 6083, + "name": "Identifier", + "src": "7156:6:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6024, + "type": "uint256", + "value": "serviceId" + }, + "id": 6084, + "name": "Identifier", + "src": "7176:9:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "timestamp", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7111, + "type": "block", + "value": "block" + }, + "id": 6085, + "name": "Identifier", + "src": "7242:5:13" + } + ], + "id": 6086, + "name": "MemberAccess", + "src": "7242:15:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6026, + "type": "address", + "value": "mrktFeeCollector" + }, + "id": 6087, + "name": "Identifier", + "src": "7271:16:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6030, + "type": "uint256", + "value": "marketFee" + }, + "id": 6088, + "name": "Identifier", + "src": "7301:9:13" + } + ], + "id": 6089, + "name": "FunctionCall", + "src": "7084:236:13" + } + ], + "id": 6090, + "name": "EmitStatement", + "src": "7079:241:13" + } + ], + "id": 6091, + "name": "Block", + "src": "6532:795:13" + } + ], + "id": 6092, + "name": "FunctionDefinition", + "src": "6374:953:13" + }, + { + "attributes": { + "documentation": "@dev finishOrder\n called by provider prior completing service delivery only\n if there is a partial or full refund.\n@param orderTxId refers to the transaction Id of startOrder acts \n as a payment reference.\n@param consumer refers to an address that has consumed that service.\n@param amount refers to amount of tokens that is going to be transfered.\n@param serviceId service index in the metadata.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "finishOrder", + "scope": 6272, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "orderTxId", + "scope": 6127, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 6093, + "name": "ElementaryTypeName", + "src": "7856:7:13" + } + ], + "id": 6094, + "name": "VariableDeclaration", + "src": "7856:17:13" + }, + { + "attributes": { + "constant": false, + "name": "consumer", + "scope": 6127, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6095, + "name": "ElementaryTypeName", + "src": "7884:7:13" + } + ], + "id": 6096, + "name": "VariableDeclaration", + "src": "7884:16:13" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 6127, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6097, + "name": "ElementaryTypeName", + "src": "7911:7:13" + } + ], + "id": 6098, + "name": "VariableDeclaration", + "src": "7911:14:13" + }, + { + "attributes": { + "constant": false, + "name": "serviceId", + "scope": 6127, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6099, + "name": "ElementaryTypeName", + "src": "7935:7:13" + } + ], + "id": 6100, + "name": "VariableDeclaration", + "src": "7935:17:13" + } + ], + "id": 6101, + "name": "ParameterList", + "src": "7846:112:13" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6102, + "name": "ParameterList", + "src": "7980:0:13" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6098, + "type": "uint256", + "value": "amount" + }, + "id": 6103, + "name": "Identifier", + "src": "7995:6:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6104, + "name": "Literal", + "src": "8005:1:13" + } + ], + "id": 6105, + "name": "BinaryOperation", + "src": "7995:11:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5beb845327406b92f3857bb14436e4b6862cb87998aca33ed8309c1bf98b5e76", + "typeString": "literal_string \"DataTokenTemplate: failed to finish order\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6106, + "name": "Identifier", + "src": "8023:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6695, + "type": "function (address,uint256) returns (bool)", + "value": "transfer" + }, + "id": 6107, + "name": "Identifier", + "src": "8048:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6096, + "type": "address", + "value": "consumer" + }, + "id": 6108, + "name": "Identifier", + "src": "8057:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6098, + "type": "uint256", + "value": "amount" + }, + "id": 6109, + "name": "Identifier", + "src": "8067:6:13" + } + ], + "id": 6110, + "name": "FunctionCall", + "src": "8048:26:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e54656d706c6174653a206661696c656420746f2066696e697368206f72646572", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataTokenTemplate: failed to finish order\"", + "value": "DataTokenTemplate: failed to finish order" + }, + "id": 6111, + "name": "Literal", + "src": "8092:43:13" + } + ], + "id": 6112, + "name": "FunctionCall", + "src": "8023:126:13" + } + ], + "id": 6113, + "name": "ExpressionStatement", + "src": "8023:126:13" + } + ], + "id": 6114, + "name": "IfStatement", + "src": "7990:159:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5822, + "type": "function (bytes32,address,uint256,uint256,address,uint256)", + "value": "OrderFinished" + }, + "id": 6115, + "name": "Identifier", + "src": "8173:13:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6094, + "type": "bytes32", + "value": "orderTxId" + }, + "id": 6116, + "name": "Identifier", + "src": "8200:9:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6096, + "type": "address", + "value": "consumer" + }, + "id": 6117, + "name": "Identifier", + "src": "8224:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6098, + "type": "uint256", + "value": "amount" + }, + "id": 6118, + "name": "Identifier", + "src": "8247:6:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6100, + "type": "uint256", + "value": "serviceId" + }, + "id": 6119, + "name": "Identifier", + "src": "8268:9:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 6120, + "name": "Identifier", + "src": "8292:3:13" + } + ], + "id": 6121, + "name": "MemberAccess", + "src": "8292:10:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "timestamp", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7111, + "type": "block", + "value": "block" + }, + "id": 6122, + "name": "Identifier", + "src": "8359:5:13" + } + ], + "id": 6123, + "name": "MemberAccess", + "src": "8359:15:13" + } + ], + "id": 6124, + "name": "FunctionCall", + "src": "8173:211:13" + } + ], + "id": 6125, + "name": "EmitStatement", + "src": "8168:216:13" + } + ], + "id": 6126, + "name": "Block", + "src": "7980:411:13" + } + ], + "id": 6127, + "name": "FunctionDefinition", + "src": "7826:565:13" + }, + { + "attributes": { + "documentation": "@dev proposeMinter\n It proposes a new token minter address.\n Only the current minter can call it.\n@param newMinter refers to a new token minter address.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "proposeMinter", + "scope": 6272, + "stateMutability": "nonpayable", + "superFunction": 5654, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "newMinter", + "scope": 6145, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6128, + "name": "ElementaryTypeName", + "src": "8625:7:13" + } + ], + "id": 6129, + "name": "VariableDeclaration", + "src": "8625:17:13" + } + ], + "id": 6130, + "name": "ParameterList", + "src": "8624:19:13" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6133, + "name": "ParameterList", + "src": "8687:0:13" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5856, + "type": "modifier ()", + "value": "onlyMinter" + }, + "id": 6131, + "name": "Identifier", + "src": "8671:10:13" + } + ], + "id": 6132, + "name": "ModifierInvocation", + "src": "8671:10:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5777, + "type": "address", + "value": "_proposedMinter" + }, + "id": 6134, + "name": "Identifier", + "src": "8697:15:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6129, + "type": "address", + "value": "newMinter" + }, + "id": 6135, + "name": "Identifier", + "src": "8715:9:13" + } + ], + "id": 6136, + "name": "Assignment", + "src": "8697:27:13" + } + ], + "id": 6137, + "name": "ExpressionStatement", + "src": "8697:27:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5828, + "type": "function (address,address)", + "value": "MinterProposed" + }, + "id": 6138, + "name": "Identifier", + "src": "8739:14:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 6139, + "name": "Identifier", + "src": "8767:3:13" + } + ], + "id": 6140, + "name": "MemberAccess", + "src": "8767:10:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5777, + "type": "address", + "value": "_proposedMinter" + }, + "id": 6141, + "name": "Identifier", + "src": "8791:15:13" + } + ], + "id": 6142, + "name": "FunctionCall", + "src": "8739:77:13" + } + ], + "id": 6143, + "name": "EmitStatement", + "src": "8734:82:13" + } + ], + "id": 6144, + "name": "Block", + "src": "8687:136:13" + } + ], + "id": 6145, + "name": "FunctionDefinition", + "src": "8602:221:13" + }, + { + "attributes": { + "documentation": "@dev approveMinter\n It approves a new token minter address.\n Only the current minter can call it.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "approveMinter", + "scope": 6272, + "stateMutability": "nonpayable", + "superFunction": 5657, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6146, + "name": "ParameterList", + "src": "8994:2:13" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6147, + "name": "ParameterList", + "src": "9018:0:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7af8769e1ae364fd1070260138caf964484121753b4fb103f09e0f3de065c059", + "typeString": "literal_string \"DataTokenTemplate: invalid proposed minter address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6148, + "name": "Identifier", + "src": "9028:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 6149, + "name": "Identifier", + "src": "9049:3:13" + } + ], + "id": 6150, + "name": "MemberAccess", + "src": "9049:10:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5777, + "type": "address", + "value": "_proposedMinter" + }, + "id": 6151, + "name": "Identifier", + "src": "9063:15:13" + } + ], + "id": 6152, + "name": "BinaryOperation", + "src": "9049:29:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e54656d706c6174653a20696e76616c69642070726f706f736564206d696e7465722061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataTokenTemplate: invalid proposed minter address\"", + "value": "DataTokenTemplate: invalid proposed minter address" + }, + "id": 6153, + "name": "Literal", + "src": "9092:52:13" + } + ], + "id": 6154, + "name": "FunctionCall", + "src": "9028:126:13" + } + ], + "id": 6155, + "name": "ExpressionStatement", + "src": "9028:126:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5834, + "type": "function (address,address)", + "value": "MinterApproved" + }, + "id": 6156, + "name": "Identifier", + "src": "9169:14:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5775, + "type": "address", + "value": "_minter" + }, + "id": 6157, + "name": "Identifier", + "src": "9197:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5777, + "type": "address", + "value": "_proposedMinter" + }, + "id": 6158, + "name": "Identifier", + "src": "9218:15:13" + } + ], + "id": 6159, + "name": "FunctionCall", + "src": "9169:74:13" + } + ], + "id": 6160, + "name": "EmitStatement", + "src": "9164:79:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5775, + "type": "address", + "value": "_minter" + }, + "id": 6161, + "name": "Identifier", + "src": "9253:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5777, + "type": "address", + "value": "_proposedMinter" + }, + "id": 6162, + "name": "Identifier", + "src": "9263:15:13" + } + ], + "id": 6163, + "name": "Assignment", + "src": "9253:25:13" + } + ], + "id": 6164, + "name": "ExpressionStatement", + "src": "9253:25:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5777, + "type": "address", + "value": "_proposedMinter" + }, + "id": 6165, + "name": "Identifier", + "src": "9288:15:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6166, + "name": "ElementaryTypeNameExpression", + "src": "9306:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6167, + "name": "Literal", + "src": "9314:1:13" + } + ], + "id": 6168, + "name": "FunctionCall", + "src": "9306:10:13" + } + ], + "id": 6169, + "name": "Assignment", + "src": "9288:28:13" + } + ], + "id": 6170, + "name": "ExpressionStatement", + "src": "9288:28:13" + } + ], + "id": 6171, + "name": "Block", + "src": "9018:305:13" + } + ], + "id": 6172, + "name": "FunctionDefinition", + "src": "8972:351:13" + }, + { + "attributes": { + "documentation": "@dev name\n It returns the token name.\n@return DataToken name.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "name", + "scope": 6272, + "stateMutability": "view", + "superFunction": 5586, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6173, + "name": "ParameterList", + "src": "9445:2:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6180, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 6174, + "name": "ElementaryTypeName", + "src": "9470:6:13" + } + ], + "id": 6175, + "name": "VariableDeclaration", + "src": "9470:13:13" + } + ], + "id": 6176, + "name": "ParameterList", + "src": "9469:15:13" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6176 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5759, + "type": "string storage ref", + "value": "_name" + }, + "id": 6177, + "name": "Identifier", + "src": "9502:5:13" + } + ], + "id": 6178, + "name": "Return", + "src": "9495:12:13" + } + ], + "id": 6179, + "name": "Block", + "src": "9485:29:13" + } + ], + "id": 6180, + "name": "FunctionDefinition", + "src": "9432:82:13" + }, + { + "attributes": { + "documentation": "@dev symbol\n It returns the token symbol.\n@return DataToken symbol.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "symbol", + "scope": 6272, + "stateMutability": "view", + "superFunction": 5591, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6181, + "name": "ParameterList", + "src": "9644:2:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6188, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 6182, + "name": "ElementaryTypeName", + "src": "9669:6:13" + } + ], + "id": 6183, + "name": "VariableDeclaration", + "src": "9669:13:13" + } + ], + "id": 6184, + "name": "ParameterList", + "src": "9668:15:13" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6184 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5761, + "type": "string storage ref", + "value": "_symbol" + }, + "id": 6185, + "name": "Identifier", + "src": "9701:7:13" + } + ], + "id": 6186, + "name": "Return", + "src": "9694:14:13" + } + ], + "id": 6187, + "name": "Block", + "src": "9684:31:13" + } + ], + "id": 6188, + "name": "FunctionDefinition", + "src": "9629:86:13" + }, + { + "attributes": { + "documentation": "@dev blob\n It returns the blob (e.g https://123.com).\n@return DataToken blob.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "blob", + "scope": 6272, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6189, + "name": "ParameterList", + "src": "9853:2:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6196, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 6190, + "name": "ElementaryTypeName", + "src": "9878:6:13" + } + ], + "id": 6191, + "name": "VariableDeclaration", + "src": "9878:13:13" + } + ], + "id": 6192, + "name": "ParameterList", + "src": "9877:15:13" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6192 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5763, + "type": "string storage ref", + "value": "_blob" + }, + "id": 6193, + "name": "Identifier", + "src": "9910:5:13" + } + ], + "id": 6194, + "name": "Return", + "src": "9903:12:13" + } + ], + "id": 6195, + "name": "Block", + "src": "9893:29:13" + } + ], + "id": 6196, + "name": "FunctionDefinition", + "src": "9840:82:13" + }, + { + "attributes": { + "documentation": "@dev decimals\n It returns the token decimals.\n how many supported decimal points\n@return DataToken decimals.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "decimals", + "scope": 6272, + "stateMutability": "view", + "superFunction": 5596, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6197, + "name": "ParameterList", + "src": "10106:2:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6204, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 6198, + "name": "ElementaryTypeName", + "src": "10131:5:13" + } + ], + "id": 6199, + "name": "VariableDeclaration", + "src": "10131:5:13" + } + ], + "id": 6200, + "name": "ParameterList", + "src": "10130:7:13" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6200 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5768, + "type": "uint8", + "value": "_decimals" + }, + "id": 6201, + "name": "Identifier", + "src": "10155:9:13" + } + ], + "id": 6202, + "name": "Return", + "src": "10148:16:13" + } + ], + "id": 6203, + "name": "Block", + "src": "10138:33:13" + } + ], + "id": 6204, + "name": "FunctionDefinition", + "src": "10089:82:13" + }, + { + "attributes": { + "documentation": "@dev cap\n it returns the capital.\n@return DataToken cap.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "cap", + "scope": 6272, + "stateMutability": "view", + "superFunction": 5601, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6205, + "name": "ParameterList", + "src": "10287:2:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6212, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6206, + "name": "ElementaryTypeName", + "src": "10313:7:13" + } + ], + "id": 6207, + "name": "VariableDeclaration", + "src": "10313:7:13" + } + ], + "id": 6208, + "name": "ParameterList", + "src": "10312:9:13" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6208 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5765, + "type": "uint256", + "value": "_cap" + }, + "id": 6209, + "name": "Identifier", + "src": "10339:4:13" + } + ], + "id": 6210, + "name": "Return", + "src": "10332:11:13" + } + ], + "id": 6211, + "name": "Block", + "src": "10322:28:13" + } + ], + "id": 6212, + "name": "FunctionDefinition", + "src": "10275:75:13" + }, + { + "attributes": { + "documentation": "@dev isMinter\n It takes the address and checks whether it has a minter role.\n@param account refers to the address.\n@return true if account has a minter role.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isMinter", + "scope": 6272, + "stateMutability": "view", + "superFunction": 5608, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "account", + "scope": 6225, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6213, + "name": "ElementaryTypeName", + "src": "10580:7:13" + } + ], + "id": 6214, + "name": "VariableDeclaration", + "src": "10580:15:13" + } + ], + "id": 6215, + "name": "ParameterList", + "src": "10579:17:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6225, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 6216, + "name": "ElementaryTypeName", + "src": "10619:4:13" + } + ], + "id": 6217, + "name": "VariableDeclaration", + "src": "10619:4:13" + } + ], + "id": 6218, + "name": "ParameterList", + "src": "10618:6:13" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6218 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5775, + "type": "address", + "value": "_minter" + }, + "id": 6219, + "name": "Identifier", + "src": "10643:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6214, + "type": "address", + "value": "account" + }, + "id": 6220, + "name": "Identifier", + "src": "10654:7:13" + } + ], + "id": 6221, + "name": "BinaryOperation", + "src": "10643:18:13" + } + ], + "id": 6222, + "name": "TupleExpression", + "src": "10642:20:13" + } + ], + "id": 6223, + "name": "Return", + "src": "10635:27:13" + } + ], + "id": 6224, + "name": "Block", + "src": "10625:44:13" + } + ], + "id": 6225, + "name": "FunctionDefinition", + "src": "10562:107:13" + }, + { + "attributes": { + "documentation": "@dev minter\n@return minter's address.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "minter", + "scope": 6272, + "stateMutability": "view", + "superFunction": 5581, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6226, + "name": "ParameterList", + "src": "10759:2:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6233, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6227, + "name": "ElementaryTypeName", + "src": "10809:7:13" + } + ], + "id": 6228, + "name": "VariableDeclaration", + "src": "10809:7:13" + } + ], + "id": 6229, + "name": "ParameterList", + "src": "10808:9:13" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6229 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5775, + "type": "address", + "value": "_minter" + }, + "id": 6230, + "name": "Identifier", + "src": "10839:7:13" + } + ], + "id": 6231, + "name": "Return", + "src": "10832:14:13" + } + ], + "id": 6232, + "name": "Block", + "src": "10822:31:13" + } + ], + "id": 6233, + "name": "FunctionDefinition", + "src": "10744:109:13" + }, + { + "attributes": { + "documentation": "@dev isInitialized\n It checks whether the contract is initialized.\n@return true if the contract is initialized.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isInitialized", + "scope": 6272, + "stateMutability": "view", + "superFunction": 5613, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6234, + "name": "ParameterList", + "src": "11035:2:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6241, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 6235, + "name": "ElementaryTypeName", + "src": "11060:4:13" + } + ], + "id": 6236, + "name": "VariableDeclaration", + "src": "11060:4:13" + } + ], + "id": 6237, + "name": "ParameterList", + "src": "11059:6:13" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6237 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5773, + "type": "bool", + "value": "initialized" + }, + "id": 6238, + "name": "Identifier", + "src": "11083:11:13" + } + ], + "id": 6239, + "name": "Return", + "src": "11076:18:13" + } + ], + "id": 6240, + "name": "Block", + "src": "11066:35:13" + } + ], + "id": 6241, + "name": "FunctionDefinition", + "src": "11013:88:13" + }, + { + "attributes": { + "documentation": "@dev calculateFee\n giving a fee percentage, and amount it calculates the actual fee\n@param amount the amount of token\n@param feePercentage the fee percentage \n@return the token fee.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "calculateFee", + "scope": 6272, + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 6271, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6242, + "name": "ElementaryTypeName", + "src": "11376:7:13" + } + ], + "id": 6243, + "name": "VariableDeclaration", + "src": "11376:14:13" + }, + { + "attributes": { + "constant": false, + "name": "feePercentage", + "scope": 6271, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6244, + "name": "ElementaryTypeName", + "src": "11400:7:13" + } + ], + "id": 6245, + "name": "VariableDeclaration", + "src": "11400:21:13" + } + ], + "id": 6246, + "name": "ParameterList", + "src": "11366:61:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6271, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6247, + "name": "ElementaryTypeName", + "src": "11472:7:13" + } + ], + "id": 6248, + "name": "VariableDeclaration", + "src": "11472:7:13" + } + ], + "id": 6249, + "name": "ParameterList", + "src": "11471:9:13" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6243, + "type": "uint256", + "value": "amount" + }, + "id": 6250, + "name": "Identifier", + "src": "11498:6:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6251, + "name": "Literal", + "src": "11508:1:13" + } + ], + "id": 6252, + "name": "BinaryOperation", + "src": "11498:11:13" + }, + { + "attributes": { + "functionReturnParameters": 6249 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6253, + "name": "Literal", + "src": "11518:1:13" + } + ], + "id": 6254, + "name": "Return", + "src": "11511:8:13" + } + ], + "id": 6255, + "name": "IfStatement", + "src": "11495:24:13" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6245, + "type": "uint256", + "value": "feePercentage" + }, + "id": 6256, + "name": "Identifier", + "src": "11532:13:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6257, + "name": "Literal", + "src": "11549:1:13" + } + ], + "id": 6258, + "name": "BinaryOperation", + "src": "11532:18:13" + }, + { + "attributes": { + "functionReturnParameters": 6249 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6259, + "name": "Literal", + "src": "11559:1:13" + } + ], + "id": 6260, + "name": "Return", + "src": "11552:8:13" + } + ], + "id": 6261, + "name": "IfStatement", + "src": "11529:31:13" + }, + { + "attributes": { + "functionReturnParameters": 6249 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "div", + "referencedDeclaration": 6447, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "mul", + "referencedDeclaration": 6431, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6243, + "type": "uint256", + "value": "amount" + }, + "id": 6262, + "name": "Identifier", + "src": "11577:6:13" + } + ], + "id": 6263, + "name": "MemberAccess", + "src": "11577:10:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6245, + "type": "uint256", + "value": "feePercentage" + }, + "id": 6264, + "name": "Identifier", + "src": "11588:13:13" + } + ], + "id": 6265, + "name": "FunctionCall", + "src": "11577:25:13" + } + ], + "id": 6266, + "name": "MemberAccess", + "src": "11577:29:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5782, + "type": "uint256", + "value": "BASE" + }, + "id": 6267, + "name": "Identifier", + "src": "11607:4:13" + } + ], + "id": 6268, + "name": "FunctionCall", + "src": "11577:35:13" + } + ], + "id": 6269, + "name": "Return", + "src": "11570:42:13" + } + ], + "id": 6270, + "name": "Block", + "src": "11485:134:13" + } + ], + "id": 6271, + "name": "FunctionDefinition", + "src": "11345:274:13" + } + ], + "id": 6272, + "name": "ContractDefinition", + "src": "488:11133:13" + } + ], + "id": 6273, + "name": "SourceUnit", + "src": "0:11622:13" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.846Z", + "devdoc": { + "details": "DataTokenTemplate is an ERC20 compliant token template Used by the factory contract as a bytecode reference to deploy new DataTokens.", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address." + }, + "approveMinter()": { + "details": "approveMinter It approves a new token minter address. Only the current minter can call it." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "blob()": { + "details": "blob It returns the blob (e.g https://123.com).", + "return": "DataToken blob." + }, + "calculateFee(uint256,uint256)": { + "details": "calculateFee giving a fee percentage, and amount it calculates the actual fee", + "params": { + "amount": "the amount of token", + "feePercentage": "the fee percentage " + }, + "return": "the token fee." + }, + "cap()": { + "details": "cap it returns the capital.", + "return": "DataToken cap." + }, + "constructor": { + "details": "constructor Called prior contract deployment", + "params": { + "blob": "data string refering to the resolver for the metadata", + "cap": "the total ERC20 cap", + "feeCollector": "it is the community fee collector address", + "minterAddress": "refers to an address that has minter role", + "name": "refers to a template DataToken name", + "symbol": "refers to a template DataToken symbol" + } + }, + "decimals()": { + "details": "decimals It returns the token decimals. how many supported decimal points", + "return": "DataToken decimals." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "finishOrder(bytes32,address,uint256,uint256)": { + "details": "finishOrder called by provider prior completing service delivery only if there is a partial or full refund.", + "params": { + "amount": "refers to amount of tokens that is going to be transfered.", + "consumer": "refers to an address that has consumed that service.", + "orderTxId": "refers to the transaction Id of startOrder acts as a payment reference.", + "serviceId": "service index in the metadata." + } + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address." + }, + "initialize(string,string,address,uint256,string,address)": { + "details": "initialize Called prior contract initialization (e.g creating new DataToken instance) Calls private _initialize function. Only if contract is not initialized.", + "params": { + "blob": "data string refering to the resolver for the metadata", + "cap": "the total ERC20 cap", + "feeCollector": "it is the community fee collector address", + "minterAddress": "refers to an address that has minter rights", + "name": "refers to a new DataToken name", + "symbol": "refers to a nea DataToken symbol" + } + }, + "isInitialized()": { + "details": "isInitialized It checks whether the contract is initialized.", + "return": "true if the contract is initialized." + }, + "isMinter(address)": { + "details": "isMinter It takes the address and checks whether it has a minter role.", + "params": { + "account": "refers to the address." + }, + "return": "true if account has a minter role." + }, + "mint(address,uint256)": { + "details": "mint Only the minter address can call it. msg.value should be higher than zero and gt or eq minting fee", + "params": { + "account": "refers to an address that token is going to be minted to.", + "value": "refers to amount of tokens that is going to be minted." + } + }, + "minter()": { + "details": "minter", + "return": "minter's address." + }, + "name()": { + "details": "name It returns the token name.", + "return": "DataToken name." + }, + "proposeMinter(address)": { + "details": "proposeMinter It proposes a new token minter address. Only the current minter can call it.", + "params": { + "newMinter": "refers to a new token minter address." + } + }, + "startOrder(address,uint256,uint256,address)": { + "details": "startOrder called by payer or consumer prior ordering a service consume on a marketplace.", + "params": { + "amount": "refers to amount of tokens that is going to be transfered.", + "consumer": "is the consumer address (payer could be different address)", + "mrktFeeCollector": "marketplace fee collector", + "serviceId": "service index in the metadata" + } + }, + "symbol()": { + "details": "symbol It returns the token symbol.", + "return": "DataToken symbol." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for `sender`'s tokens of at least `amount`." + } + }, + "title": "DataTokenTemplate " + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/Deployer.json b/artifacts/Deployer.json new file mode 100644 index 000000000..4eb3e255e --- /dev/null +++ b/artifacts/Deployer.json @@ -0,0 +1,829 @@ +{ + "contractName": "Deployer", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "instance", + "type": "address" + } + ], + "name": "InstanceDeployed", + "type": "event" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"instance\",\"type\":\"address\"}],\"name\":\"InstanceDeployed\",\"type\":\"event\"}],\"devdoc\":{\"author\":\"Ocean Protocol Team\",\"details\":\"Contract Deployer This contract allowes factory contract to deploy new contract instances using the same library pattern in solidity. the logic it self is deployed only once, but executed in the context of the new storage contract (new contract instance)\",\"methods\":{},\"title\":\"Deployer Contract\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/utils/Deployer.sol\":\"Deployer\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/utils/Deployer.sol\":{\"keccak256\":\"0x60ebf25d36c0ee9d310c74eda954a474b0d867f23f57d3b8923d9ee7cc313dcc\",\"urls\":[\"bzzr://81ebb3c5acb99bc74b4bd7ee9897282cb2c983344195645cec8bc2e642680c53\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b50603580601d6000396000f3fe6080604052600080fdfea165627a7a723058209342e9900aa82dd4eb56d09a6bb22d160b7e5971728ce9d194b3dea028c0a3c50029", + "deployedBytecode": "0x6080604052600080fdfea165627a7a723058209342e9900aa82dd4eb56d09a6bb22d160b7e5971728ce9d194b3dea028c0a3c50029", + "sourceMap": "568:1208:14:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;568:1208:14;;;;;;;", + "deployedSourceMap": "568:1208:14:-;;;;;", + "source": "pragma solidity 0.5.7;\n// Copyright BigchainDB GmbH and Ocean Protocol contributors\n// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)\n// Code is Apache-2.0 and docs are CC-BY-4.0\n\n/**\n * @title Deployer Contract\n * @author Ocean Protocol Team\n *\n * @dev Contract Deployer\n * This contract allowes factory contract \n * to deploy new contract instances using\n * the same library pattern in solidity.\n * the logic it self is deployed only once, but\n * executed in the context of the new storage \n * contract (new contract instance)\n */\ncontract Deployer {\n event InstanceDeployed(address instance);\n \n /**\n * @dev deploy\n * deploy new contract instance \n * @param _logic the logic contract address\n * @return address of the new instance\n */\n function deploy(\n address _logic\n ) \n internal \n returns (address instance) \n {\n bytes20 targetBytes = bytes20(_logic);\n // Follows OpenZeppelin Implementation https://github.com/OpenZeppelin/openzeppelin-sdk/blob/71c9ad77e0326db079e6a643eca8568ab316d4a9/packages/lib/contracts/upgradeability/ProxyFactory.sol\n // Adapted from https://github.com/optionality/clone-factory/blob/32782f82dfc5a00d103a7e61a17a5dedbd1e8e9d/contracts/CloneFactory.sol\n /* solium-disable-next-line security/no-inline-assembly */\n assembly {\n let clone := mload(0x40)\n mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(clone, 0x14), targetBytes)\n mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n instance := create(0, clone, 0x37)\n }\n emit InstanceDeployed(address(instance));\n }\n}", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/utils/Deployer.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/utils/Deployer.sol", + "exportedSymbols": { + "Deployer": [ + 6300 + ] + }, + "id": 6301, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6274, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "0:22:14" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Deployer Contract\n@author Ocean Protocol Team\n * @dev Contract Deployer\n This contract allowes factory contract \n to deploy new contract instances using\n the same library pattern in solidity.\n the logic it self is deployed only once, but\n executed in the context of the new storage \n contract (new contract instance)", + "fullyImplemented": true, + "id": 6300, + "linearizedBaseContracts": [ + 6300 + ], + "name": "Deployer", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": null, + "id": 6278, + "name": "InstanceDeployed", + "nodeType": "EventDefinition", + "parameters": { + "id": 6277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6276, + "indexed": false, + "name": "instance", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "615:16:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6275, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "615:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "614:18:14" + }, + "src": "592:41:14" + }, + { + "body": { + "id": 6298, + "nodeType": "Block", + "src": "912:862:14", + "statements": [ + { + "assignments": [ + 6286 + ], + "declarations": [ + { + "constant": false, + "id": 6286, + "name": "targetBytes", + "nodeType": "VariableDeclaration", + "scope": 6298, + "src": "922:19:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes20", + "typeString": "bytes20" + }, + "typeName": { + "id": 6285, + "name": "bytes20", + "nodeType": "ElementaryTypeName", + "src": "922:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes20", + "typeString": "bytes20" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6290, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6288, + "name": "_logic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6280, + "src": "952:6:14", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6287, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "944:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes20_$", + "typeString": "type(bytes20)" + }, + "typeName": "bytes20" + }, + "id": 6289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "944:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes20", + "typeString": "bytes20" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "922:37:14" + }, + { + "externalReferences": [ + { + "instance": { + "declaration": 6283, + "isOffset": false, + "isSlot": false, + "src": "1674:8:14", + "valueSize": 1 + } + }, + { + "targetBytes": { + "declaration": 6286, + "isOffset": false, + "isSlot": false, + "src": "1548:11:14", + "valueSize": 1 + } + } + ], + "id": 6291, + "nodeType": "InlineAssembly", + "operations": "{\n let clone := mload(0x40)\n mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(clone, 0x14), targetBytes)\n mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n instance := create(0, clone, 0x37)\n}", + "src": "1375:356:14" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6294, + "name": "instance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6283, + "src": "1757:8:14", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1749:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1749:17:14", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6292, + "name": "InstanceDeployed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6278, + "src": "1732:16:14", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1732:35:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6297, + "nodeType": "EmitStatement", + "src": "1727:40:14" + } + ] + }, + "documentation": "@dev deploy\n deploy new contract instance \n@param _logic the logic contract address\n@return address of the new instance", + "id": 6299, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deploy", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6281, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6280, + "name": "_logic", + "nodeType": "VariableDeclaration", + "scope": 6299, + "src": "836:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "836:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "826:30:14" + }, + "returnParameters": { + "id": 6284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6283, + "name": "instance", + "nodeType": "VariableDeclaration", + "scope": 6299, + "src": "889:16:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6282, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "889:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "888:18:14" + }, + "scope": 6300, + "src": "811:963:14", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 6301, + "src": "568:1208:14" + } + ], + "src": "0:1776:14" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/utils/Deployer.sol", + "exportedSymbols": { + "Deployer": [ + 6300 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 6274, + "name": "PragmaDirective", + "src": "0:22:14" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": "@title Deployer Contract\n@author Ocean Protocol Team\n * @dev Contract Deployer\n This contract allowes factory contract \n to deploy new contract instances using\n the same library pattern in solidity.\n the logic it self is deployed only once, but\n executed in the context of the new storage \n contract (new contract instance)", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 6300 + ], + "name": "Deployer", + "scope": 6301 + }, + "children": [ + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "InstanceDeployed" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": false, + "name": "instance", + "scope": 6278, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6275, + "name": "ElementaryTypeName", + "src": "615:7:14" + } + ], + "id": 6276, + "name": "VariableDeclaration", + "src": "615:16:14" + } + ], + "id": 6277, + "name": "ParameterList", + "src": "614:18:14" + } + ], + "id": 6278, + "name": "EventDefinition", + "src": "592:41:14" + }, + { + "attributes": { + "documentation": "@dev deploy\n deploy new contract instance \n@param _logic the logic contract address\n@return address of the new instance", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "deploy", + "scope": 6300, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_logic", + "scope": 6299, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6279, + "name": "ElementaryTypeName", + "src": "836:7:14" + } + ], + "id": 6280, + "name": "VariableDeclaration", + "src": "836:14:14" + } + ], + "id": 6281, + "name": "ParameterList", + "src": "826:30:14" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "instance", + "scope": 6299, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6282, + "name": "ElementaryTypeName", + "src": "889:7:14" + } + ], + "id": 6283, + "name": "VariableDeclaration", + "src": "889:16:14" + } + ], + "id": 6284, + "name": "ParameterList", + "src": "888:18:14" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 6286 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "targetBytes", + "scope": 6298, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes20", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes20", + "type": "bytes20" + }, + "id": 6285, + "name": "ElementaryTypeName", + "src": "922:7:14" + } + ], + "id": 6286, + "name": "VariableDeclaration", + "src": "922:19:14" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes20", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(bytes20)", + "value": "bytes20" + }, + "id": 6287, + "name": "ElementaryTypeNameExpression", + "src": "944:7:14" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6280, + "type": "address", + "value": "_logic" + }, + "id": 6288, + "name": "Identifier", + "src": "952:6:14" + } + ], + "id": 6289, + "name": "FunctionCall", + "src": "944:15:14" + } + ], + "id": 6290, + "name": "VariableDeclarationStatement", + "src": "922:37:14" + }, + { + "attributes": { + "externalReferences": [ + { + "instance": { + "declaration": 6283, + "isOffset": false, + "isSlot": false, + "src": "1674:8:14", + "valueSize": 1 + } + }, + { + "targetBytes": { + "declaration": 6286, + "isOffset": false, + "isSlot": false, + "src": "1548:11:14", + "valueSize": 1 + } + } + ], + "operations": "{\n let clone := mload(0x40)\n mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(clone, 0x14), targetBytes)\n mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n instance := create(0, clone, 0x37)\n}" + }, + "children": [], + "id": 6291, + "name": "InlineAssembly", + "src": "1375:356:14" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6278, + "type": "function (address)", + "value": "InstanceDeployed" + }, + "id": 6292, + "name": "Identifier", + "src": "1732:16:14" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6293, + "name": "ElementaryTypeNameExpression", + "src": "1749:7:14" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6283, + "type": "address", + "value": "instance" + }, + "id": 6294, + "name": "Identifier", + "src": "1757:8:14" + } + ], + "id": 6295, + "name": "FunctionCall", + "src": "1749:17:14" + } + ], + "id": 6296, + "name": "FunctionCall", + "src": "1732:35:14" + } + ], + "id": 6297, + "name": "EmitStatement", + "src": "1727:40:14" + } + ], + "id": 6298, + "name": "Block", + "src": "912:862:14" + } + ], + "id": 6299, + "name": "FunctionDefinition", + "src": "811:963:14" + } + ], + "id": 6300, + "name": "ContractDefinition", + "src": "568:1208:14" + } + ], + "id": 6301, + "name": "SourceUnit", + "src": "0:1776:14" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.852Z", + "devdoc": { + "author": "Ocean Protocol Team", + "details": "Contract Deployer This contract allowes factory contract to deploy new contract instances using the same library pattern in solidity. the logic it self is deployed only once, but executed in the context of the new storage contract (new contract instance)", + "methods": {}, + "title": "Deployer Contract" + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/Dispenser.json b/artifacts/Dispenser.json new file mode 100644 index 000000000..5955c72a8 --- /dev/null +++ b/artifacts/Dispenser.json @@ -0,0 +1,17468 @@ +{ + "contractName": "Dispenser", + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "datatokensList", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "datatokenAddress", + "type": "address" + } + ], + "name": "Activated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "datatokenAddress", + "type": "address" + } + ], + "name": "Deactivated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "datatokenAddress", + "type": "address" + } + ], + "name": "AcceptedMinter", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "datatokenAddress", + "type": "address" + } + ], + "name": "RemovedMinter", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "datatokenAddress", + "type": "address" + }, + { + "indexed": true, + "name": "userAddress", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensDispensed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "datatoken", + "type": "address" + }, + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + } + ], + "name": "OwnerWithdrawed", + "type": "event" + }, + { + "constant": true, + "inputs": [ + { + "name": "datatoken", + "type": "address" + } + ], + "name": "status", + "outputs": [ + { + "name": "active", + "type": "bool" + }, + { + "name": "owner", + "type": "address" + }, + { + "name": "minterApproved", + "type": "bool" + }, + { + "name": "isTrueMinter", + "type": "bool" + }, + { + "name": "maxTokens", + "type": "uint256" + }, + { + "name": "maxBalance", + "type": "uint256" + }, + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "datatoken", + "type": "address" + }, + { + "name": "maxTokens", + "type": "uint256" + }, + { + "name": "maxBalance", + "type": "uint256" + } + ], + "name": "activate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "datatoken", + "type": "address" + } + ], + "name": "deactivate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "datatoken", + "type": "address" + } + ], + "name": "acceptMinter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "datatoken", + "type": "address" + } + ], + "name": "removeMinter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "datatoken", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "dispense", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "datatoken", + "type": "address" + } + ], + "name": "ownerWithdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"datatoken\",\"type\":\"address\"}],\"name\":\"removeMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"datatokensList\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"datatoken\",\"type\":\"address\"}],\"name\":\"deactivate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"datatoken\",\"type\":\"address\"}],\"name\":\"status\",\"outputs\":[{\"name\":\"active\",\"type\":\"bool\"},{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"minterApproved\",\"type\":\"bool\"},{\"name\":\"isTrueMinter\",\"type\":\"bool\"},{\"name\":\"maxTokens\",\"type\":\"uint256\"},{\"name\":\"maxBalance\",\"type\":\"uint256\"},{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"datatoken\",\"type\":\"address\"},{\"name\":\"maxTokens\",\"type\":\"uint256\"},{\"name\":\"maxBalance\",\"type\":\"uint256\"}],\"name\":\"activate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"datatoken\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"dispense\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"datatoken\",\"type\":\"address\"}],\"name\":\"acceptMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"datatoken\",\"type\":\"address\"}],\"name\":\"ownerWithdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"datatokenAddress\",\"type\":\"address\"}],\"name\":\"Activated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"datatokenAddress\",\"type\":\"address\"}],\"name\":\"Deactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"datatokenAddress\",\"type\":\"address\"}],\"name\":\"AcceptedMinter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"datatokenAddress\",\"type\":\"address\"}],\"name\":\"RemovedMinter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"datatokenAddress\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"userAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensDispensed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"datatoken\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"OwnerWithdrawed\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"acceptMinter(address)\":{\"details\":\"acceptMinter Accepts Minter role (existing datatoken minter has to call datatoken.proposeMinter(dispenserAddress) first)\",\"params\":{\"datatoken\":\"refers to datatoken address.\"}},\"activate(address,uint256,uint256)\":{\"details\":\"activate Activate a new dispenser\",\"params\":{\"datatoken\":\"refers to datatoken address.\",\"maxBalance\":\"- max balance of requester.\",\"maxTokens\":\"- max tokens to dispense\"}},\"deactivate(address)\":{\"details\":\"deactivate Deactivate an existing dispenser\",\"params\":{\"datatoken\":\"refers to datatoken address.\"}},\"dispense(address,uint256)\":{\"details\":\"dispense Dispense datatokens to caller. The dispenser must be active, hold enough DT (or be able to mint more) and respect maxTokens/maxBalance requirements\",\"params\":{\"datatoken\":\"amount of datatokens required.\"}},\"ownerWithdraw(address)\":{\"details\":\"ownerWithdraw Allow owner to withdraw all datatokens in this dispenser balance\",\"params\":{\"datatoken\":\"refers to datatoken address.\"}},\"removeMinter(address)\":{\"details\":\"removeMinter Removes Minter role and proposes the owner as a new minter (the owner has to call approveMinter after this)\",\"params\":{\"datatoken\":\"refers to datatoken address.\"}},\"status(address)\":{\"details\":\"status Get information about a datatoken dispenser\",\"params\":{\"datatoken\":\"refers to datatoken address.\"},\"return\":\"active - if the dispenser is active for this datatokenowner - owner of this dispenserminterApproved - if the dispenser is a minter for this datatokenisTrueMinter - check the datatoken contract if this contract is really a mintermaxTokens - max tokens to dispensemaxBalance - max balance of requester. If the balance is higher, the dispense is rejectedbalance - internal balance of the contract (if any)\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/dispenser/Dispenser.sol\":\"Dispenser\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/dispenser/Dispenser.sol\":{\"keccak256\":\"0x6acf943424d35f94f558e980af605acbee444243f64a79f9a6d7c8e49e6ae2c7\",\"urls\":[\"bzzr://76b4928f491fbabfe0f0f9b235f3bc5ebef8ac4476ce01aa934d1b8dd36d1a4b\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol\":{\"keccak256\":\"0x022ebed2ba4949e96a05cc394cf690d8fd3190a4733cebe8cbe930ac25cfde18\",\"urls\":[\"bzzr://2fa3d5cae14f0af7d78f6e1d13bc41854082c03ab2f86462ebb09afda88ee6e9\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611491806100206000396000f3fe608060405260043610610098576000357c010000000000000000000000000000000000000000000000000000000090048063938d71d01161006b578063938d71d0146101bb578063bef54a5e146101fa578063efa0ac4314610226578063f9bfaa7d1461025957610098565b80633092afd51461009a5780633398086a146100cd5780633ea053eb14610113578063645b8b1b14610146575b005b3480156100a657600080fd5b50610098600480360360208110156100bd57600080fd5b5035600160a060020a031661028c565b3480156100d957600080fd5b506100f7600480360360208110156100f057600080fd5b5035610508565b60408051600160a060020a039092168252519081900360200190f35b34801561011f57600080fd5b506100986004803603602081101561013657600080fd5b5035600160a060020a031661052f565b34801561015257600080fd5b506101796004803603602081101561016957600080fd5b5035600160a060020a031661063a565b604080519715158852600160a060020a039096166020880152931515868601529115156060860152608085015260a084015260c0830152519081900360e00190f35b3480156101c757600080fd5b50610098600480360360608110156101de57600080fd5b50600160a060020a0381351690602081013590604001356107dd565b6100986004803603604081101561021057600080fd5b50600160a060020a038135169060200135610a5d565b34801561023257600080fd5b506100986004803603602081101561024957600080fd5b5035600160a060020a0316611003565b34801561026557600080fd5b506100986004803603602081101561027c57600080fd5b5035600160a060020a0316611203565b600160a060020a0381166102d8576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a03818116600090815260208190526040902054610100900416331461034e576040805160e560020a62461bcd02815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015290519081900360640190fd5b6040805160e160020a6355138f0d02815230600482015290518291600160a060020a0383169163aa271e1a91602480820192602092909190829003018186803b15801561039a57600080fd5b505afa1580156103ae573d6000803e3d6000fd5b505050506040513d60208110156103c457600080fd5b505161041a576040805160e560020a62461bcd02815260206004820152601e60248201527f4552523a2043616e6e6f7420616363657074206d696e74657220726f6c650000604482015290519081900360640190fd5b600160a060020a038281166000908152602081905260408082205481517f50d2fcc4000000000000000000000000000000000000000000000000000000008152610100909104841660048201529051928416926350d2fcc49260248084019391929182900301818387803b15801561049157600080fd5b505af11580156104a5573d6000803e3d6000fd5b50505050600160a060020a038216600081815260208190526040808220805475ff00000000000000000000000000000000000000000019169055517fc93cfdd5d8f442c448a02ed11ccff64355643272c9f2be94b723f2181af1a8969190a25050565b6001818154811061051557fe5b600091825260209091200154600160a060020a0316905081565b600160a060020a03811661057b576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a0381811660009081526020819052604090205461010090041633146105f1576040805160e560020a62461bcd02815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015290519081900360640190fd5b600160a060020a038116600081815260208190526040808220805460ff19169055517f749cb6b4c510bc468cf6b9c2086d6f0a54d6b18e25d37bf3200e68eab0880c009190a250565b6000808080808080600160a060020a03881661068e576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a038089166000818152602081815260409182902080546001820154600290920154845160e060020a6370a08231028152306004820152945160ff8084169f5061010084049098169d5075010000000000000000000000000000000000000000009092049096169a509097509395508b936370a08231926024808201939291829003018186803b15801561072757600080fd5b505afa15801561073b573d6000803e3d6000fd5b505050506040513d602081101561075157600080fd5b50516040805160e160020a6355138f0d0281523060048201529051919350600160a060020a0383169163aa271e1a91602480820192602092909190829003018186803b1580156107a057600080fd5b505afa1580156107b4573d6000803e3d6000fd5b505050506040513d60208110156107ca57600080fd5b5051979996985094969592945090925090565b600160a060020a038316610829576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a0383811660009081526020819052604090205461010090041615806108735750600160a060020a0383811660009081526020819052604090205461010090041633145b6108c7576040805160e560020a62461bcd02815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015290519081900360640190fd5b6040805160e160020a6355138f0d02815233600482015290518491600160a060020a0383169163aa271e1a91602480820192602092909190829003018186803b15801561091357600080fd5b505afa158015610927573d6000803e3d6000fd5b505050506040513d602081101561093d57600080fd5b505161097d5760405160e560020a62461bcd0281526004018080602001828103825260248152602001806114226024913960400191505060405180910390fd5b600160a060020a038416600081815260208190526040808220805460018083018990556002830188905560ff19909116811774ffffffffffffffffffffffffffffffffffffffff00191661010033021775ff0000000000000000000000000000000000000000001916909155805480820182559083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601805473ffffffffffffffffffffffffffffffffffffffff191684179055517f0cc43938d137e7efade6a531f663e78c1fc75257b0d65ffda2fdaf70cb49cdf99190a250505050565b600160a060020a038216610aa9576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a03821660009081526020819052604090205460ff161515600114610b1e576040805160e560020a62461bcd02815260206004820152601460248201527f44697370656e736572206e6f7420616374697665000000000000000000000000604482015290519081900360640190fd5b60008111610b76576040805160e560020a62461bcd02815260206004820152601360248201527f496e76616c6964207a65726f20616d6f756e7400000000000000000000000000604482015290519081900360640190fd5b600160a060020a038216600090815260208190526040902060010154811115610be9576040805160e560020a62461bcd02815260206004820152600f60248201527f416d6f756e7420746f6f20686967680000000000000000000000000000000000604482015290519081900360640190fd5b6040805160e060020a6370a0823102815233600482015290518391600091600160a060020a038416916370a08231916024808301926020929190829003018186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d6020811015610c6157600080fd5b5051600160a060020a0385166000908152602081905260409020600201549091508110610cd8576040805160e560020a62461bcd02815260206004820152601760248201527f43616c6c65722062616c616e636520746f6f2068696768000000000000000000604482015290519081900360640190fd5b6040805160e060020a6370a082310281523060048201529051600091600160a060020a038516916370a0823191602480820192602092909190829003018186803b158015610d2557600080fd5b505afa158015610d39573d6000803e3d6000fd5b505050506040513d6020811015610d4f57600080fd5b505190508381108015610dd357506040805160e160020a6355138f0d0281523060048201529051600160a060020a0385169163aa271e1a916024808301926020929190829003018186803b158015610da657600080fd5b505afa158015610dba573d6000803e3d6000fd5b505050506040513d6020811015610dd057600080fd5b50515b15610ed057604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015282860360248201529051600160a060020a038516916340c10f1991604480830192600092919082900301818387803b158015610e4057600080fd5b505af1158015610e54573d6000803e3d6000fd5b50506040805160e060020a6370a082310281523060048201529051600160a060020a03871693506370a0823192506024808301926020929190829003018186803b158015610ea157600080fd5b505afa158015610eb5573d6000803e3d6000fd5b505050506040513d6020811015610ecb57600080fd5b505190505b83811015610f28576040805160e560020a62461bcd02815260206004820152601360248201527f4e6f7420656e6f75676820726573657276657300000000000000000000000000604482015290519081900360640190fd5b604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018690529051600160a060020a0385169163a9059cbb9160448083019260209291908290030181600087803b158015610f9057600080fd5b505af1158015610fa4573d6000803e3d6000fd5b505050506040513d6020811015610fba57600080fd5b50506040805185815290513391600160a060020a038816917f63e223ff524bd93d4cbff98ef34405b39f63ded87f5a8d85e39ccda966f135439181900360200190a35050505050565b600160a060020a03811661104f576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600081905080600160a060020a031663eb40024b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1580156110ab57600080fd5b505af11580156110bf573d6000803e3d6000fd5b50506040805160e160020a6355138f0d0281523060048201529051600160a060020a038516935063aa271e1a92506024808301926020929190829003018186803b15801561110c57600080fd5b505afa158015611120573d6000803e3d6000fd5b505050506040513d602081101561113657600080fd5b505161118c576040805160e560020a62461bcd02815260206004820152601e60248201527f4552523a2043616e6e6f7420616363657074206d696e74657220726f6c650000604482015290519081900360640190fd5b600160a060020a038216600081815260208190526040808220805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055517ffef43e73eccfaf6e7c8c743baaa69fc51e375d972142bee1ffa6ee98f28339e99190a25050565b600160a060020a03811661124f576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a0381811660009081526020819052604090205461010090041633146112c5576040805160e560020a62461bcd02815260206004820152600d60248201527f496e76616c6964206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b6040805160e060020a6370a0823102815230600482015290518291600091600160a060020a038416916370a08231916024808301926020929190829003018186803b15801561131357600080fd5b505afa158015611327573d6000803e3d6000fd5b505050506040513d602081101561133d57600080fd5b50519050801561141c57604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018390529051600160a060020a0384169163a9059cbb9160448083019260209291908290030181600087803b1580156113af57600080fd5b505af11580156113c3573d6000803e3d6000fd5b505050506040513d60208110156113d957600080fd5b50506040805182815290513391600160a060020a038616917f03185212530fcdce6b38fbf62ed27ab29b1b047f59b76b17401388a70a95f41b9181900360200190a35b50505056fe53656e64657220646f6573206e6f74206861766520746865206d696e74657220726f6c65496e76616c696420746f6b656e20636f6e747261637420616464726573730000a165627a7a72305820912566faae5bbd326f1ceefce2069e2d2206f629febcbb8ea833de618c7c9d2e0029", + "deployedBytecode": "0x608060405260043610610098576000357c010000000000000000000000000000000000000000000000000000000090048063938d71d01161006b578063938d71d0146101bb578063bef54a5e146101fa578063efa0ac4314610226578063f9bfaa7d1461025957610098565b80633092afd51461009a5780633398086a146100cd5780633ea053eb14610113578063645b8b1b14610146575b005b3480156100a657600080fd5b50610098600480360360208110156100bd57600080fd5b5035600160a060020a031661028c565b3480156100d957600080fd5b506100f7600480360360208110156100f057600080fd5b5035610508565b60408051600160a060020a039092168252519081900360200190f35b34801561011f57600080fd5b506100986004803603602081101561013657600080fd5b5035600160a060020a031661052f565b34801561015257600080fd5b506101796004803603602081101561016957600080fd5b5035600160a060020a031661063a565b604080519715158852600160a060020a039096166020880152931515868601529115156060860152608085015260a084015260c0830152519081900360e00190f35b3480156101c757600080fd5b50610098600480360360608110156101de57600080fd5b50600160a060020a0381351690602081013590604001356107dd565b6100986004803603604081101561021057600080fd5b50600160a060020a038135169060200135610a5d565b34801561023257600080fd5b506100986004803603602081101561024957600080fd5b5035600160a060020a0316611003565b34801561026557600080fd5b506100986004803603602081101561027c57600080fd5b5035600160a060020a0316611203565b600160a060020a0381166102d8576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a03818116600090815260208190526040902054610100900416331461034e576040805160e560020a62461bcd02815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015290519081900360640190fd5b6040805160e160020a6355138f0d02815230600482015290518291600160a060020a0383169163aa271e1a91602480820192602092909190829003018186803b15801561039a57600080fd5b505afa1580156103ae573d6000803e3d6000fd5b505050506040513d60208110156103c457600080fd5b505161041a576040805160e560020a62461bcd02815260206004820152601e60248201527f4552523a2043616e6e6f7420616363657074206d696e74657220726f6c650000604482015290519081900360640190fd5b600160a060020a038281166000908152602081905260408082205481517f50d2fcc4000000000000000000000000000000000000000000000000000000008152610100909104841660048201529051928416926350d2fcc49260248084019391929182900301818387803b15801561049157600080fd5b505af11580156104a5573d6000803e3d6000fd5b50505050600160a060020a038216600081815260208190526040808220805475ff00000000000000000000000000000000000000000019169055517fc93cfdd5d8f442c448a02ed11ccff64355643272c9f2be94b723f2181af1a8969190a25050565b6001818154811061051557fe5b600091825260209091200154600160a060020a0316905081565b600160a060020a03811661057b576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a0381811660009081526020819052604090205461010090041633146105f1576040805160e560020a62461bcd02815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015290519081900360640190fd5b600160a060020a038116600081815260208190526040808220805460ff19169055517f749cb6b4c510bc468cf6b9c2086d6f0a54d6b18e25d37bf3200e68eab0880c009190a250565b6000808080808080600160a060020a03881661068e576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a038089166000818152602081815260409182902080546001820154600290920154845160e060020a6370a08231028152306004820152945160ff8084169f5061010084049098169d5075010000000000000000000000000000000000000000009092049096169a509097509395508b936370a08231926024808201939291829003018186803b15801561072757600080fd5b505afa15801561073b573d6000803e3d6000fd5b505050506040513d602081101561075157600080fd5b50516040805160e160020a6355138f0d0281523060048201529051919350600160a060020a0383169163aa271e1a91602480820192602092909190829003018186803b1580156107a057600080fd5b505afa1580156107b4573d6000803e3d6000fd5b505050506040513d60208110156107ca57600080fd5b5051979996985094969592945090925090565b600160a060020a038316610829576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a0383811660009081526020819052604090205461010090041615806108735750600160a060020a0383811660009081526020819052604090205461010090041633145b6108c7576040805160e560020a62461bcd02815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015290519081900360640190fd5b6040805160e160020a6355138f0d02815233600482015290518491600160a060020a0383169163aa271e1a91602480820192602092909190829003018186803b15801561091357600080fd5b505afa158015610927573d6000803e3d6000fd5b505050506040513d602081101561093d57600080fd5b505161097d5760405160e560020a62461bcd0281526004018080602001828103825260248152602001806114226024913960400191505060405180910390fd5b600160a060020a038416600081815260208190526040808220805460018083018990556002830188905560ff19909116811774ffffffffffffffffffffffffffffffffffffffff00191661010033021775ff0000000000000000000000000000000000000000001916909155805480820182559083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601805473ffffffffffffffffffffffffffffffffffffffff191684179055517f0cc43938d137e7efade6a531f663e78c1fc75257b0d65ffda2fdaf70cb49cdf99190a250505050565b600160a060020a038216610aa9576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a03821660009081526020819052604090205460ff161515600114610b1e576040805160e560020a62461bcd02815260206004820152601460248201527f44697370656e736572206e6f7420616374697665000000000000000000000000604482015290519081900360640190fd5b60008111610b76576040805160e560020a62461bcd02815260206004820152601360248201527f496e76616c6964207a65726f20616d6f756e7400000000000000000000000000604482015290519081900360640190fd5b600160a060020a038216600090815260208190526040902060010154811115610be9576040805160e560020a62461bcd02815260206004820152600f60248201527f416d6f756e7420746f6f20686967680000000000000000000000000000000000604482015290519081900360640190fd5b6040805160e060020a6370a0823102815233600482015290518391600091600160a060020a038416916370a08231916024808301926020929190829003018186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d6020811015610c6157600080fd5b5051600160a060020a0385166000908152602081905260409020600201549091508110610cd8576040805160e560020a62461bcd02815260206004820152601760248201527f43616c6c65722062616c616e636520746f6f2068696768000000000000000000604482015290519081900360640190fd5b6040805160e060020a6370a082310281523060048201529051600091600160a060020a038516916370a0823191602480820192602092909190829003018186803b158015610d2557600080fd5b505afa158015610d39573d6000803e3d6000fd5b505050506040513d6020811015610d4f57600080fd5b505190508381108015610dd357506040805160e160020a6355138f0d0281523060048201529051600160a060020a0385169163aa271e1a916024808301926020929190829003018186803b158015610da657600080fd5b505afa158015610dba573d6000803e3d6000fd5b505050506040513d6020811015610dd057600080fd5b50515b15610ed057604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015282860360248201529051600160a060020a038516916340c10f1991604480830192600092919082900301818387803b158015610e4057600080fd5b505af1158015610e54573d6000803e3d6000fd5b50506040805160e060020a6370a082310281523060048201529051600160a060020a03871693506370a0823192506024808301926020929190829003018186803b158015610ea157600080fd5b505afa158015610eb5573d6000803e3d6000fd5b505050506040513d6020811015610ecb57600080fd5b505190505b83811015610f28576040805160e560020a62461bcd02815260206004820152601360248201527f4e6f7420656e6f75676820726573657276657300000000000000000000000000604482015290519081900360640190fd5b604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018690529051600160a060020a0385169163a9059cbb9160448083019260209291908290030181600087803b158015610f9057600080fd5b505af1158015610fa4573d6000803e3d6000fd5b505050506040513d6020811015610fba57600080fd5b50506040805185815290513391600160a060020a038816917f63e223ff524bd93d4cbff98ef34405b39f63ded87f5a8d85e39ccda966f135439181900360200190a35050505050565b600160a060020a03811661104f576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600081905080600160a060020a031663eb40024b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1580156110ab57600080fd5b505af11580156110bf573d6000803e3d6000fd5b50506040805160e160020a6355138f0d0281523060048201529051600160a060020a038516935063aa271e1a92506024808301926020929190829003018186803b15801561110c57600080fd5b505afa158015611120573d6000803e3d6000fd5b505050506040513d602081101561113657600080fd5b505161118c576040805160e560020a62461bcd02815260206004820152601e60248201527f4552523a2043616e6e6f7420616363657074206d696e74657220726f6c650000604482015290519081900360640190fd5b600160a060020a038216600081815260208190526040808220805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055517ffef43e73eccfaf6e7c8c743baaa69fc51e375d972142bee1ffa6ee98f28339e99190a25050565b600160a060020a03811661124f576040805160e560020a62461bcd02815260206004820152601e6024820152600080516020611446833981519152604482015290519081900360640190fd5b600160a060020a0381811660009081526020819052604090205461010090041633146112c5576040805160e560020a62461bcd02815260206004820152600d60248201527f496e76616c6964206f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b6040805160e060020a6370a0823102815230600482015290518291600091600160a060020a038416916370a08231916024808301926020929190829003018186803b15801561131357600080fd5b505afa158015611327573d6000803e3d6000fd5b505050506040513d602081101561133d57600080fd5b50519050801561141c57604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018390529051600160a060020a0384169163a9059cbb9160448083019260209291908290030181600087803b1580156113af57600080fd5b505af11580156113c3573d6000803e3d6000fd5b505050506040513d60208110156113d957600080fd5b50506040805182815290513391600160a060020a038616917f03185212530fcdce6b38fbf62ed27ab29b1b047f59b76b17401388a70a95f41b9181900360200190a35b50505056fe53656e64657220646f6573206e6f74206861766520746865206d696e74657220726f6c65496e76616c696420746f6b656e20636f6e747261637420616464726573730000a165627a7a72305820912566faae5bbd326f1ceefce2069e2d2206f629febcbb8ea833de618c7c9d2e0029", + "sourceMap": "231:8452:9:-;;;741:23;8:9:-1;5:2;;;30:1;27;20:12;5:2;741:23:9;231:8452;;;;;;", + "deployedSourceMap": "231:8452:9:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5593:640;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5593:640:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5593:640:9;-1:-1:-1;;;;;5593:640:9;;:::i;704:31::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;704:31:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;704:31:9;;:::i;:::-;;;;-1:-1:-1;;;;;704:31:9;;;;;;;;;;;;;;4293:372;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4293:372:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4293:372:9;-1:-1:-1;;;;;4293:372:9;;:::i;2255:756::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2255:756:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2255:756:9;-1:-1:-1;;;;;2255:756:9;;:::i;:::-;;;;;;;;;-1:-1:-1;;;;;2255:756:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3246:904;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3246:904:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3246:904:9;;;;;;;;;;;;;:::i;6544:1304::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;6544:1304:9;;;;;;;;:::i;4886:488::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4886:488:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4886:488:9;-1:-1:-1;;;;;4886:488:9;;:::i;8026:577::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8026:577:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8026:577:9;-1:-1:-1;;;;;8026:577:9;;:::i;5593:640::-;-1:-1:-1;;;;;5673:23:9;;5652:100;;;;;-1:-1:-1;;;;;5652:100:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;5652:100:9;;;;;;;;;;;;;;;-1:-1:-1;;;;;5783:21:9;;;:10;:21;;;;;;;;;;:27;;;;;5814:10;5783:41;5762:115;;;;;-1:-1:-1;;;;;5762:115:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;5974:37;;;-1:-1:-1;;;;;5974:37:9;;6005:4;5974:37;;;;;;5933:9;;-1:-1:-1;;;;;5974:22:9;;;;;:37;;;;;;;;;;;;;;;:22;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;5974:37:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5974:37:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5974:37:9;5953:114;;;;;-1:-1:-1;;;;;5953:114:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6105:21:9;;;:10;:21;;;;;;;;;;;:27;6077:56;;;;;6105:27;;;;;;6077:56;;;;;;:27;;;;;;:56;;;;;6105:10;;6077:56;;;;;;6105:10;6077:27;:56;;;5:2:-1;;;;30:1;27;20:12;5:2;6077:56:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;;;;;;;;6143:21:9;;6182:5;6143:21;;;;;;;;;;;:44;;-1:-1:-1;;6143:44:9;;;6202:24;;;6182:5;6202:24;5593:640;;:::o;704:31::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;704:31:9;;-1:-1:-1;704:31:9;:::o;4293:372::-;-1:-1:-1;;;;;4371:23:9;;4350:100;;;;;-1:-1:-1;;;;;4350:100:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;4350:100:9;;;;;;;;;;;;;;;-1:-1:-1;;;;;4481:21:9;;;:10;:21;;;;;;;;;;:27;;;;;4512:10;4481:41;4460:115;;;;;-1:-1:-1;;;;;4460:115:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4585:21:9;;4616:5;4585:21;;;;;;;;;;;:36;;-1:-1:-1;;4585:36:9;;;4636:22;;;4616:5;4636:22;4293:372;:::o;2255:756::-;2322:11;;;;;;;-1:-1:-1;;;;;2476:23:9;;2455:100;;;;;-1:-1:-1;;;;;2455:100:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2455:100:9;;;;;;;;;;;;;;;-1:-1:-1;;;;;2574:21:9;;;:10;:21;;;;;;;;;;;;:28;;;2732:31;;;2786:32;;;;;2904:38;;-1:-1:-1;;;;;2904:38:9;;2936:4;2904:38;;;;;;2574:28;;;;;-1:-1:-1;2574:28:9;2620:27;;;;;;-1:-1:-1;2674:36:9;;;;;;;;-1:-1:-1;2732:31:9;;-1:-1:-1;2786:32:9;;-1:-1:-1;2585:9:9;;2904:23;;:38;;;;;2574:21;2904:38;;;;;;2574:21;2904:38;;;5:2:-1;;;;30:1;27;20:12;5:2;2904:38:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2904:38:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2904:38:9;2967:37;;;-1:-1:-1;;;;;2967:37:9;;2998:4;2967:37;;;;;;2904:38;;-1:-1:-1;;;;;;2967:22:9;;;;;:37;;;;;2904:38;;2967:37;;;;;;;;:22;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;2967:37:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2967:37:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2967:37:9;2255:756;;;;-1:-1:-1;2255:756:9;;2967:37;2255:756;;-1:-1:-1;2255:756:9;;-1:-1:-1;2255:756:9;:::o;3246:904::-;-1:-1:-1;;;;;3369:23:9;;3348:100;;;;;-1:-1:-1;;;;;3348:100:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;3348:100:9;;;;;;;;;;;;;;;-1:-1:-1;;;;;3479:21:9;;;3518:1;3479:21;;;;;;;;;;:27;;;;;:41;;:86;;-1:-1:-1;;;;;;3524:21:9;;;:10;:21;;;;;;;;;;:27;;;;;3555:10;3524:41;3479:86;3458:160;;;;;-1:-1:-1;;;;;3458:160:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;3715:34;;;-1:-1:-1;;;;;3715:34:9;;3738:10;3715:34;;;;;;3674:9;;-1:-1:-1;;;;;3715:22:9;;;;;:34;;;;;;;;;;;;;;;:22;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;3715:34:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3715:34:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3715:34:9;3694:117;;;;-1:-1:-1;;;;;3694:117:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3821:21:9;;:10;:21;;;;;;;;;;;:35;;3852:4;3916:31;;;:43;;;3969:32;;;:45;;;-1:-1:-1;;3821:35:9;;;;;-1:-1:-1;;3866:40:9;3821:35;3896:10;3866:40;;-1:-1:-1;;4024:44:9;;;;27:10:-1;;23:18;;;45:23;;4078:30:9;;;;;;;-1:-1:-1;;4078:30:9;;;;;4123:20;;;3821:10;4123:20;3246:904;;;;:::o;6544:1304::-;-1:-1:-1;;;;;6644:23:9;;6623:100;;;;;-1:-1:-1;;;;;6623:100:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;6623:100:9;;;;;;;;;;;;;;;-1:-1:-1;;;;;6754:21:9;;:10;:21;;;;;;;;;;:28;;;:36;;:28;:36;6733:103;;;;;-1:-1:-1;;;;;6733:103:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;6876:1;6867:6;:10;6846:76;;;;;-1:-1:-1;;;;;6846:76:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6953:21:9;;:10;:21;;;;;;;;;;:31;;;:41;-1:-1:-1;6953:41:9;6932:103;;;;;-1:-1:-1;;;;;6932:103:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;7135:35;;;-1:-1:-1;;;;;7135:35:9;;7159:10;7135:35;;;;;;7091:9;;7045:28;;-1:-1:-1;;;;;7135:23:9;;;;;:35;;;;;;;;;;;;;;:23;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;7135:35:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7135:35:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7135:35:9;-1:-1:-1;;;;;7215:21:9;;:10;:21;;;7135:35;7215:21;;;;;;:32;;;7135:35;;-1:-1:-1;7201:46:9;;7180:116;;;;;-1:-1:-1;;;;;7180:116:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;7327:38;;;-1:-1:-1;;;;;7327:38:9;;7359:4;7327:38;;;;;;7306:18;;-1:-1:-1;;;;;7327:23:9;;;;;:38;;;;;;;;;;;;;;;:23;:38;;;5:2:-1;;;;30:1;27;20:12;5:2;7327:38:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7327:38:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7327:38:9;;-1:-1:-1;7378:17:9;;;:58;;;;-1:-1:-1;7399:37:9;;;-1:-1:-1;;;;;7399:37:9;;7430:4;7399:37;;;;;;-1:-1:-1;;;;;7399:22:9;;;;;:37;;;;;;;;;;;;;;:22;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;7399:37:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7399:37:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7399:37:9;7378:58;7375:261;;;7507:53;;;;;;7534:4;7507:53;;;;7540:19;;;7507:53;;;;;;-1:-1:-1;;;;;7507:18:9;;;;;:53;;;;;-1:-1:-1;;7507:53:9;;;;;;;-1:-1:-1;7507:18:9;:53;;;5:2:-1;;;;30:1;27;20:12;5:2;7507:53:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;7587:38:9;;;-1:-1:-1;;;;;7587:38:9;;7619:4;7587:38;;;;;;-1:-1:-1;;;;;7587:23:9;;;-1:-1:-1;7587:23:9;;-1:-1:-1;7587:38:9;;;;;;;;;;;;;;:23;:38;;;5:2:-1;;;;30:1;27;20:12;5:2;7587:38:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7587:38:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7587:38:9;;-1:-1:-1;7375:261:9;7678:6;7666:10;:18;;7645:84;;;;;-1:-1:-1;;;;;7645:84:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;7739:41;;;;;;7762:10;7739:41;;;;;;;;;;;;-1:-1:-1;;;;;7739:22:9;;;;;:41;;;;;;;;;;;;;;-1:-1:-1;7739:22:9;:41;;;5:2:-1;;;;30:1;27;20:12;5:2;7739:41:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7739:41:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;7795:46:9;;;;;;;;7822:10;;-1:-1:-1;;;;;7795:46:9;;;;;;;;7739:41;7795:46;;;6544:1304;;;;;:::o;4886:488::-;-1:-1:-1;;;;;4966:23:9;;4945:100;;;;;-1:-1:-1;;;;;4945:100:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;4945:100:9;;;;;;;;;;;;;;;5055:28;5101:9;5055:56;;5121:13;-1:-1:-1;;;;;5121:27:9;;:29;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5121:29:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;5181:37:9;;;-1:-1:-1;;;;;5181:37:9;;5212:4;5181:37;;;;;;-1:-1:-1;;;;;5181:22:9;;;-1:-1:-1;5181:22:9;;-1:-1:-1;5181:37:9;;;;;;;;;;;;;;:22;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;5181:37:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5181:37:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5181:37:9;5160:114;;;;;-1:-1:-1;;;;;5160:114:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5284:21:9;;:10;:21;;;;;;;;;;;:43;;-1:-1:-1;;5284:43:9;;;;;5342:25;;;5284:10;5342:25;4886:488;;:::o;8026:577::-;-1:-1:-1;;;;;8107:23:9;;8086:100;;;;;-1:-1:-1;;;;;8086:100:9;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8086:100:9;;;;;;;;;;;;;;;-1:-1:-1;;;;;8217:21:9;;;:10;:21;;;;;;;;;;:27;;;;;8248:10;8217:41;8196:101;;;;;-1:-1:-1;;;;;8196:101:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;8394:38;;;-1:-1:-1;;;;;8394:38:9;;8426:4;8394:38;;;;;;8353:9;;8307:28;;-1:-1:-1;;;;;8394:23:9;;;;;:38;;;;;;;;;;;;;;:23;:38;;;5:2:-1;;;;30:1;27;20:12;5:2;8394:38:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8394:38:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8394:38:9;;-1:-1:-1;8445:12:9;;8442:155;;8472:45;;;;;;8495:10;8472:45;;;;;;;;;;;;-1:-1:-1;;;;;8472:22:9;;;;;:45;;;;;;;;;;;;;;-1:-1:-1;8472:22:9;:45;;;5:2:-1;;;;30:1;27;20:12;5:2;8472:45:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8472:45:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;8536:50:9;;;;;;;;8563:10;;-1:-1:-1;;;;;8536:50:9;;;;;;;;8472:45;8536:50;;;8442:155;8026:577;;;:::o", + "source": "pragma solidity 0.5.7;\n// Copyright BigchainDB GmbH and Ocean Protocol contributors\n// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)\n// Code is Apache-2.0 and docs are CC-BY-4.0\n\nimport '../interfaces/IERC20Template.sol';\n\n\n\ncontract Dispenser {\n struct DataToken {\n bool active; // if the dispenser is active for this datatoken\n address owner; // owner of this dispenser\n bool minterApproved; // if the dispenser is a minter for this datatoken\n uint256 maxTokens; // max tokens to dispense\n uint256 maxBalance; // max balance of requester. \n //If the balance is higher, the dispense is rejected\n }\n mapping(address => DataToken) datatokens;\n address[] public datatokensList;\n constructor() public {}\n \n event Activated( // emited when a dispenser is activated\n address indexed datatokenAddress\n );\n\n event Deactivated( // emited when a dispenser is deactivated\n address indexed datatokenAddress\n );\n\n event AcceptedMinter( \n // emited when a dispenser becomes minter of the datatoken\n address indexed datatokenAddress\n );\n\n event RemovedMinter( \n // emited when a dispenser if removed as minter of the datatoken\n address indexed datatokenAddress\n );\n\n event TokensDispensed( \n // emited when tokens are dispended\n address indexed datatokenAddress,\n address indexed userAddress,\n uint256 amount\n );\n\n event OwnerWithdrawed(\n address indexed datatoken,\n address indexed owner,\n uint256 amount\n );\n\n /**\n * @dev status\n * Get information about a datatoken dispenser\n * @param datatoken refers to datatoken address.\n * @return active - if the dispenser is active for this datatoken\n * @return owner - owner of this dispenser\n * @return minterApproved - if the dispenser is a minter for this datatoken\n * @return isTrueMinter - check the datatoken contract if this contract is really a minter\n * @return maxTokens - max tokens to dispense\n * @return maxBalance - max balance of requester. If the balance is higher, the dispense is rejected\n * @return balance - internal balance of the contract (if any)\n */\n function status(address datatoken) \n external view \n returns(bool active,address owner,bool minterApproved,\n bool isTrueMinter,uint256 maxTokens,uint256 maxBalance, uint256 balance){\n require(\n datatoken != address(0),\n 'Invalid token contract address'\n );\n active = datatokens[datatoken].active;\n owner = datatokens[datatoken].owner;\n minterApproved = datatokens[datatoken].minterApproved;\n maxTokens = datatokens[datatoken].maxTokens;\n maxBalance = datatokens[datatoken].maxBalance;\n IERC20Template tokenInstance = IERC20Template(datatoken);\n balance = tokenInstance.balanceOf(address(this));\n isTrueMinter = tokenInstance.isMinter(address(this));\n }\n\n /**\n * @dev activate\n * Activate a new dispenser\n * @param datatoken refers to datatoken address.\n * @param maxTokens - max tokens to dispense\n * @param maxBalance - max balance of requester.\n */\n function activate(address datatoken,uint256 maxTokens, uint256 maxBalance)\n external {\n require(\n datatoken != address(0),\n 'Invalid token contract address'\n );\n require(\n datatokens[datatoken].owner == address(0) || datatokens[datatoken].owner == msg.sender,\n 'DataToken already activated'\n );\n IERC20Template tokenInstance = IERC20Template(datatoken);\n require(\n tokenInstance.isMinter(msg.sender),\n 'Sender does not have the minter role'\n );\n datatokens[datatoken].active = true;\n datatokens[datatoken].owner = msg.sender;\n datatokens[datatoken].maxTokens = maxTokens;\n datatokens[datatoken].maxBalance = maxBalance;\n datatokens[datatoken].minterApproved = false;\n datatokensList.push(datatoken);\n emit Activated(datatoken);\n }\n\n /**\n * @dev deactivate\n * Deactivate an existing dispenser\n * @param datatoken refers to datatoken address.\n */\n function deactivate(address datatoken) external{\n require(\n datatoken != address(0),\n 'Invalid token contract address'\n );\n require(\n datatokens[datatoken].owner == msg.sender,\n 'DataToken already activated'\n );\n datatokens[datatoken].active = false;\n emit Deactivated(datatoken);\n }\n\n /**\n * @dev acceptMinter\n * Accepts Minter role (existing datatoken minter has to call datatoken.proposeMinter(dispenserAddress) first)\n * @param datatoken refers to datatoken address.\n */\n function acceptMinter(address datatoken) external{\n require(\n datatoken != address(0),\n 'Invalid token contract address'\n );\n IERC20Template tokenInstance = IERC20Template(datatoken);\n tokenInstance.approveMinter();\n require(\n tokenInstance.isMinter(address(this)),\n 'ERR: Cannot accept minter role'\n );\n datatokens[datatoken].minterApproved = true;\n emit AcceptedMinter(datatoken);\n }\n /**\n * @dev removeMinter\n * Removes Minter role and proposes the owner as a new minter (the owner has to call approveMinter after this)\n * @param datatoken refers to datatoken address.\n */\n function removeMinter(address datatoken) external{\n require(\n datatoken != address(0),\n 'Invalid token contract address'\n );\n require(\n datatokens[datatoken].owner == msg.sender,\n 'DataToken already activated'\n );\n IERC20Template tokenInstance = IERC20Template(datatoken);\n require(\n tokenInstance.isMinter(address(this)),\n 'ERR: Cannot accept minter role'\n );\n tokenInstance.proposeMinter(datatokens[datatoken].owner);\n datatokens[datatoken].minterApproved = false;\n emit RemovedMinter(datatoken);\n }\n\n /**\n * @dev dispense\n * Dispense datatokens to caller. The dispenser must be active, hold enough DT (or be able to mint more) and respect maxTokens/maxBalance requirements\n * @param datatoken refers to datatoken address.\n * @param datatoken amount of datatokens required.\n */\n function dispense(address datatoken, uint256 amount) external payable{\n require(\n datatoken != address(0),\n 'Invalid token contract address'\n );\n require(\n datatokens[datatoken].active == true,\n 'Dispenser not active'\n );\n require(\n amount > 0,\n 'Invalid zero amount'\n );\n require(\n datatokens[datatoken].maxTokens >= amount,\n 'Amount too high'\n );\n IERC20Template tokenInstance = IERC20Template(datatoken);\n uint256 callerBalance = tokenInstance.balanceOf(msg.sender);\n require(\n callerBalance=amount,\n 'Not enough reserves'\n );\n tokenInstance.transfer(msg.sender,amount);\n emit TokensDispensed(datatoken, msg.sender, amount);\n }\n\n /**\n * @dev ownerWithdraw\n * Allow owner to withdraw all datatokens in this dispenser balance\n * @param datatoken refers to datatoken address.\n */\n function ownerWithdraw(address datatoken) external{\n require(\n datatoken != address(0),\n 'Invalid token contract address'\n );\n require(\n datatokens[datatoken].owner == msg.sender,\n 'Invalid owner'\n );\n IERC20Template tokenInstance = IERC20Template(datatoken);\n uint256 ourBalance = tokenInstance.balanceOf(address(this));\n if(ourBalance>0){\n tokenInstance.transfer(msg.sender,ourBalance);\n emit OwnerWithdrawed(datatoken, msg.sender, ourBalance);\n }\n }\n function() external payable {\n //thank you for your donation\n }\n}", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/dispenser/Dispenser.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/dispenser/Dispenser.sol", + "exportedSymbols": { + "Dispenser": [ + 4986 + ] + }, + "id": 4987, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4400, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "0:22:9" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "../interfaces/IERC20Template.sol", + "id": 4401, + "nodeType": "ImportDirective", + "scope": 4987, + "sourceUnit": 5659, + "src": "185:42:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4986, + "linearizedBaseContracts": [ + 4986 + ], + "name": "Dispenser", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "Dispenser.DataToken", + "id": 4412, + "members": [ + { + "constant": false, + "id": 4403, + "name": "active", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "283:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4402, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "283:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4405, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "354:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4404, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "354:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4407, + "name": "minterApproved", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "404:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4406, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "404:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4409, + "name": "maxTokens", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "484:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4408, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4411, + "name": "maxBalance", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "537:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4410, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "537:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "DataToken", + "nodeType": "StructDefinition", + "scope": 4986, + "src": "256:397:9", + "visibility": "public" + }, + { + "constant": false, + "id": 4416, + "name": "datatokens", + "nodeType": "VariableDeclaration", + "scope": 4986, + "src": "658:40:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken)" + }, + "typeName": { + "id": 4415, + "keyType": { + "id": 4413, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "666:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "658:29:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken)" + }, + "valueType": { + "contractScope": null, + "id": 4414, + "name": "DataToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4412, + "src": "677:9:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage_ptr", + "typeString": "struct Dispenser.DataToken" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4419, + "name": "datatokensList", + "nodeType": "VariableDeclaration", + "scope": 4986, + "src": "704:31:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4417, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "704:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4418, + "length": null, + "nodeType": "ArrayTypeName", + "src": "704:9:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 4422, + "nodeType": "Block", + "src": "762:2:9", + "statements": [] + }, + "documentation": null, + "id": 4423, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4420, + "nodeType": "ParameterList", + "parameters": [], + "src": "752:2:9" + }, + "returnParameters": { + "id": 4421, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:9" + }, + "scope": 4986, + "src": "741:23:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 4427, + "name": "Activated", + "nodeType": "EventDefinition", + "parameters": { + "id": 4426, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4425, + "indexed": true, + "name": "datatokenAddress", + "nodeType": "VariableDeclaration", + "scope": 4427, + "src": "840:32:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4424, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "840:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "789:89:9" + }, + "src": "774:105:9" + }, + { + "anonymous": false, + "documentation": null, + "id": 4431, + "name": "Deactivated", + "nodeType": "EventDefinition", + "parameters": { + "id": 4430, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4429, + "indexed": true, + "name": "datatokenAddress", + "nodeType": "VariableDeclaration", + "scope": 4431, + "src": "954:32:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4428, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "954:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "902:90:9" + }, + "src": "885:108:9" + }, + { + "anonymous": false, + "documentation": null, + "id": 4435, + "name": "AcceptedMinter", + "nodeType": "EventDefinition", + "parameters": { + "id": 4434, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4433, + "indexed": true, + "name": "datatokenAddress", + "nodeType": "VariableDeclaration", + "scope": 4435, + "src": "1097:32:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4432, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1097:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1019:116:9" + }, + "src": "999:137:9" + }, + { + "anonymous": false, + "documentation": null, + "id": 4439, + "name": "RemovedMinter", + "nodeType": "EventDefinition", + "parameters": { + "id": 4438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4437, + "indexed": true, + "name": "datatokenAddress", + "nodeType": "VariableDeclaration", + "scope": 4439, + "src": "1245:32:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1245:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1161:122:9" + }, + "src": "1142:142:9" + }, + { + "anonymous": false, + "documentation": null, + "id": 4447, + "name": "TokensDispensed", + "nodeType": "EventDefinition", + "parameters": { + "id": 4446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4441, + "indexed": true, + "name": "datatokenAddress", + "nodeType": "VariableDeclaration", + "scope": 4447, + "src": "1366:32:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4440, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1366:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4443, + "indexed": true, + "name": "userAddress", + "nodeType": "VariableDeclaration", + "scope": 4447, + "src": "1408:27:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4442, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1408:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4445, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4447, + "src": "1445:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4444, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1445:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1311:154:9" + }, + "src": "1290:176:9" + }, + { + "anonymous": false, + "documentation": null, + "id": 4455, + "name": "OwnerWithdrawed", + "nodeType": "EventDefinition", + "parameters": { + "id": 4454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4449, + "indexed": true, + "name": "datatoken", + "nodeType": "VariableDeclaration", + "scope": 4455, + "src": "1503:25:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4448, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1503:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4451, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 4455, + "src": "1538:21:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4450, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1538:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4453, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4455, + "src": "1569:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4452, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1569:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1493:96:9" + }, + "src": "1472:118:9" + }, + { + "body": { + "id": 4542, + "nodeType": "Block", + "src": "2445:566:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4475, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "2476:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2497:1:9", + "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": 4476, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2489:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4478, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2489:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2476:23:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "id": 4480, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2513:32:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + }, + "value": "Invalid token contract address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "id": 4474, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2455:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2455:100:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4482, + "nodeType": "ExpressionStatement", + "src": "2455:100:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4483, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4460, + "src": "2565:6:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4484, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "2574:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4486, + "indexExpression": { + "argumentTypes": null, + "id": 4485, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "2585:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2574:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4487, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "active", + "nodeType": "MemberAccess", + "referencedDeclaration": 4403, + "src": "2574:28:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2565:37:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4489, + "nodeType": "ExpressionStatement", + "src": "2565:37:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4490, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4462, + "src": "2612:5:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4491, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "2620:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4493, + "indexExpression": { + "argumentTypes": null, + "id": 4492, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "2631:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2620:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 4405, + "src": "2620:27:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2612:35:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4496, + "nodeType": "ExpressionStatement", + "src": "2612:35:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4497, + "name": "minterApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4464, + "src": "2657:14:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4498, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "2674:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4500, + "indexExpression": { + "argumentTypes": null, + "id": 4499, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "2685:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2674:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4501, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minterApproved", + "nodeType": "MemberAccess", + "referencedDeclaration": 4407, + "src": "2674:36:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2657:53:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4503, + "nodeType": "ExpressionStatement", + "src": "2657:53:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4504, + "name": "maxTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4468, + "src": "2720:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4505, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "2732:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4507, + "indexExpression": { + "argumentTypes": null, + "id": 4506, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "2743:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2732:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4508, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 4409, + "src": "2732:31:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2720:43:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4510, + "nodeType": "ExpressionStatement", + "src": "2720:43:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4511, + "name": "maxBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4470, + "src": "2773:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4512, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "2786:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4514, + "indexExpression": { + "argumentTypes": null, + "id": 4513, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "2797:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2786:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4515, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4411, + "src": "2786:32:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2773:45:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4517, + "nodeType": "ExpressionStatement", + "src": "2773:45:9" + }, + { + "assignments": [ + 4519 + ], + "declarations": [ + { + "constant": false, + "id": 4519, + "name": "tokenInstance", + "nodeType": "VariableDeclaration", + "scope": 4542, + "src": "2828:28:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + }, + "typeName": { + "contractScope": null, + "id": 4518, + "name": "IERC20Template", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5658, + "src": "2828:14:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4523, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4521, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "2874:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4520, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "2859:14:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 4522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2859:25:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2828:56:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4524, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4472, + "src": "2894:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4528, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7165, + "src": "2936:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "id": 4527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2928:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2928:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 4525, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4519, + "src": "2904:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5640, + "src": "2904:23:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 4530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2904:38:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2894:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4532, + "nodeType": "ExpressionStatement", + "src": "2894:48:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4533, + "name": "isTrueMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4466, + "src": "2952:12:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4537, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7165, + "src": "2998:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "id": 4536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2990:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2990:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 4534, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4519, + "src": "2967:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isMinter", + "nodeType": "MemberAccess", + "referencedDeclaration": 5608, + "src": "2967:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 4539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2967:37:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2952:52:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4541, + "nodeType": "ExpressionStatement", + "src": "2952:52:9" + } + ] + }, + "documentation": "@dev status\n Get information about a datatoken dispenser\n@param datatoken refers to datatoken address.\n@return active - if the dispenser is active for this datatoken\n@return owner - owner of this dispenser\n@return minterApproved - if the dispenser is a minter for this datatoken\n@return isTrueMinter - check the datatoken contract if this contract is really a minter\n@return maxTokens - max tokens to dispense\n@return maxBalance - max balance of requester. If the balance is higher, the dispense is rejected\n@return balance - internal balance of the contract (if any)", + "id": 4543, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "status", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4458, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4457, + "name": "datatoken", + "nodeType": "VariableDeclaration", + "scope": 4543, + "src": "2271:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4456, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2271:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2270:19:9" + }, + "returnParameters": { + "id": 4473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4460, + "name": "active", + "nodeType": "VariableDeclaration", + "scope": 4543, + "src": "2322:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4459, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2322:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4462, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 4543, + "src": "2334:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2334:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4464, + "name": "minterApproved", + "nodeType": "VariableDeclaration", + "scope": 4543, + "src": "2348:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4463, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2348:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4466, + "name": "isTrueMinter", + "nodeType": "VariableDeclaration", + "scope": 4543, + "src": "2373:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4465, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2373:4:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4468, + "name": "maxTokens", + "nodeType": "VariableDeclaration", + "scope": 4543, + "src": "2391:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2391:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4470, + "name": "maxBalance", + "nodeType": "VariableDeclaration", + "scope": 4543, + "src": "2409:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2409:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4472, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 4543, + "src": "2429:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2429:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2321:124:9" + }, + "scope": 4986, + "src": "2255:756:9", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4642, + "nodeType": "Block", + "src": "3338:812:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4553, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4545, + "src": "3369:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3390:1:9", + "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": 4554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3382:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3382:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3369:23:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "id": 4558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3406:32:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + }, + "value": "Invalid token contract address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "id": 4552, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "3348:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3348:100:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4560, + "nodeType": "ExpressionStatement", + "src": "3348:100:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4562, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "3479:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4564, + "indexExpression": { + "argumentTypes": null, + "id": 4563, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4545, + "src": "3490:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3479:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4565, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 4405, + "src": "3479:27:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4567, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3518:1:9", + "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": 4566, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3510:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4568, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3510:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3479:41:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4570, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "3524:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4572, + "indexExpression": { + "argumentTypes": null, + "id": 4571, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4545, + "src": "3535:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3524:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4573, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 4405, + "src": "3524:27:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4574, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3555:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3555:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3524:41:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3479:86:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e20616c726561647920616374697661746564", + "id": 4578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3579:29:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_802727ce41e9ef5c4e956e0703828b375cc164569f34790696628fad0573768e", + "typeString": "literal_string \"DataToken already activated\"" + }, + "value": "DataToken already activated" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_802727ce41e9ef5c4e956e0703828b375cc164569f34790696628fad0573768e", + "typeString": "literal_string \"DataToken already activated\"" + } + ], + "id": 4561, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "3458:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3458:160:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4580, + "nodeType": "ExpressionStatement", + "src": "3458:160:9" + }, + { + "assignments": [ + 4582 + ], + "declarations": [ + { + "constant": false, + "id": 4582, + "name": "tokenInstance", + "nodeType": "VariableDeclaration", + "scope": 4642, + "src": "3628:28:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + }, + "typeName": { + "contractScope": null, + "id": 4581, + "name": "IERC20Template", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5658, + "src": "3628:14:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4586, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4584, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4545, + "src": "3674:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4583, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "3659:14:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 4585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3659:25:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3628:56:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4590, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3738:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3738:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 4588, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4582, + "src": "3715:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isMinter", + "nodeType": "MemberAccess", + "referencedDeclaration": 5608, + "src": "3715:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 4592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3715:34:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "53656e64657220646f6573206e6f74206861766520746865206d696e74657220726f6c65", + "id": 4593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3763:38:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9ee47ffa5d7be08bbcf8e567aa23ba3d67c2f7b7ccc9551956c2443209e5c72", + "typeString": "literal_string \"Sender does not have the minter role\"" + }, + "value": "Sender does not have the minter role" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9ee47ffa5d7be08bbcf8e567aa23ba3d67c2f7b7ccc9551956c2443209e5c72", + "typeString": "literal_string \"Sender does not have the minter role\"" + } + ], + "id": 4587, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "3694:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3694:117:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4595, + "nodeType": "ExpressionStatement", + "src": "3694:117:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4596, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "3821:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4598, + "indexExpression": { + "argumentTypes": null, + "id": 4597, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4545, + "src": "3832:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3821:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "active", + "nodeType": "MemberAccess", + "referencedDeclaration": 4403, + "src": "3821:28:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3852:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3821:35:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4602, + "nodeType": "ExpressionStatement", + "src": "3821:35:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4603, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "3866:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4605, + "indexExpression": { + "argumentTypes": null, + "id": 4604, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4545, + "src": "3877:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3866:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4606, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 4405, + "src": "3866:27:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4607, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3896:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3896:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3866:40:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4610, + "nodeType": "ExpressionStatement", + "src": "3866:40:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4611, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "3916:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4613, + "indexExpression": { + "argumentTypes": null, + "id": 4612, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4545, + "src": "3927:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3916:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4614, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "maxTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 4409, + "src": "3916:31:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4615, + "name": "maxTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4547, + "src": "3950:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3916:43:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4617, + "nodeType": "ExpressionStatement", + "src": "3916:43:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4618, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "3969:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4620, + "indexExpression": { + "argumentTypes": null, + "id": 4619, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4545, + "src": "3980:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3969:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "maxBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4411, + "src": "3969:32:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4622, + "name": "maxBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4549, + "src": "4004:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3969:45:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4624, + "nodeType": "ExpressionStatement", + "src": "3969:45:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4625, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "4024:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4627, + "indexExpression": { + "argumentTypes": null, + "id": 4626, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4545, + "src": "4035:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4024:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minterApproved", + "nodeType": "MemberAccess", + "referencedDeclaration": 4407, + "src": "4024:36:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 4629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4063:5:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "4024:44:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4631, + "nodeType": "ExpressionStatement", + "src": "4024:44:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4635, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4545, + "src": "4098:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4632, + "name": "datatokensList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4419, + "src": "4078:14:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 4634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4078:19:9", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 4636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4078:30:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4637, + "nodeType": "ExpressionStatement", + "src": "4078:30:9" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4639, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4545, + "src": "4133:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4638, + "name": "Activated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4427, + "src": "4123:9:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4123:20:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4641, + "nodeType": "EmitStatement", + "src": "4118:25:9" + } + ] + }, + "documentation": "@dev activate\n Activate a new dispenser\n@param datatoken refers to datatoken address.\n@param maxTokens - max tokens to dispense\n@param maxBalance - max balance of requester.", + "id": 4643, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "activate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4545, + "name": "datatoken", + "nodeType": "VariableDeclaration", + "scope": 4643, + "src": "3264:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4544, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3264:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4547, + "name": "maxTokens", + "nodeType": "VariableDeclaration", + "scope": 4643, + "src": "3282:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4546, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3282:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4549, + "name": "maxBalance", + "nodeType": "VariableDeclaration", + "scope": 4643, + "src": "3301:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4548, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3301:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3263:57:9" + }, + "returnParameters": { + "id": 4551, + "nodeType": "ParameterList", + "parameters": [], + "src": "3338:0:9" + }, + "scope": 4986, + "src": "3246:904:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4679, + "nodeType": "Block", + "src": "4340:325:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4649, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4645, + "src": "4371:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4392:1:9", + "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": 4650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4384:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4384:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4371:23:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "id": 4654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4408:32:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + }, + "value": "Invalid token contract address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "id": 4648, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "4350:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4350:100:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4656, + "nodeType": "ExpressionStatement", + "src": "4350:100:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4658, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "4481:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4660, + "indexExpression": { + "argumentTypes": null, + "id": 4659, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4645, + "src": "4492:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4481:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4661, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 4405, + "src": "4481:27:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4662, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "4512:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4512:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4481:41:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e20616c726561647920616374697661746564", + "id": 4665, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4536:29:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_802727ce41e9ef5c4e956e0703828b375cc164569f34790696628fad0573768e", + "typeString": "literal_string \"DataToken already activated\"" + }, + "value": "DataToken already activated" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_802727ce41e9ef5c4e956e0703828b375cc164569f34790696628fad0573768e", + "typeString": "literal_string \"DataToken already activated\"" + } + ], + "id": 4657, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "4460:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4460:115:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4667, + "nodeType": "ExpressionStatement", + "src": "4460:115:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4668, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "4585:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4670, + "indexExpression": { + "argumentTypes": null, + "id": 4669, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4645, + "src": "4596:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4585:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4671, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "active", + "nodeType": "MemberAccess", + "referencedDeclaration": 4403, + "src": "4585:28:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 4672, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4616:5:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "4585:36:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4674, + "nodeType": "ExpressionStatement", + "src": "4585:36:9" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4676, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4645, + "src": "4648:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4675, + "name": "Deactivated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4431, + "src": "4636:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4636:22:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4678, + "nodeType": "EmitStatement", + "src": "4631:27:9" + } + ] + }, + "documentation": "@dev deactivate\n Deactivate an existing dispenser\n@param datatoken refers to datatoken address.", + "id": 4680, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deactivate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4645, + "name": "datatoken", + "nodeType": "VariableDeclaration", + "scope": 4680, + "src": "4313:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4644, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4313:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4312:19:9" + }, + "returnParameters": { + "id": 4647, + "nodeType": "ParameterList", + "parameters": [], + "src": "4340:0:9" + }, + "scope": 4986, + "src": "4293:372:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4726, + "nodeType": "Block", + "src": "4935:439:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4686, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "4966:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4688, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4987:1:9", + "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": 4687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4979:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4689, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4979:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4966:23:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "id": 4691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5003:32:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + }, + "value": "Invalid token contract address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "id": 4685, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "4945:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4945:100:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4693, + "nodeType": "ExpressionStatement", + "src": "4945:100:9" + }, + { + "assignments": [ + 4695 + ], + "declarations": [ + { + "constant": false, + "id": 4695, + "name": "tokenInstance", + "nodeType": "VariableDeclaration", + "scope": 4726, + "src": "5055:28:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + }, + "typeName": { + "contractScope": null, + "id": 4694, + "name": "IERC20Template", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5658, + "src": "5055:14:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4699, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4697, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "5101:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4696, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "5086:14:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 4698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5086:25:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5055:56:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 4700, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4695, + "src": "5121:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approveMinter", + "nodeType": "MemberAccess", + "referencedDeclaration": 5657, + "src": "5121:27:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 4703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5121:29:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4704, + "nodeType": "ExpressionStatement", + "src": "5121:29:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4709, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7165, + "src": "5212:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "id": 4708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5204:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5204:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 4706, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4695, + "src": "5181:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isMinter", + "nodeType": "MemberAccess", + "referencedDeclaration": 5608, + "src": "5181:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 4711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5181:37:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552523a2043616e6e6f7420616363657074206d696e74657220726f6c65", + "id": 4712, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5232:32:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0cfbec393383e0fce86a0bb31aa847b6ed694cf44c618a4606d1f2f2834c3497", + "typeString": "literal_string \"ERR: Cannot accept minter role\"" + }, + "value": "ERR: Cannot accept minter role" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0cfbec393383e0fce86a0bb31aa847b6ed694cf44c618a4606d1f2f2834c3497", + "typeString": "literal_string \"ERR: Cannot accept minter role\"" + } + ], + "id": 4705, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "5160:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5160:114:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4714, + "nodeType": "ExpressionStatement", + "src": "5160:114:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4715, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "5284:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4717, + "indexExpression": { + "argumentTypes": null, + "id": 4716, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "5295:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5284:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4718, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minterApproved", + "nodeType": "MemberAccess", + "referencedDeclaration": 4407, + "src": "5284:36:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4719, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5323:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5284:43:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4721, + "nodeType": "ExpressionStatement", + "src": "5284:43:9" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4723, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "5357:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4722, + "name": "AcceptedMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4435, + "src": "5342:14:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5342:25:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4725, + "nodeType": "EmitStatement", + "src": "5337:30:9" + } + ] + }, + "documentation": "@dev acceptMinter\n Accepts Minter role (existing datatoken minter has to call datatoken.proposeMinter(dispenserAddress) first)\n@param datatoken refers to datatoken address.", + "id": 4727, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptMinter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4683, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4682, + "name": "datatoken", + "nodeType": "VariableDeclaration", + "scope": 4727, + "src": "4908:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4681, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4908:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4907:19:9" + }, + "returnParameters": { + "id": 4684, + "nodeType": "ParameterList", + "parameters": [], + "src": "4935:0:9" + }, + "scope": 4986, + "src": "4886:488:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4788, + "nodeType": "Block", + "src": "5642:591:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4733, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4729, + "src": "5673:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5694:1:9", + "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": 4734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5686:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4736, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5686:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5673:23:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "id": 4738, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5710:32:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + }, + "value": "Invalid token contract address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "id": 4732, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "5652:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5652:100:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4740, + "nodeType": "ExpressionStatement", + "src": "5652:100:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4742, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "5783:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4744, + "indexExpression": { + "argumentTypes": null, + "id": 4743, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4729, + "src": "5794:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5783:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4745, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 4405, + "src": "5783:27:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4746, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "5814:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5814:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5783:41:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44617461546f6b656e20616c726561647920616374697661746564", + "id": 4749, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5838:29:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_802727ce41e9ef5c4e956e0703828b375cc164569f34790696628fad0573768e", + "typeString": "literal_string \"DataToken already activated\"" + }, + "value": "DataToken already activated" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_802727ce41e9ef5c4e956e0703828b375cc164569f34790696628fad0573768e", + "typeString": "literal_string \"DataToken already activated\"" + } + ], + "id": 4741, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "5762:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5762:115:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4751, + "nodeType": "ExpressionStatement", + "src": "5762:115:9" + }, + { + "assignments": [ + 4753 + ], + "declarations": [ + { + "constant": false, + "id": 4753, + "name": "tokenInstance", + "nodeType": "VariableDeclaration", + "scope": 4788, + "src": "5887:28:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + }, + "typeName": { + "contractScope": null, + "id": 4752, + "name": "IERC20Template", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5658, + "src": "5887:14:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4757, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4755, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4729, + "src": "5933:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4754, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "5918:14:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 4756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5918:25:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5887:56:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4762, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7165, + "src": "6005:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "id": 4761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5997:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5997:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 4759, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4753, + "src": "5974:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isMinter", + "nodeType": "MemberAccess", + "referencedDeclaration": 5608, + "src": "5974:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 4764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5974:37:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552523a2043616e6e6f7420616363657074206d696e74657220726f6c65", + "id": 4765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6025:32:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0cfbec393383e0fce86a0bb31aa847b6ed694cf44c618a4606d1f2f2834c3497", + "typeString": "literal_string \"ERR: Cannot accept minter role\"" + }, + "value": "ERR: Cannot accept minter role" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0cfbec393383e0fce86a0bb31aa847b6ed694cf44c618a4606d1f2f2834c3497", + "typeString": "literal_string \"ERR: Cannot accept minter role\"" + } + ], + "id": 4758, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "5953:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5953:114:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4767, + "nodeType": "ExpressionStatement", + "src": "5953:114:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4771, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "6105:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4773, + "indexExpression": { + "argumentTypes": null, + "id": 4772, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4729, + "src": "6116:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6105:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4774, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 4405, + "src": "6105:27:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 4768, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4753, + "src": "6077:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "proposeMinter", + "nodeType": "MemberAccess", + "referencedDeclaration": 5654, + "src": "6077:27:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 4775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6077:56:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4776, + "nodeType": "ExpressionStatement", + "src": "6077:56:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4777, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "6143:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4779, + "indexExpression": { + "argumentTypes": null, + "id": 4778, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4729, + "src": "6154:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6143:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4780, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minterApproved", + "nodeType": "MemberAccess", + "referencedDeclaration": 4407, + "src": "6143:36:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 4781, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6182:5:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "6143:44:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4783, + "nodeType": "ExpressionStatement", + "src": "6143:44:9" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4785, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4729, + "src": "6216:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4784, + "name": "RemovedMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4439, + "src": "6202:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6202:24:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4787, + "nodeType": "EmitStatement", + "src": "6197:29:9" + } + ] + }, + "documentation": "@dev removeMinter\n Removes Minter role and proposes the owner as a new minter (the owner has to call approveMinter after this)\n@param datatoken refers to datatoken address.", + "id": 4789, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeMinter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4730, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4729, + "name": "datatoken", + "nodeType": "VariableDeclaration", + "scope": 4789, + "src": "5615:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4728, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5615:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5614:19:9" + }, + "returnParameters": { + "id": 4731, + "nodeType": "ParameterList", + "parameters": [], + "src": "5642:0:9" + }, + "scope": 4986, + "src": "5593:640:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4919, + "nodeType": "Block", + "src": "6613:1235:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4797, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4791, + "src": "6644:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4799, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6665:1:9", + "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": 4798, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6657:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6657:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6644:23:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "id": 4802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6681:32:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + }, + "value": "Invalid token contract address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "id": 4796, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "6623:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6623:100:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4804, + "nodeType": "ExpressionStatement", + "src": "6623:100:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4806, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "6754:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4808, + "indexExpression": { + "argumentTypes": null, + "id": 4807, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4791, + "src": "6765:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6754:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4809, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "active", + "nodeType": "MemberAccess", + "referencedDeclaration": 4403, + "src": "6754:28:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 4810, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6786:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "6754:36:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "44697370656e736572206e6f7420616374697665", + "id": 4812, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6804:22:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ad22fc5ad027c7c8b01eef1a92f40801532cfc3acc4dec7288322ef61342b858", + "typeString": "literal_string \"Dispenser not active\"" + }, + "value": "Dispenser not active" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ad22fc5ad027c7c8b01eef1a92f40801532cfc3acc4dec7288322ef61342b858", + "typeString": "literal_string \"Dispenser not active\"" + } + ], + "id": 4805, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "6733:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6733:103:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4814, + "nodeType": "ExpressionStatement", + "src": "6733:103:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4816, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4793, + "src": "6867:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 4817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6876:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6867:10:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e76616c6964207a65726f20616d6f756e74", + "id": 4819, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6891:21:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3e58cd0dd15e69c386ad46aeaec0637af7b133b0b08192a22e891c7d736d3ac8", + "typeString": "literal_string \"Invalid zero amount\"" + }, + "value": "Invalid zero amount" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3e58cd0dd15e69c386ad46aeaec0637af7b133b0b08192a22e891c7d736d3ac8", + "typeString": "literal_string \"Invalid zero amount\"" + } + ], + "id": 4815, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "6846:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6846:76:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4821, + "nodeType": "ExpressionStatement", + "src": "6846:76:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4823, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "6953:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4825, + "indexExpression": { + "argumentTypes": null, + "id": 4824, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4791, + "src": "6964:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6953:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 4409, + "src": "6953:31:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4827, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4793, + "src": "6988:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6953:41:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "416d6f756e7420746f6f2068696768", + "id": 4829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7008:17:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7353a6bd8628dd713e866f78b282b0b6793f273d47e76330330b9a5a159c17ef", + "typeString": "literal_string \"Amount too high\"" + }, + "value": "Amount too high" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7353a6bd8628dd713e866f78b282b0b6793f273d47e76330330b9a5a159c17ef", + "typeString": "literal_string \"Amount too high\"" + } + ], + "id": 4822, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "6932:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6932:103:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4831, + "nodeType": "ExpressionStatement", + "src": "6932:103:9" + }, + { + "assignments": [ + 4833 + ], + "declarations": [ + { + "constant": false, + "id": 4833, + "name": "tokenInstance", + "nodeType": "VariableDeclaration", + "scope": 4919, + "src": "7045:28:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + }, + "typeName": { + "contractScope": null, + "id": 4832, + "name": "IERC20Template", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5658, + "src": "7045:14:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4837, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4835, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4791, + "src": "7091:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4834, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "7076:14:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 4836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7076:25:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7045:56:9" + }, + { + "assignments": [ + 4839 + ], + "declarations": [ + { + "constant": false, + "id": 4839, + "name": "callerBalance", + "nodeType": "VariableDeclaration", + "scope": 4919, + "src": "7111:21:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4838, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7111:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4845, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4842, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "7159:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7159:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 4840, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4833, + "src": "7135:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5640, + "src": "7135:23:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 4844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7135:35:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7111:59:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4847, + "name": "callerBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "7201:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4848, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "7215:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4850, + "indexExpression": { + "argumentTypes": null, + "id": 4849, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4791, + "src": "7226:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7215:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4851, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4411, + "src": "7215:32:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7201:46:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "43616c6c65722062616c616e636520746f6f2068696768", + "id": 4853, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7261:25:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_036daf442604eb31ad74da9a69fe5dbd62aabfebb2991e7c7d29a1f2fe39919a", + "typeString": "literal_string \"Caller balance too high\"" + }, + "value": "Caller balance too high" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_036daf442604eb31ad74da9a69fe5dbd62aabfebb2991e7c7d29a1f2fe39919a", + "typeString": "literal_string \"Caller balance too high\"" + } + ], + "id": 4846, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "7180:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7180:116:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4855, + "nodeType": "ExpressionStatement", + "src": "7180:116:9" + }, + { + "assignments": [ + 4857 + ], + "declarations": [ + { + "constant": false, + "id": 4857, + "name": "ourBalance", + "nodeType": "VariableDeclaration", + "scope": 4919, + "src": "7306:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4856, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7306:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4864, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4861, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7165, + "src": "7359:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "id": 4860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7351:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7351:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 4858, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4833, + "src": "7327:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5640, + "src": "7327:23:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 4863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7327:38:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7306:59:9" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4865, + "name": "ourBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4857, + "src": "7378:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 4866, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4793, + "src": "7389:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7378:17:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4871, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7165, + "src": "7430:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "id": 4870, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7422:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7422:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 4868, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4833, + "src": "7399:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isMinter", + "nodeType": "MemberAccess", + "referencedDeclaration": 5608, + "src": "7399:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7399:37:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7378:58:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 4896, + "nodeType": "IfStatement", + "src": "7375:261:9", + "trueBody": { + "id": 4895, + "nodeType": "Block", + "src": "7437:199:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4879, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7165, + "src": "7534:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "id": 4878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7526:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7526:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4881, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4793, + "src": "7540:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 4882, + "name": "ourBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4857, + "src": "7549:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7540:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4875, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4833, + "src": "7507:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 5576, + "src": "7507:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 4884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7507:53:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4885, + "nodeType": "ExpressionStatement", + "src": "7507:53:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 4893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4886, + "name": "ourBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4857, + "src": "7574:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4890, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7165, + "src": "7619:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "id": 4889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7611:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7611:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 4887, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4833, + "src": "7587:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5640, + "src": "7587:23:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 4892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7587:38:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7574:51:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4894, + "nodeType": "ExpressionStatement", + "src": "7574:51:9" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4898, + "name": "ourBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4857, + "src": "7666:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4899, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4793, + "src": "7678:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7666:18:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4e6f7420656e6f756768207265736572766573", + "id": 4901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7698:21:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6b90a513fa74c2a8dc35fe1591468e10fc67c299dc0f325ea992d29212514d24", + "typeString": "literal_string \"Not enough reserves\"" + }, + "value": "Not enough reserves" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6b90a513fa74c2a8dc35fe1591468e10fc67c299dc0f325ea992d29212514d24", + "typeString": "literal_string \"Not enough reserves\"" + } + ], + "id": 4897, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "7645:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7645:84:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4903, + "nodeType": "ExpressionStatement", + "src": "7645:84:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4907, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "7762:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7762:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4909, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4793, + "src": "7773:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4904, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4833, + "src": "7739:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5649, + "src": "7739:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 4910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7739:41:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4911, + "nodeType": "ExpressionStatement", + "src": "7739:41:9" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4913, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4791, + "src": "7811:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4914, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "7822:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7822:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4916, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4793, + "src": "7834:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4912, + "name": "TokensDispensed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4447, + "src": "7795:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7795:46:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4918, + "nodeType": "EmitStatement", + "src": "7790:51:9" + } + ] + }, + "documentation": "@dev dispense\n Dispense datatokens to caller. The dispenser must be active, hold enough DT (or be able to mint more) and respect maxTokens/maxBalance requirements\n@param datatoken refers to datatoken address.\n@param datatoken amount of datatokens required.", + "id": 4920, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "dispense", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4791, + "name": "datatoken", + "nodeType": "VariableDeclaration", + "scope": 4920, + "src": "6562:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4790, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6562:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4793, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 4920, + "src": "6581:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4792, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6581:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6561:35:9" + }, + "returnParameters": { + "id": 4795, + "nodeType": "ParameterList", + "parameters": [], + "src": "6613:0:9" + }, + "scope": 4986, + "src": "6544:1304:9", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4980, + "nodeType": "Block", + "src": "8076:527:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4926, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4922, + "src": "8107:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8128:1:9", + "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": 4927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8120:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8120:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "8107:23:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "id": 4931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8144:32:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + }, + "value": "Invalid token contract address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "id": 4925, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "8086:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8086:100:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4933, + "nodeType": "ExpressionStatement", + "src": "8086:100:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4935, + "name": "datatokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4416, + "src": "8217:10:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DataToken_$4412_storage_$", + "typeString": "mapping(address => struct Dispenser.DataToken storage ref)" + } + }, + "id": 4937, + "indexExpression": { + "argumentTypes": null, + "id": 4936, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4922, + "src": "8228:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8217:21:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DataToken_$4412_storage", + "typeString": "struct Dispenser.DataToken storage ref" + } + }, + "id": 4938, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 4405, + "src": "8217:27:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4939, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "8248:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8248:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "8217:41:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e76616c6964206f776e6572", + "id": 4942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8272:15:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae", + "typeString": "literal_string \"Invalid owner\"" + }, + "value": "Invalid owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae", + "typeString": "literal_string \"Invalid owner\"" + } + ], + "id": 4934, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "8196:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8196:101:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4944, + "nodeType": "ExpressionStatement", + "src": "8196:101:9" + }, + { + "assignments": [ + 4946 + ], + "declarations": [ + { + "constant": false, + "id": 4946, + "name": "tokenInstance", + "nodeType": "VariableDeclaration", + "scope": 4980, + "src": "8307:28:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + }, + "typeName": { + "contractScope": null, + "id": 4945, + "name": "IERC20Template", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5658, + "src": "8307:14:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4950, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4948, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4922, + "src": "8353:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4947, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "8338:14:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 4949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8338:25:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8307:56:9" + }, + { + "assignments": [ + 4952 + ], + "declarations": [ + { + "constant": false, + "id": 4952, + "name": "ourBalance", + "nodeType": "VariableDeclaration", + "scope": 4980, + "src": "8373:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4951, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8373:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4959, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4956, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7165, + "src": "8426:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "id": 4955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8418:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8418:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 4953, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "8394:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5640, + "src": "8394:23:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 4958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8394:38:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8373:59:9" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4960, + "name": "ourBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4952, + "src": "8445:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 4961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8456:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8445:12:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 4979, + "nodeType": "IfStatement", + "src": "8442:155:9", + "trueBody": { + "id": 4978, + "nodeType": "Block", + "src": "8458:139:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4966, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "8495:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8495:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4968, + "name": "ourBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4952, + "src": "8506:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4963, + "name": "tokenInstance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "8472:13:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5649, + "src": "8472:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 4969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8472:45:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4970, + "nodeType": "ExpressionStatement", + "src": "8472:45:9" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4972, + "name": "datatoken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4922, + "src": "8552:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4973, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "8563:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8563:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4975, + "name": "ourBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4952, + "src": "8575:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4971, + "name": "OwnerWithdrawed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4455, + "src": "8536:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8536:50:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4977, + "nodeType": "EmitStatement", + "src": "8531:55:9" + } + ] + } + } + ] + }, + "documentation": "@dev ownerWithdraw\n Allow owner to withdraw all datatokens in this dispenser balance\n@param datatoken refers to datatoken address.", + "id": 4981, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ownerWithdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4922, + "name": "datatoken", + "nodeType": "VariableDeclaration", + "scope": 4981, + "src": "8049:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4921, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8049:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8048:19:9" + }, + "returnParameters": { + "id": 4924, + "nodeType": "ParameterList", + "parameters": [], + "src": "8076:0:9" + }, + "scope": 4986, + "src": "8026:577:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4984, + "nodeType": "Block", + "src": "8636:45:9", + "statements": [] + }, + "documentation": null, + "id": 4985, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4982, + "nodeType": "ParameterList", + "parameters": [], + "src": "8616:2:9" + }, + "returnParameters": { + "id": 4983, + "nodeType": "ParameterList", + "parameters": [], + "src": "8636:0:9" + }, + "scope": 4986, + "src": "8608:73:9", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 4987, + "src": "231:8452:9" + } + ], + "src": "0:8683:9" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/dispenser/Dispenser.sol", + "exportedSymbols": { + "Dispenser": [ + 4986 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 4400, + "name": "PragmaDirective", + "src": "0:22:9" + }, + { + "attributes": { + "SourceUnit": 5659, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "../interfaces/IERC20Template.sol", + "scope": 4987, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 4401, + "name": "ImportDirective", + "src": "185:42:9" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 4986 + ], + "name": "Dispenser", + "scope": 4987 + }, + "children": [ + { + "attributes": { + "canonicalName": "Dispenser.DataToken", + "name": "DataToken", + "scope": 4986, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "active", + "scope": 4412, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4402, + "name": "ElementaryTypeName", + "src": "283:4:9" + } + ], + "id": 4403, + "name": "VariableDeclaration", + "src": "283:11:9" + }, + { + "attributes": { + "constant": false, + "name": "owner", + "scope": 4412, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4404, + "name": "ElementaryTypeName", + "src": "354:7:9" + } + ], + "id": 4405, + "name": "VariableDeclaration", + "src": "354:13:9" + }, + { + "attributes": { + "constant": false, + "name": "minterApproved", + "scope": 4412, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4406, + "name": "ElementaryTypeName", + "src": "404:4:9" + } + ], + "id": 4407, + "name": "VariableDeclaration", + "src": "404:19:9" + }, + { + "attributes": { + "constant": false, + "name": "maxTokens", + "scope": 4412, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4408, + "name": "ElementaryTypeName", + "src": "484:7:9" + } + ], + "id": 4409, + "name": "VariableDeclaration", + "src": "484:17:9" + }, + { + "attributes": { + "constant": false, + "name": "maxBalance", + "scope": 4412, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4410, + "name": "ElementaryTypeName", + "src": "537:7:9" + } + ], + "id": 4411, + "name": "VariableDeclaration", + "src": "537:18:9" + } + ], + "id": 4412, + "name": "StructDefinition", + "src": "256:397:9" + }, + { + "attributes": { + "constant": false, + "name": "datatokens", + "scope": 4986, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => struct Dispenser.DataToken)", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => struct Dispenser.DataToken)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 4413, + "name": "ElementaryTypeName", + "src": "666:7:9" + }, + { + "attributes": { + "contractScope": null, + "name": "DataToken", + "referencedDeclaration": 4412, + "type": "struct Dispenser.DataToken" + }, + "id": 4414, + "name": "UserDefinedTypeName", + "src": "677:9:9" + } + ], + "id": 4415, + "name": "Mapping", + "src": "658:29:9" + } + ], + "id": 4416, + "name": "VariableDeclaration", + "src": "658:40:9" + }, + { + "attributes": { + "constant": false, + "name": "datatokensList", + "scope": 4986, + "stateVariable": true, + "storageLocation": "default", + "type": "address[]", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "length": null, + "type": "address[]" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4417, + "name": "ElementaryTypeName", + "src": "704:7:9" + } + ], + "id": 4418, + "name": "ArrayTypeName", + "src": "704:9:9" + } + ], + "id": 4419, + "name": "VariableDeclaration", + "src": "704:31:9" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "modifiers": [ + null + ], + "name": "", + "scope": 4986, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4420, + "name": "ParameterList", + "src": "752:2:9" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4421, + "name": "ParameterList", + "src": "762:0:9" + }, + { + "attributes": { + "statements": [ + null + ] + }, + "children": [], + "id": 4422, + "name": "Block", + "src": "762:2:9" + } + ], + "id": 4423, + "name": "FunctionDefinition", + "src": "741:23:9" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "Activated" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "datatokenAddress", + "scope": 4427, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4424, + "name": "ElementaryTypeName", + "src": "840:7:9" + } + ], + "id": 4425, + "name": "VariableDeclaration", + "src": "840:32:9" + } + ], + "id": 4426, + "name": "ParameterList", + "src": "789:89:9" + } + ], + "id": 4427, + "name": "EventDefinition", + "src": "774:105:9" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "Deactivated" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "datatokenAddress", + "scope": 4431, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4428, + "name": "ElementaryTypeName", + "src": "954:7:9" + } + ], + "id": 4429, + "name": "VariableDeclaration", + "src": "954:32:9" + } + ], + "id": 4430, + "name": "ParameterList", + "src": "902:90:9" + } + ], + "id": 4431, + "name": "EventDefinition", + "src": "885:108:9" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "AcceptedMinter" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "datatokenAddress", + "scope": 4435, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4432, + "name": "ElementaryTypeName", + "src": "1097:7:9" + } + ], + "id": 4433, + "name": "VariableDeclaration", + "src": "1097:32:9" + } + ], + "id": 4434, + "name": "ParameterList", + "src": "1019:116:9" + } + ], + "id": 4435, + "name": "EventDefinition", + "src": "999:137:9" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "RemovedMinter" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "datatokenAddress", + "scope": 4439, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4436, + "name": "ElementaryTypeName", + "src": "1245:7:9" + } + ], + "id": 4437, + "name": "VariableDeclaration", + "src": "1245:32:9" + } + ], + "id": 4438, + "name": "ParameterList", + "src": "1161:122:9" + } + ], + "id": 4439, + "name": "EventDefinition", + "src": "1142:142:9" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "TokensDispensed" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "datatokenAddress", + "scope": 4447, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4440, + "name": "ElementaryTypeName", + "src": "1366:7:9" + } + ], + "id": 4441, + "name": "VariableDeclaration", + "src": "1366:32:9" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "userAddress", + "scope": 4447, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4442, + "name": "ElementaryTypeName", + "src": "1408:7:9" + } + ], + "id": 4443, + "name": "VariableDeclaration", + "src": "1408:27:9" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "amount", + "scope": 4447, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4444, + "name": "ElementaryTypeName", + "src": "1445:7:9" + } + ], + "id": 4445, + "name": "VariableDeclaration", + "src": "1445:14:9" + } + ], + "id": 4446, + "name": "ParameterList", + "src": "1311:154:9" + } + ], + "id": 4447, + "name": "EventDefinition", + "src": "1290:176:9" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "OwnerWithdrawed" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "datatoken", + "scope": 4455, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4448, + "name": "ElementaryTypeName", + "src": "1503:7:9" + } + ], + "id": 4449, + "name": "VariableDeclaration", + "src": "1503:25:9" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "owner", + "scope": 4455, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4450, + "name": "ElementaryTypeName", + "src": "1538:7:9" + } + ], + "id": 4451, + "name": "VariableDeclaration", + "src": "1538:21:9" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "amount", + "scope": 4455, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4452, + "name": "ElementaryTypeName", + "src": "1569:7:9" + } + ], + "id": 4453, + "name": "VariableDeclaration", + "src": "1569:14:9" + } + ], + "id": 4454, + "name": "ParameterList", + "src": "1493:96:9" + } + ], + "id": 4455, + "name": "EventDefinition", + "src": "1472:118:9" + }, + { + "attributes": { + "documentation": "@dev status\n Get information about a datatoken dispenser\n@param datatoken refers to datatoken address.\n@return active - if the dispenser is active for this datatoken\n@return owner - owner of this dispenser\n@return minterApproved - if the dispenser is a minter for this datatoken\n@return isTrueMinter - check the datatoken contract if this contract is really a minter\n@return maxTokens - max tokens to dispense\n@return maxBalance - max balance of requester. If the balance is higher, the dispense is rejected\n@return balance - internal balance of the contract (if any)", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "status", + "scope": 4986, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "datatoken", + "scope": 4543, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4456, + "name": "ElementaryTypeName", + "src": "2271:7:9" + } + ], + "id": 4457, + "name": "VariableDeclaration", + "src": "2271:17:9" + } + ], + "id": 4458, + "name": "ParameterList", + "src": "2270:19:9" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "active", + "scope": 4543, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4459, + "name": "ElementaryTypeName", + "src": "2322:4:9" + } + ], + "id": 4460, + "name": "VariableDeclaration", + "src": "2322:11:9" + }, + { + "attributes": { + "constant": false, + "name": "owner", + "scope": 4543, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4461, + "name": "ElementaryTypeName", + "src": "2334:7:9" + } + ], + "id": 4462, + "name": "VariableDeclaration", + "src": "2334:13:9" + }, + { + "attributes": { + "constant": false, + "name": "minterApproved", + "scope": 4543, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4463, + "name": "ElementaryTypeName", + "src": "2348:4:9" + } + ], + "id": 4464, + "name": "VariableDeclaration", + "src": "2348:19:9" + }, + { + "attributes": { + "constant": false, + "name": "isTrueMinter", + "scope": 4543, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4465, + "name": "ElementaryTypeName", + "src": "2373:4:9" + } + ], + "id": 4466, + "name": "VariableDeclaration", + "src": "2373:17:9" + }, + { + "attributes": { + "constant": false, + "name": "maxTokens", + "scope": 4543, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4467, + "name": "ElementaryTypeName", + "src": "2391:7:9" + } + ], + "id": 4468, + "name": "VariableDeclaration", + "src": "2391:17:9" + }, + { + "attributes": { + "constant": false, + "name": "maxBalance", + "scope": 4543, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4469, + "name": "ElementaryTypeName", + "src": "2409:7:9" + } + ], + "id": 4470, + "name": "VariableDeclaration", + "src": "2409:18:9" + }, + { + "attributes": { + "constant": false, + "name": "balance", + "scope": 4543, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4471, + "name": "ElementaryTypeName", + "src": "2429:7:9" + } + ], + "id": 4472, + "name": "VariableDeclaration", + "src": "2429:15:9" + } + ], + "id": 4473, + "name": "ParameterList", + "src": "2321:124:9" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4474, + "name": "Identifier", + "src": "2455:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4457, + "type": "address", + "value": "datatoken" + }, + "id": 4475, + "name": "Identifier", + "src": "2476:9:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4476, + "name": "ElementaryTypeNameExpression", + "src": "2489:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4477, + "name": "Literal", + "src": "2497:1:9" + } + ], + "id": 4478, + "name": "FunctionCall", + "src": "2489:10:9" + } + ], + "id": 4479, + "name": "BinaryOperation", + "src": "2476:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Invalid token contract address\"", + "value": "Invalid token contract address" + }, + "id": 4480, + "name": "Literal", + "src": "2513:32:9" + } + ], + "id": 4481, + "name": "FunctionCall", + "src": "2455:100:9" + } + ], + "id": 4482, + "name": "ExpressionStatement", + "src": "2455:100:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4460, + "type": "bool", + "value": "active" + }, + "id": 4483, + "name": "Identifier", + "src": "2565:6:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "active", + "referencedDeclaration": 4403, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4484, + "name": "Identifier", + "src": "2574:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4457, + "type": "address", + "value": "datatoken" + }, + "id": 4485, + "name": "Identifier", + "src": "2585:9:9" + } + ], + "id": 4486, + "name": "IndexAccess", + "src": "2574:21:9" + } + ], + "id": 4487, + "name": "MemberAccess", + "src": "2574:28:9" + } + ], + "id": 4488, + "name": "Assignment", + "src": "2565:37:9" + } + ], + "id": 4489, + "name": "ExpressionStatement", + "src": "2565:37:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4462, + "type": "address", + "value": "owner" + }, + "id": 4490, + "name": "Identifier", + "src": "2612:5:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "owner", + "referencedDeclaration": 4405, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4491, + "name": "Identifier", + "src": "2620:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4457, + "type": "address", + "value": "datatoken" + }, + "id": 4492, + "name": "Identifier", + "src": "2631:9:9" + } + ], + "id": 4493, + "name": "IndexAccess", + "src": "2620:21:9" + } + ], + "id": 4494, + "name": "MemberAccess", + "src": "2620:27:9" + } + ], + "id": 4495, + "name": "Assignment", + "src": "2612:35:9" + } + ], + "id": 4496, + "name": "ExpressionStatement", + "src": "2612:35:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4464, + "type": "bool", + "value": "minterApproved" + }, + "id": 4497, + "name": "Identifier", + "src": "2657:14:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "minterApproved", + "referencedDeclaration": 4407, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4498, + "name": "Identifier", + "src": "2674:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4457, + "type": "address", + "value": "datatoken" + }, + "id": 4499, + "name": "Identifier", + "src": "2685:9:9" + } + ], + "id": 4500, + "name": "IndexAccess", + "src": "2674:21:9" + } + ], + "id": 4501, + "name": "MemberAccess", + "src": "2674:36:9" + } + ], + "id": 4502, + "name": "Assignment", + "src": "2657:53:9" + } + ], + "id": 4503, + "name": "ExpressionStatement", + "src": "2657:53:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4468, + "type": "uint256", + "value": "maxTokens" + }, + "id": 4504, + "name": "Identifier", + "src": "2720:9:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "maxTokens", + "referencedDeclaration": 4409, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4505, + "name": "Identifier", + "src": "2732:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4457, + "type": "address", + "value": "datatoken" + }, + "id": 4506, + "name": "Identifier", + "src": "2743:9:9" + } + ], + "id": 4507, + "name": "IndexAccess", + "src": "2732:21:9" + } + ], + "id": 4508, + "name": "MemberAccess", + "src": "2732:31:9" + } + ], + "id": 4509, + "name": "Assignment", + "src": "2720:43:9" + } + ], + "id": 4510, + "name": "ExpressionStatement", + "src": "2720:43:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4470, + "type": "uint256", + "value": "maxBalance" + }, + "id": 4511, + "name": "Identifier", + "src": "2773:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "maxBalance", + "referencedDeclaration": 4411, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4512, + "name": "Identifier", + "src": "2786:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4457, + "type": "address", + "value": "datatoken" + }, + "id": 4513, + "name": "Identifier", + "src": "2797:9:9" + } + ], + "id": 4514, + "name": "IndexAccess", + "src": "2786:21:9" + } + ], + "id": 4515, + "name": "MemberAccess", + "src": "2786:32:9" + } + ], + "id": 4516, + "name": "Assignment", + "src": "2773:45:9" + } + ], + "id": 4517, + "name": "ExpressionStatement", + "src": "2773:45:9" + }, + { + "attributes": { + "assignments": [ + 4519 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenInstance", + "scope": 4542, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IERC20Template", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20Template", + "referencedDeclaration": 5658, + "type": "contract IERC20Template" + }, + "id": 4518, + "name": "UserDefinedTypeName", + "src": "2828:14:9" + } + ], + "id": 4519, + "name": "VariableDeclaration", + "src": "2828:28:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 4520, + "name": "Identifier", + "src": "2859:14:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4457, + "type": "address", + "value": "datatoken" + }, + "id": 4521, + "name": "Identifier", + "src": "2874:9:9" + } + ], + "id": 4522, + "name": "FunctionCall", + "src": "2859:25:9" + } + ], + "id": 4523, + "name": "VariableDeclarationStatement", + "src": "2828:56:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4472, + "type": "uint256", + "value": "balance" + }, + "id": 4524, + "name": "Identifier", + "src": "2894:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 5640, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4519, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4525, + "name": "Identifier", + "src": "2904:13:9" + } + ], + "id": 4526, + "name": "MemberAccess", + "src": "2904:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4527, + "name": "ElementaryTypeNameExpression", + "src": "2928:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7165, + "type": "contract Dispenser", + "value": "this" + }, + "id": 4528, + "name": "Identifier", + "src": "2936:4:9" + } + ], + "id": 4529, + "name": "FunctionCall", + "src": "2928:13:9" + } + ], + "id": 4530, + "name": "FunctionCall", + "src": "2904:38:9" + } + ], + "id": 4531, + "name": "Assignment", + "src": "2894:48:9" + } + ], + "id": 4532, + "name": "ExpressionStatement", + "src": "2894:48:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4466, + "type": "bool", + "value": "isTrueMinter" + }, + "id": 4533, + "name": "Identifier", + "src": "2952:12:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "isMinter", + "referencedDeclaration": 5608, + "type": "function (address) view external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4519, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4534, + "name": "Identifier", + "src": "2967:13:9" + } + ], + "id": 4535, + "name": "MemberAccess", + "src": "2967:22:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4536, + "name": "ElementaryTypeNameExpression", + "src": "2990:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7165, + "type": "contract Dispenser", + "value": "this" + }, + "id": 4537, + "name": "Identifier", + "src": "2998:4:9" + } + ], + "id": 4538, + "name": "FunctionCall", + "src": "2990:13:9" + } + ], + "id": 4539, + "name": "FunctionCall", + "src": "2967:37:9" + } + ], + "id": 4540, + "name": "Assignment", + "src": "2952:52:9" + } + ], + "id": 4541, + "name": "ExpressionStatement", + "src": "2952:52:9" + } + ], + "id": 4542, + "name": "Block", + "src": "2445:566:9" + } + ], + "id": 4543, + "name": "FunctionDefinition", + "src": "2255:756:9" + }, + { + "attributes": { + "documentation": "@dev activate\n Activate a new dispenser\n@param datatoken refers to datatoken address.\n@param maxTokens - max tokens to dispense\n@param maxBalance - max balance of requester.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "activate", + "scope": 4986, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "datatoken", + "scope": 4643, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4544, + "name": "ElementaryTypeName", + "src": "3264:7:9" + } + ], + "id": 4545, + "name": "VariableDeclaration", + "src": "3264:17:9" + }, + { + "attributes": { + "constant": false, + "name": "maxTokens", + "scope": 4643, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4546, + "name": "ElementaryTypeName", + "src": "3282:7:9" + } + ], + "id": 4547, + "name": "VariableDeclaration", + "src": "3282:17:9" + }, + { + "attributes": { + "constant": false, + "name": "maxBalance", + "scope": 4643, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4548, + "name": "ElementaryTypeName", + "src": "3301:7:9" + } + ], + "id": 4549, + "name": "VariableDeclaration", + "src": "3301:18:9" + } + ], + "id": 4550, + "name": "ParameterList", + "src": "3263:57:9" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4551, + "name": "ParameterList", + "src": "3338:0:9" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4552, + "name": "Identifier", + "src": "3348:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4545, + "type": "address", + "value": "datatoken" + }, + "id": 4553, + "name": "Identifier", + "src": "3369:9:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4554, + "name": "ElementaryTypeNameExpression", + "src": "3382:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4555, + "name": "Literal", + "src": "3390:1:9" + } + ], + "id": 4556, + "name": "FunctionCall", + "src": "3382:10:9" + } + ], + "id": 4557, + "name": "BinaryOperation", + "src": "3369:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Invalid token contract address\"", + "value": "Invalid token contract address" + }, + "id": 4558, + "name": "Literal", + "src": "3406:32:9" + } + ], + "id": 4559, + "name": "FunctionCall", + "src": "3348:100:9" + } + ], + "id": 4560, + "name": "ExpressionStatement", + "src": "3348:100:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_802727ce41e9ef5c4e956e0703828b375cc164569f34790696628fad0573768e", + "typeString": "literal_string \"DataToken already activated\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4561, + "name": "Identifier", + "src": "3458:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "||", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "owner", + "referencedDeclaration": 4405, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4562, + "name": "Identifier", + "src": "3479:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4545, + "type": "address", + "value": "datatoken" + }, + "id": 4563, + "name": "Identifier", + "src": "3490:9:9" + } + ], + "id": 4564, + "name": "IndexAccess", + "src": "3479:21:9" + } + ], + "id": 4565, + "name": "MemberAccess", + "src": "3479:27:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4566, + "name": "ElementaryTypeNameExpression", + "src": "3510:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4567, + "name": "Literal", + "src": "3518:1:9" + } + ], + "id": 4568, + "name": "FunctionCall", + "src": "3510:10:9" + } + ], + "id": 4569, + "name": "BinaryOperation", + "src": "3479:41:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "owner", + "referencedDeclaration": 4405, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4570, + "name": "Identifier", + "src": "3524:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4545, + "type": "address", + "value": "datatoken" + }, + "id": 4571, + "name": "Identifier", + "src": "3535:9:9" + } + ], + "id": 4572, + "name": "IndexAccess", + "src": "3524:21:9" + } + ], + "id": 4573, + "name": "MemberAccess", + "src": "3524:27:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4574, + "name": "Identifier", + "src": "3555:3:9" + } + ], + "id": 4575, + "name": "MemberAccess", + "src": "3555:10:9" + } + ], + "id": 4576, + "name": "BinaryOperation", + "src": "3524:41:9" + } + ], + "id": 4577, + "name": "BinaryOperation", + "src": "3479:86:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e20616c726561647920616374697661746564", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataToken already activated\"", + "value": "DataToken already activated" + }, + "id": 4578, + "name": "Literal", + "src": "3579:29:9" + } + ], + "id": 4579, + "name": "FunctionCall", + "src": "3458:160:9" + } + ], + "id": 4580, + "name": "ExpressionStatement", + "src": "3458:160:9" + }, + { + "attributes": { + "assignments": [ + 4582 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenInstance", + "scope": 4642, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IERC20Template", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20Template", + "referencedDeclaration": 5658, + "type": "contract IERC20Template" + }, + "id": 4581, + "name": "UserDefinedTypeName", + "src": "3628:14:9" + } + ], + "id": 4582, + "name": "VariableDeclaration", + "src": "3628:28:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 4583, + "name": "Identifier", + "src": "3659:14:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4545, + "type": "address", + "value": "datatoken" + }, + "id": 4584, + "name": "Identifier", + "src": "3674:9:9" + } + ], + "id": 4585, + "name": "FunctionCall", + "src": "3659:25:9" + } + ], + "id": 4586, + "name": "VariableDeclarationStatement", + "src": "3628:56:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9ee47ffa5d7be08bbcf8e567aa23ba3d67c2f7b7ccc9551956c2443209e5c72", + "typeString": "literal_string \"Sender does not have the minter role\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4587, + "name": "Identifier", + "src": "3694:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "isMinter", + "referencedDeclaration": 5608, + "type": "function (address) view external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4582, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4588, + "name": "Identifier", + "src": "3715:13:9" + } + ], + "id": 4589, + "name": "MemberAccess", + "src": "3715:22:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4590, + "name": "Identifier", + "src": "3738:3:9" + } + ], + "id": 4591, + "name": "MemberAccess", + "src": "3738:10:9" + } + ], + "id": 4592, + "name": "FunctionCall", + "src": "3715:34:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "53656e64657220646f6573206e6f74206861766520746865206d696e74657220726f6c65", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Sender does not have the minter role\"", + "value": "Sender does not have the minter role" + }, + "id": 4593, + "name": "Literal", + "src": "3763:38:9" + } + ], + "id": 4594, + "name": "FunctionCall", + "src": "3694:117:9" + } + ], + "id": 4595, + "name": "ExpressionStatement", + "src": "3694:117:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "active", + "referencedDeclaration": 4403, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4596, + "name": "Identifier", + "src": "3821:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4545, + "type": "address", + "value": "datatoken" + }, + "id": 4597, + "name": "Identifier", + "src": "3832:9:9" + } + ], + "id": 4598, + "name": "IndexAccess", + "src": "3821:21:9" + } + ], + "id": 4599, + "name": "MemberAccess", + "src": "3821:28:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4600, + "name": "Literal", + "src": "3852:4:9" + } + ], + "id": 4601, + "name": "Assignment", + "src": "3821:35:9" + } + ], + "id": 4602, + "name": "ExpressionStatement", + "src": "3821:35:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "owner", + "referencedDeclaration": 4405, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4603, + "name": "Identifier", + "src": "3866:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4545, + "type": "address", + "value": "datatoken" + }, + "id": 4604, + "name": "Identifier", + "src": "3877:9:9" + } + ], + "id": 4605, + "name": "IndexAccess", + "src": "3866:21:9" + } + ], + "id": 4606, + "name": "MemberAccess", + "src": "3866:27:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4607, + "name": "Identifier", + "src": "3896:3:9" + } + ], + "id": 4608, + "name": "MemberAccess", + "src": "3896:10:9" + } + ], + "id": 4609, + "name": "Assignment", + "src": "3866:40:9" + } + ], + "id": 4610, + "name": "ExpressionStatement", + "src": "3866:40:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "maxTokens", + "referencedDeclaration": 4409, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4611, + "name": "Identifier", + "src": "3916:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4545, + "type": "address", + "value": "datatoken" + }, + "id": 4612, + "name": "Identifier", + "src": "3927:9:9" + } + ], + "id": 4613, + "name": "IndexAccess", + "src": "3916:21:9" + } + ], + "id": 4614, + "name": "MemberAccess", + "src": "3916:31:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4547, + "type": "uint256", + "value": "maxTokens" + }, + "id": 4615, + "name": "Identifier", + "src": "3950:9:9" + } + ], + "id": 4616, + "name": "Assignment", + "src": "3916:43:9" + } + ], + "id": 4617, + "name": "ExpressionStatement", + "src": "3916:43:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "maxBalance", + "referencedDeclaration": 4411, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4618, + "name": "Identifier", + "src": "3969:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4545, + "type": "address", + "value": "datatoken" + }, + "id": 4619, + "name": "Identifier", + "src": "3980:9:9" + } + ], + "id": 4620, + "name": "IndexAccess", + "src": "3969:21:9" + } + ], + "id": 4621, + "name": "MemberAccess", + "src": "3969:32:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4549, + "type": "uint256", + "value": "maxBalance" + }, + "id": 4622, + "name": "Identifier", + "src": "4004:10:9" + } + ], + "id": 4623, + "name": "Assignment", + "src": "3969:45:9" + } + ], + "id": 4624, + "name": "ExpressionStatement", + "src": "3969:45:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "minterApproved", + "referencedDeclaration": 4407, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4625, + "name": "Identifier", + "src": "4024:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4545, + "type": "address", + "value": "datatoken" + }, + "id": 4626, + "name": "Identifier", + "src": "4035:9:9" + } + ], + "id": 4627, + "name": "IndexAccess", + "src": "4024:21:9" + } + ], + "id": 4628, + "name": "MemberAccess", + "src": "4024:36:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 4629, + "name": "Literal", + "src": "4063:5:9" + } + ], + "id": 4630, + "name": "Assignment", + "src": "4024:44:9" + } + ], + "id": 4631, + "name": "ExpressionStatement", + "src": "4024:44:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "push", + "referencedDeclaration": null, + "type": "function (address) returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4419, + "type": "address[] storage ref", + "value": "datatokensList" + }, + "id": 4632, + "name": "Identifier", + "src": "4078:14:9" + } + ], + "id": 4634, + "name": "MemberAccess", + "src": "4078:19:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4545, + "type": "address", + "value": "datatoken" + }, + "id": 4635, + "name": "Identifier", + "src": "4098:9:9" + } + ], + "id": 4636, + "name": "FunctionCall", + "src": "4078:30:9" + } + ], + "id": 4637, + "name": "ExpressionStatement", + "src": "4078:30:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4427, + "type": "function (address)", + "value": "Activated" + }, + "id": 4638, + "name": "Identifier", + "src": "4123:9:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4545, + "type": "address", + "value": "datatoken" + }, + "id": 4639, + "name": "Identifier", + "src": "4133:9:9" + } + ], + "id": 4640, + "name": "FunctionCall", + "src": "4123:20:9" + } + ], + "id": 4641, + "name": "EmitStatement", + "src": "4118:25:9" + } + ], + "id": 4642, + "name": "Block", + "src": "3338:812:9" + } + ], + "id": 4643, + "name": "FunctionDefinition", + "src": "3246:904:9" + }, + { + "attributes": { + "documentation": "@dev deactivate\n Deactivate an existing dispenser\n@param datatoken refers to datatoken address.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "deactivate", + "scope": 4986, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "datatoken", + "scope": 4680, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4644, + "name": "ElementaryTypeName", + "src": "4313:7:9" + } + ], + "id": 4645, + "name": "VariableDeclaration", + "src": "4313:17:9" + } + ], + "id": 4646, + "name": "ParameterList", + "src": "4312:19:9" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4647, + "name": "ParameterList", + "src": "4340:0:9" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4648, + "name": "Identifier", + "src": "4350:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4645, + "type": "address", + "value": "datatoken" + }, + "id": 4649, + "name": "Identifier", + "src": "4371:9:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4650, + "name": "ElementaryTypeNameExpression", + "src": "4384:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4651, + "name": "Literal", + "src": "4392:1:9" + } + ], + "id": 4652, + "name": "FunctionCall", + "src": "4384:10:9" + } + ], + "id": 4653, + "name": "BinaryOperation", + "src": "4371:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Invalid token contract address\"", + "value": "Invalid token contract address" + }, + "id": 4654, + "name": "Literal", + "src": "4408:32:9" + } + ], + "id": 4655, + "name": "FunctionCall", + "src": "4350:100:9" + } + ], + "id": 4656, + "name": "ExpressionStatement", + "src": "4350:100:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_802727ce41e9ef5c4e956e0703828b375cc164569f34790696628fad0573768e", + "typeString": "literal_string \"DataToken already activated\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4657, + "name": "Identifier", + "src": "4460:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "owner", + "referencedDeclaration": 4405, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4658, + "name": "Identifier", + "src": "4481:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4645, + "type": "address", + "value": "datatoken" + }, + "id": 4659, + "name": "Identifier", + "src": "4492:9:9" + } + ], + "id": 4660, + "name": "IndexAccess", + "src": "4481:21:9" + } + ], + "id": 4661, + "name": "MemberAccess", + "src": "4481:27:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4662, + "name": "Identifier", + "src": "4512:3:9" + } + ], + "id": 4663, + "name": "MemberAccess", + "src": "4512:10:9" + } + ], + "id": 4664, + "name": "BinaryOperation", + "src": "4481:41:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e20616c726561647920616374697661746564", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataToken already activated\"", + "value": "DataToken already activated" + }, + "id": 4665, + "name": "Literal", + "src": "4536:29:9" + } + ], + "id": 4666, + "name": "FunctionCall", + "src": "4460:115:9" + } + ], + "id": 4667, + "name": "ExpressionStatement", + "src": "4460:115:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "active", + "referencedDeclaration": 4403, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4668, + "name": "Identifier", + "src": "4585:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4645, + "type": "address", + "value": "datatoken" + }, + "id": 4669, + "name": "Identifier", + "src": "4596:9:9" + } + ], + "id": 4670, + "name": "IndexAccess", + "src": "4585:21:9" + } + ], + "id": 4671, + "name": "MemberAccess", + "src": "4585:28:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 4672, + "name": "Literal", + "src": "4616:5:9" + } + ], + "id": 4673, + "name": "Assignment", + "src": "4585:36:9" + } + ], + "id": 4674, + "name": "ExpressionStatement", + "src": "4585:36:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4431, + "type": "function (address)", + "value": "Deactivated" + }, + "id": 4675, + "name": "Identifier", + "src": "4636:11:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4645, + "type": "address", + "value": "datatoken" + }, + "id": 4676, + "name": "Identifier", + "src": "4648:9:9" + } + ], + "id": 4677, + "name": "FunctionCall", + "src": "4636:22:9" + } + ], + "id": 4678, + "name": "EmitStatement", + "src": "4631:27:9" + } + ], + "id": 4679, + "name": "Block", + "src": "4340:325:9" + } + ], + "id": 4680, + "name": "FunctionDefinition", + "src": "4293:372:9" + }, + { + "attributes": { + "documentation": "@dev acceptMinter\n Accepts Minter role (existing datatoken minter has to call datatoken.proposeMinter(dispenserAddress) first)\n@param datatoken refers to datatoken address.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "acceptMinter", + "scope": 4986, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "datatoken", + "scope": 4727, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4681, + "name": "ElementaryTypeName", + "src": "4908:7:9" + } + ], + "id": 4682, + "name": "VariableDeclaration", + "src": "4908:17:9" + } + ], + "id": 4683, + "name": "ParameterList", + "src": "4907:19:9" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4684, + "name": "ParameterList", + "src": "4935:0:9" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4685, + "name": "Identifier", + "src": "4945:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4682, + "type": "address", + "value": "datatoken" + }, + "id": 4686, + "name": "Identifier", + "src": "4966:9:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4687, + "name": "ElementaryTypeNameExpression", + "src": "4979:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4688, + "name": "Literal", + "src": "4987:1:9" + } + ], + "id": 4689, + "name": "FunctionCall", + "src": "4979:10:9" + } + ], + "id": 4690, + "name": "BinaryOperation", + "src": "4966:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Invalid token contract address\"", + "value": "Invalid token contract address" + }, + "id": 4691, + "name": "Literal", + "src": "5003:32:9" + } + ], + "id": 4692, + "name": "FunctionCall", + "src": "4945:100:9" + } + ], + "id": 4693, + "name": "ExpressionStatement", + "src": "4945:100:9" + }, + { + "attributes": { + "assignments": [ + 4695 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenInstance", + "scope": 4726, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IERC20Template", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20Template", + "referencedDeclaration": 5658, + "type": "contract IERC20Template" + }, + "id": 4694, + "name": "UserDefinedTypeName", + "src": "5055:14:9" + } + ], + "id": 4695, + "name": "VariableDeclaration", + "src": "5055:28:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 4696, + "name": "Identifier", + "src": "5086:14:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4682, + "type": "address", + "value": "datatoken" + }, + "id": 4697, + "name": "Identifier", + "src": "5101:9:9" + } + ], + "id": 4698, + "name": "FunctionCall", + "src": "5086:25:9" + } + ], + "id": 4699, + "name": "VariableDeclarationStatement", + "src": "5055:56:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "approveMinter", + "referencedDeclaration": 5657, + "type": "function () external" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4695, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4700, + "name": "Identifier", + "src": "5121:13:9" + } + ], + "id": 4702, + "name": "MemberAccess", + "src": "5121:27:9" + } + ], + "id": 4703, + "name": "FunctionCall", + "src": "5121:29:9" + } + ], + "id": 4704, + "name": "ExpressionStatement", + "src": "5121:29:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0cfbec393383e0fce86a0bb31aa847b6ed694cf44c618a4606d1f2f2834c3497", + "typeString": "literal_string \"ERR: Cannot accept minter role\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4705, + "name": "Identifier", + "src": "5160:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "isMinter", + "referencedDeclaration": 5608, + "type": "function (address) view external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4695, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4706, + "name": "Identifier", + "src": "5181:13:9" + } + ], + "id": 4707, + "name": "MemberAccess", + "src": "5181:22:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4708, + "name": "ElementaryTypeNameExpression", + "src": "5204:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7165, + "type": "contract Dispenser", + "value": "this" + }, + "id": 4709, + "name": "Identifier", + "src": "5212:4:9" + } + ], + "id": 4710, + "name": "FunctionCall", + "src": "5204:13:9" + } + ], + "id": 4711, + "name": "FunctionCall", + "src": "5181:37:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552523a2043616e6e6f7420616363657074206d696e74657220726f6c65", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR: Cannot accept minter role\"", + "value": "ERR: Cannot accept minter role" + }, + "id": 4712, + "name": "Literal", + "src": "5232:32:9" + } + ], + "id": 4713, + "name": "FunctionCall", + "src": "5160:114:9" + } + ], + "id": 4714, + "name": "ExpressionStatement", + "src": "5160:114:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "minterApproved", + "referencedDeclaration": 4407, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4715, + "name": "Identifier", + "src": "5284:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4682, + "type": "address", + "value": "datatoken" + }, + "id": 4716, + "name": "Identifier", + "src": "5295:9:9" + } + ], + "id": 4717, + "name": "IndexAccess", + "src": "5284:21:9" + } + ], + "id": 4718, + "name": "MemberAccess", + "src": "5284:36:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4719, + "name": "Literal", + "src": "5323:4:9" + } + ], + "id": 4720, + "name": "Assignment", + "src": "5284:43:9" + } + ], + "id": 4721, + "name": "ExpressionStatement", + "src": "5284:43:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4435, + "type": "function (address)", + "value": "AcceptedMinter" + }, + "id": 4722, + "name": "Identifier", + "src": "5342:14:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4682, + "type": "address", + "value": "datatoken" + }, + "id": 4723, + "name": "Identifier", + "src": "5357:9:9" + } + ], + "id": 4724, + "name": "FunctionCall", + "src": "5342:25:9" + } + ], + "id": 4725, + "name": "EmitStatement", + "src": "5337:30:9" + } + ], + "id": 4726, + "name": "Block", + "src": "4935:439:9" + } + ], + "id": 4727, + "name": "FunctionDefinition", + "src": "4886:488:9" + }, + { + "attributes": { + "documentation": "@dev removeMinter\n Removes Minter role and proposes the owner as a new minter (the owner has to call approveMinter after this)\n@param datatoken refers to datatoken address.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "removeMinter", + "scope": 4986, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "datatoken", + "scope": 4789, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4728, + "name": "ElementaryTypeName", + "src": "5615:7:9" + } + ], + "id": 4729, + "name": "VariableDeclaration", + "src": "5615:17:9" + } + ], + "id": 4730, + "name": "ParameterList", + "src": "5614:19:9" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4731, + "name": "ParameterList", + "src": "5642:0:9" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4732, + "name": "Identifier", + "src": "5652:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4729, + "type": "address", + "value": "datatoken" + }, + "id": 4733, + "name": "Identifier", + "src": "5673:9:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4734, + "name": "ElementaryTypeNameExpression", + "src": "5686:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4735, + "name": "Literal", + "src": "5694:1:9" + } + ], + "id": 4736, + "name": "FunctionCall", + "src": "5686:10:9" + } + ], + "id": 4737, + "name": "BinaryOperation", + "src": "5673:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Invalid token contract address\"", + "value": "Invalid token contract address" + }, + "id": 4738, + "name": "Literal", + "src": "5710:32:9" + } + ], + "id": 4739, + "name": "FunctionCall", + "src": "5652:100:9" + } + ], + "id": 4740, + "name": "ExpressionStatement", + "src": "5652:100:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_802727ce41e9ef5c4e956e0703828b375cc164569f34790696628fad0573768e", + "typeString": "literal_string \"DataToken already activated\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4741, + "name": "Identifier", + "src": "5762:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "owner", + "referencedDeclaration": 4405, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4742, + "name": "Identifier", + "src": "5783:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4729, + "type": "address", + "value": "datatoken" + }, + "id": 4743, + "name": "Identifier", + "src": "5794:9:9" + } + ], + "id": 4744, + "name": "IndexAccess", + "src": "5783:21:9" + } + ], + "id": 4745, + "name": "MemberAccess", + "src": "5783:27:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4746, + "name": "Identifier", + "src": "5814:3:9" + } + ], + "id": 4747, + "name": "MemberAccess", + "src": "5814:10:9" + } + ], + "id": 4748, + "name": "BinaryOperation", + "src": "5783:41:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44617461546f6b656e20616c726561647920616374697661746564", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"DataToken already activated\"", + "value": "DataToken already activated" + }, + "id": 4749, + "name": "Literal", + "src": "5838:29:9" + } + ], + "id": 4750, + "name": "FunctionCall", + "src": "5762:115:9" + } + ], + "id": 4751, + "name": "ExpressionStatement", + "src": "5762:115:9" + }, + { + "attributes": { + "assignments": [ + 4753 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenInstance", + "scope": 4788, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IERC20Template", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20Template", + "referencedDeclaration": 5658, + "type": "contract IERC20Template" + }, + "id": 4752, + "name": "UserDefinedTypeName", + "src": "5887:14:9" + } + ], + "id": 4753, + "name": "VariableDeclaration", + "src": "5887:28:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 4754, + "name": "Identifier", + "src": "5918:14:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4729, + "type": "address", + "value": "datatoken" + }, + "id": 4755, + "name": "Identifier", + "src": "5933:9:9" + } + ], + "id": 4756, + "name": "FunctionCall", + "src": "5918:25:9" + } + ], + "id": 4757, + "name": "VariableDeclarationStatement", + "src": "5887:56:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0cfbec393383e0fce86a0bb31aa847b6ed694cf44c618a4606d1f2f2834c3497", + "typeString": "literal_string \"ERR: Cannot accept minter role\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4758, + "name": "Identifier", + "src": "5953:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "isMinter", + "referencedDeclaration": 5608, + "type": "function (address) view external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4753, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4759, + "name": "Identifier", + "src": "5974:13:9" + } + ], + "id": 4760, + "name": "MemberAccess", + "src": "5974:22:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4761, + "name": "ElementaryTypeNameExpression", + "src": "5997:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7165, + "type": "contract Dispenser", + "value": "this" + }, + "id": 4762, + "name": "Identifier", + "src": "6005:4:9" + } + ], + "id": 4763, + "name": "FunctionCall", + "src": "5997:13:9" + } + ], + "id": 4764, + "name": "FunctionCall", + "src": "5974:37:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4552523a2043616e6e6f7420616363657074206d696e74657220726f6c65", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERR: Cannot accept minter role\"", + "value": "ERR: Cannot accept minter role" + }, + "id": 4765, + "name": "Literal", + "src": "6025:32:9" + } + ], + "id": 4766, + "name": "FunctionCall", + "src": "5953:114:9" + } + ], + "id": 4767, + "name": "ExpressionStatement", + "src": "5953:114:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "proposeMinter", + "referencedDeclaration": 5654, + "type": "function (address) external" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4753, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4768, + "name": "Identifier", + "src": "6077:13:9" + } + ], + "id": 4770, + "name": "MemberAccess", + "src": "6077:27:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "owner", + "referencedDeclaration": 4405, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4771, + "name": "Identifier", + "src": "6105:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4729, + "type": "address", + "value": "datatoken" + }, + "id": 4772, + "name": "Identifier", + "src": "6116:9:9" + } + ], + "id": 4773, + "name": "IndexAccess", + "src": "6105:21:9" + } + ], + "id": 4774, + "name": "MemberAccess", + "src": "6105:27:9" + } + ], + "id": 4775, + "name": "FunctionCall", + "src": "6077:56:9" + } + ], + "id": 4776, + "name": "ExpressionStatement", + "src": "6077:56:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "minterApproved", + "referencedDeclaration": 4407, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4777, + "name": "Identifier", + "src": "6143:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4729, + "type": "address", + "value": "datatoken" + }, + "id": 4778, + "name": "Identifier", + "src": "6154:9:9" + } + ], + "id": 4779, + "name": "IndexAccess", + "src": "6143:21:9" + } + ], + "id": 4780, + "name": "MemberAccess", + "src": "6143:36:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 4781, + "name": "Literal", + "src": "6182:5:9" + } + ], + "id": 4782, + "name": "Assignment", + "src": "6143:44:9" + } + ], + "id": 4783, + "name": "ExpressionStatement", + "src": "6143:44:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4439, + "type": "function (address)", + "value": "RemovedMinter" + }, + "id": 4784, + "name": "Identifier", + "src": "6202:13:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4729, + "type": "address", + "value": "datatoken" + }, + "id": 4785, + "name": "Identifier", + "src": "6216:9:9" + } + ], + "id": 4786, + "name": "FunctionCall", + "src": "6202:24:9" + } + ], + "id": 4787, + "name": "EmitStatement", + "src": "6197:29:9" + } + ], + "id": 4788, + "name": "Block", + "src": "5642:591:9" + } + ], + "id": 4789, + "name": "FunctionDefinition", + "src": "5593:640:9" + }, + { + "attributes": { + "documentation": "@dev dispense\n Dispense datatokens to caller. The dispenser must be active, hold enough DT (or be able to mint more) and respect maxTokens/maxBalance requirements\n@param datatoken refers to datatoken address.\n@param datatoken amount of datatokens required.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "dispense", + "scope": 4986, + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "datatoken", + "scope": 4920, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4790, + "name": "ElementaryTypeName", + "src": "6562:7:9" + } + ], + "id": 4791, + "name": "VariableDeclaration", + "src": "6562:17:9" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 4920, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4792, + "name": "ElementaryTypeName", + "src": "6581:7:9" + } + ], + "id": 4793, + "name": "VariableDeclaration", + "src": "6581:14:9" + } + ], + "id": 4794, + "name": "ParameterList", + "src": "6561:35:9" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4795, + "name": "ParameterList", + "src": "6613:0:9" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4796, + "name": "Identifier", + "src": "6623:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4791, + "type": "address", + "value": "datatoken" + }, + "id": 4797, + "name": "Identifier", + "src": "6644:9:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4798, + "name": "ElementaryTypeNameExpression", + "src": "6657:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4799, + "name": "Literal", + "src": "6665:1:9" + } + ], + "id": 4800, + "name": "FunctionCall", + "src": "6657:10:9" + } + ], + "id": 4801, + "name": "BinaryOperation", + "src": "6644:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Invalid token contract address\"", + "value": "Invalid token contract address" + }, + "id": 4802, + "name": "Literal", + "src": "6681:32:9" + } + ], + "id": 4803, + "name": "FunctionCall", + "src": "6623:100:9" + } + ], + "id": 4804, + "name": "ExpressionStatement", + "src": "6623:100:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ad22fc5ad027c7c8b01eef1a92f40801532cfc3acc4dec7288322ef61342b858", + "typeString": "literal_string \"Dispenser not active\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4805, + "name": "Identifier", + "src": "6733:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "active", + "referencedDeclaration": 4403, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4806, + "name": "Identifier", + "src": "6754:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4791, + "type": "address", + "value": "datatoken" + }, + "id": 4807, + "name": "Identifier", + "src": "6765:9:9" + } + ], + "id": 4808, + "name": "IndexAccess", + "src": "6754:21:9" + } + ], + "id": 4809, + "name": "MemberAccess", + "src": "6754:28:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 4810, + "name": "Literal", + "src": "6786:4:9" + } + ], + "id": 4811, + "name": "BinaryOperation", + "src": "6754:36:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "44697370656e736572206e6f7420616374697665", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Dispenser not active\"", + "value": "Dispenser not active" + }, + "id": 4812, + "name": "Literal", + "src": "6804:22:9" + } + ], + "id": 4813, + "name": "FunctionCall", + "src": "6733:103:9" + } + ], + "id": 4814, + "name": "ExpressionStatement", + "src": "6733:103:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3e58cd0dd15e69c386ad46aeaec0637af7b133b0b08192a22e891c7d736d3ac8", + "typeString": "literal_string \"Invalid zero amount\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4815, + "name": "Identifier", + "src": "6846:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4793, + "type": "uint256", + "value": "amount" + }, + "id": 4816, + "name": "Identifier", + "src": "6867:6:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4817, + "name": "Literal", + "src": "6876:1:9" + } + ], + "id": 4818, + "name": "BinaryOperation", + "src": "6867:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e76616c6964207a65726f20616d6f756e74", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Invalid zero amount\"", + "value": "Invalid zero amount" + }, + "id": 4819, + "name": "Literal", + "src": "6891:21:9" + } + ], + "id": 4820, + "name": "FunctionCall", + "src": "6846:76:9" + } + ], + "id": 4821, + "name": "ExpressionStatement", + "src": "6846:76:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7353a6bd8628dd713e866f78b282b0b6793f273d47e76330330b9a5a159c17ef", + "typeString": "literal_string \"Amount too high\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4822, + "name": "Identifier", + "src": "6932:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "maxTokens", + "referencedDeclaration": 4409, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4823, + "name": "Identifier", + "src": "6953:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4791, + "type": "address", + "value": "datatoken" + }, + "id": 4824, + "name": "Identifier", + "src": "6964:9:9" + } + ], + "id": 4825, + "name": "IndexAccess", + "src": "6953:21:9" + } + ], + "id": 4826, + "name": "MemberAccess", + "src": "6953:31:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4793, + "type": "uint256", + "value": "amount" + }, + "id": 4827, + "name": "Identifier", + "src": "6988:6:9" + } + ], + "id": 4828, + "name": "BinaryOperation", + "src": "6953:41:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "416d6f756e7420746f6f2068696768", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Amount too high\"", + "value": "Amount too high" + }, + "id": 4829, + "name": "Literal", + "src": "7008:17:9" + } + ], + "id": 4830, + "name": "FunctionCall", + "src": "6932:103:9" + } + ], + "id": 4831, + "name": "ExpressionStatement", + "src": "6932:103:9" + }, + { + "attributes": { + "assignments": [ + 4833 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenInstance", + "scope": 4919, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IERC20Template", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20Template", + "referencedDeclaration": 5658, + "type": "contract IERC20Template" + }, + "id": 4832, + "name": "UserDefinedTypeName", + "src": "7045:14:9" + } + ], + "id": 4833, + "name": "VariableDeclaration", + "src": "7045:28:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 4834, + "name": "Identifier", + "src": "7076:14:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4791, + "type": "address", + "value": "datatoken" + }, + "id": 4835, + "name": "Identifier", + "src": "7091:9:9" + } + ], + "id": 4836, + "name": "FunctionCall", + "src": "7076:25:9" + } + ], + "id": 4837, + "name": "VariableDeclarationStatement", + "src": "7045:56:9" + }, + { + "attributes": { + "assignments": [ + 4839 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "callerBalance", + "scope": 4919, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4838, + "name": "ElementaryTypeName", + "src": "7111:7:9" + } + ], + "id": 4839, + "name": "VariableDeclaration", + "src": "7111:21:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 5640, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4833, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4840, + "name": "Identifier", + "src": "7135:13:9" + } + ], + "id": 4841, + "name": "MemberAccess", + "src": "7135:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4842, + "name": "Identifier", + "src": "7159:3:9" + } + ], + "id": 4843, + "name": "MemberAccess", + "src": "7159:10:9" + } + ], + "id": 4844, + "name": "FunctionCall", + "src": "7135:35:9" + } + ], + "id": 4845, + "name": "VariableDeclarationStatement", + "src": "7111:59:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_036daf442604eb31ad74da9a69fe5dbd62aabfebb2991e7c7d29a1f2fe39919a", + "typeString": "literal_string \"Caller balance too high\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4846, + "name": "Identifier", + "src": "7180:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4839, + "type": "uint256", + "value": "callerBalance" + }, + "id": 4847, + "name": "Identifier", + "src": "7201:13:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "maxBalance", + "referencedDeclaration": 4411, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4848, + "name": "Identifier", + "src": "7215:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4791, + "type": "address", + "value": "datatoken" + }, + "id": 4849, + "name": "Identifier", + "src": "7226:9:9" + } + ], + "id": 4850, + "name": "IndexAccess", + "src": "7215:21:9" + } + ], + "id": 4851, + "name": "MemberAccess", + "src": "7215:32:9" + } + ], + "id": 4852, + "name": "BinaryOperation", + "src": "7201:46:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "43616c6c65722062616c616e636520746f6f2068696768", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Caller balance too high\"", + "value": "Caller balance too high" + }, + "id": 4853, + "name": "Literal", + "src": "7261:25:9" + } + ], + "id": 4854, + "name": "FunctionCall", + "src": "7180:116:9" + } + ], + "id": 4855, + "name": "ExpressionStatement", + "src": "7180:116:9" + }, + { + "attributes": { + "assignments": [ + 4857 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "ourBalance", + "scope": 4919, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4856, + "name": "ElementaryTypeName", + "src": "7306:7:9" + } + ], + "id": 4857, + "name": "VariableDeclaration", + "src": "7306:18:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 5640, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4833, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4858, + "name": "Identifier", + "src": "7327:13:9" + } + ], + "id": 4859, + "name": "MemberAccess", + "src": "7327:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4860, + "name": "ElementaryTypeNameExpression", + "src": "7351:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7165, + "type": "contract Dispenser", + "value": "this" + }, + "id": 4861, + "name": "Identifier", + "src": "7359:4:9" + } + ], + "id": 4862, + "name": "FunctionCall", + "src": "7351:13:9" + } + ], + "id": 4863, + "name": "FunctionCall", + "src": "7327:38:9" + } + ], + "id": 4864, + "name": "VariableDeclarationStatement", + "src": "7306:59:9" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "&&", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4857, + "type": "uint256", + "value": "ourBalance" + }, + "id": 4865, + "name": "Identifier", + "src": "7378:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4793, + "type": "uint256", + "value": "amount" + }, + "id": 4866, + "name": "Identifier", + "src": "7389:6:9" + } + ], + "id": 4867, + "name": "BinaryOperation", + "src": "7378:17:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "isMinter", + "referencedDeclaration": 5608, + "type": "function (address) view external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4833, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4868, + "name": "Identifier", + "src": "7399:13:9" + } + ], + "id": 4869, + "name": "MemberAccess", + "src": "7399:22:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4870, + "name": "ElementaryTypeNameExpression", + "src": "7422:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7165, + "type": "contract Dispenser", + "value": "this" + }, + "id": 4871, + "name": "Identifier", + "src": "7430:4:9" + } + ], + "id": 4872, + "name": "FunctionCall", + "src": "7422:13:9" + } + ], + "id": 4873, + "name": "FunctionCall", + "src": "7399:37:9" + } + ], + "id": 4874, + "name": "BinaryOperation", + "src": "7378:58:9" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "mint", + "referencedDeclaration": 5576, + "type": "function (address,uint256) external" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4833, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4875, + "name": "Identifier", + "src": "7507:13:9" + } + ], + "id": 4877, + "name": "MemberAccess", + "src": "7507:18:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4878, + "name": "ElementaryTypeNameExpression", + "src": "7526:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7165, + "type": "contract Dispenser", + "value": "this" + }, + "id": 4879, + "name": "Identifier", + "src": "7534:4:9" + } + ], + "id": 4880, + "name": "FunctionCall", + "src": "7526:13:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "-", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4793, + "type": "uint256", + "value": "amount" + }, + "id": 4881, + "name": "Identifier", + "src": "7540:6:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4857, + "type": "uint256", + "value": "ourBalance" + }, + "id": 4882, + "name": "Identifier", + "src": "7549:10:9" + } + ], + "id": 4883, + "name": "BinaryOperation", + "src": "7540:19:9" + } + ], + "id": 4884, + "name": "FunctionCall", + "src": "7507:53:9" + } + ], + "id": 4885, + "name": "ExpressionStatement", + "src": "7507:53:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4857, + "type": "uint256", + "value": "ourBalance" + }, + "id": 4886, + "name": "Identifier", + "src": "7574:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 5640, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4833, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4887, + "name": "Identifier", + "src": "7587:13:9" + } + ], + "id": 4888, + "name": "MemberAccess", + "src": "7587:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4889, + "name": "ElementaryTypeNameExpression", + "src": "7611:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7165, + "type": "contract Dispenser", + "value": "this" + }, + "id": 4890, + "name": "Identifier", + "src": "7619:4:9" + } + ], + "id": 4891, + "name": "FunctionCall", + "src": "7611:13:9" + } + ], + "id": 4892, + "name": "FunctionCall", + "src": "7587:38:9" + } + ], + "id": 4893, + "name": "Assignment", + "src": "7574:51:9" + } + ], + "id": 4894, + "name": "ExpressionStatement", + "src": "7574:51:9" + } + ], + "id": 4895, + "name": "Block", + "src": "7437:199:9" + } + ], + "id": 4896, + "name": "IfStatement", + "src": "7375:261:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6b90a513fa74c2a8dc35fe1591468e10fc67c299dc0f325ea992d29212514d24", + "typeString": "literal_string \"Not enough reserves\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4897, + "name": "Identifier", + "src": "7645:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4857, + "type": "uint256", + "value": "ourBalance" + }, + "id": 4898, + "name": "Identifier", + "src": "7666:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4793, + "type": "uint256", + "value": "amount" + }, + "id": 4899, + "name": "Identifier", + "src": "7678:6:9" + } + ], + "id": 4900, + "name": "BinaryOperation", + "src": "7666:18:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4e6f7420656e6f756768207265736572766573", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Not enough reserves\"", + "value": "Not enough reserves" + }, + "id": 4901, + "name": "Literal", + "src": "7698:21:9" + } + ], + "id": 4902, + "name": "FunctionCall", + "src": "7645:84:9" + } + ], + "id": 4903, + "name": "ExpressionStatement", + "src": "7645:84:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": 5649, + "type": "function (address,uint256) external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4833, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4904, + "name": "Identifier", + "src": "7739:13:9" + } + ], + "id": 4906, + "name": "MemberAccess", + "src": "7739:22:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4907, + "name": "Identifier", + "src": "7762:3:9" + } + ], + "id": 4908, + "name": "MemberAccess", + "src": "7762:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4793, + "type": "uint256", + "value": "amount" + }, + "id": 4909, + "name": "Identifier", + "src": "7773:6:9" + } + ], + "id": 4910, + "name": "FunctionCall", + "src": "7739:41:9" + } + ], + "id": 4911, + "name": "ExpressionStatement", + "src": "7739:41:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4447, + "type": "function (address,address,uint256)", + "value": "TokensDispensed" + }, + "id": 4912, + "name": "Identifier", + "src": "7795:15:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4791, + "type": "address", + "value": "datatoken" + }, + "id": 4913, + "name": "Identifier", + "src": "7811:9:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4914, + "name": "Identifier", + "src": "7822:3:9" + } + ], + "id": 4915, + "name": "MemberAccess", + "src": "7822:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4793, + "type": "uint256", + "value": "amount" + }, + "id": 4916, + "name": "Identifier", + "src": "7834:6:9" + } + ], + "id": 4917, + "name": "FunctionCall", + "src": "7795:46:9" + } + ], + "id": 4918, + "name": "EmitStatement", + "src": "7790:51:9" + } + ], + "id": 4919, + "name": "Block", + "src": "6613:1235:9" + } + ], + "id": 4920, + "name": "FunctionDefinition", + "src": "6544:1304:9" + }, + { + "attributes": { + "documentation": "@dev ownerWithdraw\n Allow owner to withdraw all datatokens in this dispenser balance\n@param datatoken refers to datatoken address.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "ownerWithdraw", + "scope": 4986, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "datatoken", + "scope": 4981, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4921, + "name": "ElementaryTypeName", + "src": "8049:7:9" + } + ], + "id": 4922, + "name": "VariableDeclaration", + "src": "8049:17:9" + } + ], + "id": 4923, + "name": "ParameterList", + "src": "8048:19:9" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4924, + "name": "ParameterList", + "src": "8076:0:9" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_06ebfe378f7fe772505ae89070020ed35d339723d05a163f9140463cf1c3e2e1", + "typeString": "literal_string \"Invalid token contract address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4925, + "name": "Identifier", + "src": "8086:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4922, + "type": "address", + "value": "datatoken" + }, + "id": 4926, + "name": "Identifier", + "src": "8107:9:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4927, + "name": "ElementaryTypeNameExpression", + "src": "8120:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4928, + "name": "Literal", + "src": "8128:1:9" + } + ], + "id": 4929, + "name": "FunctionCall", + "src": "8120:10:9" + } + ], + "id": 4930, + "name": "BinaryOperation", + "src": "8107:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e76616c696420746f6b656e20636f6e74726163742061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Invalid token contract address\"", + "value": "Invalid token contract address" + }, + "id": 4931, + "name": "Literal", + "src": "8144:32:9" + } + ], + "id": 4932, + "name": "FunctionCall", + "src": "8086:100:9" + } + ], + "id": 4933, + "name": "ExpressionStatement", + "src": "8086:100:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae", + "typeString": "literal_string \"Invalid owner\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4934, + "name": "Identifier", + "src": "8196:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "owner", + "referencedDeclaration": 4405, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct Dispenser.DataToken storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4416, + "type": "mapping(address => struct Dispenser.DataToken storage ref)", + "value": "datatokens" + }, + "id": 4935, + "name": "Identifier", + "src": "8217:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4922, + "type": "address", + "value": "datatoken" + }, + "id": 4936, + "name": "Identifier", + "src": "8228:9:9" + } + ], + "id": 4937, + "name": "IndexAccess", + "src": "8217:21:9" + } + ], + "id": 4938, + "name": "MemberAccess", + "src": "8217:27:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4939, + "name": "Identifier", + "src": "8248:3:9" + } + ], + "id": 4940, + "name": "MemberAccess", + "src": "8248:10:9" + } + ], + "id": 4941, + "name": "BinaryOperation", + "src": "8217:41:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "496e76616c6964206f776e6572", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Invalid owner\"", + "value": "Invalid owner" + }, + "id": 4942, + "name": "Literal", + "src": "8272:15:9" + } + ], + "id": 4943, + "name": "FunctionCall", + "src": "8196:101:9" + } + ], + "id": 4944, + "name": "ExpressionStatement", + "src": "8196:101:9" + }, + { + "attributes": { + "assignments": [ + 4946 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenInstance", + "scope": 4980, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IERC20Template", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20Template", + "referencedDeclaration": 5658, + "type": "contract IERC20Template" + }, + "id": 4945, + "name": "UserDefinedTypeName", + "src": "8307:14:9" + } + ], + "id": 4946, + "name": "VariableDeclaration", + "src": "8307:28:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 4947, + "name": "Identifier", + "src": "8338:14:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4922, + "type": "address", + "value": "datatoken" + }, + "id": 4948, + "name": "Identifier", + "src": "8353:9:9" + } + ], + "id": 4949, + "name": "FunctionCall", + "src": "8338:25:9" + } + ], + "id": 4950, + "name": "VariableDeclarationStatement", + "src": "8307:56:9" + }, + { + "attributes": { + "assignments": [ + 4952 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "ourBalance", + "scope": 4980, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4951, + "name": "ElementaryTypeName", + "src": "8373:7:9" + } + ], + "id": 4952, + "name": "VariableDeclaration", + "src": "8373:18:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 5640, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4946, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4953, + "name": "Identifier", + "src": "8394:13:9" + } + ], + "id": 4954, + "name": "MemberAccess", + "src": "8394:23:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Dispenser_$4986", + "typeString": "contract Dispenser" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4955, + "name": "ElementaryTypeNameExpression", + "src": "8418:7:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7165, + "type": "contract Dispenser", + "value": "this" + }, + "id": 4956, + "name": "Identifier", + "src": "8426:4:9" + } + ], + "id": 4957, + "name": "FunctionCall", + "src": "8418:13:9" + } + ], + "id": 4958, + "name": "FunctionCall", + "src": "8394:38:9" + } + ], + "id": 4959, + "name": "VariableDeclarationStatement", + "src": "8373:59:9" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4952, + "type": "uint256", + "value": "ourBalance" + }, + "id": 4960, + "name": "Identifier", + "src": "8445:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4961, + "name": "Literal", + "src": "8456:1:9" + } + ], + "id": 4962, + "name": "BinaryOperation", + "src": "8445:12:9" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": 5649, + "type": "function (address,uint256) external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4946, + "type": "contract IERC20Template", + "value": "tokenInstance" + }, + "id": 4963, + "name": "Identifier", + "src": "8472:13:9" + } + ], + "id": 4965, + "name": "MemberAccess", + "src": "8472:22:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4966, + "name": "Identifier", + "src": "8495:3:9" + } + ], + "id": 4967, + "name": "MemberAccess", + "src": "8495:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4952, + "type": "uint256", + "value": "ourBalance" + }, + "id": 4968, + "name": "Identifier", + "src": "8506:10:9" + } + ], + "id": 4969, + "name": "FunctionCall", + "src": "8472:45:9" + } + ], + "id": 4970, + "name": "ExpressionStatement", + "src": "8472:45:9" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4455, + "type": "function (address,address,uint256)", + "value": "OwnerWithdrawed" + }, + "id": 4971, + "name": "Identifier", + "src": "8536:15:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4922, + "type": "address", + "value": "datatoken" + }, + "id": 4972, + "name": "Identifier", + "src": "8552:9:9" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 4973, + "name": "Identifier", + "src": "8563:3:9" + } + ], + "id": 4974, + "name": "MemberAccess", + "src": "8563:10:9" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4952, + "type": "uint256", + "value": "ourBalance" + }, + "id": 4975, + "name": "Identifier", + "src": "8575:10:9" + } + ], + "id": 4976, + "name": "FunctionCall", + "src": "8536:50:9" + } + ], + "id": 4977, + "name": "EmitStatement", + "src": "8531:55:9" + } + ], + "id": 4978, + "name": "Block", + "src": "8458:139:9" + } + ], + "id": 4979, + "name": "IfStatement", + "src": "8442:155:9" + } + ], + "id": 4980, + "name": "Block", + "src": "8076:527:9" + } + ], + "id": 4981, + "name": "FunctionDefinition", + "src": "8026:577:9" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "fallback", + "modifiers": [ + null + ], + "name": "", + "scope": 4986, + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4982, + "name": "ParameterList", + "src": "8616:2:9" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4983, + "name": "ParameterList", + "src": "8636:0:9" + }, + { + "attributes": { + "statements": [ + null + ] + }, + "children": [], + "id": 4984, + "name": "Block", + "src": "8636:45:9" + } + ], + "id": 4985, + "name": "FunctionDefinition", + "src": "8608:73:9" + } + ], + "id": 4986, + "name": "ContractDefinition", + "src": "231:8452:9" + } + ], + "id": 4987, + "name": "SourceUnit", + "src": "0:8683:9" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.822Z", + "devdoc": { + "methods": { + "acceptMinter(address)": { + "details": "acceptMinter Accepts Minter role (existing datatoken minter has to call datatoken.proposeMinter(dispenserAddress) first)", + "params": { + "datatoken": "refers to datatoken address." + } + }, + "activate(address,uint256,uint256)": { + "details": "activate Activate a new dispenser", + "params": { + "datatoken": "refers to datatoken address.", + "maxBalance": "- max balance of requester.", + "maxTokens": "- max tokens to dispense" + } + }, + "deactivate(address)": { + "details": "deactivate Deactivate an existing dispenser", + "params": { + "datatoken": "refers to datatoken address." + } + }, + "dispense(address,uint256)": { + "details": "dispense Dispense datatokens to caller. The dispenser must be active, hold enough DT (or be able to mint more) and respect maxTokens/maxBalance requirements", + "params": { + "datatoken": "amount of datatokens required." + } + }, + "ownerWithdraw(address)": { + "details": "ownerWithdraw Allow owner to withdraw all datatokens in this dispenser balance", + "params": { + "datatoken": "refers to datatoken address." + } + }, + "removeMinter(address)": { + "details": "removeMinter Removes Minter role and proposes the owner as a new minter (the owner has to call approveMinter after this)", + "params": { + "datatoken": "refers to datatoken address." + } + }, + "status(address)": { + "details": "status Get information about a datatoken dispenser", + "params": { + "datatoken": "refers to datatoken address." + }, + "return": "active - if the dispenser is active for this datatokenowner - owner of this dispenserminterApproved - if the dispenser is a minter for this datatokenisTrueMinter - check the datatoken contract if this contract is really a mintermaxTokens - max tokens to dispensemaxBalance - max balance of requester. If the balance is higher, the dispense is rejectedbalance - internal balance of the contract (if any)" + } + } + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/ERC20.json b/artifacts/ERC20.json new file mode 100644 index 000000000..a02cbc671 --- /dev/null +++ b/artifacts/ERC20.json @@ -0,0 +1,11836 @@ +{ + "contractName": "ERC20", + "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": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "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" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "sender", + "type": "address" + }, + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"amount\",\"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\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"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\":{\"details\":\"Implementation of the {IERC20} interface. * This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. For a generic mechanism see {ERC20Mintable}. * TIP: For a detailed writeup see our guide https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. * We have followed general OpenZeppelin guidelines: functions revert instead of returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. * Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for `sender`'s tokens of at least `amount`.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":\"ERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzzr://51482c01bddf23793bddee43b60ab9578a62948a4f2082def24ea792a553b055\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzzr://292843005e754e752644f767477ec5ad7a1ffc91ddb18c38b8079c62f3993cad\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xb15af804e2bc97db51e4e103f13de9fe13f87e6b835d7a88c897966c0e58506e\",\"urls\":[\"bzzr://6200c125af376381ae6c5415b8f3c1cb83889be20a7a51d67ac607487a10313b\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062\"]}},\"version\":1}", + "bytecode": "0x6080604052610861806100136000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c01000000000000000000000000000000000000000000000000000000009004806370a082311161007857806370a0823114610166578063a457c2d71461018c578063a9059cbb146101b8578063dd62ed3e146101e4576100a5565b8063095ea7b3146100aa57806318160ddd146100ea57806323b872dd14610104578063395093511461013a575b600080fd5b6100d6600480360360408110156100c057600080fd5b50600160a060020a038135169060200135610212565b604080519115158252519081900360200190f35b6100f261022f565b60408051918252519081900360200190f35b6100d66004803603606081101561011a57600080fd5b50600160a060020a03813581169160208101359091169060400135610235565b6100d66004803603604081101561015057600080fd5b50600160a060020a0381351690602001356102c2565b6100f26004803603602081101561017c57600080fd5b5035600160a060020a0316610316565b6100d6600480360360408110156101a257600080fd5b50600160a060020a038135169060200135610331565b6100d6600480360360408110156101ce57600080fd5b50600160a060020a03813516906020013561039f565b6100f2600480360360408110156101fa57600080fd5b50600160a060020a03813581169160200135166103b3565b600061022661021f6103de565b84846103e2565b50600192915050565b60025490565b60006102428484846104d4565b6102b88461024e6103de565b6102b3856040518060600160405280602881526020016107a060289139600160a060020a038a1660009081526001602052604081209061028c6103de565b600160a060020a03168152602081019190915260400160002054919063ffffffff61063616565b6103e2565b5060019392505050565b60006102266102cf6103de565b846102b385600160006102e06103de565b600160a060020a03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6106d016565b600160a060020a031660009081526020819052604090205490565b600061022661033e6103de565b846102b38560405180606001604052806025815260200161081160259139600160006103686103de565b600160a060020a03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61063616565b60006102266103ac6103de565b84846104d4565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b3390565b600160a060020a03831661042a5760405160e560020a62461bcd0281526004018080602001828103825260248152602001806107ed6024913960400191505060405180910390fd5b600160a060020a0382166104725760405160e560020a62461bcd0281526004018080602001828103825260228152602001806107586022913960400191505060405180910390fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600160a060020a03831661051c5760405160e560020a62461bcd0281526004018080602001828103825260258152602001806107c86025913960400191505060405180910390fd5b600160a060020a0382166105645760405160e560020a62461bcd0281526004018080602001828103825260238152602001806107356023913960400191505060405180910390fd5b6105a78160405180606001604052806026815260200161077a60269139600160a060020a038616600090815260208190526040902054919063ffffffff61063616565b600160a060020a0380851660009081526020819052604080822093909355908416815220546105dc908263ffffffff6106d016565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156106c85760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561068d578181015183820152602001610675565b50505050905090810190601f1680156106ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008282018381101561072d576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa165627a7a72305820a1adcf26d01b1adc7fc20133464568abd16d8798ba59108499e7793a7fc6fb890029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a5576000357c01000000000000000000000000000000000000000000000000000000009004806370a082311161007857806370a0823114610166578063a457c2d71461018c578063a9059cbb146101b8578063dd62ed3e146101e4576100a5565b8063095ea7b3146100aa57806318160ddd146100ea57806323b872dd14610104578063395093511461013a575b600080fd5b6100d6600480360360408110156100c057600080fd5b50600160a060020a038135169060200135610212565b604080519115158252519081900360200190f35b6100f261022f565b60408051918252519081900360200190f35b6100d66004803603606081101561011a57600080fd5b50600160a060020a03813581169160208101359091169060400135610235565b6100d66004803603604081101561015057600080fd5b50600160a060020a0381351690602001356102c2565b6100f26004803603602081101561017c57600080fd5b5035600160a060020a0316610316565b6100d6600480360360408110156101a257600080fd5b50600160a060020a038135169060200135610331565b6100d6600480360360408110156101ce57600080fd5b50600160a060020a03813516906020013561039f565b6100f2600480360360408110156101fa57600080fd5b50600160a060020a03813581169160200135166103b3565b600061022661021f6103de565b84846103e2565b50600192915050565b60025490565b60006102428484846104d4565b6102b88461024e6103de565b6102b3856040518060600160405280602881526020016107a060289139600160a060020a038a1660009081526001602052604081209061028c6103de565b600160a060020a03168152602081019190915260400160002054919063ffffffff61063616565b6103e2565b5060019392505050565b60006102266102cf6103de565b846102b385600160006102e06103de565b600160a060020a03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6106d016565b600160a060020a031660009081526020819052604090205490565b600061022661033e6103de565b846102b38560405180606001604052806025815260200161081160259139600160006103686103de565b600160a060020a03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61063616565b60006102266103ac6103de565b84846104d4565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b3390565b600160a060020a03831661042a5760405160e560020a62461bcd0281526004018080602001828103825260248152602001806107ed6024913960400191505060405180910390fd5b600160a060020a0382166104725760405160e560020a62461bcd0281526004018080602001828103825260228152602001806107586022913960400191505060405180910390fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600160a060020a03831661051c5760405160e560020a62461bcd0281526004018080602001828103825260258152602001806107c86025913960400191505060405180910390fd5b600160a060020a0382166105645760405160e560020a62461bcd0281526004018080602001828103825260238152602001806107356023913960400191505060405180910390fd5b6105a78160405180606001604052806026815260200161077a60269139600160a060020a038616600090815260208190526040902054919063ffffffff61063616565b600160a060020a0380851660009081526020819052604080822093909355908416815220546105dc908263ffffffff6106d016565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156106c85760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561068d578181015183820152602001610675565b50505050905090810190601f1680156106ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008282018381101561072d576040805160e560020a62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa165627a7a72305820a1adcf26d01b1adc7fc20133464568abd16d8798ba59108499e7793a7fc6fb890029", + "sourceMap": "1268:6823:18:-;;;;;;;;;", + "deployedSourceMap": "1268:6823:18:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1268:6823:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2500:149;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2500:149:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1559:89;;;:::i;:::-;;;;;;;;;;;;;;;;3107:300;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3107:300:18;;;;;;;;;;;;;;;;;:::i;3802:207::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3802:207:18;;;;;;;;:::i;1706:108::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1706:108:18;-1:-1:-1;;;;;1706:108:18;;:::i;4496:258::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4496:258:18;;;;;;;;:::i;2017:155::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2017:155:18;;;;;;;;:::i;2230:132::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2230:132:18;;;;;;;;;;:::i;2500:149::-;2566:4;2582:39;2591:12;:10;:12::i;:::-;2605:7;2614:6;2582:8;:39::i;:::-;-1:-1:-1;2638:4:18;2500:149;;;;:::o;1559:89::-;1629:12;;1559:89;:::o;3107:300::-;3196:4;3212:36;3222:6;3230:9;3241:6;3212:9;:36::i;:::-;3258:121;3267:6;3275:12;:10;:12::i;:::-;3289:89;3327:6;3289:89;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3289:19:18;;;;;;:11;:19;;;;;;3309:12;:10;:12::i;:::-;-1:-1:-1;;;;;3289:33:18;;;;;;;;;;;;-1:-1:-1;3289:33:18;;;:89;;:37;:89;:::i;:::-;3258:8;:121::i;:::-;-1:-1:-1;3396:4:18;3107:300;;;;;:::o;3802:207::-;3882:4;3898:83;3907:12;:10;:12::i;:::-;3921:7;3930:50;3969:10;3930:11;:25;3942:12;:10;:12::i;:::-;-1:-1:-1;;;;;3930:25:18;;;;;;;;;;;;;;;;;-1:-1:-1;3930:25:18;;;:34;;;;;;;;;;;:50;:38;:50;:::i;1706:108::-;-1:-1:-1;;;;;1789:18:18;1763:7;1789:18;;;;;;;;;;;;1706:108::o;4496:258::-;4581:4;4597:129;4606:12;:10;:12::i;:::-;4620:7;4629:96;4668:15;4629:96;;;;;;;;;;;;;;;;;:11;:25;4641:12;:10;:12::i;:::-;-1:-1:-1;;;;;4629:25:18;;;;;;;;;;;;;;;;;-1:-1:-1;4629:25:18;;;:34;;;;;;;;;;;:96;;:38;:96;:::i;2017:155::-;2086:4;2102:42;2112:12;:10;:12::i;:::-;2126:9;2137:6;2102:9;:42::i;2230:132::-;-1:-1:-1;;;;;2328:18:18;;;2302:7;2328:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;2230:132::o;788:96:15:-;867:10;788:96;:::o;7350:332:18:-;-1:-1:-1;;;;;7443:19:18;;7435:68;;;;-1:-1:-1;;;;;7435:68:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7521:21:18;;7513:68;;;;-1:-1:-1;;;;;7513:68:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7592:18:18;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;7643:32;;;;;;;;;;;;;;;;;7350:332;;;:::o;5228:464::-;-1:-1:-1;;;;;5325:20:18;;5317:70;;;;-1:-1:-1;;;;;5317:70:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5405:23:18;;5397:71;;;;-1:-1:-1;;;;;5397:71:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5499;5521:6;5499:71;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5499:17:18;;:9;:17;;;;;;;;;;;;:71;;:21;:71;:::i;:::-;-1:-1:-1;;;;;5479:17:18;;;:9;:17;;;;;;;;;;;:91;;;;5603:20;;;;;;;:32;;5628:6;5603:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;5580:20:18;;;:9;:20;;;;;;;;;;;;:55;;;;5650:35;;;;;;;5580:20;;5650:35;;;;;;;;;;;;;5228:464;;;:::o;1732:187:16:-;1818:7;1853:12;1845:6;;;;1837:29;;;;-1:-1:-1;;;;;1837:29:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1837:29:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1888:5:16;;;1732:187::o;834:176::-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;;;938:46:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;1002:1;834:176;-1:-1:-1;;;834:176:16:o", + "source": "pragma solidity ^0.5.0;\n\nimport \"../../GSN/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20Mintable}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n\n mapping (address => uint256) private _balances;\n\n mapping (address => mapping (address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20};\n *\n * Requirements:\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for `sender`'s tokens of at least\n * `amount`.\n */\n function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(address sender, address recipient, uint256 amount) internal {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements\n *\n * - `to` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n *\n * This is internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`.`amount` is then deducted\n * from the caller's allowance.\n *\n * See {_burn} and {_approve}.\n */\n function _burnFrom(address account, uint256 amount) internal {\n _burn(account, amount);\n _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, \"ERC20: burn amount exceeds allowance\"));\n }\n}\n", + "sourcePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "ast": { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "exportedSymbols": { + "ERC20": [ + 7037 + ] + }, + "id": 7038, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6634, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:18" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/GSN/Context.sol", + "file": "../../GSN/Context.sol", + "id": 6635, + "nodeType": "ImportDirective", + "scope": 7038, + "sourceUnit": 6328, + "src": "25:31:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 6636, + "nodeType": "ImportDirective", + "scope": 7038, + "sourceUnit": 7107, + "src": "57:22:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "id": 6637, + "nodeType": "ImportDirective", + "scope": 7038, + "sourceUnit": 6515, + "src": "80:33:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 6638, + "name": "Context", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6327, + "src": "1286:7:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$6327", + "typeString": "contract Context" + } + }, + "id": 6639, + "nodeType": "InheritanceSpecifier", + "src": "1286:7:18" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 6640, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 7106, + "src": "1295:6:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$7106", + "typeString": "contract IERC20" + } + }, + "id": 6641, + "nodeType": "InheritanceSpecifier", + "src": "1295:6:18" + } + ], + "contractDependencies": [ + 6327, + 7106 + ], + "contractKind": "contract", + "documentation": "@dev Implementation of the {IERC20} interface.\n * This implementation is agnostic to the way tokens are created. This means\nthat a supply mechanism has to be added in a derived contract using {_mint}.\nFor a generic mechanism see {ERC20Mintable}.\n * TIP: For a detailed writeup see our guide\nhttps://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\nto implement supply mechanisms].\n * We have followed general OpenZeppelin guidelines: functions revert instead\nof returning `false` on failure. This behavior is nonetheless conventional\nand does not conflict with the expectations of ERC20 applications.\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\nThis allows applications to reconstruct the allowance for all accounts just\nby listening to said events. Other implementations of the EIP may not emit\nthese events, as it isn't required by the specification.\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\nfunctions have been added to mitigate the well-known issues around setting\nallowances. See {IERC20-approve}.", + "fullyImplemented": true, + "id": 7037, + "linearizedBaseContracts": [ + 7037, + 7106, + 6327 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6644, + "libraryName": { + "contractScope": null, + "id": 6642, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6514, + "src": "1314:8:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6514", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1308:27:18", + "typeName": { + "id": 6643, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1327:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 6648, + "name": "_balances", + "nodeType": "VariableDeclaration", + "scope": 7037, + "src": "1341:46:18", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6647, + "keyType": { + "id": 6645, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1350:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1341:28:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6646, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1361:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 6654, + "name": "_allowances", + "nodeType": "VariableDeclaration", + "scope": 7037, + "src": "1394:69:18", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 6653, + "keyType": { + "id": 6649, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1403:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1394:49:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 6652, + "keyType": { + "id": 6650, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1423:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1414:28:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6651, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1434:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 6656, + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "scope": 7037, + "src": "1470:28:18", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1470:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 6663, + "nodeType": "Block", + "src": "1612:36:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6661, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6656, + "src": "1629:12:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6660, + "id": 6662, + "nodeType": "Return", + "src": "1622:19:18" + } + ] + }, + "documentation": "@dev See {IERC20-totalSupply}.", + "id": 6664, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6657, + "nodeType": "ParameterList", + "parameters": [], + "src": "1579:2:18" + }, + "returnParameters": { + "id": 6660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6659, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6664, + "src": "1603:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1603:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1602:9:18" + }, + "scope": 7037, + "src": "1559:89:18", + "stateMutability": "view", + "superFunction": 7044, + "visibility": "public" + }, + { + "body": { + "id": 6675, + "nodeType": "Block", + "src": "1772:42:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6671, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "1789:9:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6673, + "indexExpression": { + "argumentTypes": null, + "id": 6672, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6666, + "src": "1799:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1789:18:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6670, + "id": 6674, + "nodeType": "Return", + "src": "1782:25:18" + } + ] + }, + "documentation": "@dev See {IERC20-balanceOf}.", + "id": 6676, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6667, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6666, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 6676, + "src": "1725:15:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6665, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1725:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1724:17:18" + }, + "returnParameters": { + "id": 6670, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6669, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6676, + "src": "1763:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6668, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1763:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1762:9:18" + }, + "scope": 7037, + "src": "1706:108:18", + "stateMutability": "view", + "superFunction": 7051, + "visibility": "public" + }, + { + "body": { + "id": 6694, + "nodeType": "Block", + "src": "2092:80:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6686, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "2112:10:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 6687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2112:12:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 6688, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6678, + "src": "2126:9:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6689, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "2137:6:18", + "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": 6685, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6878, + "src": "2102:9:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 6690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2102:42:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6691, + "nodeType": "ExpressionStatement", + "src": "2102:42:18" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 6692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2161:4:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 6684, + "id": 6693, + "nodeType": "Return", + "src": "2154:11:18" + } + ] + }, + "documentation": "@dev See {IERC20-transfer}.\n * Requirements:\n * - `recipient` cannot be the zero address.\n- the caller must have a balance of at least `amount`.", + "id": 6695, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6681, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6678, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 6695, + "src": "2035:17:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2035:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6680, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 6695, + "src": "2054:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6679, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2054:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2034:35:18" + }, + "returnParameters": { + "id": 6684, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6683, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6695, + "src": "2086:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6682, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2086:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2085:6:18" + }, + "scope": 7037, + "src": "2017:155:18", + "stateMutability": "nonpayable", + "superFunction": 7060, + "visibility": "public" + }, + { + "body": { + "id": 6710, + "nodeType": "Block", + "src": "2311:51:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6704, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "2328:11:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 6706, + "indexExpression": { + "argumentTypes": null, + "id": 6705, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6697, + "src": "2340:5:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2328:18:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6708, + "indexExpression": { + "argumentTypes": null, + "id": 6707, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6699, + "src": "2347:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2328:27:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6703, + "id": 6709, + "nodeType": "Return", + "src": "2321:34:18" + } + ] + }, + "documentation": "@dev See {IERC20-allowance}.", + "id": 6711, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6700, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6697, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 6711, + "src": "2249:13:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6696, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2249:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6699, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 6711, + "src": "2264:15:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6698, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2264:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2248:32:18" + }, + "returnParameters": { + "id": 6703, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6702, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6711, + "src": "2302:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6701, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2302:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2301:9:18" + }, + "scope": 7037, + "src": "2230:132:18", + "stateMutability": "view", + "superFunction": 7069, + "visibility": "public" + }, + { + "body": { + "id": 6729, + "nodeType": "Block", + "src": "2572:77:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6721, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "2591:10:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 6722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2591:12:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 6723, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6713, + "src": "2605:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6724, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6715, + "src": "2614:6:18", + "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": 6720, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7007, + "src": "2582:8:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 6725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2582:39:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6726, + "nodeType": "ExpressionStatement", + "src": "2582:39:18" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 6727, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2638:4:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 6719, + "id": 6728, + "nodeType": "Return", + "src": "2631:11:18" + } + ] + }, + "documentation": "@dev See {IERC20-approve}.\n * Requirements:\n * - `spender` cannot be the zero address.", + "id": 6730, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6716, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6713, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 6730, + "src": "2517:15:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6712, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2517:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6715, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 6730, + "src": "2534:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6714, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2534:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2516:33:18" + }, + "returnParameters": { + "id": 6719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6718, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6730, + "src": "2566:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6717, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2566:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2565:6:18" + }, + "scope": 7037, + "src": "2500:149:18", + "stateMutability": "nonpayable", + "superFunction": 7078, + "visibility": "public" + }, + { + "body": { + "id": 6765, + "nodeType": "Block", + "src": "3202:205:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6742, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6732, + "src": "3222:6:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6743, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6734, + "src": "3230:9:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6744, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6736, + "src": "3241:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6741, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6878, + "src": "3212:9:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 6745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3212:36:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6746, + "nodeType": "ExpressionStatement", + "src": "3212:36:18" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6748, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6732, + "src": "3267:6:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6749, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "3275:10:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 6750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3275:12:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6758, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6736, + "src": "3327:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365", + "id": 6759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3335:42:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", + "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" + }, + "value": "ERC20: transfer amount exceeds allowance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", + "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6751, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "3289:11:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 6753, + "indexExpression": { + "argumentTypes": null, + "id": 6752, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6732, + "src": "3301:6:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3289:19:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6756, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6754, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "3309:10:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3309:12:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3289:33:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6397, + "src": "3289:37:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 6760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3289:89:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6747, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7007, + "src": "3258:8:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 6761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3258:121:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6762, + "nodeType": "ExpressionStatement", + "src": "3258:121:18" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3396:4:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 6740, + "id": 6764, + "nodeType": "Return", + "src": "3389:11:18" + } + ] + }, + "documentation": "@dev See {IERC20-transferFrom}.\n * Emits an {Approval} event indicating the updated allowance. This is not\nrequired by the EIP. See the note at the beginning of {ERC20};\n * Requirements:\n- `sender` and `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `amount`.\n- the caller must have allowance for `sender`'s tokens of at least\n`amount`.", + "id": 6766, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6737, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6732, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 6766, + "src": "3129:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6731, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3129:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6734, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 6766, + "src": "3145:17:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6733, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3145:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6736, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 6766, + "src": "3164:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3164:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3128:51:18" + }, + "returnParameters": { + "id": 6740, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6739, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6766, + "src": "3196:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6738, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3196:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3195:6:18" + }, + "scope": 7037, + "src": "3107:300:18", + "stateMutability": "nonpayable", + "superFunction": 7089, + "visibility": "public" + }, + { + "body": { + "id": 6792, + "nodeType": "Block", + "src": "3888:121:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6776, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "3907:10:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 6777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3907:12:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 6778, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6768, + "src": "3921:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6786, + "name": "addedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6770, + "src": "3969:10:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6779, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "3930:11:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 6782, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6780, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "3942:10:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 6781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3942:12:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3930:25:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6784, + "indexExpression": { + "argumentTypes": null, + "id": 6783, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6768, + "src": "3956:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3930:34:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6354, + "src": "3930:38:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3930:50:18", + "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": 6775, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7007, + "src": "3898:8:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 6788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3898:83:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6789, + "nodeType": "ExpressionStatement", + "src": "3898:83:18" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 6790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3998:4:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 6774, + "id": 6791, + "nodeType": "Return", + "src": "3991:11:18" + } + ] + }, + "documentation": "@dev Atomically increases the allowance granted to `spender` by the caller.\n * This is an alternative to {approve} that can be used as a mitigation for\nproblems described in {IERC20-approve}.\n * Emits an {Approval} event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.", + "id": 6793, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "increaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6771, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6768, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 6793, + "src": "3829:15:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3829:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6770, + "name": "addedValue", + "nodeType": "VariableDeclaration", + "scope": 6793, + "src": "3846:18:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6769, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3846:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3828:37:18" + }, + "returnParameters": { + "id": 6774, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6773, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6793, + "src": "3882:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6772, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3882:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3881:6:18" + }, + "scope": 7037, + "src": "3802:207:18", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 6820, + "nodeType": "Block", + "src": "4587:167:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6803, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "4606:10:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 6804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4606:12:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 6805, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6795, + "src": "4620:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6813, + "name": "subtractedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6797, + "src": "4668:15:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", + "id": 6814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4685:39:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", + "typeString": "literal_string \"ERC20: decreased allowance below zero\"" + }, + "value": "ERC20: decreased allowance below zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", + "typeString": "literal_string \"ERC20: decreased allowance below zero\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6806, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "4629:11:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 6809, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6807, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "4641:10:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 6808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4641:12:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4629:25:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6811, + "indexExpression": { + "argumentTypes": null, + "id": 6810, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6795, + "src": "4655:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4629:34:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6397, + "src": "4629:38:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 6815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4629:96:18", + "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": 6802, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7007, + "src": "4597:8:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 6816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4597:129:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6817, + "nodeType": "ExpressionStatement", + "src": "4597:129:18" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 6818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4743:4:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 6801, + "id": 6819, + "nodeType": "Return", + "src": "4736:11:18" + } + ] + }, + "documentation": "@dev Atomically decreases the allowance granted to `spender` by the caller.\n * This is an alternative to {approve} that can be used as a mitigation for\nproblems described in {IERC20-approve}.\n * Emits an {Approval} event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.\n- `spender` must have allowance for the caller of at least\n`subtractedValue`.", + "id": 6821, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6798, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6795, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 6821, + "src": "4523:15:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6794, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4523:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6797, + "name": "subtractedValue", + "nodeType": "VariableDeclaration", + "scope": 6821, + "src": "4540:23:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6796, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4540:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4522:42:18" + }, + "returnParameters": { + "id": 6801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6800, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6821, + "src": "4581:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6799, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4581:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4580:6:18" + }, + "scope": 7037, + "src": "4496:258:18", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 6877, + "nodeType": "Block", + "src": "5307:385:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6831, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6823, + "src": "5325:6:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6833, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5343:1:18", + "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": 6832, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5335:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5335:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5325:20:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373", + "id": 6836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5347:39:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "typeString": "literal_string \"ERC20: transfer from the zero address\"" + }, + "value": "ERC20: transfer from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "typeString": "literal_string \"ERC20: transfer from the zero address\"" + } + ], + "id": 6830, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "5317:7:18", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5317:70:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6838, + "nodeType": "ExpressionStatement", + "src": "5317:70:18" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6840, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6825, + "src": "5405:9:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5426:1:18", + "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": 6841, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5418:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5418:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5405:23:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472657373", + "id": 6845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5430:37:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "typeString": "literal_string \"ERC20: transfer to the zero address\"" + }, + "value": "ERC20: transfer to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "typeString": "literal_string \"ERC20: transfer to the zero address\"" + } + ], + "id": 6839, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "5397:7:18", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5397:71:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6847, + "nodeType": "ExpressionStatement", + "src": "5397:71:18" + }, + { + "expression": { + "argumentTypes": null, + "id": 6858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6848, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "5479:9:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6850, + "indexExpression": { + "argumentTypes": null, + "id": 6849, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6823, + "src": "5489:6:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5479:17:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6855, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "5521:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365", + "id": 6856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5529:40:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" + }, + "value": "ERC20: transfer amount exceeds balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6851, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "5499:9:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6853, + "indexExpression": { + "argumentTypes": null, + "id": 6852, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6823, + "src": "5509:6:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5499:17:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6397, + "src": "5499:21:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 6857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5499:71:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5479:91:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6859, + "nodeType": "ExpressionStatement", + "src": "5479:91:18" + }, + { + "expression": { + "argumentTypes": null, + "id": 6869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6860, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "5580:9:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6862, + "indexExpression": { + "argumentTypes": null, + "id": 6861, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6825, + "src": "5590:9:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5580:20:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6867, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "5628:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6863, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "5603:9:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6865, + "indexExpression": { + "argumentTypes": null, + "id": 6864, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6825, + "src": "5613:9:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5603:20:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6354, + "src": "5603:24:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5603:32:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5580:55:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6870, + "nodeType": "ExpressionStatement", + "src": "5580:55:18" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6872, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6823, + "src": "5659:6:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6873, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6825, + "src": "5667:9:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6874, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "5678:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6871, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7097, + "src": "5650:8:18", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 6875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5650:35:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6876, + "nodeType": "EmitStatement", + "src": "5645:40:18" + } + ] + }, + "documentation": "@dev Moves tokens `amount` from `sender` to `recipient`.\n * This is internal function is equivalent to {transfer}, and can be used to\ne.g. implement automatic token fees, slashing mechanisms, etc.\n * Emits a {Transfer} event.\n * Requirements:\n * - `sender` cannot be the zero address.\n- `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `amount`.", + "id": 6878, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6828, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6823, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 6878, + "src": "5247:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5247:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6825, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 6878, + "src": "5263:17:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6824, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5263:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6827, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 6878, + "src": "5282:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6826, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5282:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5246:51:18" + }, + "returnParameters": { + "id": 6829, + "nodeType": "ParameterList", + "parameters": [], + "src": "5307:0:18" + }, + "scope": 7037, + "src": "5228:464:18", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6920, + "nodeType": "Block", + "src": "6019:245:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6886, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6880, + "src": "6037:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6056:1:18", + "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": 6887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6048:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6048:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6037:21:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373", + "id": 6891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6060:33:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "typeString": "literal_string \"ERC20: mint to the zero address\"" + }, + "value": "ERC20: mint to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "typeString": "literal_string \"ERC20: mint to the zero address\"" + } + ], + "id": 6885, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "6029:7:18", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6029:65:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6893, + "nodeType": "ExpressionStatement", + "src": "6029:65:18" + }, + { + "expression": { + "argumentTypes": null, + "id": 6899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6894, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6656, + "src": "6105:12:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6897, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "6137:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 6895, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6656, + "src": "6120:12:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6354, + "src": "6120:16:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6120:24:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6105:39:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6900, + "nodeType": "ExpressionStatement", + "src": "6105:39:18" + }, + { + "expression": { + "argumentTypes": null, + "id": 6910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6901, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "6154:9:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6903, + "indexExpression": { + "argumentTypes": null, + "id": 6902, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6880, + "src": "6164:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6154:18:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6908, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "6198:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6904, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "6175:9:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6906, + "indexExpression": { + "argumentTypes": null, + "id": 6905, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6880, + "src": "6185:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6175:18:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 6354, + "src": "6175:22:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6175:30:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6154:51:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6911, + "nodeType": "ExpressionStatement", + "src": "6154:51:18" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6914, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6237:1:18", + "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": 6913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6229:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6229:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 6916, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6880, + "src": "6241:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6917, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "6250:6:18", + "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": 6912, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7097, + "src": "6220:8:18", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 6918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6220:37:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6919, + "nodeType": "EmitStatement", + "src": "6215:42:18" + } + ] + }, + "documentation": "@dev Creates `amount` tokens and assigns them to `account`, increasing\nthe total supply.\n * Emits a {Transfer} event with `from` set to the zero address.\n * Requirements\n * - `to` cannot be the zero address.", + "id": 6921, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6883, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6880, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 6921, + "src": "5977:15:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6879, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5977:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6882, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 6921, + "src": "5994:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6881, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5994:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5976:33:18" + }, + "returnParameters": { + "id": 6884, + "nodeType": "ParameterList", + "parameters": [], + "src": "6019:0:18" + }, + "scope": 7037, + "src": "5962:302:18", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6964, + "nodeType": "Block", + "src": "6640:285:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6929, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6923, + "src": "6658:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6677:1:18", + "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": 6930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6669:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6932, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6669:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6658:21:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206275726e2066726f6d20746865207a65726f2061646472657373", + "id": 6934, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6681:35:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", + "typeString": "literal_string \"ERC20: burn from the zero address\"" + }, + "value": "ERC20: burn from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", + "typeString": "literal_string \"ERC20: burn from the zero address\"" + } + ], + "id": 6928, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "6650:7:18", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6650:67:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6936, + "nodeType": "ExpressionStatement", + "src": "6650:67:18" + }, + { + "expression": { + "argumentTypes": null, + "id": 6947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6937, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "6728:9:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6939, + "indexExpression": { + "argumentTypes": null, + "id": 6938, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6923, + "src": "6738:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6728:18:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6944, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6925, + "src": "6772:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206275726e20616d6f756e7420657863656564732062616c616e6365", + "id": 6945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6780:36:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", + "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" + }, + "value": "ERC20: burn amount exceeds balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", + "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6940, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "6749:9:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6942, + "indexExpression": { + "argumentTypes": null, + "id": 6941, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6923, + "src": "6759:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6749:18:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6397, + "src": "6749:22:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 6946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6749:68:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6728:89:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6948, + "nodeType": "ExpressionStatement", + "src": "6728:89:18" + }, + { + "expression": { + "argumentTypes": null, + "id": 6954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6949, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6656, + "src": "6827:12:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6952, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6925, + "src": "6859:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 6950, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6656, + "src": "6842:12:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6370, + "src": "6842:16:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 6953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6842:24:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6827:39:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6955, + "nodeType": "ExpressionStatement", + "src": "6827:39:18" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6957, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6923, + "src": "6890:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6959, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6907:1:18", + "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": 6958, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6899:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6960, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6899:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 6961, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6925, + "src": "6911:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6956, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7097, + "src": "6881:8:18", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 6962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6881:37:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6963, + "nodeType": "EmitStatement", + "src": "6876:42:18" + } + ] + }, + "documentation": "@dev Destroys `amount` tokens from `account`, reducing the\ntotal supply.\n * Emits a {Transfer} event with `to` set to the zero address.\n * Requirements\n * - `account` cannot be the zero address.\n- `account` must have at least `amount` tokens.", + "id": 6965, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6923, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 6965, + "src": "6598:15:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6922, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6598:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6925, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 6965, + "src": "6615:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6924, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6615:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6597:33:18" + }, + "returnParameters": { + "id": 6927, + "nodeType": "ParameterList", + "parameters": [], + "src": "6640:0:18" + }, + "scope": 7037, + "src": "6583:342:18", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 7006, + "nodeType": "Block", + "src": "7425:257:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6975, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "7443:5:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6977, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7460:1:18", + "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": 6976, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7452:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7452:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7443:19:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373", + "id": 6980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7464:38:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", + "typeString": "literal_string \"ERC20: approve from the zero address\"" + }, + "value": "ERC20: approve from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", + "typeString": "literal_string \"ERC20: approve from the zero address\"" + } + ], + "id": 6974, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "7435:7:18", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7435:68:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6982, + "nodeType": "ExpressionStatement", + "src": "7435:68:18" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6984, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "7521:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7540:1:18", + "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": 6985, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7532:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7532:10:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7521:21:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a20617070726f766520746f20746865207a65726f2061646472657373", + "id": 6989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7544:36:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "typeString": "literal_string \"ERC20: approve to the zero address\"" + }, + "value": "ERC20: approve to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "typeString": "literal_string \"ERC20: approve to the zero address\"" + } + ], + "id": 6983, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "7513:7:18", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7513:68:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6991, + "nodeType": "ExpressionStatement", + "src": "7513:68:18" + }, + { + "expression": { + "argumentTypes": null, + "id": 6998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6992, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "7592:11:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 6995, + "indexExpression": { + "argumentTypes": null, + "id": 6993, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "7604:5:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7592:18:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6996, + "indexExpression": { + "argumentTypes": null, + "id": 6994, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "7611:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7592:27:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6997, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6971, + "src": "7622:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7592:36:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6999, + "nodeType": "ExpressionStatement", + "src": "7592:36:18" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7001, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "7652:5:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 7002, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "7659:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 7003, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6971, + "src": "7668:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7000, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7105, + "src": "7643:8:18", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 7004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7643:32:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7005, + "nodeType": "EmitStatement", + "src": "7638:37:18" + } + ] + }, + "documentation": "@dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n * This is internal function is equivalent to `approve`, and can be used to\ne.g. set automatic allowances for certain subsystems, etc.\n * Emits an {Approval} event.\n * Requirements:\n * - `owner` cannot be the zero address.\n- `spender` cannot be the zero address.", + "id": 7007, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6967, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 7007, + "src": "7368:13:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6966, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7368:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6969, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 7007, + "src": "7383:15:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6968, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7383:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6971, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 7007, + "src": "7400:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7400:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7367:48:18" + }, + "returnParameters": { + "id": 6973, + "nodeType": "ParameterList", + "parameters": [], + "src": "7425:0:18" + }, + "scope": 7037, + "src": "7350:332:18", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 7035, + "nodeType": "Block", + "src": "7921:168:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7015, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7009, + "src": "7937:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 7016, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7011, + "src": "7946:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7014, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6965, + "src": "7931:5:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 7017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7931:22:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7018, + "nodeType": "ExpressionStatement", + "src": "7931:22:18" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7020, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7009, + "src": "7972:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7021, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "7981:10:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 7022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7981:12:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7030, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7011, + "src": "8034:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e6365", + "id": 7031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8042:38:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a287c363786607a1457a2d9d12fa61c0073358e02d76b4035fc2c2d86a19c0db", + "typeString": "literal_string \"ERC20: burn amount exceeds allowance\"" + }, + "value": "ERC20: burn amount exceeds allowance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_a287c363786607a1457a2d9d12fa61c0073358e02d76b4035fc2c2d86a19c0db", + "typeString": "literal_string \"ERC20: burn amount exceeds allowance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 7023, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "7995:11:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 7025, + "indexExpression": { + "argumentTypes": null, + "id": 7024, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7009, + "src": "8007:7:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7995:20:18", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 7028, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7026, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "8016:10:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 7027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8016:12:18", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7995:34:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 6397, + "src": "7995:38:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 7032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7995:86:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7019, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7007, + "src": "7963:8:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 7033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7963:119:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7034, + "nodeType": "ExpressionStatement", + "src": "7963:119:18" + } + ] + }, + "documentation": "@dev Destroys `amount` tokens from `account`.`amount` is then deducted\nfrom the caller's allowance.\n * See {_burn} and {_approve}.", + "id": 7036, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burnFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7012, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7009, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 7036, + "src": "7879:15:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7008, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7879:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7011, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 7036, + "src": "7896:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7010, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7896:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7878:33:18" + }, + "returnParameters": { + "id": 7013, + "nodeType": "ParameterList", + "parameters": [], + "src": "7921:0:18" + }, + "scope": 7037, + "src": "7860:229:18", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 7038, + "src": "1268:6823:18" + } + ], + "src": "0:8092:18" + }, + "legacyAST": { + "attributes": { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "exportedSymbols": { + "ERC20": [ + 7037 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ] + }, + "id": 6634, + "name": "PragmaDirective", + "src": "0:23:18" + }, + { + "attributes": { + "SourceUnit": 6328, + "absolutePath": "openzeppelin-solidity/contracts/GSN/Context.sol", + "file": "../../GSN/Context.sol", + "scope": 7038, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 6635, + "name": "ImportDirective", + "src": "25:31:18" + }, + { + "attributes": { + "SourceUnit": 7107, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "scope": 7038, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 6636, + "name": "ImportDirective", + "src": "57:22:18" + }, + { + "attributes": { + "SourceUnit": 6515, + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "scope": 7038, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 6637, + "name": "ImportDirective", + "src": "80:33:18" + }, + { + "attributes": { + "contractDependencies": [ + 6327, + 7106 + ], + "contractKind": "contract", + "documentation": "@dev Implementation of the {IERC20} interface.\n * This implementation is agnostic to the way tokens are created. This means\nthat a supply mechanism has to be added in a derived contract using {_mint}.\nFor a generic mechanism see {ERC20Mintable}.\n * TIP: For a detailed writeup see our guide\nhttps://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\nto implement supply mechanisms].\n * We have followed general OpenZeppelin guidelines: functions revert instead\nof returning `false` on failure. This behavior is nonetheless conventional\nand does not conflict with the expectations of ERC20 applications.\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\nThis allows applications to reconstruct the allowance for all accounts just\nby listening to said events. Other implementations of the EIP may not emit\nthese events, as it isn't required by the specification.\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\nfunctions have been added to mitigate the well-known issues around setting\nallowances. See {IERC20-approve}.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 7037, + 7106, + 6327 + ], + "name": "ERC20", + "scope": 7038 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Context", + "referencedDeclaration": 6327, + "type": "contract Context" + }, + "id": 6638, + "name": "UserDefinedTypeName", + "src": "1286:7:18" + } + ], + "id": 6639, + "name": "InheritanceSpecifier", + "src": "1286:7:18" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20", + "referencedDeclaration": 7106, + "type": "contract IERC20" + }, + "id": 6640, + "name": "UserDefinedTypeName", + "src": "1295:6:18" + } + ], + "id": 6641, + "name": "InheritanceSpecifier", + "src": "1295:6:18" + }, + { + "children": [ + { + "attributes": { + "contractScope": null, + "name": "SafeMath", + "referencedDeclaration": 6514, + "type": "library SafeMath" + }, + "id": 6642, + "name": "UserDefinedTypeName", + "src": "1314:8:18" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6643, + "name": "ElementaryTypeName", + "src": "1327:7:18" + } + ], + "id": 6644, + "name": "UsingForDirective", + "src": "1308:27:18" + }, + { + "attributes": { + "constant": false, + "name": "_balances", + "scope": 7037, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => uint256)", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 6645, + "name": "ElementaryTypeName", + "src": "1350:7:18" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6646, + "name": "ElementaryTypeName", + "src": "1361:7:18" + } + ], + "id": 6647, + "name": "Mapping", + "src": "1341:28:18" + } + ], + "id": 6648, + "name": "VariableDeclaration", + "src": "1341:46:18" + }, + { + "attributes": { + "constant": false, + "name": "_allowances", + "scope": 7037, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => mapping(address => uint256))", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => mapping(address => uint256))" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 6649, + "name": "ElementaryTypeName", + "src": "1403:7:18" + }, + { + "attributes": { + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 6650, + "name": "ElementaryTypeName", + "src": "1423:7:18" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6651, + "name": "ElementaryTypeName", + "src": "1434:7:18" + } + ], + "id": 6652, + "name": "Mapping", + "src": "1414:28:18" + } + ], + "id": 6653, + "name": "Mapping", + "src": "1394:49:18" + } + ], + "id": 6654, + "name": "VariableDeclaration", + "src": "1394:69:18" + }, + { + "attributes": { + "constant": false, + "name": "_totalSupply", + "scope": 7037, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6655, + "name": "ElementaryTypeName", + "src": "1470:7:18" + } + ], + "id": 6656, + "name": "VariableDeclaration", + "src": "1470:28:18" + }, + { + "attributes": { + "documentation": "@dev See {IERC20-totalSupply}.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "totalSupply", + "scope": 7037, + "stateMutability": "view", + "superFunction": 7044, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6657, + "name": "ParameterList", + "src": "1579:2:18" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6664, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6658, + "name": "ElementaryTypeName", + "src": "1603:7:18" + } + ], + "id": 6659, + "name": "VariableDeclaration", + "src": "1603:7:18" + } + ], + "id": 6660, + "name": "ParameterList", + "src": "1602:9:18" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6660 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6656, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 6661, + "name": "Identifier", + "src": "1629:12:18" + } + ], + "id": 6662, + "name": "Return", + "src": "1622:19:18" + } + ], + "id": 6663, + "name": "Block", + "src": "1612:36:18" + } + ], + "id": 6664, + "name": "FunctionDefinition", + "src": "1559:89:18" + }, + { + "attributes": { + "documentation": "@dev See {IERC20-balanceOf}.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "balanceOf", + "scope": 7037, + "stateMutability": "view", + "superFunction": 7051, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "account", + "scope": 6676, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6665, + "name": "ElementaryTypeName", + "src": "1725:7:18" + } + ], + "id": 6666, + "name": "VariableDeclaration", + "src": "1725:15:18" + } + ], + "id": 6667, + "name": "ParameterList", + "src": "1724:17:18" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6676, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6668, + "name": "ElementaryTypeName", + "src": "1763:7:18" + } + ], + "id": 6669, + "name": "VariableDeclaration", + "src": "1763:7:18" + } + ], + "id": 6670, + "name": "ParameterList", + "src": "1762:9:18" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6670 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6648, + "type": "mapping(address => uint256)", + "value": "_balances" + }, + "id": 6671, + "name": "Identifier", + "src": "1789:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6666, + "type": "address", + "value": "account" + }, + "id": 6672, + "name": "Identifier", + "src": "1799:7:18" + } + ], + "id": 6673, + "name": "IndexAccess", + "src": "1789:18:18" + } + ], + "id": 6674, + "name": "Return", + "src": "1782:25:18" + } + ], + "id": 6675, + "name": "Block", + "src": "1772:42:18" + } + ], + "id": 6676, + "name": "FunctionDefinition", + "src": "1706:108:18" + }, + { + "attributes": { + "documentation": "@dev See {IERC20-transfer}.\n * Requirements:\n * - `recipient` cannot be the zero address.\n- the caller must have a balance of at least `amount`.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "transfer", + "scope": 7037, + "stateMutability": "nonpayable", + "superFunction": 7060, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "recipient", + "scope": 6695, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6677, + "name": "ElementaryTypeName", + "src": "2035:7:18" + } + ], + "id": 6678, + "name": "VariableDeclaration", + "src": "2035:17:18" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 6695, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6679, + "name": "ElementaryTypeName", + "src": "2054:7:18" + } + ], + "id": 6680, + "name": "VariableDeclaration", + "src": "2054:14:18" + } + ], + "id": 6681, + "name": "ParameterList", + "src": "2034:35:18" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6695, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 6682, + "name": "ElementaryTypeName", + "src": "2086:4:18" + } + ], + "id": 6683, + "name": "VariableDeclaration", + "src": "2086:4:18" + } + ], + "id": 6684, + "name": "ParameterList", + "src": "2085:6:18" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6878, + "type": "function (address,address,uint256)", + "value": "_transfer" + }, + "id": 6685, + "name": "Identifier", + "src": "2102:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 6686, + "name": "Identifier", + "src": "2112:10:18" + } + ], + "id": 6687, + "name": "FunctionCall", + "src": "2112:12:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6678, + "type": "address", + "value": "recipient" + }, + "id": 6688, + "name": "Identifier", + "src": "2126:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6680, + "type": "uint256", + "value": "amount" + }, + "id": 6689, + "name": "Identifier", + "src": "2137:6:18" + } + ], + "id": 6690, + "name": "FunctionCall", + "src": "2102:42:18" + } + ], + "id": 6691, + "name": "ExpressionStatement", + "src": "2102:42:18" + }, + { + "attributes": { + "functionReturnParameters": 6684 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 6692, + "name": "Literal", + "src": "2161:4:18" + } + ], + "id": 6693, + "name": "Return", + "src": "2154:11:18" + } + ], + "id": 6694, + "name": "Block", + "src": "2092:80:18" + } + ], + "id": 6695, + "name": "FunctionDefinition", + "src": "2017:155:18" + }, + { + "attributes": { + "documentation": "@dev See {IERC20-allowance}.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "allowance", + "scope": 7037, + "stateMutability": "view", + "superFunction": 7069, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "owner", + "scope": 6711, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6696, + "name": "ElementaryTypeName", + "src": "2249:7:18" + } + ], + "id": 6697, + "name": "VariableDeclaration", + "src": "2249:13:18" + }, + { + "attributes": { + "constant": false, + "name": "spender", + "scope": 6711, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6698, + "name": "ElementaryTypeName", + "src": "2264:7:18" + } + ], + "id": 6699, + "name": "VariableDeclaration", + "src": "2264:15:18" + } + ], + "id": 6700, + "name": "ParameterList", + "src": "2248:32:18" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6711, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6701, + "name": "ElementaryTypeName", + "src": "2302:7:18" + } + ], + "id": 6702, + "name": "VariableDeclaration", + "src": "2302:7:18" + } + ], + "id": 6703, + "name": "ParameterList", + "src": "2301:9:18" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6703 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6654, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowances" + }, + "id": 6704, + "name": "Identifier", + "src": "2328:11:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6697, + "type": "address", + "value": "owner" + }, + "id": 6705, + "name": "Identifier", + "src": "2340:5:18" + } + ], + "id": 6706, + "name": "IndexAccess", + "src": "2328:18:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6699, + "type": "address", + "value": "spender" + }, + "id": 6707, + "name": "Identifier", + "src": "2347:7:18" + } + ], + "id": 6708, + "name": "IndexAccess", + "src": "2328:27:18" + } + ], + "id": 6709, + "name": "Return", + "src": "2321:34:18" + } + ], + "id": 6710, + "name": "Block", + "src": "2311:51:18" + } + ], + "id": 6711, + "name": "FunctionDefinition", + "src": "2230:132:18" + }, + { + "attributes": { + "documentation": "@dev See {IERC20-approve}.\n * Requirements:\n * - `spender` cannot be the zero address.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "approve", + "scope": 7037, + "stateMutability": "nonpayable", + "superFunction": 7078, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "spender", + "scope": 6730, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6712, + "name": "ElementaryTypeName", + "src": "2517:7:18" + } + ], + "id": 6713, + "name": "VariableDeclaration", + "src": "2517:15:18" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 6730, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6714, + "name": "ElementaryTypeName", + "src": "2534:7:18" + } + ], + "id": 6715, + "name": "VariableDeclaration", + "src": "2534:14:18" + } + ], + "id": 6716, + "name": "ParameterList", + "src": "2516:33:18" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6730, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 6717, + "name": "ElementaryTypeName", + "src": "2566:4:18" + } + ], + "id": 6718, + "name": "VariableDeclaration", + "src": "2566:4:18" + } + ], + "id": 6719, + "name": "ParameterList", + "src": "2565:6:18" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7007, + "type": "function (address,address,uint256)", + "value": "_approve" + }, + "id": 6720, + "name": "Identifier", + "src": "2582:8:18" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 6721, + "name": "Identifier", + "src": "2591:10:18" + } + ], + "id": 6722, + "name": "FunctionCall", + "src": "2591:12:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6713, + "type": "address", + "value": "spender" + }, + "id": 6723, + "name": "Identifier", + "src": "2605:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6715, + "type": "uint256", + "value": "amount" + }, + "id": 6724, + "name": "Identifier", + "src": "2614:6:18" + } + ], + "id": 6725, + "name": "FunctionCall", + "src": "2582:39:18" + } + ], + "id": 6726, + "name": "ExpressionStatement", + "src": "2582:39:18" + }, + { + "attributes": { + "functionReturnParameters": 6719 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 6727, + "name": "Literal", + "src": "2638:4:18" + } + ], + "id": 6728, + "name": "Return", + "src": "2631:11:18" + } + ], + "id": 6729, + "name": "Block", + "src": "2572:77:18" + } + ], + "id": 6730, + "name": "FunctionDefinition", + "src": "2500:149:18" + }, + { + "attributes": { + "documentation": "@dev See {IERC20-transferFrom}.\n * Emits an {Approval} event indicating the updated allowance. This is not\nrequired by the EIP. See the note at the beginning of {ERC20};\n * Requirements:\n- `sender` and `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `amount`.\n- the caller must have allowance for `sender`'s tokens of at least\n`amount`.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "transferFrom", + "scope": 7037, + "stateMutability": "nonpayable", + "superFunction": 7089, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "sender", + "scope": 6766, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6731, + "name": "ElementaryTypeName", + "src": "3129:7:18" + } + ], + "id": 6732, + "name": "VariableDeclaration", + "src": "3129:14:18" + }, + { + "attributes": { + "constant": false, + "name": "recipient", + "scope": 6766, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6733, + "name": "ElementaryTypeName", + "src": "3145:7:18" + } + ], + "id": 6734, + "name": "VariableDeclaration", + "src": "3145:17:18" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 6766, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6735, + "name": "ElementaryTypeName", + "src": "3164:7:18" + } + ], + "id": 6736, + "name": "VariableDeclaration", + "src": "3164:14:18" + } + ], + "id": 6737, + "name": "ParameterList", + "src": "3128:51:18" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6766, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 6738, + "name": "ElementaryTypeName", + "src": "3196:4:18" + } + ], + "id": 6739, + "name": "VariableDeclaration", + "src": "3196:4:18" + } + ], + "id": 6740, + "name": "ParameterList", + "src": "3195:6:18" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6878, + "type": "function (address,address,uint256)", + "value": "_transfer" + }, + "id": 6741, + "name": "Identifier", + "src": "3212:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6732, + "type": "address", + "value": "sender" + }, + "id": 6742, + "name": "Identifier", + "src": "3222:6:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6734, + "type": "address", + "value": "recipient" + }, + "id": 6743, + "name": "Identifier", + "src": "3230:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6736, + "type": "uint256", + "value": "amount" + }, + "id": 6744, + "name": "Identifier", + "src": "3241:6:18" + } + ], + "id": 6745, + "name": "FunctionCall", + "src": "3212:36:18" + } + ], + "id": 6746, + "name": "ExpressionStatement", + "src": "3212:36:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7007, + "type": "function (address,address,uint256)", + "value": "_approve" + }, + "id": 6747, + "name": "Identifier", + "src": "3258:8:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6732, + "type": "address", + "value": "sender" + }, + "id": 6748, + "name": "Identifier", + "src": "3267:6:18" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 6749, + "name": "Identifier", + "src": "3275:10:18" + } + ], + "id": 6750, + "name": "FunctionCall", + "src": "3275:12:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", + "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 6397, + "type": "function (uint256,uint256,string memory) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6654, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowances" + }, + "id": 6751, + "name": "Identifier", + "src": "3289:11:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6732, + "type": "address", + "value": "sender" + }, + "id": 6752, + "name": "Identifier", + "src": "3301:6:18" + } + ], + "id": 6753, + "name": "IndexAccess", + "src": "3289:19:18" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 6754, + "name": "Identifier", + "src": "3309:10:18" + } + ], + "id": 6755, + "name": "FunctionCall", + "src": "3309:12:18" + } + ], + "id": 6756, + "name": "IndexAccess", + "src": "3289:33:18" + } + ], + "id": 6757, + "name": "MemberAccess", + "src": "3289:37:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6736, + "type": "uint256", + "value": "amount" + }, + "id": 6758, + "name": "Identifier", + "src": "3327:6:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERC20: transfer amount exceeds allowance\"", + "value": "ERC20: transfer amount exceeds allowance" + }, + "id": 6759, + "name": "Literal", + "src": "3335:42:18" + } + ], + "id": 6760, + "name": "FunctionCall", + "src": "3289:89:18" + } + ], + "id": 6761, + "name": "FunctionCall", + "src": "3258:121:18" + } + ], + "id": 6762, + "name": "ExpressionStatement", + "src": "3258:121:18" + }, + { + "attributes": { + "functionReturnParameters": 6740 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 6763, + "name": "Literal", + "src": "3396:4:18" + } + ], + "id": 6764, + "name": "Return", + "src": "3389:11:18" + } + ], + "id": 6765, + "name": "Block", + "src": "3202:205:18" + } + ], + "id": 6766, + "name": "FunctionDefinition", + "src": "3107:300:18" + }, + { + "attributes": { + "documentation": "@dev Atomically increases the allowance granted to `spender` by the caller.\n * This is an alternative to {approve} that can be used as a mitigation for\nproblems described in {IERC20-approve}.\n * Emits an {Approval} event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "increaseAllowance", + "scope": 7037, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "spender", + "scope": 6793, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6767, + "name": "ElementaryTypeName", + "src": "3829:7:18" + } + ], + "id": 6768, + "name": "VariableDeclaration", + "src": "3829:15:18" + }, + { + "attributes": { + "constant": false, + "name": "addedValue", + "scope": 6793, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6769, + "name": "ElementaryTypeName", + "src": "3846:7:18" + } + ], + "id": 6770, + "name": "VariableDeclaration", + "src": "3846:18:18" + } + ], + "id": 6771, + "name": "ParameterList", + "src": "3828:37:18" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6793, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 6772, + "name": "ElementaryTypeName", + "src": "3882:4:18" + } + ], + "id": 6773, + "name": "VariableDeclaration", + "src": "3882:4:18" + } + ], + "id": 6774, + "name": "ParameterList", + "src": "3881:6:18" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7007, + "type": "function (address,address,uint256)", + "value": "_approve" + }, + "id": 6775, + "name": "Identifier", + "src": "3898:8:18" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 6776, + "name": "Identifier", + "src": "3907:10:18" + } + ], + "id": 6777, + "name": "FunctionCall", + "src": "3907:12:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6768, + "type": "address", + "value": "spender" + }, + "id": 6778, + "name": "Identifier", + "src": "3921:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 6354, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6654, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowances" + }, + "id": 6779, + "name": "Identifier", + "src": "3930:11:18" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 6780, + "name": "Identifier", + "src": "3942:10:18" + } + ], + "id": 6781, + "name": "FunctionCall", + "src": "3942:12:18" + } + ], + "id": 6782, + "name": "IndexAccess", + "src": "3930:25:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6768, + "type": "address", + "value": "spender" + }, + "id": 6783, + "name": "Identifier", + "src": "3956:7:18" + } + ], + "id": 6784, + "name": "IndexAccess", + "src": "3930:34:18" + } + ], + "id": 6785, + "name": "MemberAccess", + "src": "3930:38:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6770, + "type": "uint256", + "value": "addedValue" + }, + "id": 6786, + "name": "Identifier", + "src": "3969:10:18" + } + ], + "id": 6787, + "name": "FunctionCall", + "src": "3930:50:18" + } + ], + "id": 6788, + "name": "FunctionCall", + "src": "3898:83:18" + } + ], + "id": 6789, + "name": "ExpressionStatement", + "src": "3898:83:18" + }, + { + "attributes": { + "functionReturnParameters": 6774 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 6790, + "name": "Literal", + "src": "3998:4:18" + } + ], + "id": 6791, + "name": "Return", + "src": "3991:11:18" + } + ], + "id": 6792, + "name": "Block", + "src": "3888:121:18" + } + ], + "id": 6793, + "name": "FunctionDefinition", + "src": "3802:207:18" + }, + { + "attributes": { + "documentation": "@dev Atomically decreases the allowance granted to `spender` by the caller.\n * This is an alternative to {approve} that can be used as a mitigation for\nproblems described in {IERC20-approve}.\n * Emits an {Approval} event indicating the updated allowance.\n * Requirements:\n * - `spender` cannot be the zero address.\n- `spender` must have allowance for the caller of at least\n`subtractedValue`.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "decreaseAllowance", + "scope": 7037, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "spender", + "scope": 6821, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6794, + "name": "ElementaryTypeName", + "src": "4523:7:18" + } + ], + "id": 6795, + "name": "VariableDeclaration", + "src": "4523:15:18" + }, + { + "attributes": { + "constant": false, + "name": "subtractedValue", + "scope": 6821, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6796, + "name": "ElementaryTypeName", + "src": "4540:7:18" + } + ], + "id": 6797, + "name": "VariableDeclaration", + "src": "4540:23:18" + } + ], + "id": 6798, + "name": "ParameterList", + "src": "4522:42:18" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6821, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 6799, + "name": "ElementaryTypeName", + "src": "4581:4:18" + } + ], + "id": 6800, + "name": "VariableDeclaration", + "src": "4581:4:18" + } + ], + "id": 6801, + "name": "ParameterList", + "src": "4580:6:18" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7007, + "type": "function (address,address,uint256)", + "value": "_approve" + }, + "id": 6802, + "name": "Identifier", + "src": "4597:8:18" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 6803, + "name": "Identifier", + "src": "4606:10:18" + } + ], + "id": 6804, + "name": "FunctionCall", + "src": "4606:12:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6795, + "type": "address", + "value": "spender" + }, + "id": 6805, + "name": "Identifier", + "src": "4620:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", + "typeString": "literal_string \"ERC20: decreased allowance below zero\"" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 6397, + "type": "function (uint256,uint256,string memory) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6654, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowances" + }, + "id": 6806, + "name": "Identifier", + "src": "4629:11:18" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 6807, + "name": "Identifier", + "src": "4641:10:18" + } + ], + "id": 6808, + "name": "FunctionCall", + "src": "4641:12:18" + } + ], + "id": 6809, + "name": "IndexAccess", + "src": "4629:25:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6795, + "type": "address", + "value": "spender" + }, + "id": 6810, + "name": "Identifier", + "src": "4655:7:18" + } + ], + "id": 6811, + "name": "IndexAccess", + "src": "4629:34:18" + } + ], + "id": 6812, + "name": "MemberAccess", + "src": "4629:38:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6797, + "type": "uint256", + "value": "subtractedValue" + }, + "id": 6813, + "name": "Identifier", + "src": "4668:15:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERC20: decreased allowance below zero\"", + "value": "ERC20: decreased allowance below zero" + }, + "id": 6814, + "name": "Literal", + "src": "4685:39:18" + } + ], + "id": 6815, + "name": "FunctionCall", + "src": "4629:96:18" + } + ], + "id": 6816, + "name": "FunctionCall", + "src": "4597:129:18" + } + ], + "id": 6817, + "name": "ExpressionStatement", + "src": "4597:129:18" + }, + { + "attributes": { + "functionReturnParameters": 6801 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 6818, + "name": "Literal", + "src": "4743:4:18" + } + ], + "id": 6819, + "name": "Return", + "src": "4736:11:18" + } + ], + "id": 6820, + "name": "Block", + "src": "4587:167:18" + } + ], + "id": 6821, + "name": "FunctionDefinition", + "src": "4496:258:18" + }, + { + "attributes": { + "documentation": "@dev Moves tokens `amount` from `sender` to `recipient`.\n * This is internal function is equivalent to {transfer}, and can be used to\ne.g. implement automatic token fees, slashing mechanisms, etc.\n * Emits a {Transfer} event.\n * Requirements:\n * - `sender` cannot be the zero address.\n- `recipient` cannot be the zero address.\n- `sender` must have a balance of at least `amount`.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_transfer", + "scope": 7037, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "sender", + "scope": 6878, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6822, + "name": "ElementaryTypeName", + "src": "5247:7:18" + } + ], + "id": 6823, + "name": "VariableDeclaration", + "src": "5247:14:18" + }, + { + "attributes": { + "constant": false, + "name": "recipient", + "scope": 6878, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6824, + "name": "ElementaryTypeName", + "src": "5263:7:18" + } + ], + "id": 6825, + "name": "VariableDeclaration", + "src": "5263:17:18" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 6878, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6826, + "name": "ElementaryTypeName", + "src": "5282:7:18" + } + ], + "id": 6827, + "name": "VariableDeclaration", + "src": "5282:14:18" + } + ], + "id": 6828, + "name": "ParameterList", + "src": "5246:51:18" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6829, + "name": "ParameterList", + "src": "5307:0:18" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "typeString": "literal_string \"ERC20: transfer from the zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6830, + "name": "Identifier", + "src": "5317:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6823, + "type": "address", + "value": "sender" + }, + "id": 6831, + "name": "Identifier", + "src": "5325:6:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6832, + "name": "ElementaryTypeNameExpression", + "src": "5335:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6833, + "name": "Literal", + "src": "5343:1:18" + } + ], + "id": 6834, + "name": "FunctionCall", + "src": "5335:10:18" + } + ], + "id": 6835, + "name": "BinaryOperation", + "src": "5325:20:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "45524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERC20: transfer from the zero address\"", + "value": "ERC20: transfer from the zero address" + }, + "id": 6836, + "name": "Literal", + "src": "5347:39:18" + } + ], + "id": 6837, + "name": "FunctionCall", + "src": "5317:70:18" + } + ], + "id": 6838, + "name": "ExpressionStatement", + "src": "5317:70:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "typeString": "literal_string \"ERC20: transfer to the zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6839, + "name": "Identifier", + "src": "5397:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6825, + "type": "address", + "value": "recipient" + }, + "id": 6840, + "name": "Identifier", + "src": "5405:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6841, + "name": "ElementaryTypeNameExpression", + "src": "5418:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6842, + "name": "Literal", + "src": "5426:1:18" + } + ], + "id": 6843, + "name": "FunctionCall", + "src": "5418:10:18" + } + ], + "id": 6844, + "name": "BinaryOperation", + "src": "5405:23:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERC20: transfer to the zero address\"", + "value": "ERC20: transfer to the zero address" + }, + "id": 6845, + "name": "Literal", + "src": "5430:37:18" + } + ], + "id": 6846, + "name": "FunctionCall", + "src": "5397:71:18" + } + ], + "id": 6847, + "name": "ExpressionStatement", + "src": "5397:71:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6648, + "type": "mapping(address => uint256)", + "value": "_balances" + }, + "id": 6848, + "name": "Identifier", + "src": "5479:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6823, + "type": "address", + "value": "sender" + }, + "id": 6849, + "name": "Identifier", + "src": "5489:6:18" + } + ], + "id": 6850, + "name": "IndexAccess", + "src": "5479:17:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 6397, + "type": "function (uint256,uint256,string memory) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6648, + "type": "mapping(address => uint256)", + "value": "_balances" + }, + "id": 6851, + "name": "Identifier", + "src": "5499:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6823, + "type": "address", + "value": "sender" + }, + "id": 6852, + "name": "Identifier", + "src": "5509:6:18" + } + ], + "id": 6853, + "name": "IndexAccess", + "src": "5499:17:18" + } + ], + "id": 6854, + "name": "MemberAccess", + "src": "5499:21:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6827, + "type": "uint256", + "value": "amount" + }, + "id": 6855, + "name": "Identifier", + "src": "5521:6:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERC20: transfer amount exceeds balance\"", + "value": "ERC20: transfer amount exceeds balance" + }, + "id": 6856, + "name": "Literal", + "src": "5529:40:18" + } + ], + "id": 6857, + "name": "FunctionCall", + "src": "5499:71:18" + } + ], + "id": 6858, + "name": "Assignment", + "src": "5479:91:18" + } + ], + "id": 6859, + "name": "ExpressionStatement", + "src": "5479:91:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6648, + "type": "mapping(address => uint256)", + "value": "_balances" + }, + "id": 6860, + "name": "Identifier", + "src": "5580:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6825, + "type": "address", + "value": "recipient" + }, + "id": 6861, + "name": "Identifier", + "src": "5590:9:18" + } + ], + "id": 6862, + "name": "IndexAccess", + "src": "5580:20:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 6354, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6648, + "type": "mapping(address => uint256)", + "value": "_balances" + }, + "id": 6863, + "name": "Identifier", + "src": "5603:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6825, + "type": "address", + "value": "recipient" + }, + "id": 6864, + "name": "Identifier", + "src": "5613:9:18" + } + ], + "id": 6865, + "name": "IndexAccess", + "src": "5603:20:18" + } + ], + "id": 6866, + "name": "MemberAccess", + "src": "5603:24:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6827, + "type": "uint256", + "value": "amount" + }, + "id": 6867, + "name": "Identifier", + "src": "5628:6:18" + } + ], + "id": 6868, + "name": "FunctionCall", + "src": "5603:32:18" + } + ], + "id": 6869, + "name": "Assignment", + "src": "5580:55:18" + } + ], + "id": 6870, + "name": "ExpressionStatement", + "src": "5580:55:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7097, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 6871, + "name": "Identifier", + "src": "5650:8:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6823, + "type": "address", + "value": "sender" + }, + "id": 6872, + "name": "Identifier", + "src": "5659:6:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6825, + "type": "address", + "value": "recipient" + }, + "id": 6873, + "name": "Identifier", + "src": "5667:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6827, + "type": "uint256", + "value": "amount" + }, + "id": 6874, + "name": "Identifier", + "src": "5678:6:18" + } + ], + "id": 6875, + "name": "FunctionCall", + "src": "5650:35:18" + } + ], + "id": 6876, + "name": "EmitStatement", + "src": "5645:40:18" + } + ], + "id": 6877, + "name": "Block", + "src": "5307:385:18" + } + ], + "id": 6878, + "name": "FunctionDefinition", + "src": "5228:464:18" + }, + { + "attributes": { + "documentation": "@dev Creates `amount` tokens and assigns them to `account`, increasing\nthe total supply.\n * Emits a {Transfer} event with `from` set to the zero address.\n * Requirements\n * - `to` cannot be the zero address.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_mint", + "scope": 7037, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "account", + "scope": 6921, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6879, + "name": "ElementaryTypeName", + "src": "5977:7:18" + } + ], + "id": 6880, + "name": "VariableDeclaration", + "src": "5977:15:18" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 6921, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6881, + "name": "ElementaryTypeName", + "src": "5994:7:18" + } + ], + "id": 6882, + "name": "VariableDeclaration", + "src": "5994:14:18" + } + ], + "id": 6883, + "name": "ParameterList", + "src": "5976:33:18" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6884, + "name": "ParameterList", + "src": "6019:0:18" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "typeString": "literal_string \"ERC20: mint to the zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6885, + "name": "Identifier", + "src": "6029:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6880, + "type": "address", + "value": "account" + }, + "id": 6886, + "name": "Identifier", + "src": "6037:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6887, + "name": "ElementaryTypeNameExpression", + "src": "6048:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6888, + "name": "Literal", + "src": "6056:1:18" + } + ], + "id": 6889, + "name": "FunctionCall", + "src": "6048:10:18" + } + ], + "id": 6890, + "name": "BinaryOperation", + "src": "6037:21:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERC20: mint to the zero address\"", + "value": "ERC20: mint to the zero address" + }, + "id": 6891, + "name": "Literal", + "src": "6060:33:18" + } + ], + "id": 6892, + "name": "FunctionCall", + "src": "6029:65:18" + } + ], + "id": 6893, + "name": "ExpressionStatement", + "src": "6029:65:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6656, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 6894, + "name": "Identifier", + "src": "6105:12:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 6354, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6656, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 6895, + "name": "Identifier", + "src": "6120:12:18" + } + ], + "id": 6896, + "name": "MemberAccess", + "src": "6120:16:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6882, + "type": "uint256", + "value": "amount" + }, + "id": 6897, + "name": "Identifier", + "src": "6137:6:18" + } + ], + "id": 6898, + "name": "FunctionCall", + "src": "6120:24:18" + } + ], + "id": 6899, + "name": "Assignment", + "src": "6105:39:18" + } + ], + "id": 6900, + "name": "ExpressionStatement", + "src": "6105:39:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6648, + "type": "mapping(address => uint256)", + "value": "_balances" + }, + "id": 6901, + "name": "Identifier", + "src": "6154:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6880, + "type": "address", + "value": "account" + }, + "id": 6902, + "name": "Identifier", + "src": "6164:7:18" + } + ], + "id": 6903, + "name": "IndexAccess", + "src": "6154:18:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 6354, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6648, + "type": "mapping(address => uint256)", + "value": "_balances" + }, + "id": 6904, + "name": "Identifier", + "src": "6175:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6880, + "type": "address", + "value": "account" + }, + "id": 6905, + "name": "Identifier", + "src": "6185:7:18" + } + ], + "id": 6906, + "name": "IndexAccess", + "src": "6175:18:18" + } + ], + "id": 6907, + "name": "MemberAccess", + "src": "6175:22:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6882, + "type": "uint256", + "value": "amount" + }, + "id": 6908, + "name": "Identifier", + "src": "6198:6:18" + } + ], + "id": 6909, + "name": "FunctionCall", + "src": "6175:30:18" + } + ], + "id": 6910, + "name": "Assignment", + "src": "6154:51:18" + } + ], + "id": 6911, + "name": "ExpressionStatement", + "src": "6154:51:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7097, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 6912, + "name": "Identifier", + "src": "6220:8:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6913, + "name": "ElementaryTypeNameExpression", + "src": "6229:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6914, + "name": "Literal", + "src": "6237:1:18" + } + ], + "id": 6915, + "name": "FunctionCall", + "src": "6229:10:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6880, + "type": "address", + "value": "account" + }, + "id": 6916, + "name": "Identifier", + "src": "6241:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6882, + "type": "uint256", + "value": "amount" + }, + "id": 6917, + "name": "Identifier", + "src": "6250:6:18" + } + ], + "id": 6918, + "name": "FunctionCall", + "src": "6220:37:18" + } + ], + "id": 6919, + "name": "EmitStatement", + "src": "6215:42:18" + } + ], + "id": 6920, + "name": "Block", + "src": "6019:245:18" + } + ], + "id": 6921, + "name": "FunctionDefinition", + "src": "5962:302:18" + }, + { + "attributes": { + "documentation": "@dev Destroys `amount` tokens from `account`, reducing the\ntotal supply.\n * Emits a {Transfer} event with `to` set to the zero address.\n * Requirements\n * - `account` cannot be the zero address.\n- `account` must have at least `amount` tokens.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_burn", + "scope": 7037, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "account", + "scope": 6965, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6922, + "name": "ElementaryTypeName", + "src": "6598:7:18" + } + ], + "id": 6923, + "name": "VariableDeclaration", + "src": "6598:15:18" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 6965, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6924, + "name": "ElementaryTypeName", + "src": "6615:7:18" + } + ], + "id": 6925, + "name": "VariableDeclaration", + "src": "6615:14:18" + } + ], + "id": 6926, + "name": "ParameterList", + "src": "6597:33:18" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6927, + "name": "ParameterList", + "src": "6640:0:18" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", + "typeString": "literal_string \"ERC20: burn from the zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6928, + "name": "Identifier", + "src": "6650:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6923, + "type": "address", + "value": "account" + }, + "id": 6929, + "name": "Identifier", + "src": "6658:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6930, + "name": "ElementaryTypeNameExpression", + "src": "6669:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6931, + "name": "Literal", + "src": "6677:1:18" + } + ], + "id": 6932, + "name": "FunctionCall", + "src": "6669:10:18" + } + ], + "id": 6933, + "name": "BinaryOperation", + "src": "6658:21:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "45524332303a206275726e2066726f6d20746865207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERC20: burn from the zero address\"", + "value": "ERC20: burn from the zero address" + }, + "id": 6934, + "name": "Literal", + "src": "6681:35:18" + } + ], + "id": 6935, + "name": "FunctionCall", + "src": "6650:67:18" + } + ], + "id": 6936, + "name": "ExpressionStatement", + "src": "6650:67:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6648, + "type": "mapping(address => uint256)", + "value": "_balances" + }, + "id": 6937, + "name": "Identifier", + "src": "6728:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6923, + "type": "address", + "value": "account" + }, + "id": 6938, + "name": "Identifier", + "src": "6738:7:18" + } + ], + "id": 6939, + "name": "IndexAccess", + "src": "6728:18:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", + "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 6397, + "type": "function (uint256,uint256,string memory) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6648, + "type": "mapping(address => uint256)", + "value": "_balances" + }, + "id": 6940, + "name": "Identifier", + "src": "6749:9:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6923, + "type": "address", + "value": "account" + }, + "id": 6941, + "name": "Identifier", + "src": "6759:7:18" + } + ], + "id": 6942, + "name": "IndexAccess", + "src": "6749:18:18" + } + ], + "id": 6943, + "name": "MemberAccess", + "src": "6749:22:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6925, + "type": "uint256", + "value": "amount" + }, + "id": 6944, + "name": "Identifier", + "src": "6772:6:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "45524332303a206275726e20616d6f756e7420657863656564732062616c616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERC20: burn amount exceeds balance\"", + "value": "ERC20: burn amount exceeds balance" + }, + "id": 6945, + "name": "Literal", + "src": "6780:36:18" + } + ], + "id": 6946, + "name": "FunctionCall", + "src": "6749:68:18" + } + ], + "id": 6947, + "name": "Assignment", + "src": "6728:89:18" + } + ], + "id": 6948, + "name": "ExpressionStatement", + "src": "6728:89:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6656, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 6949, + "name": "Identifier", + "src": "6827:12:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 6370, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6656, + "type": "uint256", + "value": "_totalSupply" + }, + "id": 6950, + "name": "Identifier", + "src": "6842:12:18" + } + ], + "id": 6951, + "name": "MemberAccess", + "src": "6842:16:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6925, + "type": "uint256", + "value": "amount" + }, + "id": 6952, + "name": "Identifier", + "src": "6859:6:18" + } + ], + "id": 6953, + "name": "FunctionCall", + "src": "6842:24:18" + } + ], + "id": 6954, + "name": "Assignment", + "src": "6827:39:18" + } + ], + "id": 6955, + "name": "ExpressionStatement", + "src": "6827:39:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7097, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 6956, + "name": "Identifier", + "src": "6881:8:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6923, + "type": "address", + "value": "account" + }, + "id": 6957, + "name": "Identifier", + "src": "6890:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6958, + "name": "ElementaryTypeNameExpression", + "src": "6899:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6959, + "name": "Literal", + "src": "6907:1:18" + } + ], + "id": 6960, + "name": "FunctionCall", + "src": "6899:10:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6925, + "type": "uint256", + "value": "amount" + }, + "id": 6961, + "name": "Identifier", + "src": "6911:6:18" + } + ], + "id": 6962, + "name": "FunctionCall", + "src": "6881:37:18" + } + ], + "id": 6963, + "name": "EmitStatement", + "src": "6876:42:18" + } + ], + "id": 6964, + "name": "Block", + "src": "6640:285:18" + } + ], + "id": 6965, + "name": "FunctionDefinition", + "src": "6583:342:18" + }, + { + "attributes": { + "documentation": "@dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n * This is internal function is equivalent to `approve`, and can be used to\ne.g. set automatic allowances for certain subsystems, etc.\n * Emits an {Approval} event.\n * Requirements:\n * - `owner` cannot be the zero address.\n- `spender` cannot be the zero address.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_approve", + "scope": 7037, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "owner", + "scope": 7007, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6966, + "name": "ElementaryTypeName", + "src": "7368:7:18" + } + ], + "id": 6967, + "name": "VariableDeclaration", + "src": "7368:13:18" + }, + { + "attributes": { + "constant": false, + "name": "spender", + "scope": 7007, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6968, + "name": "ElementaryTypeName", + "src": "7383:7:18" + } + ], + "id": 6969, + "name": "VariableDeclaration", + "src": "7383:15:18" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 7007, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6970, + "name": "ElementaryTypeName", + "src": "7400:7:18" + } + ], + "id": 6971, + "name": "VariableDeclaration", + "src": "7400:14:18" + } + ], + "id": 6972, + "name": "ParameterList", + "src": "7367:48:18" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6973, + "name": "ParameterList", + "src": "7425:0:18" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", + "typeString": "literal_string \"ERC20: approve from the zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6974, + "name": "Identifier", + "src": "7435:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6967, + "type": "address", + "value": "owner" + }, + "id": 6975, + "name": "Identifier", + "src": "7443:5:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6976, + "name": "ElementaryTypeNameExpression", + "src": "7452:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6977, + "name": "Literal", + "src": "7460:1:18" + } + ], + "id": 6978, + "name": "FunctionCall", + "src": "7452:10:18" + } + ], + "id": 6979, + "name": "BinaryOperation", + "src": "7443:19:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERC20: approve from the zero address\"", + "value": "ERC20: approve from the zero address" + }, + "id": 6980, + "name": "Literal", + "src": "7464:38:18" + } + ], + "id": 6981, + "name": "FunctionCall", + "src": "7435:68:18" + } + ], + "id": 6982, + "name": "ExpressionStatement", + "src": "7435:68:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "typeString": "literal_string \"ERC20: approve to the zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6983, + "name": "Identifier", + "src": "7513:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6969, + "type": "address", + "value": "spender" + }, + "id": 6984, + "name": "Identifier", + "src": "7521:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6985, + "name": "ElementaryTypeNameExpression", + "src": "7532:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6986, + "name": "Literal", + "src": "7540:1:18" + } + ], + "id": 6987, + "name": "FunctionCall", + "src": "7532:10:18" + } + ], + "id": 6988, + "name": "BinaryOperation", + "src": "7521:21:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "45524332303a20617070726f766520746f20746865207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERC20: approve to the zero address\"", + "value": "ERC20: approve to the zero address" + }, + "id": 6989, + "name": "Literal", + "src": "7544:36:18" + } + ], + "id": 6990, + "name": "FunctionCall", + "src": "7513:68:18" + } + ], + "id": 6991, + "name": "ExpressionStatement", + "src": "7513:68:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6654, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowances" + }, + "id": 6992, + "name": "Identifier", + "src": "7592:11:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6967, + "type": "address", + "value": "owner" + }, + "id": 6993, + "name": "Identifier", + "src": "7604:5:18" + } + ], + "id": 6995, + "name": "IndexAccess", + "src": "7592:18:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6969, + "type": "address", + "value": "spender" + }, + "id": 6994, + "name": "Identifier", + "src": "7611:7:18" + } + ], + "id": 6996, + "name": "IndexAccess", + "src": "7592:27:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6971, + "type": "uint256", + "value": "amount" + }, + "id": 6997, + "name": "Identifier", + "src": "7622:6:18" + } + ], + "id": 6998, + "name": "Assignment", + "src": "7592:36:18" + } + ], + "id": 6999, + "name": "ExpressionStatement", + "src": "7592:36:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7105, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 7000, + "name": "Identifier", + "src": "7643:8:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6967, + "type": "address", + "value": "owner" + }, + "id": 7001, + "name": "Identifier", + "src": "7652:5:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6969, + "type": "address", + "value": "spender" + }, + "id": 7002, + "name": "Identifier", + "src": "7659:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6971, + "type": "uint256", + "value": "amount" + }, + "id": 7003, + "name": "Identifier", + "src": "7668:6:18" + } + ], + "id": 7004, + "name": "FunctionCall", + "src": "7643:32:18" + } + ], + "id": 7005, + "name": "EmitStatement", + "src": "7638:37:18" + } + ], + "id": 7006, + "name": "Block", + "src": "7425:257:18" + } + ], + "id": 7007, + "name": "FunctionDefinition", + "src": "7350:332:18" + }, + { + "attributes": { + "documentation": "@dev Destroys `amount` tokens from `account`.`amount` is then deducted\nfrom the caller's allowance.\n * See {_burn} and {_approve}.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_burnFrom", + "scope": 7037, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "account", + "scope": 7036, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7008, + "name": "ElementaryTypeName", + "src": "7879:7:18" + } + ], + "id": 7009, + "name": "VariableDeclaration", + "src": "7879:15:18" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 7036, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 7010, + "name": "ElementaryTypeName", + "src": "7896:7:18" + } + ], + "id": 7011, + "name": "VariableDeclaration", + "src": "7896:14:18" + } + ], + "id": 7012, + "name": "ParameterList", + "src": "7878:33:18" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 7013, + "name": "ParameterList", + "src": "7921:0:18" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6965, + "type": "function (address,uint256)", + "value": "_burn" + }, + "id": 7014, + "name": "Identifier", + "src": "7931:5:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7009, + "type": "address", + "value": "account" + }, + "id": 7015, + "name": "Identifier", + "src": "7937:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7011, + "type": "uint256", + "value": "amount" + }, + "id": 7016, + "name": "Identifier", + "src": "7946:6:18" + } + ], + "id": 7017, + "name": "FunctionCall", + "src": "7931:22:18" + } + ], + "id": 7018, + "name": "ExpressionStatement", + "src": "7931:22:18" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7007, + "type": "function (address,address,uint256)", + "value": "_approve" + }, + "id": 7019, + "name": "Identifier", + "src": "7963:8:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7009, + "type": "address", + "value": "account" + }, + "id": 7020, + "name": "Identifier", + "src": "7972:7:18" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 7021, + "name": "Identifier", + "src": "7981:10:18" + } + ], + "id": 7022, + "name": "FunctionCall", + "src": "7981:12:18" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_a287c363786607a1457a2d9d12fa61c0073358e02d76b4035fc2c2d86a19c0db", + "typeString": "literal_string \"ERC20: burn amount exceeds allowance\"" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 6397, + "type": "function (uint256,uint256,string memory) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6654, + "type": "mapping(address => mapping(address => uint256))", + "value": "_allowances" + }, + "id": 7023, + "name": "Identifier", + "src": "7995:11:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7009, + "type": "address", + "value": "account" + }, + "id": 7024, + "name": "Identifier", + "src": "8007:7:18" + } + ], + "id": 7025, + "name": "IndexAccess", + "src": "7995:20:18" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 7026, + "name": "Identifier", + "src": "8016:10:18" + } + ], + "id": 7027, + "name": "FunctionCall", + "src": "8016:12:18" + } + ], + "id": 7028, + "name": "IndexAccess", + "src": "7995:34:18" + } + ], + "id": 7029, + "name": "MemberAccess", + "src": "7995:38:18" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7011, + "type": "uint256", + "value": "amount" + }, + "id": 7030, + "name": "Identifier", + "src": "8034:6:18" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e6365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"ERC20: burn amount exceeds allowance\"", + "value": "ERC20: burn amount exceeds allowance" + }, + "id": 7031, + "name": "Literal", + "src": "8042:38:18" + } + ], + "id": 7032, + "name": "FunctionCall", + "src": "7995:86:18" + } + ], + "id": 7033, + "name": "FunctionCall", + "src": "7963:119:18" + } + ], + "id": 7034, + "name": "ExpressionStatement", + "src": "7963:119:18" + } + ], + "id": 7035, + "name": "Block", + "src": "7921:168:18" + } + ], + "id": 7036, + "name": "FunctionDefinition", + "src": "7860:229:18" + } + ], + "id": 7037, + "name": "ContractDefinition", + "src": "1268:6823:18" + } + ], + "id": 7038, + "name": "SourceUnit", + "src": "0:8092:18" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.857Z", + "devdoc": { + "details": "Implementation of the {IERC20} interface. * This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. For a generic mechanism see {ERC20Mintable}. * TIP: For a detailed writeup see our guide https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. * We have followed general OpenZeppelin guidelines: functions revert instead of returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. * Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. * Requirements: * - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. * This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. * Emits an {Approval} event indicating the updated allowance. * Requirements: * - `spender` cannot be the zero address." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. * Requirements: * - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. * Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; * Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for `sender`'s tokens of at least `amount`." + } + } + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/FixedRateExchange.json b/artifacts/FixedRateExchange.json new file mode 100644 index 000000000..b36e41689 --- /dev/null +++ b/artifacts/FixedRateExchange.json @@ -0,0 +1,16191 @@ +{ + "contractName": "FixedRateExchange", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "exchangeId", + "type": "bytes32" + }, + { + "indexed": true, + "name": "baseToken", + "type": "address" + }, + { + "indexed": true, + "name": "dataToken", + "type": "address" + }, + { + "indexed": false, + "name": "exchangeOwner", + "type": "address" + }, + { + "indexed": false, + "name": "fixedRate", + "type": "uint256" + } + ], + "name": "ExchangeCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "exchangeId", + "type": "bytes32" + }, + { + "indexed": true, + "name": "exchangeOwner", + "type": "address" + }, + { + "indexed": false, + "name": "newRate", + "type": "uint256" + } + ], + "name": "ExchangeRateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "exchangeId", + "type": "bytes32" + }, + { + "indexed": true, + "name": "exchangeOwner", + "type": "address" + } + ], + "name": "ExchangeActivated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "exchangeId", + "type": "bytes32" + }, + { + "indexed": true, + "name": "exchangeOwner", + "type": "address" + } + ], + "name": "ExchangeDeactivated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "exchangeId", + "type": "bytes32" + }, + { + "indexed": true, + "name": "by", + "type": "address" + }, + { + "indexed": false, + "name": "baseTokenSwappedAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "dataTokenSwappedAmount", + "type": "uint256" + } + ], + "name": "Swapped", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "baseToken", + "type": "address" + }, + { + "name": "dataToken", + "type": "address" + }, + { + "name": "fixedRate", + "type": "uint256" + } + ], + "name": "create", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "baseToken", + "type": "address" + }, + { + "name": "dataToken", + "type": "address" + }, + { + "name": "exchangeOwner", + "type": "address" + } + ], + "name": "generateExchangeId", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "exchangeId", + "type": "bytes32" + }, + { + "name": "dataTokenAmount", + "type": "uint256" + } + ], + "name": "CalcInGivenOut", + "outputs": [ + { + "name": "baseTokenAmount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "exchangeId", + "type": "bytes32" + }, + { + "name": "dataTokenAmount", + "type": "uint256" + } + ], + "name": "swap", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getNumberOfExchanges", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "exchangeId", + "type": "bytes32" + }, + { + "name": "newRate", + "type": "uint256" + } + ], + "name": "setRate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "exchangeId", + "type": "bytes32" + } + ], + "name": "toggleExchangeState", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "exchangeId", + "type": "bytes32" + } + ], + "name": "getRate", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "exchangeId", + "type": "bytes32" + } + ], + "name": "getSupply", + "outputs": [ + { + "name": "supply", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "exchangeId", + "type": "bytes32" + } + ], + "name": "getExchange", + "outputs": [ + { + "name": "exchangeOwner", + "type": "address" + }, + { + "name": "dataToken", + "type": "address" + }, + { + "name": "baseToken", + "type": "address" + }, + { + "name": "fixedRate", + "type": "uint256" + }, + { + "name": "active", + "type": "bool" + }, + { + "name": "supply", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getExchanges", + "outputs": [ + { + "name": "", + "type": "bytes32[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "exchangeId", + "type": "bytes32" + } + ], + "name": "isActive", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"getExchanges\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"exchangeId\",\"type\":\"bytes32\"}],\"name\":\"toggleExchangeState\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"exchangeId\",\"type\":\"bytes32\"}],\"name\":\"getExchange\",\"outputs\":[{\"name\":\"exchangeOwner\",\"type\":\"address\"},{\"name\":\"dataToken\",\"type\":\"address\"},{\"name\":\"baseToken\",\"type\":\"address\"},{\"name\":\"fixedRate\",\"type\":\"uint256\"},{\"name\":\"active\",\"type\":\"bool\"},{\"name\":\"supply\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"exchangeId\",\"type\":\"bytes32\"}],\"name\":\"getSupply\",\"outputs\":[{\"name\":\"supply\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"exchangeId\",\"type\":\"bytes32\"}],\"name\":\"isActive\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"exchangeId\",\"type\":\"bytes32\"},{\"name\":\"newRate\",\"type\":\"uint256\"}],\"name\":\"setRate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"exchangeId\",\"type\":\"bytes32\"}],\"name\":\"getRate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNumberOfExchanges\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"exchangeId\",\"type\":\"bytes32\"},{\"name\":\"dataTokenAmount\",\"type\":\"uint256\"}],\"name\":\"CalcInGivenOut\",\"outputs\":[{\"name\":\"baseTokenAmount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"baseToken\",\"type\":\"address\"},{\"name\":\"dataToken\",\"type\":\"address\"},{\"name\":\"exchangeOwner\",\"type\":\"address\"}],\"name\":\"generateExchangeId\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"exchangeId\",\"type\":\"bytes32\"},{\"name\":\"dataTokenAmount\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"baseToken\",\"type\":\"address\"},{\"name\":\"dataToken\",\"type\":\"address\"},{\"name\":\"fixedRate\",\"type\":\"uint256\"}],\"name\":\"create\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"exchangeId\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"baseToken\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"dataToken\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"exchangeOwner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"fixedRate\",\"type\":\"uint256\"}],\"name\":\"ExchangeCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"exchangeId\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"exchangeOwner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newRate\",\"type\":\"uint256\"}],\"name\":\"ExchangeRateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"exchangeId\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"exchangeOwner\",\"type\":\"address\"}],\"name\":\"ExchangeActivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"exchangeId\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"exchangeOwner\",\"type\":\"address\"}],\"name\":\"ExchangeDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"exchangeId\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"by\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"baseTokenSwappedAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"dataTokenSwappedAmount\",\"type\":\"uint256\"}],\"name\":\"Swapped\",\"type\":\"event\"}],\"devdoc\":{\"details\":\"FixedRateExchange is a fixed rate exchange Contract Marketplaces uses this contract to allow consumers exchanging datatokens with ocean token using a fixed exchange rate.\",\"methods\":{\"CalcInGivenOut(bytes32,uint256)\":{\"details\":\"CalcInGivenOut Calculates how many basetokens are needed to get specifyed amount of datatokens\",\"params\":{\"dataTokenAmount\":\"the amount of data tokens to be exchanged\",\"exchangeId\":\"a unique exchange idnetifier \"}},\"create(address,address,uint256)\":{\"details\":\"create creates new exchange pairs between base token (ocean token) and data tokens.\",\"params\":{\"baseToken\":\"refers to a ocean token contract address\",\"dataToken\":\"refers to a data token contract address\",\"fixedRate\":\"refers to the exact fixed exchange rate in wei\"}},\"generateExchangeId(address,address,address)\":{\"details\":\"generateExchangeId creates unique exchange identifier for two token pairs.\",\"params\":{\"baseToken\":\"refers to a ocean token contract address\",\"dataToken\":\"refers to a data token contract address\",\"exchangeOwner\":\"exchange owner address\"}},\"getExchange(bytes32)\":{\"details\":\"getExchange gets all the exchange details\",\"params\":{\"exchangeId\":\"a unique exchange idnetifier\"},\"return\":\"all the exchange details including the exchange Owner the dataToken contract address, the base token address, the fixed rate, whether the exchange is active and the supply or the the current data token liquidity.\"},\"getExchanges()\":{\"details\":\"getExchanges gets all the exchanges list\",\"return\":\"a list of all registered exchange Ids\"},\"getNumberOfExchanges()\":{\"details\":\"getNumberOfExchanges gets the total number of registered exchanges\",\"return\":\"total number of registered exchange IDs\"},\"getRate(bytes32)\":{\"details\":\"getRate gets the current fixed rate for an exchange\",\"params\":{\"exchangeId\":\"a unique exchange idnetifier\"},\"return\":\"fixed rate value\"},\"getSupply(bytes32)\":{\"details\":\"getSupply gets the current supply of datatokens in an fixed rate exchagne\",\"params\":{\"exchangeId\":\"the exchange ID\"},\"return\":\"supply\"},\"isActive(bytes32)\":{\"details\":\"isActive checks whether exchange is active\",\"params\":{\"exchangeId\":\"a unique exchange idnetifier\"},\"return\":\"true if exchange is true, otherwise returns false\"},\"setRate(bytes32,uint256)\":{\"details\":\"setRate changes the fixed rate for an exchange with a new rate\",\"params\":{\"exchangeId\":\"a unique exchange idnetifier\",\"newRate\":\"new fixed rate value\"}},\"swap(bytes32,uint256)\":{\"details\":\"swap atomic swap between two registered fixed rate exchange.\",\"params\":{\"dataTokenAmount\":\"the amount of data tokens to be exchanged\",\"exchangeId\":\"a unique exchange idnetifier \"}},\"toggleExchangeState(bytes32)\":{\"details\":\"toggleExchangeState toggles the active state of an existing exchange\",\"params\":{\"exchangeId\":\"a unique exchange idnetifier\"}}},\"title\":\"FixedRateExchange\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/fixedRate/FixedRateExchange.sol\":\"FixedRateExchange\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/fixedRate/FixedRateExchange.sol\":{\"keccak256\":\"0xff9de548d8fc2ed7f3ba9ec63f839e164152b48f9ca0e50b8c8e31c8d4de14c4\",\"urls\":[\"bzzr://fcff28f27252fc99900599258b20062220c7084b5efec438cedde9bb47723377\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol\":{\"keccak256\":\"0x022ebed2ba4949e96a05cc394cf690d8fd3190a4733cebe8cbe930ac25cfde18\",\"urls\":[\"bzzr://2fa3d5cae14f0af7d78f6e1d13bc41854082c03ab2f86462ebb09afda88ee6e9\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzzr://292843005e754e752644f767477ec5ad7a1ffc91ddb18c38b8079c62f3993cad\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611243806100206000396000f3fe608060405234801561001057600080fd5b50600436106100d1576000357c010000000000000000000000000000000000000000000000000000000090048063b32b56f91161008e578063b32b56f914610231578063b42414291461024e578063c030023114610256578063c1f6572e14610279578063de060743146102b1578063ffe5725f146102d4576100d1565b80631e2e3a6b146100d657806324cb477e1461012e5780634c87087d1461014d57806354d9be59146101ae5780635c36901c146101dd578063680819eb1461020e575b600080fd5b6100de61030a565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561011a578181015183820152602001610102565b505050509050019250505060405180910390f35b61014b6004803603602081101561014457600080fd5b5035610362565b005b61016a6004803603602081101561016357600080fd5b5035610465565b60408051600160a060020a0397881681529587166020870152939095168484015260608401919091521515608083015260a082019290925290519081900360c00190f35b6101cb600480360360208110156101c457600080fd5b50356104fc565b60408051918252519081900360200190f35b6101fa600480360360208110156101f357600080fd5b5035610689565b604080519115158252519081900360200190f35b61014b6004803603604081101561022457600080fd5b508035906020013561069e565b6101cb6004803603602081101561024757600080fd5b503561078b565b6101cb6107a0565b6101cb6004803603604081101561026c57600080fd5b50803590602001356107a6565b6101cb6004803603606081101561028f57600080fd5b50600160a060020a03813581169160208101358216916040909101351661085e565b61014b600480360360408110156102c757600080fd5b50803590602001356108a4565b61014b600480360360608110156102ea57600080fd5b50600160a060020a03813581169160208101359091169060400135610b8a565b6060600180548060200260200160405190810160405280929190818152602001828054801561035857602002820191906000526020600020905b815481526020019060010190808311610344575b5050505050905090565b60008181526020819052604090205481906101009004600160a060020a031633146103c15760405160e560020a62461bcd0281526004018080602001828103825260298152602001806110886029913960400191505060405180910390fd5b60008281526020819052604090205460ff161561041d57600082815260208190526040808220805460ff1916905551339184917f03da9148e1de78fba22de63c573465562ebf6ef878a1d3ea83790a560229984c9190a3610461565b600082815260208190526040808220805460ff1916600117905551339184917fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a5035299190a35b5050565b600080600080600080610476610fb2565b5060008781526020818152604091829020825160a081018452815460ff81161515808352610100909104600160a060020a03908116948301859052600184015481169583018690526002840154166060830181905260039093015460808301819052939a509398509096509094509092506104f0886104fc565b91505091939550919395565b60008181526020819052604081205460ff1661051a57506000610684565b6000828152602081815260408083206001810154905482517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a036101009092048216600482015292519116926370a082319260248082019391829003018186803b15801561059057600080fd5b505afa1580156105a4573d6000803e3d6000fd5b505050506040513d60208110156105ba57600080fd5b50516000848152602081815260408083206001810154905482517fdd62ed3e000000000000000000000000000000000000000000000000000000008152610100909104600160a060020a0390811660048301523060248301529251959650939491169263dd62ed3e926044808301939192829003018186803b15801561063f57600080fd5b505afa158015610653573d6000803e3d6000fd5b505050506040513d602081101561066957600080fd5b505190508082101561067d57819250610681565b8092505b50505b919050565b60009081526020819052604090205460ff1690565b60008281526020819052604090205482906101009004600160a060020a031633146106fd5760405160e560020a62461bcd0281526004018080602001828103825260298152602001806110886029913960400191505060405180910390fd5b8161073c5760405160e560020a62461bcd02815260040180806020018281038252602381526020018061103a6023913960400191505060405180910390fd5b6000838152602081815260409182902060030184905581518481529151339286927fe50f9919fdc524004a4ee0cb934f4734f144bec0713a52e5483b753f5de0f08c92918290030190a3505050565b60009081526020819052604090206003015490565b60015490565b6000828152602081905260408120600301548390158015906107db575060008181526020819052604090205460ff1615156001145b6108195760405160e560020a62461bcd02815260040180806020018281038252602b81526020018061100f602b913960400191505060405180910390fd5b60008481526020819052604090206003015461085690670de0b6b3a76400009061084a90869063ffffffff610e6b16565b9063ffffffff610ed016565b949350505050565b60408051600160a060020a039485166020808301919091529385168183015291909316606080830191909152835180830390910181526080909101909252815191012090565b6000828152602081905260409020600301548290158015906108d9575060008181526020819052604090205460ff1615156001145b6109175760405160e560020a62461bcd02815260040180806020018281038252602b81526020018061100f602b913960400191505060405180910390fd5b816109565760405160e560020a62461bcd0281526004018080602001828103825260298152602001806111ef6029913960400191505060405180910390fd5b600061096284846107a6565b6000858152602081815260408083206002810154905482517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a036101009092048216602482015260448101879052925195965016936323b872dd93606480840194938390030190829087803b1580156109e957600080fd5b505af11580156109fd573d6000803e3d6000fd5b505050506040513d6020811015610a1357600080fd5b5051610a535760405160e560020a62461bcd0281526004018080602001828103825260408152602001806110b16040913960400191505060405180910390fd5b6000848152602081815260408083206001810154905482517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a03610100909204821660048201523360248201526044810189905292519116936323b872dd93606480850194919392918390030190829087803b158015610adb57600080fd5b505af1158015610aef573d6000803e3d6000fd5b505050506040513d6020811015610b0557600080fd5b5051610b455760405160e560020a62461bcd02815260040180806020018281038252604081526020018061117c6040913960400191505060405180910390fd5b60408051828152602081018590528151339287927f816ecef7c59c8574653ab4522960d26a6d2987e94d760cd775b6c9273ef81f23929081900390910190a350505050565b600160a060020a038316610bd25760405160e560020a62461bcd0281526004018080602001828103825260338152602001806111496033913960400191505060405180910390fd5b600160a060020a038216610c1a5760405160e560020a62461bcd0281526004018080602001828103825260338152602001806111bc6033913960400191505060405180910390fd5b81600160a060020a031683600160a060020a03161415610c6e5760405160e560020a62461bcd0281526004018080602001828103825260378152602001806110f16037913960400191505060405180910390fd5b80610cad5760405160e560020a62461bcd02815260040180806020018281038252602e815260200180610fe1602e913960400191505060405180910390fd5b6000610cba84843361085e565b60008181526020819052604090206003015490915015610d0e5760405160e560020a62461bcd02815260040180806020018281038252602b81526020018061105d602b913960400191505060405180910390fd5b6040805160a0810182526001808252336020808401828152600160a060020a038981168688018181528c83166060890181815260808a018d815260008d81528089528c81209b518c54985188166101000274ffffffffffffffffffffffffffffffffffffffff001991151560ff19909a169990991716979097178b5592518a8a01805491871673ffffffffffffffffffffffffffffffffffffffff19928316179055905160028b018054919096169116179093555160039097019690965584548086018655949091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf69093018690558451918252810186905283519293919285927feb7a353641f7d3cc54b497ef1553fdc292b64d9cc3be8587c23dfba01f310b19928290030190a4604051339082907fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a50352990600090a350505050565b600082610e7a57506000610eca565b82820282848281610e8757fe5b0414610ec75760405160e560020a62461bcd0281526004018080602001828103825260218152602001806111286021913960400191505060405180910390fd5b90505b92915050565b6000610ec783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060008183610f9c5760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f61578181015183820152602001610f49565b50505050905090810190601f168015610f8e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610fa857fe5b0495945050505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe46697865645261746545786368616e67653a20496e76616c69642065786368616e676520726174652076616c756546697865645261746545786368616e67653a2045786368616e676520646f6573206e6f742065786973742146697865645261746545786368616e67653a20526174696f206d757374206265203e3046697865645261746545786368616e67653a2045786368616e676520616c7265616479206578697374732146697865645261746545786368616e67653a20696e76616c69642065786368616e6765206f776e657246697865645261746545786368616e67653a207472616e7366657246726f6d206661696c656420696e207468652062617365546f6b656e20636f6e747261637446697865645261746545786368616e67653a20496e76616c69642064617461746f6b656e2c2020657175616c732062617365746f6b656e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7746697865645261746545786368616e67653a20496e76616c69642062617365746f6b656e2c20207a65726f206164647265737346697865645261746545786368616e67653a207472616e7366657246726f6d206661696c656420696e207468652064617461546f6b656e20636f6e747261637446697865645261746545786368616e67653a20496e76616c69642064617461746f6b656e2c20207a65726f206164647265737346697865645261746545786368616e67653a207a65726f206461746120746f6b656e20616d6f756e74a165627a7a723058202e1529c4a424db46efd4bfa6cafe9ebaa948ad8c61470bd09e49436549daf8990029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d1576000357c010000000000000000000000000000000000000000000000000000000090048063b32b56f91161008e578063b32b56f914610231578063b42414291461024e578063c030023114610256578063c1f6572e14610279578063de060743146102b1578063ffe5725f146102d4576100d1565b80631e2e3a6b146100d657806324cb477e1461012e5780634c87087d1461014d57806354d9be59146101ae5780635c36901c146101dd578063680819eb1461020e575b600080fd5b6100de61030a565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561011a578181015183820152602001610102565b505050509050019250505060405180910390f35b61014b6004803603602081101561014457600080fd5b5035610362565b005b61016a6004803603602081101561016357600080fd5b5035610465565b60408051600160a060020a0397881681529587166020870152939095168484015260608401919091521515608083015260a082019290925290519081900360c00190f35b6101cb600480360360208110156101c457600080fd5b50356104fc565b60408051918252519081900360200190f35b6101fa600480360360208110156101f357600080fd5b5035610689565b604080519115158252519081900360200190f35b61014b6004803603604081101561022457600080fd5b508035906020013561069e565b6101cb6004803603602081101561024757600080fd5b503561078b565b6101cb6107a0565b6101cb6004803603604081101561026c57600080fd5b50803590602001356107a6565b6101cb6004803603606081101561028f57600080fd5b50600160a060020a03813581169160208101358216916040909101351661085e565b61014b600480360360408110156102c757600080fd5b50803590602001356108a4565b61014b600480360360608110156102ea57600080fd5b50600160a060020a03813581169160208101359091169060400135610b8a565b6060600180548060200260200160405190810160405280929190818152602001828054801561035857602002820191906000526020600020905b815481526020019060010190808311610344575b5050505050905090565b60008181526020819052604090205481906101009004600160a060020a031633146103c15760405160e560020a62461bcd0281526004018080602001828103825260298152602001806110886029913960400191505060405180910390fd5b60008281526020819052604090205460ff161561041d57600082815260208190526040808220805460ff1916905551339184917f03da9148e1de78fba22de63c573465562ebf6ef878a1d3ea83790a560229984c9190a3610461565b600082815260208190526040808220805460ff1916600117905551339184917fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a5035299190a35b5050565b600080600080600080610476610fb2565b5060008781526020818152604091829020825160a081018452815460ff81161515808352610100909104600160a060020a03908116948301859052600184015481169583018690526002840154166060830181905260039093015460808301819052939a509398509096509094509092506104f0886104fc565b91505091939550919395565b60008181526020819052604081205460ff1661051a57506000610684565b6000828152602081815260408083206001810154905482517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a036101009092048216600482015292519116926370a082319260248082019391829003018186803b15801561059057600080fd5b505afa1580156105a4573d6000803e3d6000fd5b505050506040513d60208110156105ba57600080fd5b50516000848152602081815260408083206001810154905482517fdd62ed3e000000000000000000000000000000000000000000000000000000008152610100909104600160a060020a0390811660048301523060248301529251959650939491169263dd62ed3e926044808301939192829003018186803b15801561063f57600080fd5b505afa158015610653573d6000803e3d6000fd5b505050506040513d602081101561066957600080fd5b505190508082101561067d57819250610681565b8092505b50505b919050565b60009081526020819052604090205460ff1690565b60008281526020819052604090205482906101009004600160a060020a031633146106fd5760405160e560020a62461bcd0281526004018080602001828103825260298152602001806110886029913960400191505060405180910390fd5b8161073c5760405160e560020a62461bcd02815260040180806020018281038252602381526020018061103a6023913960400191505060405180910390fd5b6000838152602081815260409182902060030184905581518481529151339286927fe50f9919fdc524004a4ee0cb934f4734f144bec0713a52e5483b753f5de0f08c92918290030190a3505050565b60009081526020819052604090206003015490565b60015490565b6000828152602081905260408120600301548390158015906107db575060008181526020819052604090205460ff1615156001145b6108195760405160e560020a62461bcd02815260040180806020018281038252602b81526020018061100f602b913960400191505060405180910390fd5b60008481526020819052604090206003015461085690670de0b6b3a76400009061084a90869063ffffffff610e6b16565b9063ffffffff610ed016565b949350505050565b60408051600160a060020a039485166020808301919091529385168183015291909316606080830191909152835180830390910181526080909101909252815191012090565b6000828152602081905260409020600301548290158015906108d9575060008181526020819052604090205460ff1615156001145b6109175760405160e560020a62461bcd02815260040180806020018281038252602b81526020018061100f602b913960400191505060405180910390fd5b816109565760405160e560020a62461bcd0281526004018080602001828103825260298152602001806111ef6029913960400191505060405180910390fd5b600061096284846107a6565b6000858152602081815260408083206002810154905482517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a036101009092048216602482015260448101879052925195965016936323b872dd93606480840194938390030190829087803b1580156109e957600080fd5b505af11580156109fd573d6000803e3d6000fd5b505050506040513d6020811015610a1357600080fd5b5051610a535760405160e560020a62461bcd0281526004018080602001828103825260408152602001806110b16040913960400191505060405180910390fd5b6000848152602081815260408083206001810154905482517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a03610100909204821660048201523360248201526044810189905292519116936323b872dd93606480850194919392918390030190829087803b158015610adb57600080fd5b505af1158015610aef573d6000803e3d6000fd5b505050506040513d6020811015610b0557600080fd5b5051610b455760405160e560020a62461bcd02815260040180806020018281038252604081526020018061117c6040913960400191505060405180910390fd5b60408051828152602081018590528151339287927f816ecef7c59c8574653ab4522960d26a6d2987e94d760cd775b6c9273ef81f23929081900390910190a350505050565b600160a060020a038316610bd25760405160e560020a62461bcd0281526004018080602001828103825260338152602001806111496033913960400191505060405180910390fd5b600160a060020a038216610c1a5760405160e560020a62461bcd0281526004018080602001828103825260338152602001806111bc6033913960400191505060405180910390fd5b81600160a060020a031683600160a060020a03161415610c6e5760405160e560020a62461bcd0281526004018080602001828103825260378152602001806110f16037913960400191505060405180910390fd5b80610cad5760405160e560020a62461bcd02815260040180806020018281038252602e815260200180610fe1602e913960400191505060405180910390fd5b6000610cba84843361085e565b60008181526020819052604090206003015490915015610d0e5760405160e560020a62461bcd02815260040180806020018281038252602b81526020018061105d602b913960400191505060405180910390fd5b6040805160a0810182526001808252336020808401828152600160a060020a038981168688018181528c83166060890181815260808a018d815260008d81528089528c81209b518c54985188166101000274ffffffffffffffffffffffffffffffffffffffff001991151560ff19909a169990991716979097178b5592518a8a01805491871673ffffffffffffffffffffffffffffffffffffffff19928316179055905160028b018054919096169116179093555160039097019690965584548086018655949091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf69093018690558451918252810186905283519293919285927feb7a353641f7d3cc54b497ef1553fdc292b64d9cc3be8587c23dfba01f310b19928290030190a4604051339082907fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a50352990600090a350505050565b600082610e7a57506000610eca565b82820282848281610e8757fe5b0414610ec75760405160e560020a62461bcd0281526004018080602001828103825260218152602001806111286021913960400191505060405180910390fd5b90505b92915050565b6000610ec783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060008183610f9c5760405160e560020a62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f61578181015183820152602001610f49565b50505050905090810190601f168015610f8e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610fa857fe5b0495945050505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe46697865645261746545786368616e67653a20496e76616c69642065786368616e676520726174652076616c756546697865645261746545786368616e67653a2045786368616e676520646f6573206e6f742065786973742146697865645261746545786368616e67653a20526174696f206d757374206265203e3046697865645261746545786368616e67653a2045786368616e676520616c7265616479206578697374732146697865645261746545786368616e67653a20696e76616c69642065786368616e6765206f776e657246697865645261746545786368616e67653a207472616e7366657246726f6d206661696c656420696e207468652062617365546f6b656e20636f6e747261637446697865645261746545786368616e67653a20496e76616c69642064617461746f6b656e2c2020657175616c732062617365746f6b656e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7746697865645261746545786368616e67653a20496e76616c69642062617365746f6b656e2c20207a65726f206164647265737346697865645261746545786368616e67653a207472616e7366657246726f6d206661696c656420696e207468652064617461546f6b656e20636f6e747261637446697865645261746545786368616e67653a20496e76616c69642064617461746f6b656e2c20207a65726f206164647265737346697865645261746545786368616e67653a207a65726f206461746120746f6b656e20616d6f756e74a165627a7a723058202e1529c4a424db46efd4bfa6cafe9ebaa948ad8c61470bd09e49436549daf8990029", + "sourceMap": "530:10457:10:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;530:10457:10;;;;;;;", + "deployedSourceMap": "530:10457:10:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;530:10457:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10486:130;;;:::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;10486:130:10;;;;;;;;;;;;;;;;;7632:511;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7632:511:10;;:::i;:::-;;9742:604;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9742:604:10;;:::i;:::-;;;;-1:-1:-1;;;;;9742:604:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8688:636;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8688:636:10;;:::i;:::-;;;;;;;;;;;;;;;;10824:161;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10824:161:10;;:::i;:::-;;;;;;;;;;;;;;;;;;7051:411;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7051:411:10;;;;;;;:::i;8327:165::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8327:165:10;;:::i;6711:134::-;;;:::i;4846:336::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4846:336:10;;;;;;;:::i;4231:343::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4231:343:10;;;;;;;;;;;;;;;;;;;:::i;5420:1123::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5420:1123:10;;;;;;;:::i;2512:1418::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2512:1418:10;;;;;;;;;;;;;;;;;:::i;10486:130::-;10559:16;10598:11;10591:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10486:130;:::o;7632:511::-;1306:9;:21;;;;;;;;;;:35;7738:10;;1306:35;;;-1:-1:-1;;;;;1306:35:10;1345:10;1306:49;1285:137;;;;-1:-1:-1;;;;;1285:137:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7767:9;:21;;;;;;;;;;:28;;;7764:373;;;7841:5;7810:21;;;;;;;;;;;:36;;-1:-1:-1;;7810:36:10;;;7865:89;7930:10;;7820;;7865:89;;7841:5;7865:89;7764:373;;;7985:9;:21;;;;;;;;;;;:35;;-1:-1:-1;;7985:35:10;8016:4;7985:35;;;8039:87;8102:10;;7995;;8039:87;;7985:9;8039:87;7764:373;7632:511;;:::o;9742:604::-;9857:21;9892:17;9923;9954;9985:11;10010:14;10049:24;;:::i;:::-;-1:-1:-1;10076:9:10;:21;;;;;;;;;;;;10049:48;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;10049:48:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10049:48:10;;-1:-1:-1;10049:48:10;;-1:-1:-1;10049:48:10;;-1:-1:-1;10049:48:10;;-1:-1:-1;10318:21:10;10076;10318:9;:21::i;:::-;10309:30;;9742:604;;;;;;;;:::o;8688:636::-;8772:14;8805:21;;;;;;;;;;:28;;;8802:516;;-1:-1:-1;8865:1:10;8802:516;;;8895:15;8928:21;;;;;;;;;;;:31;;;;8988:35;;8913:111;;;;;-1:-1:-1;;;;;8928:31:10;8988:35;;;;;8913:111;;;;;;8928:31;;;8913:74;;:111;;;;;;;;;;;8928:31;8913:111;;;5:2:-1;;;;30:1;27;20:12;5:2;8913:111:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8913:111:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8913:111:10;9038:17;9073:21;;;8913:111;9073:21;;;;;;;:31;;;;9133:35;;9058:126;;;;;9073:31;9133:35;;;-1:-1:-1;;;;;9133:35:10;;;9058:126;;;;9178:4;9058:126;;;;;;8913:111;;-1:-1:-1;9038:17:10;;9073:31;;;9058:74;;:126;;;;;8913:111;;9058:126;;;;;9073:31;9058:126;;;5:2:-1;;;;30:1;27;20:12;5:2;9058:126:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9058:126:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9058:126:10;;-1:-1:-1;9201:19:10;;;9198:109;;;9247:7;9238:16;;9198:109;;;9298:9;9289:18;;9198:109;8802:516;;;8688:636;;;:::o;10824:161::-;10923:4;10950:21;;;;;;;;;;:28;;;;10824:161::o;7051:411::-;1306:9;:21;;;;;;;;;;:35;7170:10;;1306:35;;;-1:-1:-1;;;;;1306:35:10;1345:10;1306:49;1285:137;;;;-1:-1:-1;;;;;1285:137:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7217:12;7196:94;;;;-1:-1:-1;;;;;7196:94:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7301:9;:21;;;;;;;;;;;;:31;;:41;;;7357:98;;;;;;;7414:10;;7311;;7357:98;;;;;;;;;7051:411;;;:::o;8327:165::-;8424:7;8454:21;;;;;;;;;;:31;;;;8327:165::o;6711:134::-;6820:11;:18;6711:134;:::o;4846:336::-;5043:23;1029:21;;;;;;;;;;:31;;;5005:10;;1029:36;;;;:88;;-1:-1:-1;1081:9:10;:21;;;;;;;;;;:28;;;:36;;:28;:36;1029:88;1008:178;;;;-1:-1:-1;;;;;1008:178:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5133:9;:21;;;;;;;;;;:31;;;5100:75;;627:8;;5100:65;;:15;;:65;:19;:65;:::i;:::-;:69;:75;:69;:75;:::i;:::-;5082:93;4846:336;-1:-1:-1;;;;4846:336:10:o;4231:343::-;4448:109;;;-1:-1:-1;;;;;4448:109:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;4448:109:10;;;;;;;4425:142;;;;;;4231:343::o;5420:1123::-;1029:9;:21;;;;;;;;;;:31;;;5558:10;;1029:36;;;;:88;;-1:-1:-1;1081:9:10;:21;;;;;;;;;;:28;;;:36;;:28;:36;1029:88;1008:178;;;;-1:-1:-1;;;;;1008:178:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5614:20;5593:108;;;;-1:-1:-1;;;;;5593:108:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5711:23;5737:42;5752:10;5763:15;5737:14;:42::i;:::-;5825:9;:21;;;;;;;;;;;:31;;;;5916:35;;5810:188;;;;;5888:10;5810:188;;;;-1:-1:-1;;;;;5825:31:10;5916:35;;;;;5810:188;;;;;;;;;;;;;;-1:-1:-1;5825:31:10;;5810:60;;:188;;;;;5825:21;5810:188;;;;;;;5825:31;5810:188;;;5:2:-1;;;;30:1;27;20:12;5:2;5810:188:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5810:188:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5810:188:10;5789:299;;;;-1:-1:-1;;;;;5789:299:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6134:9;:21;;;;;;;;;;;:31;;;;6197:35;;6119:188;;;;;-1:-1:-1;;;;;6134:31:10;6197:35;;;;;6119:188;;;;6250:10;6119:188;;;;;;;;;;;;6134:31;;;6119:60;;:188;;;;;6134:21;;6119:188;;;;;;;;;6134:31;6119:188;;;5:2:-1;;;;30:1;27;20:12;5:2;6119:188:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6119:188:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6119:188:10;6098:299;;;;-1:-1:-1;;;;;6098:299:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6413:123;;;;;;;;;;;;;;6458:10;;6434;;6413:123;;;;;;;;;;;1196:1;5420:1123;;;:::o;2512:1418::-;-1:-1:-1;;;;;2667:23:10;;2646:121;;;;-1:-1:-1;;;;;2646:121:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2798:23:10;;2777:121;;;;-1:-1:-1;;;;;2777:121:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2942:9;-1:-1:-1;;;;;2929:22:10;:9;-1:-1:-1;;;;;2929:22:10;;;2908:124;;;;-1:-1:-1;;;;;2908:124:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3063:14;3042:108;;;;-1:-1:-1;;;;;3042:108:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3160:18;3181:98;3213:9;3236;3259:10;3181:18;:98::i;:::-;3310:9;:21;;;;;;;;;;:31;;;3160:119;;-1:-1:-1;3310:36:10;3289:126;;;;-1:-1:-1;;;;;3289:126:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3449:187;;;;;;;;3480:4;3449:187;;;3513:10;3449:187;;;;;;;-1:-1:-1;;;;;3449:187:10;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3425:21:10;;;;;;;;;:211;;;;;;;;;;-1:-1:-1;;3425:211:10;;;-1:-1:-1;;3425:211:10;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3425:211:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;23:18;;;45:23;;3646:28:10;;;;;;;;;;;3690:142;;;;;;;;;;;;3449:187;;;;3435:10;;3690:142;;;;;;;;3848:75;;3903:10;;3879;;3848:75;;;;;2512:1418;;;;:::o;2159:459:16:-;2217:7;2458:6;2454:45;;-1:-1:-1;2487:1:16;2480:8;;2454:45;2521:5;;;2525:1;2521;:5;:1;2544:5;;;;;:10;2536:56;;;;-1:-1:-1;;;;;2536:56:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2610:1;-1:-1:-1;2159:459:16;;;;;:::o;3073:130::-;3131:7;3157:39;3161:1;3164;3157:39;;;;;;;;;;;;;;;;;3804:7;3904:12;3897:5;3889:28;;;;-1:-1:-1;;;;;3889:28:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3889:28:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3927:9;3943:1;3939;:5;;;;;;;3718:338;-1:-1:-1;;;;;3718:338:16:o;530:10457:10:-;;;;;;;;;-1:-1:-1;530:10457:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "pragma solidity 0.5.7;\n// Copyright BigchainDB GmbH and Ocean Protocol contributors\n// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)\n// Code is Apache-2.0 and docs are CC-BY-4.0\n\nimport '../interfaces/IERC20Template.sol';\nimport 'openzeppelin-solidity/contracts/math/SafeMath.sol';\n\n/**\n * @title FixedRateExchange\n * @dev FixedRateExchange is a fixed rate exchange Contract\n * Marketplaces uses this contract to allow consumers \n * exchanging datatokens with ocean token using a fixed \n * exchange rate.\n */\ncontract FixedRateExchange {\n using SafeMath for uint256;\n uint256 private constant BASE = 10 ** 18;\n struct Exchange {\n bool active;\n address exchangeOwner;\n address dataToken;\n address baseToken;\n uint256 fixedRate;\n }\n\n // maps an exchangeId to an exchange\n mapping(bytes32 => Exchange) private exchanges;\n bytes32[] private exchangeIds;\n\n modifier onlyActiveExchange(\n bytes32 exchangeId\n )\n {\n require(\n exchanges[exchangeId].fixedRate != 0 &&\n exchanges[exchangeId].active == true,\n 'FixedRateExchange: Exchange does not exist!'\n );\n _;\n }\n\n modifier onlyExchangeOwner(\n bytes32 exchangeId\n )\n {\n require(\n exchanges[exchangeId].exchangeOwner == msg.sender,\n 'FixedRateExchange: invalid exchange owner'\n );\n _;\n }\n\n event ExchangeCreated(\n bytes32 indexed exchangeId,\n address indexed baseToken,\n address indexed dataToken,\n address exchangeOwner,\n uint256 fixedRate\n );\n\n event ExchangeRateChanged(\n bytes32 indexed exchangeId,\n address indexed exchangeOwner,\n uint256 newRate\n );\n\n event ExchangeActivated(\n bytes32 indexed exchangeId,\n address indexed exchangeOwner\n );\n\n event ExchangeDeactivated(\n bytes32 indexed exchangeId,\n address indexed exchangeOwner\n );\n\n event Swapped(\n bytes32 indexed exchangeId,\n address indexed by,\n uint256 baseTokenSwappedAmount,\n uint256 dataTokenSwappedAmount\n );\n\n /**\n * @dev create\n * creates new exchange pairs between base token\n * (ocean token) and data tokens.\n * @param baseToken refers to a ocean token contract address\n * @param dataToken refers to a data token contract address\n * @param fixedRate refers to the exact fixed exchange rate in wei\n */\n function create(\n address baseToken,\n address dataToken,\n uint256 fixedRate\n )\n external\n {\n require(\n baseToken != address(0),\n 'FixedRateExchange: Invalid basetoken, zero address'\n );\n require(\n dataToken != address(0),\n 'FixedRateExchange: Invalid datatoken, zero address'\n );\n require(\n baseToken != dataToken,\n 'FixedRateExchange: Invalid datatoken, equals basetoken'\n );\n require(\n fixedRate != 0, \n 'FixedRateExchange: Invalid exchange rate value'\n );\n bytes32 exchangeId = generateExchangeId(\n baseToken,\n dataToken,\n msg.sender\n );\n require(\n exchanges[exchangeId].fixedRate == 0,\n 'FixedRateExchange: Exchange already exists!'\n );\n exchanges[exchangeId] = Exchange({\n active: true,\n exchangeOwner: msg.sender,\n dataToken: dataToken,\n baseToken: baseToken,\n fixedRate: fixedRate\n });\n exchangeIds.push(exchangeId);\n\n emit ExchangeCreated(\n exchangeId,\n baseToken,\n dataToken,\n msg.sender,\n fixedRate\n );\n\n emit ExchangeActivated(\n exchangeId,\n msg.sender\n );\n }\n\n /**\n * @dev generateExchangeId\n * creates unique exchange identifier for two token pairs.\n * @param baseToken refers to a ocean token contract address\n * @param dataToken refers to a data token contract address\n * @param exchangeOwner exchange owner address\n */\n function generateExchangeId(\n address baseToken,\n address dataToken,\n address exchangeOwner\n )\n public\n pure\n returns (bytes32)\n {\n return keccak256(\n abi.encode(\n baseToken,\n dataToken,\n exchangeOwner\n )\n );\n }\n \n /**\n * @dev CalcInGivenOut\n * Calculates how many basetokens are needed to get specifyed amount of datatokens\n * @param exchangeId a unique exchange idnetifier \n * @param dataTokenAmount the amount of data tokens to be exchanged\n */\n function CalcInGivenOut(\n bytes32 exchangeId,\n uint256 dataTokenAmount\n )\n public\n view\n onlyActiveExchange(\n exchangeId\n )\n returns (uint256 baseTokenAmount)\n {\n baseTokenAmount = dataTokenAmount.mul(\n exchanges[exchangeId].fixedRate).div(BASE);\n }\n \n /**\n * @dev swap\n * atomic swap between two registered fixed rate exchange.\n * @param exchangeId a unique exchange idnetifier \n * @param dataTokenAmount the amount of data tokens to be exchanged\n */\n function swap(\n bytes32 exchangeId,\n uint256 dataTokenAmount\n )\n external\n onlyActiveExchange(\n exchangeId\n )\n {\n require(\n dataTokenAmount != 0,\n 'FixedRateExchange: zero data token amount'\n );\n uint256 baseTokenAmount = CalcInGivenOut(exchangeId,dataTokenAmount);\n require(\n IERC20Template(exchanges[exchangeId].baseToken).transferFrom(\n msg.sender,\n exchanges[exchangeId].exchangeOwner,\n baseTokenAmount\n ),\n 'FixedRateExchange: transferFrom failed in the baseToken contract'\n );\n require(\n IERC20Template(exchanges[exchangeId].dataToken).transferFrom(\n exchanges[exchangeId].exchangeOwner,\n msg.sender,\n dataTokenAmount\n ),\n 'FixedRateExchange: transferFrom failed in the dataToken contract'\n );\n\n emit Swapped(\n exchangeId,\n msg.sender,\n baseTokenAmount,\n dataTokenAmount\n );\n }\n\n /**\n * @dev getNumberOfExchanges\n * gets the total number of registered exchanges\n * @return total number of registered exchange IDs\n */\n function getNumberOfExchanges()\n external\n view\n returns (uint256)\n {\n return exchangeIds.length;\n }\n\n /**\n * @dev setRate\n * changes the fixed rate for an exchange with a new rate\n * @param exchangeId a unique exchange idnetifier\n * @param newRate new fixed rate value\n */\n function setRate(\n bytes32 exchangeId,\n uint256 newRate\n )\n external\n onlyExchangeOwner(exchangeId)\n {\n require(\n newRate != 0,\n 'FixedRateExchange: Ratio must be >0'\n );\n\n exchanges[exchangeId].fixedRate = newRate;\n emit ExchangeRateChanged(\n exchangeId,\n msg.sender,\n newRate\n );\n }\n\n /**\n * @dev toggleExchangeState\n * toggles the active state of an existing exchange\n * @param exchangeId a unique exchange idnetifier\n */\n function toggleExchangeState(\n bytes32 exchangeId\n )\n external\n onlyExchangeOwner(exchangeId)\n {\n if(exchanges[exchangeId].active){\n exchanges[exchangeId].active = false;\n emit ExchangeDeactivated(\n exchangeId,\n msg.sender\n );\n } else {\n exchanges[exchangeId].active = true;\n emit ExchangeActivated(\n exchangeId,\n msg.sender\n );\n }\n }\n\n /**\n * @dev getRate\n * gets the current fixed rate for an exchange\n * @param exchangeId a unique exchange idnetifier\n * @return fixed rate value\n */\n function getRate(\n bytes32 exchangeId\n )\n external\n view\n returns(uint256)\n {\n return exchanges[exchangeId].fixedRate;\n }\n\n /**\n * @dev getSupply\n * gets the current supply of datatokens in an fixed\n * rate exchagne\n * @param exchangeId the exchange ID\n * @return supply\n */\n function getSupply(bytes32 exchangeId)\n public\n view\n returns (uint256 supply)\n {\n if(exchanges[exchangeId].active == false)\n supply = 0;\n else {\n uint256 balance = IERC20Template(exchanges[exchangeId].dataToken)\n .balanceOf(exchanges[exchangeId].exchangeOwner);\n uint256 allowance = IERC20Template(exchanges[exchangeId].dataToken)\n .allowance(exchanges[exchangeId].exchangeOwner, address(this));\n if(balance < allowance)\n supply = balance;\n else\n supply = allowance;\n }\n }\n\n /**\n * @dev getExchange\n * gets all the exchange details\n * @param exchangeId a unique exchange idnetifier\n * @return all the exchange details including the exchange Owner\n * the dataToken contract address, the base token address, the \n * fixed rate, whether the exchange is active and the supply or the \n * the current data token liquidity.\n */\n function getExchange(\n bytes32 exchangeId\n )\n external\n view\n returns (\n address exchangeOwner,\n address dataToken,\n address baseToken,\n uint256 fixedRate,\n bool active,\n uint256 supply\n )\n {\n Exchange memory exchange = exchanges[exchangeId];\n exchangeOwner = exchange.exchangeOwner;\n dataToken = exchange.dataToken;\n baseToken = exchange.baseToken;\n fixedRate = exchange.fixedRate;\n active = exchange.active;\n supply = getSupply(exchangeId);\n }\n\n /**\n * @dev getExchanges\n * gets all the exchanges list\n * @return a list of all registered exchange Ids\n */\n function getExchanges()\n external \n view \n returns (bytes32[] memory)\n {\n return exchangeIds;\n }\n\n /**\n * @dev isActive\n * checks whether exchange is active\n * @param exchangeId a unique exchange idnetifier\n * @return true if exchange is true, otherwise returns false\n */\n function isActive(\n bytes32 exchangeId\n )\n external\n view\n returns (bool)\n {\n return exchanges[exchangeId].active;\n }\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/fixedRate/FixedRateExchange.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/fixedRate/FixedRateExchange.sol", + "exportedSymbols": { + "FixedRateExchange": [ + 5550 + ] + }, + "id": 5551, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4988, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "0:22:10" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "../interfaces/IERC20Template.sol", + "id": 4989, + "nodeType": "ImportDirective", + "scope": 5551, + "sourceUnit": 5659, + "src": "185:42:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 4990, + "nodeType": "ImportDirective", + "scope": 5551, + "sourceUnit": 6515, + "src": "228:59:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title FixedRateExchange\n@dev FixedRateExchange is a fixed rate exchange Contract\n Marketplaces uses this contract to allow consumers \n exchanging datatokens with ocean token using a fixed \n exchange rate.", + "fullyImplemented": true, + "id": 5550, + "linearizedBaseContracts": [ + 5550 + ], + "name": "FixedRateExchange", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4993, + "libraryName": { + "contractScope": null, + "id": 4991, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6514, + "src": "569:8:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6514", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "563:27:10", + "typeName": { + "id": 4992, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "582:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 4998, + "name": "BASE", + "nodeType": "VariableDeclaration", + "scope": 5550, + "src": "595:40:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4994, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "595:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + }, + "id": 4997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 4995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "627:2:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3138", + "id": 4996, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "633:2:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "src": "627:8:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + } + }, + "visibility": "private" + }, + { + "canonicalName": "FixedRateExchange.Exchange", + "id": 5009, + "members": [ + { + "constant": false, + "id": 5000, + "name": "active", + "nodeType": "VariableDeclaration", + "scope": 5009, + "src": "667:11:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4999, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "667:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5002, + "name": "exchangeOwner", + "nodeType": "VariableDeclaration", + "scope": 5009, + "src": "688:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5001, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "688:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5004, + "name": "dataToken", + "nodeType": "VariableDeclaration", + "scope": 5009, + "src": "719:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5003, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "719:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5006, + "name": "baseToken", + "nodeType": "VariableDeclaration", + "scope": 5009, + "src": "746:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5005, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "746:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5008, + "name": "fixedRate", + "nodeType": "VariableDeclaration", + "scope": 5009, + "src": "773:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5007, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "773:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Exchange", + "nodeType": "StructDefinition", + "scope": 5550, + "src": "641:156:10", + "visibility": "public" + }, + { + "constant": false, + "id": 5013, + "name": "exchanges", + "nodeType": "VariableDeclaration", + "scope": 5550, + "src": "844:46:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange)" + }, + "typeName": { + "id": 5012, + "keyType": { + "id": 5010, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "852:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "844:28:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange)" + }, + "valueType": { + "contractScope": null, + "id": 5011, + "name": "Exchange", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5009, + "src": "863:8:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage_ptr", + "typeString": "struct FixedRateExchange.Exchange" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 5016, + "name": "exchangeIds", + "nodeType": "VariableDeclaration", + "scope": 5550, + "src": "896:29:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 5014, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "896:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 5015, + "length": null, + "nodeType": "ArrayTypeName", + "src": "896:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 5038, + "nodeType": "Block", + "src": "998:206:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5021, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "1029:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5023, + "indexExpression": { + "argumentTypes": null, + "id": 5022, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5018, + "src": "1039:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1029:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5024, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "fixedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 5008, + "src": "1029:31:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5025, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1064:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1029:36:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5027, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "1081:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5029, + "indexExpression": { + "argumentTypes": null, + "id": 5028, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5018, + "src": "1091:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1081:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5030, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "active", + "nodeType": "MemberAccess", + "referencedDeclaration": 5000, + "src": "1081:28:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1113:4:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1081:36:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1029:88:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46697865645261746545786368616e67653a2045786368616e676520646f6573206e6f7420657869737421", + "id": 5034, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1131:45:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_33934cff4a0fa610a47c77876602b176c21576f21e0c00dbe89561d0224d4982", + "typeString": "literal_string \"FixedRateExchange: Exchange does not exist!\"" + }, + "value": "FixedRateExchange: Exchange does not exist!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_33934cff4a0fa610a47c77876602b176c21576f21e0c00dbe89561d0224d4982", + "typeString": "literal_string \"FixedRateExchange: Exchange does not exist!\"" + } + ], + "id": 5020, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1008:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1008:178:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5036, + "nodeType": "ExpressionStatement", + "src": "1008:178:10" + }, + { + "id": 5037, + "nodeType": "PlaceholderStatement", + "src": "1196:1:10" + } + ] + }, + "documentation": null, + "id": 5039, + "name": "onlyActiveExchange", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5018, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5039, + "src": "969:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5017, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "969:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "959:34:10" + }, + "src": "932:272:10", + "visibility": "internal" + }, + { + "body": { + "id": 5055, + "nodeType": "Block", + "src": "1275:165:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5044, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "1306:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5046, + "indexExpression": { + "argumentTypes": null, + "id": 5045, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5041, + "src": "1316:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1306:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5047, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exchangeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5002, + "src": "1306:35:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5048, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "1345:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1345:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1306:49:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46697865645261746545786368616e67653a20696e76616c69642065786368616e6765206f776e6572", + "id": 5051, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1369:43:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6953f2de142c64f34f94b55c4652873748f95f81c631ff9f1f451ebbfe788b37", + "typeString": "literal_string \"FixedRateExchange: invalid exchange owner\"" + }, + "value": "FixedRateExchange: invalid exchange owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6953f2de142c64f34f94b55c4652873748f95f81c631ff9f1f451ebbfe788b37", + "typeString": "literal_string \"FixedRateExchange: invalid exchange owner\"" + } + ], + "id": 5043, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1285:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1285:137:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5053, + "nodeType": "ExpressionStatement", + "src": "1285:137:10" + }, + { + "id": 5054, + "nodeType": "PlaceholderStatement", + "src": "1432:1:10" + } + ] + }, + "documentation": null, + "id": 5056, + "name": "onlyExchangeOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5041, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5056, + "src": "1246:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5040, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1246:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1236:34:10" + }, + "src": "1210:230:10", + "visibility": "internal" + }, + { + "anonymous": false, + "documentation": null, + "id": 5068, + "name": "ExchangeCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 5067, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5058, + "indexed": true, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5068, + "src": "1477:26:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5057, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1477:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5060, + "indexed": true, + "name": "baseToken", + "nodeType": "VariableDeclaration", + "scope": 5068, + "src": "1513:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5059, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1513:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5062, + "indexed": true, + "name": "dataToken", + "nodeType": "VariableDeclaration", + "scope": 5068, + "src": "1548:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5061, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5064, + "indexed": false, + "name": "exchangeOwner", + "nodeType": "VariableDeclaration", + "scope": 5068, + "src": "1583:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5063, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1583:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5066, + "indexed": false, + "name": "fixedRate", + "nodeType": "VariableDeclaration", + "scope": 5068, + "src": "1614:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1614:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1467:170:10" + }, + "src": "1446:192:10" + }, + { + "anonymous": false, + "documentation": null, + "id": 5076, + "name": "ExchangeRateChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 5075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5070, + "indexed": true, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5076, + "src": "1679:26:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5069, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1679:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5072, + "indexed": true, + "name": "exchangeOwner", + "nodeType": "VariableDeclaration", + "scope": 5076, + "src": "1715:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5071, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1715:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5074, + "indexed": false, + "name": "newRate", + "nodeType": "VariableDeclaration", + "scope": 5076, + "src": "1754:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1754:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1669:106:10" + }, + "src": "1644:132:10" + }, + { + "anonymous": false, + "documentation": null, + "id": 5082, + "name": "ExchangeActivated", + "nodeType": "EventDefinition", + "parameters": { + "id": 5081, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5078, + "indexed": true, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5082, + "src": "1815:26:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5077, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1815:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5080, + "indexed": true, + "name": "exchangeOwner", + "nodeType": "VariableDeclaration", + "scope": 5082, + "src": "1851:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1851:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1805:81:10" + }, + "src": "1782:105:10" + }, + { + "anonymous": false, + "documentation": null, + "id": 5088, + "name": "ExchangeDeactivated", + "nodeType": "EventDefinition", + "parameters": { + "id": 5087, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5084, + "indexed": true, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5088, + "src": "1928:26:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5083, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1928:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5086, + "indexed": true, + "name": "exchangeOwner", + "nodeType": "VariableDeclaration", + "scope": 5088, + "src": "1964:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5085, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1964:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1918:81:10" + }, + "src": "1893:107:10" + }, + { + "anonymous": false, + "documentation": null, + "id": 5098, + "name": "Swapped", + "nodeType": "EventDefinition", + "parameters": { + "id": 5097, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5090, + "indexed": true, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5098, + "src": "2029:26:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5089, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2029:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5092, + "indexed": true, + "name": "by", + "nodeType": "VariableDeclaration", + "scope": 5098, + "src": "2065:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2065:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5094, + "indexed": false, + "name": "baseTokenSwappedAmount", + "nodeType": "VariableDeclaration", + "scope": 5098, + "src": "2093:30:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5093, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2093:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5096, + "indexed": false, + "name": "dataTokenSwappedAmount", + "nodeType": "VariableDeclaration", + "scope": 5098, + "src": "2133:30:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5095, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2133:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2019:150:10" + }, + "src": "2006:164:10" + }, + { + "body": { + "id": 5192, + "nodeType": "Block", + "src": "2636:1294:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5108, + "name": "baseToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5100, + "src": "2667:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 5110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2688:1:10", + "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": 5109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2680:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 5111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2680:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2667:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46697865645261746545786368616e67653a20496e76616c69642062617365746f6b656e2c20207a65726f2061646472657373", + "id": 5113, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2704:53:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e4f79921714a9bf5dc580585dc440da8f598ce27caa8d87778cb9493126de16", + "typeString": "literal_string \"FixedRateExchange: Invalid basetoken, zero address\"" + }, + "value": "FixedRateExchange: Invalid basetoken, zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e4f79921714a9bf5dc580585dc440da8f598ce27caa8d87778cb9493126de16", + "typeString": "literal_string \"FixedRateExchange: Invalid basetoken, zero address\"" + } + ], + "id": 5107, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2646:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2646:121:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5115, + "nodeType": "ExpressionStatement", + "src": "2646:121:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5117, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5102, + "src": "2798:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 5119, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2819:1:10", + "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": 5118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2811:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 5120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2811:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2798:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46697865645261746545786368616e67653a20496e76616c69642064617461746f6b656e2c20207a65726f2061646472657373", + "id": 5122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:53:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c4a0d6c9d74c4e7b7eb600c681c94f357f46a1a17500afc03636322ac0a63c22", + "typeString": "literal_string \"FixedRateExchange: Invalid datatoken, zero address\"" + }, + "value": "FixedRateExchange: Invalid datatoken, zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c4a0d6c9d74c4e7b7eb600c681c94f357f46a1a17500afc03636322ac0a63c22", + "typeString": "literal_string \"FixedRateExchange: Invalid datatoken, zero address\"" + } + ], + "id": 5116, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2777:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2777:121:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5124, + "nodeType": "ExpressionStatement", + "src": "2777:121:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5126, + "name": "baseToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5100, + "src": "2929:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 5127, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5102, + "src": "2942:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2929:22:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46697865645261746545786368616e67653a20496e76616c69642064617461746f6b656e2c2020657175616c732062617365746f6b656e", + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2965:57:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8088a8876b7d943bb58f3202d91bc395f378f8d33e9c768b1a854016f72d0175", + "typeString": "literal_string \"FixedRateExchange: Invalid datatoken, equals basetoken\"" + }, + "value": "FixedRateExchange: Invalid datatoken, equals basetoken" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8088a8876b7d943bb58f3202d91bc395f378f8d33e9c768b1a854016f72d0175", + "typeString": "literal_string \"FixedRateExchange: Invalid datatoken, equals basetoken\"" + } + ], + "id": 5125, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2908:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2908:124:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5131, + "nodeType": "ExpressionStatement", + "src": "2908:124:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5133, + "name": "fixedRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5104, + "src": "3063:9:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3076:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3063:14:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46697865645261746545786368616e67653a20496e76616c69642065786368616e676520726174652076616c7565", + "id": 5136, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3092:48:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_049c41558b20e3ef0c501ffa5f229a463d9c10ba2b6e269ac1d736dfd92adbc2", + "typeString": "literal_string \"FixedRateExchange: Invalid exchange rate value\"" + }, + "value": "FixedRateExchange: Invalid exchange rate value" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_049c41558b20e3ef0c501ffa5f229a463d9c10ba2b6e269ac1d736dfd92adbc2", + "typeString": "literal_string \"FixedRateExchange: Invalid exchange rate value\"" + } + ], + "id": 5132, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "3042:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3042:108:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5138, + "nodeType": "ExpressionStatement", + "src": "3042:108:10" + }, + { + "assignments": [ + 5140 + ], + "declarations": [ + { + "constant": false, + "id": 5140, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5192, + "src": "3160:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5139, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3160:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5147, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5142, + "name": "baseToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5100, + "src": "3213:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5143, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5102, + "src": "3236:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5144, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3259:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3259:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 5141, + "name": "generateExchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5214, + "src": "3181:18:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$_t_address_$returns$_t_bytes32_$", + "typeString": "function (address,address,address) pure returns (bytes32)" + } + }, + "id": 5146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3181:98:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3160:119:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5149, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "3310:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5151, + "indexExpression": { + "argumentTypes": null, + "id": 5150, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5140, + "src": "3320:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3310:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5152, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "fixedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 5008, + "src": "3310:31:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3345:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3310:36:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46697865645261746545786368616e67653a2045786368616e676520616c72656164792065786973747321", + "id": 5155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3360:45:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4cbdfa87b7259677de1d4b2bb2aef7a46adf4ea65536670792826c014ead7938", + "typeString": "literal_string \"FixedRateExchange: Exchange already exists!\"" + }, + "value": "FixedRateExchange: Exchange already exists!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4cbdfa87b7259677de1d4b2bb2aef7a46adf4ea65536670792826c014ead7938", + "typeString": "literal_string \"FixedRateExchange: Exchange already exists!\"" + } + ], + "id": 5148, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "3289:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3289:126:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5157, + "nodeType": "ExpressionStatement", + "src": "3289:126:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 5169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5158, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "3425:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5160, + "indexExpression": { + "argumentTypes": null, + "id": 5159, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5140, + "src": "3435:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3425:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3480:4:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5163, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3513:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3513:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 5165, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5102, + "src": "3548:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5166, + "name": "baseToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5100, + "src": "3582:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5167, + "name": "fixedRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5104, + "src": "3616:9:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5161, + "name": "Exchange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "3449:8:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Exchange_$5009_storage_ptr_$", + "typeString": "type(struct FixedRateExchange.Exchange storage pointer)" + } + }, + "id": 5168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "active", + "exchangeOwner", + "dataToken", + "baseToken", + "fixedRate" + ], + "nodeType": "FunctionCall", + "src": "3449:187:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_memory", + "typeString": "struct FixedRateExchange.Exchange memory" + } + }, + "src": "3425:211:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5170, + "nodeType": "ExpressionStatement", + "src": "3425:211:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5174, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5140, + "src": "3663:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 5171, + "name": "exchangeIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5016, + "src": "3646:11:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 5173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3646:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) returns (uint256)" + } + }, + "id": 5175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3646:28:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5176, + "nodeType": "ExpressionStatement", + "src": "3646:28:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5178, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5140, + "src": "3719:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 5179, + "name": "baseToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5100, + "src": "3743:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5180, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5102, + "src": "3766:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5181, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3789:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3789:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 5183, + "name": "fixedRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5104, + "src": "3813:9:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5177, + "name": "ExchangeCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5068, + "src": "3690:15:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,address,address,address,uint256)" + } + }, + "id": 5184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3690:142:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5185, + "nodeType": "EmitStatement", + "src": "3685:147:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5187, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5140, + "src": "3879:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5188, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "3903:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3903:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 5186, + "name": "ExchangeActivated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5082, + "src": "3848:17:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 5190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3848:75:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5191, + "nodeType": "EmitStatement", + "src": "3843:80:10" + } + ] + }, + "documentation": "@dev create\n creates new exchange pairs between base token\n (ocean token) and data tokens.\n@param baseToken refers to a ocean token contract address\n@param dataToken refers to a data token contract address\n@param fixedRate refers to the exact fixed exchange rate in wei", + "id": 5193, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "create", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5105, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5100, + "name": "baseToken", + "nodeType": "VariableDeclaration", + "scope": 5193, + "src": "2537:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5099, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2537:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5102, + "name": "dataToken", + "nodeType": "VariableDeclaration", + "scope": 5193, + "src": "2564:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5101, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2564:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5104, + "name": "fixedRate", + "nodeType": "VariableDeclaration", + "scope": 5193, + "src": "2591:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5103, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2591:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2527:87:10" + }, + "returnParameters": { + "id": 5106, + "nodeType": "ParameterList", + "parameters": [], + "src": "2636:0:10" + }, + "scope": 5550, + "src": "2512:1418:10", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 5213, + "nodeType": "Block", + "src": "4408:166:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5207, + "name": "baseToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5195, + "src": "4476:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5208, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5197, + "src": "4503:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5209, + "name": "exchangeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5199, + "src": "4530:13:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 5205, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7108, + "src": "4448:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4448:10:10", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 5210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4448:109:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5204, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7115, + "src": "4425:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 5211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4425:142:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 5203, + "id": 5212, + "nodeType": "Return", + "src": "4418:149:10" + } + ] + }, + "documentation": "@dev generateExchangeId\n creates unique exchange identifier for two token pairs.\n@param baseToken refers to a ocean token contract address\n@param dataToken refers to a data token contract address\n@param exchangeOwner exchange owner address", + "id": 5214, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generateExchangeId", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5195, + "name": "baseToken", + "nodeType": "VariableDeclaration", + "scope": 5214, + "src": "4268:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4268:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5197, + "name": "dataToken", + "nodeType": "VariableDeclaration", + "scope": 5214, + "src": "4295:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5196, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4295:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5199, + "name": "exchangeOwner", + "nodeType": "VariableDeclaration", + "scope": 5214, + "src": "4322:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5198, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4322:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4258:91:10" + }, + "returnParameters": { + "id": 5203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5202, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5214, + "src": "4395:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5201, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4395:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4394:9:10" + }, + "scope": 5550, + "src": "4231:343:10", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5239, + "nodeType": "Block", + "src": "5072:110:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5226, + "name": "baseTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5224, + "src": "5082:15:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5235, + "name": "BASE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4998, + "src": "5170:4:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5229, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "5133:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5231, + "indexExpression": { + "argumentTypes": null, + "id": 5230, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5216, + "src": "5143:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5133:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5232, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "fixedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 5008, + "src": "5133:31:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5227, + "name": "dataTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "5100:15:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 6431, + "src": "5100:19:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5100:65:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 6447, + "src": "5100:69:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5100:75:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5082:93:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5238, + "nodeType": "ExpressionStatement", + "src": "5082:93:10" + } + ] + }, + "documentation": "@dev CalcInGivenOut\n Calculates how many basetokens are needed to get specifyed amount of datatokens\n@param exchangeId a unique exchange idnetifier \n@param dataTokenAmount the amount of data tokens to be exchanged", + "id": 5240, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 5221, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5216, + "src": "5005:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 5222, + "modifierName": { + "argumentTypes": null, + "id": 5220, + "name": "onlyActiveExchange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5039, + "src": "4973:18:10", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4973:52:10" + } + ], + "name": "CalcInGivenOut", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5216, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5240, + "src": "4879:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5215, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4879:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5218, + "name": "dataTokenAmount", + "nodeType": "VariableDeclaration", + "scope": 5240, + "src": "4907:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4907:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4869:67:10" + }, + "returnParameters": { + "id": 5225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5224, + "name": "baseTokenAmount", + "nodeType": "VariableDeclaration", + "scope": 5240, + "src": "5043:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5223, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5043:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5042:25:10" + }, + "scope": 5550, + "src": "4846:336:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5310, + "nodeType": "Block", + "src": "5583:960:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5251, + "name": "dataTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "5614:15:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5633:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5614:20:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46697865645261746545786368616e67653a207a65726f206461746120746f6b656e20616d6f756e74", + "id": 5254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5648:43:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d2b293ef72dfab6f705b22246c532786cca882499f3fba3ae8114dc40951c5bc", + "typeString": "literal_string \"FixedRateExchange: zero data token amount\"" + }, + "value": "FixedRateExchange: zero data token amount" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d2b293ef72dfab6f705b22246c532786cca882499f3fba3ae8114dc40951c5bc", + "typeString": "literal_string \"FixedRateExchange: zero data token amount\"" + } + ], + "id": 5250, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "5593:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5593:108:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5256, + "nodeType": "ExpressionStatement", + "src": "5593:108:10" + }, + { + "assignments": [ + 5258 + ], + "declarations": [ + { + "constant": false, + "id": 5258, + "name": "baseTokenAmount", + "nodeType": "VariableDeclaration", + "scope": 5310, + "src": "5711:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5711:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5263, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5260, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "5752:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 5261, + "name": "dataTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "5763:15:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5259, + "name": "CalcInGivenOut", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5240, + "src": "5737:14:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bytes32,uint256) view returns (uint256)" + } + }, + "id": 5262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5737:42:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5711:68:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5272, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "5888:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5888:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5274, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "5916:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5276, + "indexExpression": { + "argumentTypes": null, + "id": 5275, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "5926:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5916:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5277, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exchangeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5002, + "src": "5916:35:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5278, + "name": "baseTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "5969:15:10", + "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" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5266, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "5825:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5268, + "indexExpression": { + "argumentTypes": null, + "id": 5267, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "5835:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5825:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5269, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "5825:31:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5265, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "5810:14:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 5270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5810:47:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 5271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 5633, + "src": "5810:60:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 5279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5810:188:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46697865645261746545786368616e67653a207472616e7366657246726f6d206661696c656420696e207468652062617365546f6b656e20636f6e7472616374", + "id": 5280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6012:66:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_704d230adb0aeaaf731cbfcd3f10c77132039a7e2520db77d561e3ebcc5b16b9", + "typeString": "literal_string \"FixedRateExchange: transferFrom failed in the baseToken contract\"" + }, + "value": "FixedRateExchange: transferFrom failed in the baseToken contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_704d230adb0aeaaf731cbfcd3f10c77132039a7e2520db77d561e3ebcc5b16b9", + "typeString": "literal_string \"FixedRateExchange: transferFrom failed in the baseToken contract\"" + } + ], + "id": 5264, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "5789:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5789:299:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5282, + "nodeType": "ExpressionStatement", + "src": "5789:299:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5291, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "6197:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5293, + "indexExpression": { + "argumentTypes": null, + "id": 5292, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "6207:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6197:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5294, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exchangeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5002, + "src": "6197:35:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5295, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "6250:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6250:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 5297, + "name": "dataTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "6278:15:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5285, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "6134:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5287, + "indexExpression": { + "argumentTypes": null, + "id": 5286, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "6144:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6134:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5288, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dataToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 5004, + "src": "6134:31:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5284, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "6119:14:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 5289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6119:47:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 5290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 5633, + "src": "6119:60:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 5298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6119:188:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46697865645261746545786368616e67653a207472616e7366657246726f6d206661696c656420696e207468652064617461546f6b656e20636f6e7472616374", + "id": 5299, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6321:66:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c05b0f5b41acd20d6ba43aff2e398e9afe8f1d66a0a38aeff2f84a7867e95310", + "typeString": "literal_string \"FixedRateExchange: transferFrom failed in the dataToken contract\"" + }, + "value": "FixedRateExchange: transferFrom failed in the dataToken contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c05b0f5b41acd20d6ba43aff2e398e9afe8f1d66a0a38aeff2f84a7867e95310", + "typeString": "literal_string \"FixedRateExchange: transferFrom failed in the dataToken contract\"" + } + ], + "id": 5283, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "6098:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6098:299:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5301, + "nodeType": "ExpressionStatement", + "src": "6098:299:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5303, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "6434:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5304, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "6458:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6458:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 5306, + "name": "baseTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5258, + "src": "6482:15:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5307, + "name": "dataTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "6511:15:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5302, + "name": "Swapped", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5098, + "src": "6413:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,address,uint256,uint256)" + } + }, + "id": 5308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6413:123:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5309, + "nodeType": "EmitStatement", + "src": "6408:128:10" + } + ] + }, + "documentation": "@dev swap\n atomic swap between two registered fixed rate exchange.\n@param exchangeId a unique exchange idnetifier \n@param dataTokenAmount the amount of data tokens to be exchanged", + "id": 5311, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 5247, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5242, + "src": "5558:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 5248, + "modifierName": { + "argumentTypes": null, + "id": 5246, + "name": "onlyActiveExchange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5039, + "src": "5526:18:10", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5526:52:10" + } + ], + "name": "swap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5245, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5242, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5311, + "src": "5443:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5241, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5443:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5244, + "name": "dataTokenAmount", + "nodeType": "VariableDeclaration", + "scope": 5311, + "src": "5471:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5243, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5471:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5433:67:10" + }, + "returnParameters": { + "id": 5249, + "nodeType": "ParameterList", + "parameters": [], + "src": "5583:0:10" + }, + "scope": 5550, + "src": "5420:1123:10", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 5319, + "nodeType": "Block", + "src": "6803:42:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5316, + "name": "exchangeIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5016, + "src": "6820:11:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 5317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6820:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5315, + "id": 5318, + "nodeType": "Return", + "src": "6813:25:10" + } + ] + }, + "documentation": "@dev getNumberOfExchanges\n gets the total number of registered exchanges\n@return total number of registered exchange IDs", + "id": 5320, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNumberOfExchanges", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5312, + "nodeType": "ParameterList", + "parameters": [], + "src": "6740:2:10" + }, + "returnParameters": { + "id": 5315, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5314, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5320, + "src": "6790:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5313, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6790:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6789:9:10" + }, + "scope": 5550, + "src": "6711:134:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 5351, + "nodeType": "Block", + "src": "7186:276:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5331, + "name": "newRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5324, + "src": "7217:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7228:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7217:12:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46697865645261746545786368616e67653a20526174696f206d757374206265203e30", + "id": 5334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7243:37:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_36101f33c85b5f047dc985e5d24ae3bcf32f1d4b0a57ccd6a8c04d1cc8672d12", + "typeString": "literal_string \"FixedRateExchange: Ratio must be >0\"" + }, + "value": "FixedRateExchange: Ratio must be >0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_36101f33c85b5f047dc985e5d24ae3bcf32f1d4b0a57ccd6a8c04d1cc8672d12", + "typeString": "literal_string \"FixedRateExchange: Ratio must be >0\"" + } + ], + "id": 5330, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "7196:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7196:94:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5336, + "nodeType": "ExpressionStatement", + "src": "7196:94:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 5342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5337, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "7301:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5339, + "indexExpression": { + "argumentTypes": null, + "id": 5338, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5322, + "src": "7311:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7301:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5340, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "fixedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 5008, + "src": "7301:31:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5341, + "name": "newRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5324, + "src": "7335:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7301:41:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5343, + "nodeType": "ExpressionStatement", + "src": "7301:41:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5345, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5322, + "src": "7390:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5346, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "7414:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7414:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 5348, + "name": "newRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5324, + "src": "7438:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5344, + "name": "ExchangeRateChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5076, + "src": "7357:19:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,address,uint256)" + } + }, + "id": 5349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7357:98:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5350, + "nodeType": "EmitStatement", + "src": "7352:103:10" + } + ] + }, + "documentation": "@dev setRate\n changes the fixed rate for an exchange with a new rate\n@param exchangeId a unique exchange idnetifier\n@param newRate new fixed rate value", + "id": 5352, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 5327, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5322, + "src": "7170:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 5328, + "modifierName": { + "argumentTypes": null, + "id": 5326, + "name": "onlyExchangeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5056, + "src": "7152:17:10", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7152:29:10" + } + ], + "name": "setRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5325, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5322, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5352, + "src": "7077:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5321, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7077:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5324, + "name": "newRate", + "nodeType": "VariableDeclaration", + "scope": 5352, + "src": "7105:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5323, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7105:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7067:59:10" + }, + "returnParameters": { + "id": 5329, + "nodeType": "ParameterList", + "parameters": [], + "src": "7186:0:10" + }, + "scope": 5550, + "src": "7051:411:10", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 5393, + "nodeType": "Block", + "src": "7754:389:10", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5360, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "7767:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5362, + "indexExpression": { + "argumentTypes": null, + "id": 5361, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5354, + "src": "7777:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7767:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5363, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "active", + "nodeType": "MemberAccess", + "referencedDeclaration": 5000, + "src": "7767:28:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 5391, + "nodeType": "Block", + "src": "7971:166:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5378, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "7985:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5380, + "indexExpression": { + "argumentTypes": null, + "id": 5379, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5354, + "src": "7995:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7985:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5381, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "active", + "nodeType": "MemberAccess", + "referencedDeclaration": 5000, + "src": "7985:28:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8016:4:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "7985:35:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5384, + "nodeType": "ExpressionStatement", + "src": "7985:35:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5386, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5354, + "src": "8074:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5387, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "8102:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8102:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 5385, + "name": "ExchangeActivated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5082, + "src": "8039:17:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 5389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8039:87:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5390, + "nodeType": "EmitStatement", + "src": "8034:92:10" + } + ] + }, + "id": 5392, + "nodeType": "IfStatement", + "src": "7764:373:10", + "trueBody": { + "id": 5377, + "nodeType": "Block", + "src": "7796:169:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5364, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "7810:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5366, + "indexExpression": { + "argumentTypes": null, + "id": 5365, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5354, + "src": "7820:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7810:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5367, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "active", + "nodeType": "MemberAccess", + "referencedDeclaration": 5000, + "src": "7810:28:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 5368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7841:5:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "7810:36:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5370, + "nodeType": "ExpressionStatement", + "src": "7810:36:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5372, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5354, + "src": "7902:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5373, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "7930:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7930:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 5371, + "name": "ExchangeDeactivated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "7865:19:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 5375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7865:89:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5376, + "nodeType": "EmitStatement", + "src": "7860:94:10" + } + ] + } + } + ] + }, + "documentation": "@dev toggleExchangeState\n toggles the active state of an existing exchange\n@param exchangeId a unique exchange idnetifier", + "id": 5394, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 5357, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5354, + "src": "7738:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 5358, + "modifierName": { + "argumentTypes": null, + "id": 5356, + "name": "onlyExchangeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5056, + "src": "7720:17:10", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7720:29:10" + } + ], + "name": "toggleExchangeState", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5355, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5354, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5394, + "src": "7670:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5353, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7670:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7660:34:10" + }, + "returnParameters": { + "id": 5359, + "nodeType": "ParameterList", + "parameters": [], + "src": "7754:0:10" + }, + "scope": 5550, + "src": "7632:511:10", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 5406, + "nodeType": "Block", + "src": "8437:55:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5401, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "8454:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5403, + "indexExpression": { + "argumentTypes": null, + "id": 5402, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5396, + "src": "8464:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8454:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5404, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "fixedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 5008, + "src": "8454:31:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5400, + "id": 5405, + "nodeType": "Return", + "src": "8447:38:10" + } + ] + }, + "documentation": "@dev getRate\n gets the current fixed rate for an exchange\n@param exchangeId a unique exchange idnetifier\n@return fixed rate value", + "id": 5407, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5397, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5396, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5407, + "src": "8353:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5395, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8353:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8343:34:10" + }, + "returnParameters": { + "id": 5400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5399, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5407, + "src": "8424:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5398, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8424:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8423:9:10" + }, + "scope": 5550, + "src": "8327:165:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 5471, + "nodeType": "Block", + "src": "8792:532:10", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5414, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "8805:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5416, + "indexExpression": { + "argumentTypes": null, + "id": 5415, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "8815:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8805:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5417, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "active", + "nodeType": "MemberAccess", + "referencedDeclaration": 5000, + "src": "8805:28:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 5418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8837:5:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "8805:37:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 5469, + "nodeType": "Block", + "src": "8881:437:10", + "statements": [ + { + "assignments": [ + 5425 + ], + "declarations": [ + { + "constant": false, + "id": 5425, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 5469, + "src": "8895:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5424, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8895:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5438, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5433, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "8988:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5435, + "indexExpression": { + "argumentTypes": null, + "id": 5434, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "8998:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8988:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5436, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exchangeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5002, + "src": "8988:35:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5427, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "8928:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5429, + "indexExpression": { + "argumentTypes": null, + "id": 5428, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "8938:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8928:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5430, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dataToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 5004, + "src": "8928:31:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5426, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "8913:14:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 5431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8913:47:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 5432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5640, + "src": "8913:74:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 5437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8913:111:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8895:129:10" + }, + { + "assignments": [ + 5440 + ], + "declarations": [ + { + "constant": false, + "id": 5440, + "name": "allowance", + "nodeType": "VariableDeclaration", + "scope": 5469, + "src": "9038:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9038:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5456, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5448, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "9133:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5450, + "indexExpression": { + "argumentTypes": null, + "id": 5449, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "9143:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9133:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5451, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exchangeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5002, + "src": "9133:35:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5453, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7169, + "src": "9178:4:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_FixedRateExchange_$5550", + "typeString": "contract FixedRateExchange" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_FixedRateExchange_$5550", + "typeString": "contract FixedRateExchange" + } + ], + "id": 5452, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9170:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 5454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9170:13:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5442, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "9073:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5444, + "indexExpression": { + "argumentTypes": null, + "id": 5443, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "9083:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9073:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5445, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dataToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 5004, + "src": "9073:31:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5441, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "9058:14:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 5446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9058:47:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 5447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 5622, + "src": "9058:74:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 5455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9058:126:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9038:146:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5457, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5425, + "src": "9201:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 5458, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5440, + "src": "9211:9:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9201:19:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 5466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5464, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5412, + "src": "9289:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5465, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5440, + "src": "9298:9:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9289:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5467, + "nodeType": "ExpressionStatement", + "src": "9289:18:10" + }, + "id": 5468, + "nodeType": "IfStatement", + "src": "9198:109:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 5462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5460, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5412, + "src": "9238:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 5461, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5425, + "src": "9247:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9238:16:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5463, + "nodeType": "ExpressionStatement", + "src": "9238:16:10" + } + } + ] + }, + "id": 5470, + "nodeType": "IfStatement", + "src": "8802:516:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 5422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5420, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5412, + "src": "8856:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 5421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8865:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8856:10:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5423, + "nodeType": "ExpressionStatement", + "src": "8856:10:10" + } + } + ] + }, + "documentation": "@dev getSupply\n gets the current supply of datatokens in an fixed\n rate exchagne\n@param exchangeId the exchange ID\n@return supply", + "id": 5472, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5410, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5409, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5472, + "src": "8707:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5408, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8707:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8706:20:10" + }, + "returnParameters": { + "id": 5413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5412, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 5472, + "src": "8772:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8772:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8771:16:10" + }, + "scope": 5550, + "src": "8688:636:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 5526, + "nodeType": "Block", + "src": "10039:307:10", + "statements": [ + { + "assignments": [ + 5490 + ], + "declarations": [ + { + "constant": false, + "id": 5490, + "name": "exchange", + "nodeType": "VariableDeclaration", + "scope": 5526, + "src": "10049:24:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_memory_ptr", + "typeString": "struct FixedRateExchange.Exchange" + }, + "typeName": { + "contractScope": null, + "id": 5489, + "name": "Exchange", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5009, + "src": "10049:8:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage_ptr", + "typeString": "struct FixedRateExchange.Exchange" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5494, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5491, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "10076:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5493, + "indexExpression": { + "argumentTypes": null, + "id": 5492, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5474, + "src": "10086:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10076:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10049:48:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 5498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5495, + "name": "exchangeOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5477, + "src": "10107:13:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5496, + "name": "exchange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5490, + "src": "10123:8:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_memory_ptr", + "typeString": "struct FixedRateExchange.Exchange memory" + } + }, + "id": 5497, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exchangeOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 5002, + "src": "10123:22:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "10107:38:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5499, + "nodeType": "ExpressionStatement", + "src": "10107:38:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 5503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5500, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5479, + "src": "10155:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5501, + "name": "exchange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5490, + "src": "10167:8:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_memory_ptr", + "typeString": "struct FixedRateExchange.Exchange memory" + } + }, + "id": 5502, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dataToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 5004, + "src": "10167:18:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "10155:30:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5504, + "nodeType": "ExpressionStatement", + "src": "10155:30:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 5508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5505, + "name": "baseToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5481, + "src": "10195:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5506, + "name": "exchange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5490, + "src": "10207:8:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_memory_ptr", + "typeString": "struct FixedRateExchange.Exchange memory" + } + }, + "id": 5507, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 5006, + "src": "10207:18:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "10195:30:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5509, + "nodeType": "ExpressionStatement", + "src": "10195:30:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 5513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5510, + "name": "fixedRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5483, + "src": "10235:9:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5511, + "name": "exchange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5490, + "src": "10247:8:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_memory_ptr", + "typeString": "struct FixedRateExchange.Exchange memory" + } + }, + "id": 5512, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "fixedRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 5008, + "src": "10247:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10235:30:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5514, + "nodeType": "ExpressionStatement", + "src": "10235:30:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 5518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5515, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5485, + "src": "10275:6:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5516, + "name": "exchange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5490, + "src": "10284:8:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_memory_ptr", + "typeString": "struct FixedRateExchange.Exchange memory" + } + }, + "id": 5517, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "active", + "nodeType": "MemberAccess", + "referencedDeclaration": 5000, + "src": "10284:15:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10275:24:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5519, + "nodeType": "ExpressionStatement", + "src": "10275:24:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 5524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5520, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5487, + "src": "10309:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5522, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5474, + "src": "10328:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 5521, + "name": "getSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5472, + "src": "10318:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (bytes32) view returns (uint256)" + } + }, + "id": 5523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10318:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10309:30:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5525, + "nodeType": "ExpressionStatement", + "src": "10309:30:10" + } + ] + }, + "documentation": "@dev getExchange\n gets all the exchange details\n@param exchangeId a unique exchange idnetifier\n@return all the exchange details including the exchange Owner\n the dataToken contract address, the base token address, the \n fixed rate, whether the exchange is active and the supply or the \n the current data token liquidity.", + "id": 5527, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getExchange", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5475, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5474, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5527, + "src": "9772:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5473, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9772:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9762:34:10" + }, + "returnParameters": { + "id": 5488, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5477, + "name": "exchangeOwner", + "nodeType": "VariableDeclaration", + "scope": 5527, + "src": "9857:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5476, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9857:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5479, + "name": "dataToken", + "nodeType": "VariableDeclaration", + "scope": 5527, + "src": "9892:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5478, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9892:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5481, + "name": "baseToken", + "nodeType": "VariableDeclaration", + "scope": 5527, + "src": "9923:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5480, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9923:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5483, + "name": "fixedRate", + "nodeType": "VariableDeclaration", + "scope": 5527, + "src": "9954:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5482, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9954:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5485, + "name": "active", + "nodeType": "VariableDeclaration", + "scope": 5527, + "src": "9985:11:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5484, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9985:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5487, + "name": "supply", + "nodeType": "VariableDeclaration", + "scope": 5527, + "src": "10010:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5486, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10010:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9843:191:10" + }, + "scope": 5550, + "src": "9742:604:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 5535, + "nodeType": "Block", + "src": "10581:35:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5533, + "name": "exchangeIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5016, + "src": "10598:11:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "functionReturnParameters": 5532, + "id": 5534, + "nodeType": "Return", + "src": "10591:18:10" + } + ] + }, + "documentation": "@dev getExchanges\n gets all the exchanges list\n@return a list of all registered exchange Ids", + "id": 5536, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getExchanges", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5528, + "nodeType": "ParameterList", + "parameters": [], + "src": "10507:2:10" + }, + "returnParameters": { + "id": 5532, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5531, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5536, + "src": "10559:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 5529, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10559:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 5530, + "length": null, + "nodeType": "ArrayTypeName", + "src": "10559:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10558:18:10" + }, + "scope": 5550, + "src": "10486:130:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 5548, + "nodeType": "Block", + "src": "10933:52:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5543, + "name": "exchanges", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5013, + "src": "10950:9:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Exchange_$5009_storage_$", + "typeString": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)" + } + }, + "id": 5545, + "indexExpression": { + "argumentTypes": null, + "id": 5544, + "name": "exchangeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5538, + "src": "10960:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10950:21:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Exchange_$5009_storage", + "typeString": "struct FixedRateExchange.Exchange storage ref" + } + }, + "id": 5546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "active", + "nodeType": "MemberAccess", + "referencedDeclaration": 5000, + "src": "10950:28:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5542, + "id": 5547, + "nodeType": "Return", + "src": "10943:35:10" + } + ] + }, + "documentation": "@dev isActive\n checks whether exchange is active\n@param exchangeId a unique exchange idnetifier\n@return true if exchange is true, otherwise returns false", + "id": 5549, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isActive", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5538, + "name": "exchangeId", + "nodeType": "VariableDeclaration", + "scope": 5549, + "src": "10851:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5537, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10851:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10841:34:10" + }, + "returnParameters": { + "id": 5542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5541, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5549, + "src": "10923:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5540, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10923:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10922:6:10" + }, + "scope": 5550, + "src": "10824:161:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 5551, + "src": "530:10457:10" + } + ], + "src": "0:10988:10" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/fixedRate/FixedRateExchange.sol", + "exportedSymbols": { + "FixedRateExchange": [ + 5550 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 4988, + "name": "PragmaDirective", + "src": "0:22:10" + }, + { + "attributes": { + "SourceUnit": 5659, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "../interfaces/IERC20Template.sol", + "scope": 5551, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 4989, + "name": "ImportDirective", + "src": "185:42:10" + }, + { + "attributes": { + "SourceUnit": 6515, + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "scope": 5551, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 4990, + "name": "ImportDirective", + "src": "228:59:10" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": "@title FixedRateExchange\n@dev FixedRateExchange is a fixed rate exchange Contract\n Marketplaces uses this contract to allow consumers \n exchanging datatokens with ocean token using a fixed \n exchange rate.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 5550 + ], + "name": "FixedRateExchange", + "scope": 5551 + }, + "children": [ + { + "children": [ + { + "attributes": { + "contractScope": null, + "name": "SafeMath", + "referencedDeclaration": 6514, + "type": "library SafeMath" + }, + "id": 4991, + "name": "UserDefinedTypeName", + "src": "569:8:10" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4992, + "name": "ElementaryTypeName", + "src": "582:7:10" + } + ], + "id": 4993, + "name": "UsingForDirective", + "src": "563:27:10" + }, + { + "attributes": { + "constant": true, + "name": "BASE", + "scope": 5550, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 4994, + "name": "ElementaryTypeName", + "src": "595:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "**", + "type": "int_const 1000000000000000000" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3130", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 10", + "value": "10" + }, + "id": 4995, + "name": "Literal", + "src": "627:2:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3138", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 18", + "value": "18" + }, + "id": 4996, + "name": "Literal", + "src": "633:2:10" + } + ], + "id": 4997, + "name": "BinaryOperation", + "src": "627:8:10" + } + ], + "id": 4998, + "name": "VariableDeclaration", + "src": "595:40:10" + }, + { + "attributes": { + "canonicalName": "FixedRateExchange.Exchange", + "name": "Exchange", + "scope": 5550, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "active", + "scope": 5009, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 4999, + "name": "ElementaryTypeName", + "src": "667:4:10" + } + ], + "id": 5000, + "name": "VariableDeclaration", + "src": "667:11:10" + }, + { + "attributes": { + "constant": false, + "name": "exchangeOwner", + "scope": 5009, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5001, + "name": "ElementaryTypeName", + "src": "688:7:10" + } + ], + "id": 5002, + "name": "VariableDeclaration", + "src": "688:21:10" + }, + { + "attributes": { + "constant": false, + "name": "dataToken", + "scope": 5009, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5003, + "name": "ElementaryTypeName", + "src": "719:7:10" + } + ], + "id": 5004, + "name": "VariableDeclaration", + "src": "719:17:10" + }, + { + "attributes": { + "constant": false, + "name": "baseToken", + "scope": 5009, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5005, + "name": "ElementaryTypeName", + "src": "746:7:10" + } + ], + "id": 5006, + "name": "VariableDeclaration", + "src": "746:17:10" + }, + { + "attributes": { + "constant": false, + "name": "fixedRate", + "scope": 5009, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5007, + "name": "ElementaryTypeName", + "src": "773:7:10" + } + ], + "id": 5008, + "name": "VariableDeclaration", + "src": "773:17:10" + } + ], + "id": 5009, + "name": "StructDefinition", + "src": "641:156:10" + }, + { + "attributes": { + "constant": false, + "name": "exchanges", + "scope": 5550, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange)", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange)" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5010, + "name": "ElementaryTypeName", + "src": "852:7:10" + }, + { + "attributes": { + "contractScope": null, + "name": "Exchange", + "referencedDeclaration": 5009, + "type": "struct FixedRateExchange.Exchange" + }, + "id": 5011, + "name": "UserDefinedTypeName", + "src": "863:8:10" + } + ], + "id": 5012, + "name": "Mapping", + "src": "844:28:10" + } + ], + "id": 5013, + "name": "VariableDeclaration", + "src": "844:46:10" + }, + { + "attributes": { + "constant": false, + "name": "exchangeIds", + "scope": 5550, + "stateVariable": true, + "storageLocation": "default", + "type": "bytes32[]", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "length": null, + "type": "bytes32[]" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5014, + "name": "ElementaryTypeName", + "src": "896:7:10" + } + ], + "id": 5015, + "name": "ArrayTypeName", + "src": "896:9:10" + } + ], + "id": 5016, + "name": "VariableDeclaration", + "src": "896:29:10" + }, + { + "attributes": { + "documentation": null, + "name": "onlyActiveExchange", + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeId", + "scope": 5039, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5017, + "name": "ElementaryTypeName", + "src": "969:7:10" + } + ], + "id": 5018, + "name": "VariableDeclaration", + "src": "969:18:10" + } + ], + "id": 5019, + "name": "ParameterList", + "src": "959:34:10" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_33934cff4a0fa610a47c77876602b176c21576f21e0c00dbe89561d0224d4982", + "typeString": "literal_string \"FixedRateExchange: Exchange does not exist!\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5020, + "name": "Identifier", + "src": "1008:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "&&", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "fixedRate", + "referencedDeclaration": 5008, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5021, + "name": "Identifier", + "src": "1029:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5018, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5022, + "name": "Identifier", + "src": "1039:10:10" + } + ], + "id": 5023, + "name": "IndexAccess", + "src": "1029:21:10" + } + ], + "id": 5024, + "name": "MemberAccess", + "src": "1029:31:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5025, + "name": "Literal", + "src": "1064:1:10" + } + ], + "id": 5026, + "name": "BinaryOperation", + "src": "1029:36:10" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "active", + "referencedDeclaration": 5000, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5027, + "name": "Identifier", + "src": "1081:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5018, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5028, + "name": "Identifier", + "src": "1091:10:10" + } + ], + "id": 5029, + "name": "IndexAccess", + "src": "1081:21:10" + } + ], + "id": 5030, + "name": "MemberAccess", + "src": "1081:28:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 5031, + "name": "Literal", + "src": "1113:4:10" + } + ], + "id": 5032, + "name": "BinaryOperation", + "src": "1081:36:10" + } + ], + "id": 5033, + "name": "BinaryOperation", + "src": "1029:88:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "46697865645261746545786368616e67653a2045786368616e676520646f6573206e6f7420657869737421", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"FixedRateExchange: Exchange does not exist!\"", + "value": "FixedRateExchange: Exchange does not exist!" + }, + "id": 5034, + "name": "Literal", + "src": "1131:45:10" + } + ], + "id": 5035, + "name": "FunctionCall", + "src": "1008:178:10" + } + ], + "id": 5036, + "name": "ExpressionStatement", + "src": "1008:178:10" + }, + { + "id": 5037, + "name": "PlaceholderStatement", + "src": "1196:1:10" + } + ], + "id": 5038, + "name": "Block", + "src": "998:206:10" + } + ], + "id": 5039, + "name": "ModifierDefinition", + "src": "932:272:10" + }, + { + "attributes": { + "documentation": null, + "name": "onlyExchangeOwner", + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeId", + "scope": 5056, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5040, + "name": "ElementaryTypeName", + "src": "1246:7:10" + } + ], + "id": 5041, + "name": "VariableDeclaration", + "src": "1246:18:10" + } + ], + "id": 5042, + "name": "ParameterList", + "src": "1236:34:10" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6953f2de142c64f34f94b55c4652873748f95f81c631ff9f1f451ebbfe788b37", + "typeString": "literal_string \"FixedRateExchange: invalid exchange owner\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5043, + "name": "Identifier", + "src": "1285:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "exchangeOwner", + "referencedDeclaration": 5002, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5044, + "name": "Identifier", + "src": "1306:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5041, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5045, + "name": "Identifier", + "src": "1316:10:10" + } + ], + "id": 5046, + "name": "IndexAccess", + "src": "1306:21:10" + } + ], + "id": 5047, + "name": "MemberAccess", + "src": "1306:35:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5048, + "name": "Identifier", + "src": "1345:3:10" + } + ], + "id": 5049, + "name": "MemberAccess", + "src": "1345:10:10" + } + ], + "id": 5050, + "name": "BinaryOperation", + "src": "1306:49:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "46697865645261746545786368616e67653a20696e76616c69642065786368616e6765206f776e6572", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"FixedRateExchange: invalid exchange owner\"", + "value": "FixedRateExchange: invalid exchange owner" + }, + "id": 5051, + "name": "Literal", + "src": "1369:43:10" + } + ], + "id": 5052, + "name": "FunctionCall", + "src": "1285:137:10" + } + ], + "id": 5053, + "name": "ExpressionStatement", + "src": "1285:137:10" + }, + { + "id": 5054, + "name": "PlaceholderStatement", + "src": "1432:1:10" + } + ], + "id": 5055, + "name": "Block", + "src": "1275:165:10" + } + ], + "id": 5056, + "name": "ModifierDefinition", + "src": "1210:230:10" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "ExchangeCreated" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "exchangeId", + "scope": 5068, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5057, + "name": "ElementaryTypeName", + "src": "1477:7:10" + } + ], + "id": 5058, + "name": "VariableDeclaration", + "src": "1477:26:10" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "baseToken", + "scope": 5068, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5059, + "name": "ElementaryTypeName", + "src": "1513:7:10" + } + ], + "id": 5060, + "name": "VariableDeclaration", + "src": "1513:25:10" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "dataToken", + "scope": 5068, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5061, + "name": "ElementaryTypeName", + "src": "1548:7:10" + } + ], + "id": 5062, + "name": "VariableDeclaration", + "src": "1548:25:10" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "exchangeOwner", + "scope": 5068, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5063, + "name": "ElementaryTypeName", + "src": "1583:7:10" + } + ], + "id": 5064, + "name": "VariableDeclaration", + "src": "1583:21:10" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "fixedRate", + "scope": 5068, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5065, + "name": "ElementaryTypeName", + "src": "1614:7:10" + } + ], + "id": 5066, + "name": "VariableDeclaration", + "src": "1614:17:10" + } + ], + "id": 5067, + "name": "ParameterList", + "src": "1467:170:10" + } + ], + "id": 5068, + "name": "EventDefinition", + "src": "1446:192:10" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "ExchangeRateChanged" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "exchangeId", + "scope": 5076, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5069, + "name": "ElementaryTypeName", + "src": "1679:7:10" + } + ], + "id": 5070, + "name": "VariableDeclaration", + "src": "1679:26:10" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "exchangeOwner", + "scope": 5076, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5071, + "name": "ElementaryTypeName", + "src": "1715:7:10" + } + ], + "id": 5072, + "name": "VariableDeclaration", + "src": "1715:29:10" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "newRate", + "scope": 5076, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5073, + "name": "ElementaryTypeName", + "src": "1754:7:10" + } + ], + "id": 5074, + "name": "VariableDeclaration", + "src": "1754:15:10" + } + ], + "id": 5075, + "name": "ParameterList", + "src": "1669:106:10" + } + ], + "id": 5076, + "name": "EventDefinition", + "src": "1644:132:10" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "ExchangeActivated" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "exchangeId", + "scope": 5082, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5077, + "name": "ElementaryTypeName", + "src": "1815:7:10" + } + ], + "id": 5078, + "name": "VariableDeclaration", + "src": "1815:26:10" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "exchangeOwner", + "scope": 5082, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5079, + "name": "ElementaryTypeName", + "src": "1851:7:10" + } + ], + "id": 5080, + "name": "VariableDeclaration", + "src": "1851:29:10" + } + ], + "id": 5081, + "name": "ParameterList", + "src": "1805:81:10" + } + ], + "id": 5082, + "name": "EventDefinition", + "src": "1782:105:10" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "ExchangeDeactivated" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "exchangeId", + "scope": 5088, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5083, + "name": "ElementaryTypeName", + "src": "1928:7:10" + } + ], + "id": 5084, + "name": "VariableDeclaration", + "src": "1928:26:10" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "exchangeOwner", + "scope": 5088, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5085, + "name": "ElementaryTypeName", + "src": "1964:7:10" + } + ], + "id": 5086, + "name": "VariableDeclaration", + "src": "1964:29:10" + } + ], + "id": 5087, + "name": "ParameterList", + "src": "1918:81:10" + } + ], + "id": 5088, + "name": "EventDefinition", + "src": "1893:107:10" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "Swapped" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "exchangeId", + "scope": 5098, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5089, + "name": "ElementaryTypeName", + "src": "2029:7:10" + } + ], + "id": 5090, + "name": "VariableDeclaration", + "src": "2029:26:10" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "by", + "scope": 5098, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5091, + "name": "ElementaryTypeName", + "src": "2065:7:10" + } + ], + "id": 5092, + "name": "VariableDeclaration", + "src": "2065:18:10" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "baseTokenSwappedAmount", + "scope": 5098, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5093, + "name": "ElementaryTypeName", + "src": "2093:7:10" + } + ], + "id": 5094, + "name": "VariableDeclaration", + "src": "2093:30:10" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "dataTokenSwappedAmount", + "scope": 5098, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5095, + "name": "ElementaryTypeName", + "src": "2133:7:10" + } + ], + "id": 5096, + "name": "VariableDeclaration", + "src": "2133:30:10" + } + ], + "id": 5097, + "name": "ParameterList", + "src": "2019:150:10" + } + ], + "id": 5098, + "name": "EventDefinition", + "src": "2006:164:10" + }, + { + "attributes": { + "documentation": "@dev create\n creates new exchange pairs between base token\n (ocean token) and data tokens.\n@param baseToken refers to a ocean token contract address\n@param dataToken refers to a data token contract address\n@param fixedRate refers to the exact fixed exchange rate in wei", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "create", + "scope": 5550, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "baseToken", + "scope": 5193, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5099, + "name": "ElementaryTypeName", + "src": "2537:7:10" + } + ], + "id": 5100, + "name": "VariableDeclaration", + "src": "2537:17:10" + }, + { + "attributes": { + "constant": false, + "name": "dataToken", + "scope": 5193, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5101, + "name": "ElementaryTypeName", + "src": "2564:7:10" + } + ], + "id": 5102, + "name": "VariableDeclaration", + "src": "2564:17:10" + }, + { + "attributes": { + "constant": false, + "name": "fixedRate", + "scope": 5193, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5103, + "name": "ElementaryTypeName", + "src": "2591:7:10" + } + ], + "id": 5104, + "name": "VariableDeclaration", + "src": "2591:17:10" + } + ], + "id": 5105, + "name": "ParameterList", + "src": "2527:87:10" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5106, + "name": "ParameterList", + "src": "2636:0:10" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e4f79921714a9bf5dc580585dc440da8f598ce27caa8d87778cb9493126de16", + "typeString": "literal_string \"FixedRateExchange: Invalid basetoken, zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5107, + "name": "Identifier", + "src": "2646:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5100, + "type": "address", + "value": "baseToken" + }, + "id": 5108, + "name": "Identifier", + "src": "2667:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 5109, + "name": "ElementaryTypeNameExpression", + "src": "2680:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5110, + "name": "Literal", + "src": "2688:1:10" + } + ], + "id": 5111, + "name": "FunctionCall", + "src": "2680:10:10" + } + ], + "id": 5112, + "name": "BinaryOperation", + "src": "2667:23:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "46697865645261746545786368616e67653a20496e76616c69642062617365746f6b656e2c20207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"FixedRateExchange: Invalid basetoken, zero address\"", + "value": "FixedRateExchange: Invalid basetoken, zero address" + }, + "id": 5113, + "name": "Literal", + "src": "2704:53:10" + } + ], + "id": 5114, + "name": "FunctionCall", + "src": "2646:121:10" + } + ], + "id": 5115, + "name": "ExpressionStatement", + "src": "2646:121:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c4a0d6c9d74c4e7b7eb600c681c94f357f46a1a17500afc03636322ac0a63c22", + "typeString": "literal_string \"FixedRateExchange: Invalid datatoken, zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5116, + "name": "Identifier", + "src": "2777:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5102, + "type": "address", + "value": "dataToken" + }, + "id": 5117, + "name": "Identifier", + "src": "2798:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 5118, + "name": "ElementaryTypeNameExpression", + "src": "2811:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5119, + "name": "Literal", + "src": "2819:1:10" + } + ], + "id": 5120, + "name": "FunctionCall", + "src": "2811:10:10" + } + ], + "id": 5121, + "name": "BinaryOperation", + "src": "2798:23:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "46697865645261746545786368616e67653a20496e76616c69642064617461746f6b656e2c20207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"FixedRateExchange: Invalid datatoken, zero address\"", + "value": "FixedRateExchange: Invalid datatoken, zero address" + }, + "id": 5122, + "name": "Literal", + "src": "2835:53:10" + } + ], + "id": 5123, + "name": "FunctionCall", + "src": "2777:121:10" + } + ], + "id": 5124, + "name": "ExpressionStatement", + "src": "2777:121:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8088a8876b7d943bb58f3202d91bc395f378f8d33e9c768b1a854016f72d0175", + "typeString": "literal_string \"FixedRateExchange: Invalid datatoken, equals basetoken\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5125, + "name": "Identifier", + "src": "2908:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5100, + "type": "address", + "value": "baseToken" + }, + "id": 5126, + "name": "Identifier", + "src": "2929:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5102, + "type": "address", + "value": "dataToken" + }, + "id": 5127, + "name": "Identifier", + "src": "2942:9:10" + } + ], + "id": 5128, + "name": "BinaryOperation", + "src": "2929:22:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "46697865645261746545786368616e67653a20496e76616c69642064617461746f6b656e2c2020657175616c732062617365746f6b656e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"FixedRateExchange: Invalid datatoken, equals basetoken\"", + "value": "FixedRateExchange: Invalid datatoken, equals basetoken" + }, + "id": 5129, + "name": "Literal", + "src": "2965:57:10" + } + ], + "id": 5130, + "name": "FunctionCall", + "src": "2908:124:10" + } + ], + "id": 5131, + "name": "ExpressionStatement", + "src": "2908:124:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_049c41558b20e3ef0c501ffa5f229a463d9c10ba2b6e269ac1d736dfd92adbc2", + "typeString": "literal_string \"FixedRateExchange: Invalid exchange rate value\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5132, + "name": "Identifier", + "src": "3042:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5104, + "type": "uint256", + "value": "fixedRate" + }, + "id": 5133, + "name": "Identifier", + "src": "3063:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5134, + "name": "Literal", + "src": "3076:1:10" + } + ], + "id": 5135, + "name": "BinaryOperation", + "src": "3063:14:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "46697865645261746545786368616e67653a20496e76616c69642065786368616e676520726174652076616c7565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"FixedRateExchange: Invalid exchange rate value\"", + "value": "FixedRateExchange: Invalid exchange rate value" + }, + "id": 5136, + "name": "Literal", + "src": "3092:48:10" + } + ], + "id": 5137, + "name": "FunctionCall", + "src": "3042:108:10" + } + ], + "id": 5138, + "name": "ExpressionStatement", + "src": "3042:108:10" + }, + { + "attributes": { + "assignments": [ + 5140 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeId", + "scope": 5192, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5139, + "name": "ElementaryTypeName", + "src": "3160:7:10" + } + ], + "id": 5140, + "name": "VariableDeclaration", + "src": "3160:18:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes32", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5214, + "type": "function (address,address,address) pure returns (bytes32)", + "value": "generateExchangeId" + }, + "id": 5141, + "name": "Identifier", + "src": "3181:18:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5100, + "type": "address", + "value": "baseToken" + }, + "id": 5142, + "name": "Identifier", + "src": "3213:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5102, + "type": "address", + "value": "dataToken" + }, + "id": 5143, + "name": "Identifier", + "src": "3236:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5144, + "name": "Identifier", + "src": "3259:3:10" + } + ], + "id": 5145, + "name": "MemberAccess", + "src": "3259:10:10" + } + ], + "id": 5146, + "name": "FunctionCall", + "src": "3181:98:10" + } + ], + "id": 5147, + "name": "VariableDeclarationStatement", + "src": "3160:119:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4cbdfa87b7259677de1d4b2bb2aef7a46adf4ea65536670792826c014ead7938", + "typeString": "literal_string \"FixedRateExchange: Exchange already exists!\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5148, + "name": "Identifier", + "src": "3289:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "fixedRate", + "referencedDeclaration": 5008, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5149, + "name": "Identifier", + "src": "3310:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5140, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5150, + "name": "Identifier", + "src": "3320:10:10" + } + ], + "id": 5151, + "name": "IndexAccess", + "src": "3310:21:10" + } + ], + "id": 5152, + "name": "MemberAccess", + "src": "3310:31:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5153, + "name": "Literal", + "src": "3345:1:10" + } + ], + "id": 5154, + "name": "BinaryOperation", + "src": "3310:36:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "46697865645261746545786368616e67653a2045786368616e676520616c72656164792065786973747321", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"FixedRateExchange: Exchange already exists!\"", + "value": "FixedRateExchange: Exchange already exists!" + }, + "id": 5155, + "name": "Literal", + "src": "3360:45:10" + } + ], + "id": 5156, + "name": "FunctionCall", + "src": "3289:126:10" + } + ], + "id": 5157, + "name": "ExpressionStatement", + "src": "3289:126:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5158, + "name": "Identifier", + "src": "3425:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5140, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5159, + "name": "Identifier", + "src": "3435:10:10" + } + ], + "id": 5160, + "name": "IndexAccess", + "src": "3425:21:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": true, + "lValueRequested": false, + "names": [ + "active", + "exchangeOwner", + "dataToken", + "baseToken", + "fixedRate" + ], + "type": "struct FixedRateExchange.Exchange memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5009, + "type": "type(struct FixedRateExchange.Exchange storage pointer)", + "value": "Exchange" + }, + "id": 5161, + "name": "Identifier", + "src": "3449:8:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 5162, + "name": "Literal", + "src": "3480:4:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5163, + "name": "Identifier", + "src": "3513:3:10" + } + ], + "id": 5164, + "name": "MemberAccess", + "src": "3513:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5102, + "type": "address", + "value": "dataToken" + }, + "id": 5165, + "name": "Identifier", + "src": "3548:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5100, + "type": "address", + "value": "baseToken" + }, + "id": 5166, + "name": "Identifier", + "src": "3582:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5104, + "type": "uint256", + "value": "fixedRate" + }, + "id": 5167, + "name": "Identifier", + "src": "3616:9:10" + } + ], + "id": 5168, + "name": "FunctionCall", + "src": "3449:187:10" + } + ], + "id": 5169, + "name": "Assignment", + "src": "3425:211:10" + } + ], + "id": 5170, + "name": "ExpressionStatement", + "src": "3425:211:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "push", + "referencedDeclaration": null, + "type": "function (bytes32) returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5016, + "type": "bytes32[] storage ref", + "value": "exchangeIds" + }, + "id": 5171, + "name": "Identifier", + "src": "3646:11:10" + } + ], + "id": 5173, + "name": "MemberAccess", + "src": "3646:16:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5140, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5174, + "name": "Identifier", + "src": "3663:10:10" + } + ], + "id": 5175, + "name": "FunctionCall", + "src": "3646:28:10" + } + ], + "id": 5176, + "name": "ExpressionStatement", + "src": "3646:28:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5068, + "type": "function (bytes32,address,address,address,uint256)", + "value": "ExchangeCreated" + }, + "id": 5177, + "name": "Identifier", + "src": "3690:15:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5140, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5178, + "name": "Identifier", + "src": "3719:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5100, + "type": "address", + "value": "baseToken" + }, + "id": 5179, + "name": "Identifier", + "src": "3743:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5102, + "type": "address", + "value": "dataToken" + }, + "id": 5180, + "name": "Identifier", + "src": "3766:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5181, + "name": "Identifier", + "src": "3789:3:10" + } + ], + "id": 5182, + "name": "MemberAccess", + "src": "3789:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5104, + "type": "uint256", + "value": "fixedRate" + }, + "id": 5183, + "name": "Identifier", + "src": "3813:9:10" + } + ], + "id": 5184, + "name": "FunctionCall", + "src": "3690:142:10" + } + ], + "id": 5185, + "name": "EmitStatement", + "src": "3685:147:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5082, + "type": "function (bytes32,address)", + "value": "ExchangeActivated" + }, + "id": 5186, + "name": "Identifier", + "src": "3848:17:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5140, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5187, + "name": "Identifier", + "src": "3879:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5188, + "name": "Identifier", + "src": "3903:3:10" + } + ], + "id": 5189, + "name": "MemberAccess", + "src": "3903:10:10" + } + ], + "id": 5190, + "name": "FunctionCall", + "src": "3848:75:10" + } + ], + "id": 5191, + "name": "EmitStatement", + "src": "3843:80:10" + } + ], + "id": 5192, + "name": "Block", + "src": "2636:1294:10" + } + ], + "id": 5193, + "name": "FunctionDefinition", + "src": "2512:1418:10" + }, + { + "attributes": { + "documentation": "@dev generateExchangeId\n creates unique exchange identifier for two token pairs.\n@param baseToken refers to a ocean token contract address\n@param dataToken refers to a data token contract address\n@param exchangeOwner exchange owner address", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "generateExchangeId", + "scope": 5550, + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "baseToken", + "scope": 5214, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5194, + "name": "ElementaryTypeName", + "src": "4268:7:10" + } + ], + "id": 5195, + "name": "VariableDeclaration", + "src": "4268:17:10" + }, + { + "attributes": { + "constant": false, + "name": "dataToken", + "scope": 5214, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5196, + "name": "ElementaryTypeName", + "src": "4295:7:10" + } + ], + "id": 5197, + "name": "VariableDeclaration", + "src": "4295:17:10" + }, + { + "attributes": { + "constant": false, + "name": "exchangeOwner", + "scope": 5214, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5198, + "name": "ElementaryTypeName", + "src": "4322:7:10" + } + ], + "id": 5199, + "name": "VariableDeclaration", + "src": "4322:21:10" + } + ], + "id": 5200, + "name": "ParameterList", + "src": "4258:91:10" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5214, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5201, + "name": "ElementaryTypeName", + "src": "4395:7:10" + } + ], + "id": 5202, + "name": "VariableDeclaration", + "src": "4395:7:10" + } + ], + "id": 5203, + "name": "ParameterList", + "src": "4394:9:10" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 5203 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes32", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7115, + "type": "function (bytes memory) pure returns (bytes32)", + "value": "keccak256" + }, + "id": 5204, + "name": "Identifier", + "src": "4425:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bytes memory", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "member_name": "encode", + "referencedDeclaration": null, + "type": "function () pure returns (bytes memory)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7108, + "type": "abi", + "value": "abi" + }, + "id": 5205, + "name": "Identifier", + "src": "4448:3:10" + } + ], + "id": 5206, + "name": "MemberAccess", + "src": "4448:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5195, + "type": "address", + "value": "baseToken" + }, + "id": 5207, + "name": "Identifier", + "src": "4476:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5197, + "type": "address", + "value": "dataToken" + }, + "id": 5208, + "name": "Identifier", + "src": "4503:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5199, + "type": "address", + "value": "exchangeOwner" + }, + "id": 5209, + "name": "Identifier", + "src": "4530:13:10" + } + ], + "id": 5210, + "name": "FunctionCall", + "src": "4448:109:10" + } + ], + "id": 5211, + "name": "FunctionCall", + "src": "4425:142:10" + } + ], + "id": 5212, + "name": "Return", + "src": "4418:149:10" + } + ], + "id": 5213, + "name": "Block", + "src": "4408:166:10" + } + ], + "id": 5214, + "name": "FunctionDefinition", + "src": "4231:343:10" + }, + { + "attributes": { + "documentation": "@dev CalcInGivenOut\n Calculates how many basetokens are needed to get specifyed amount of datatokens\n@param exchangeId a unique exchange idnetifier \n@param dataTokenAmount the amount of data tokens to be exchanged", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "CalcInGivenOut", + "scope": 5550, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeId", + "scope": 5240, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5215, + "name": "ElementaryTypeName", + "src": "4879:7:10" + } + ], + "id": 5216, + "name": "VariableDeclaration", + "src": "4879:18:10" + }, + { + "attributes": { + "constant": false, + "name": "dataTokenAmount", + "scope": 5240, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5217, + "name": "ElementaryTypeName", + "src": "4907:7:10" + } + ], + "id": 5218, + "name": "VariableDeclaration", + "src": "4907:23:10" + } + ], + "id": 5219, + "name": "ParameterList", + "src": "4869:67:10" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "baseTokenAmount", + "scope": 5240, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5223, + "name": "ElementaryTypeName", + "src": "5043:7:10" + } + ], + "id": 5224, + "name": "VariableDeclaration", + "src": "5043:23:10" + } + ], + "id": 5225, + "name": "ParameterList", + "src": "5042:25:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5039, + "type": "modifier (bytes32)", + "value": "onlyActiveExchange" + }, + "id": 5220, + "name": "Identifier", + "src": "4973:18:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5216, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5221, + "name": "Identifier", + "src": "5005:10:10" + } + ], + "id": 5222, + "name": "ModifierInvocation", + "src": "4973:52:10" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5224, + "type": "uint256", + "value": "baseTokenAmount" + }, + "id": 5226, + "name": "Identifier", + "src": "5082:15:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "div", + "referencedDeclaration": 6447, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "mul", + "referencedDeclaration": 6431, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5218, + "type": "uint256", + "value": "dataTokenAmount" + }, + "id": 5227, + "name": "Identifier", + "src": "5100:15:10" + } + ], + "id": 5228, + "name": "MemberAccess", + "src": "5100:19:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "fixedRate", + "referencedDeclaration": 5008, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5229, + "name": "Identifier", + "src": "5133:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5216, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5230, + "name": "Identifier", + "src": "5143:10:10" + } + ], + "id": 5231, + "name": "IndexAccess", + "src": "5133:21:10" + } + ], + "id": 5232, + "name": "MemberAccess", + "src": "5133:31:10" + } + ], + "id": 5233, + "name": "FunctionCall", + "src": "5100:65:10" + } + ], + "id": 5234, + "name": "MemberAccess", + "src": "5100:69:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4998, + "type": "uint256", + "value": "BASE" + }, + "id": 5235, + "name": "Identifier", + "src": "5170:4:10" + } + ], + "id": 5236, + "name": "FunctionCall", + "src": "5100:75:10" + } + ], + "id": 5237, + "name": "Assignment", + "src": "5082:93:10" + } + ], + "id": 5238, + "name": "ExpressionStatement", + "src": "5082:93:10" + } + ], + "id": 5239, + "name": "Block", + "src": "5072:110:10" + } + ], + "id": 5240, + "name": "FunctionDefinition", + "src": "4846:336:10" + }, + { + "attributes": { + "documentation": "@dev swap\n atomic swap between two registered fixed rate exchange.\n@param exchangeId a unique exchange idnetifier \n@param dataTokenAmount the amount of data tokens to be exchanged", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "swap", + "scope": 5550, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeId", + "scope": 5311, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5241, + "name": "ElementaryTypeName", + "src": "5443:7:10" + } + ], + "id": 5242, + "name": "VariableDeclaration", + "src": "5443:18:10" + }, + { + "attributes": { + "constant": false, + "name": "dataTokenAmount", + "scope": 5311, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5243, + "name": "ElementaryTypeName", + "src": "5471:7:10" + } + ], + "id": 5244, + "name": "VariableDeclaration", + "src": "5471:23:10" + } + ], + "id": 5245, + "name": "ParameterList", + "src": "5433:67:10" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5249, + "name": "ParameterList", + "src": "5583:0:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5039, + "type": "modifier (bytes32)", + "value": "onlyActiveExchange" + }, + "id": 5246, + "name": "Identifier", + "src": "5526:18:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5242, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5247, + "name": "Identifier", + "src": "5558:10:10" + } + ], + "id": 5248, + "name": "ModifierInvocation", + "src": "5526:52:10" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d2b293ef72dfab6f705b22246c532786cca882499f3fba3ae8114dc40951c5bc", + "typeString": "literal_string \"FixedRateExchange: zero data token amount\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5250, + "name": "Identifier", + "src": "5593:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5244, + "type": "uint256", + "value": "dataTokenAmount" + }, + "id": 5251, + "name": "Identifier", + "src": "5614:15:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5252, + "name": "Literal", + "src": "5633:1:10" + } + ], + "id": 5253, + "name": "BinaryOperation", + "src": "5614:20:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "46697865645261746545786368616e67653a207a65726f206461746120746f6b656e20616d6f756e74", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"FixedRateExchange: zero data token amount\"", + "value": "FixedRateExchange: zero data token amount" + }, + "id": 5254, + "name": "Literal", + "src": "5648:43:10" + } + ], + "id": 5255, + "name": "FunctionCall", + "src": "5593:108:10" + } + ], + "id": 5256, + "name": "ExpressionStatement", + "src": "5593:108:10" + }, + { + "attributes": { + "assignments": [ + 5258 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "baseTokenAmount", + "scope": 5310, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5257, + "name": "ElementaryTypeName", + "src": "5711:7:10" + } + ], + "id": 5258, + "name": "VariableDeclaration", + "src": "5711:23:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5240, + "type": "function (bytes32,uint256) view returns (uint256)", + "value": "CalcInGivenOut" + }, + "id": 5259, + "name": "Identifier", + "src": "5737:14:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5242, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5260, + "name": "Identifier", + "src": "5752:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5244, + "type": "uint256", + "value": "dataTokenAmount" + }, + "id": 5261, + "name": "Identifier", + "src": "5763:15:10" + } + ], + "id": 5262, + "name": "FunctionCall", + "src": "5737:42:10" + } + ], + "id": 5263, + "name": "VariableDeclarationStatement", + "src": "5711:68:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_704d230adb0aeaaf731cbfcd3f10c77132039a7e2520db77d561e3ebcc5b16b9", + "typeString": "literal_string \"FixedRateExchange: transferFrom failed in the baseToken contract\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5264, + "name": "Identifier", + "src": "5789:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transferFrom", + "referencedDeclaration": 5633, + "type": "function (address,address,uint256) external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 5265, + "name": "Identifier", + "src": "5810:14:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "baseToken", + "referencedDeclaration": 5006, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5266, + "name": "Identifier", + "src": "5825:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5242, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5267, + "name": "Identifier", + "src": "5835:10:10" + } + ], + "id": 5268, + "name": "IndexAccess", + "src": "5825:21:10" + } + ], + "id": 5269, + "name": "MemberAccess", + "src": "5825:31:10" + } + ], + "id": 5270, + "name": "FunctionCall", + "src": "5810:47:10" + } + ], + "id": 5271, + "name": "MemberAccess", + "src": "5810:60:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5272, + "name": "Identifier", + "src": "5888:3:10" + } + ], + "id": 5273, + "name": "MemberAccess", + "src": "5888:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "exchangeOwner", + "referencedDeclaration": 5002, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5274, + "name": "Identifier", + "src": "5916:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5242, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5275, + "name": "Identifier", + "src": "5926:10:10" + } + ], + "id": 5276, + "name": "IndexAccess", + "src": "5916:21:10" + } + ], + "id": 5277, + "name": "MemberAccess", + "src": "5916:35:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5258, + "type": "uint256", + "value": "baseTokenAmount" + }, + "id": 5278, + "name": "Identifier", + "src": "5969:15:10" + } + ], + "id": 5279, + "name": "FunctionCall", + "src": "5810:188:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "46697865645261746545786368616e67653a207472616e7366657246726f6d206661696c656420696e207468652062617365546f6b656e20636f6e7472616374", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"FixedRateExchange: transferFrom failed in the baseToken contract\"", + "value": "FixedRateExchange: transferFrom failed in the baseToken contract" + }, + "id": 5280, + "name": "Literal", + "src": "6012:66:10" + } + ], + "id": 5281, + "name": "FunctionCall", + "src": "5789:299:10" + } + ], + "id": 5282, + "name": "ExpressionStatement", + "src": "5789:299:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c05b0f5b41acd20d6ba43aff2e398e9afe8f1d66a0a38aeff2f84a7867e95310", + "typeString": "literal_string \"FixedRateExchange: transferFrom failed in the dataToken contract\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5283, + "name": "Identifier", + "src": "6098:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transferFrom", + "referencedDeclaration": 5633, + "type": "function (address,address,uint256) external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 5284, + "name": "Identifier", + "src": "6119:14:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "dataToken", + "referencedDeclaration": 5004, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5285, + "name": "Identifier", + "src": "6134:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5242, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5286, + "name": "Identifier", + "src": "6144:10:10" + } + ], + "id": 5287, + "name": "IndexAccess", + "src": "6134:21:10" + } + ], + "id": 5288, + "name": "MemberAccess", + "src": "6134:31:10" + } + ], + "id": 5289, + "name": "FunctionCall", + "src": "6119:47:10" + } + ], + "id": 5290, + "name": "MemberAccess", + "src": "6119:60:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "exchangeOwner", + "referencedDeclaration": 5002, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5291, + "name": "Identifier", + "src": "6197:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5242, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5292, + "name": "Identifier", + "src": "6207:10:10" + } + ], + "id": 5293, + "name": "IndexAccess", + "src": "6197:21:10" + } + ], + "id": 5294, + "name": "MemberAccess", + "src": "6197:35:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5295, + "name": "Identifier", + "src": "6250:3:10" + } + ], + "id": 5296, + "name": "MemberAccess", + "src": "6250:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5244, + "type": "uint256", + "value": "dataTokenAmount" + }, + "id": 5297, + "name": "Identifier", + "src": "6278:15:10" + } + ], + "id": 5298, + "name": "FunctionCall", + "src": "6119:188:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "46697865645261746545786368616e67653a207472616e7366657246726f6d206661696c656420696e207468652064617461546f6b656e20636f6e7472616374", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"FixedRateExchange: transferFrom failed in the dataToken contract\"", + "value": "FixedRateExchange: transferFrom failed in the dataToken contract" + }, + "id": 5299, + "name": "Literal", + "src": "6321:66:10" + } + ], + "id": 5300, + "name": "FunctionCall", + "src": "6098:299:10" + } + ], + "id": 5301, + "name": "ExpressionStatement", + "src": "6098:299:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5098, + "type": "function (bytes32,address,uint256,uint256)", + "value": "Swapped" + }, + "id": 5302, + "name": "Identifier", + "src": "6413:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5242, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5303, + "name": "Identifier", + "src": "6434:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5304, + "name": "Identifier", + "src": "6458:3:10" + } + ], + "id": 5305, + "name": "MemberAccess", + "src": "6458:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5258, + "type": "uint256", + "value": "baseTokenAmount" + }, + "id": 5306, + "name": "Identifier", + "src": "6482:15:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5244, + "type": "uint256", + "value": "dataTokenAmount" + }, + "id": 5307, + "name": "Identifier", + "src": "6511:15:10" + } + ], + "id": 5308, + "name": "FunctionCall", + "src": "6413:123:10" + } + ], + "id": 5309, + "name": "EmitStatement", + "src": "6408:128:10" + } + ], + "id": 5310, + "name": "Block", + "src": "5583:960:10" + } + ], + "id": 5311, + "name": "FunctionDefinition", + "src": "5420:1123:10" + }, + { + "attributes": { + "documentation": "@dev getNumberOfExchanges\n gets the total number of registered exchanges\n@return total number of registered exchange IDs", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getNumberOfExchanges", + "scope": 5550, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5312, + "name": "ParameterList", + "src": "6740:2:10" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5320, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5313, + "name": "ElementaryTypeName", + "src": "6790:7:10" + } + ], + "id": 5314, + "name": "VariableDeclaration", + "src": "6790:7:10" + } + ], + "id": 5315, + "name": "ParameterList", + "src": "6789:9:10" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 5315 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "length", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5016, + "type": "bytes32[] storage ref", + "value": "exchangeIds" + }, + "id": 5316, + "name": "Identifier", + "src": "6820:11:10" + } + ], + "id": 5317, + "name": "MemberAccess", + "src": "6820:18:10" + } + ], + "id": 5318, + "name": "Return", + "src": "6813:25:10" + } + ], + "id": 5319, + "name": "Block", + "src": "6803:42:10" + } + ], + "id": 5320, + "name": "FunctionDefinition", + "src": "6711:134:10" + }, + { + "attributes": { + "documentation": "@dev setRate\n changes the fixed rate for an exchange with a new rate\n@param exchangeId a unique exchange idnetifier\n@param newRate new fixed rate value", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "setRate", + "scope": 5550, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeId", + "scope": 5352, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5321, + "name": "ElementaryTypeName", + "src": "7077:7:10" + } + ], + "id": 5322, + "name": "VariableDeclaration", + "src": "7077:18:10" + }, + { + "attributes": { + "constant": false, + "name": "newRate", + "scope": 5352, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5323, + "name": "ElementaryTypeName", + "src": "7105:7:10" + } + ], + "id": 5324, + "name": "VariableDeclaration", + "src": "7105:15:10" + } + ], + "id": 5325, + "name": "ParameterList", + "src": "7067:59:10" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5329, + "name": "ParameterList", + "src": "7186:0:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5056, + "type": "modifier (bytes32)", + "value": "onlyExchangeOwner" + }, + "id": 5326, + "name": "Identifier", + "src": "7152:17:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5322, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5327, + "name": "Identifier", + "src": "7170:10:10" + } + ], + "id": 5328, + "name": "ModifierInvocation", + "src": "7152:29:10" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_36101f33c85b5f047dc985e5d24ae3bcf32f1d4b0a57ccd6a8c04d1cc8672d12", + "typeString": "literal_string \"FixedRateExchange: Ratio must be >0\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5330, + "name": "Identifier", + "src": "7196:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5324, + "type": "uint256", + "value": "newRate" + }, + "id": 5331, + "name": "Identifier", + "src": "7217:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5332, + "name": "Literal", + "src": "7228:1:10" + } + ], + "id": 5333, + "name": "BinaryOperation", + "src": "7217:12:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "46697865645261746545786368616e67653a20526174696f206d757374206265203e30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"FixedRateExchange: Ratio must be >0\"", + "value": "FixedRateExchange: Ratio must be >0" + }, + "id": 5334, + "name": "Literal", + "src": "7243:37:10" + } + ], + "id": 5335, + "name": "FunctionCall", + "src": "7196:94:10" + } + ], + "id": 5336, + "name": "ExpressionStatement", + "src": "7196:94:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "fixedRate", + "referencedDeclaration": 5008, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5337, + "name": "Identifier", + "src": "7301:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5322, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5338, + "name": "Identifier", + "src": "7311:10:10" + } + ], + "id": 5339, + "name": "IndexAccess", + "src": "7301:21:10" + } + ], + "id": 5340, + "name": "MemberAccess", + "src": "7301:31:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5324, + "type": "uint256", + "value": "newRate" + }, + "id": 5341, + "name": "Identifier", + "src": "7335:7:10" + } + ], + "id": 5342, + "name": "Assignment", + "src": "7301:41:10" + } + ], + "id": 5343, + "name": "ExpressionStatement", + "src": "7301:41:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5076, + "type": "function (bytes32,address,uint256)", + "value": "ExchangeRateChanged" + }, + "id": 5344, + "name": "Identifier", + "src": "7357:19:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5322, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5345, + "name": "Identifier", + "src": "7390:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5346, + "name": "Identifier", + "src": "7414:3:10" + } + ], + "id": 5347, + "name": "MemberAccess", + "src": "7414:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5324, + "type": "uint256", + "value": "newRate" + }, + "id": 5348, + "name": "Identifier", + "src": "7438:7:10" + } + ], + "id": 5349, + "name": "FunctionCall", + "src": "7357:98:10" + } + ], + "id": 5350, + "name": "EmitStatement", + "src": "7352:103:10" + } + ], + "id": 5351, + "name": "Block", + "src": "7186:276:10" + } + ], + "id": 5352, + "name": "FunctionDefinition", + "src": "7051:411:10" + }, + { + "attributes": { + "documentation": "@dev toggleExchangeState\n toggles the active state of an existing exchange\n@param exchangeId a unique exchange idnetifier", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "toggleExchangeState", + "scope": 5550, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeId", + "scope": 5394, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5353, + "name": "ElementaryTypeName", + "src": "7670:7:10" + } + ], + "id": 5354, + "name": "VariableDeclaration", + "src": "7670:18:10" + } + ], + "id": 5355, + "name": "ParameterList", + "src": "7660:34:10" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5359, + "name": "ParameterList", + "src": "7754:0:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5056, + "type": "modifier (bytes32)", + "value": "onlyExchangeOwner" + }, + "id": 5356, + "name": "Identifier", + "src": "7720:17:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5354, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5357, + "name": "Identifier", + "src": "7738:10:10" + } + ], + "id": 5358, + "name": "ModifierInvocation", + "src": "7720:29:10" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "active", + "referencedDeclaration": 5000, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5360, + "name": "Identifier", + "src": "7767:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5354, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5361, + "name": "Identifier", + "src": "7777:10:10" + } + ], + "id": 5362, + "name": "IndexAccess", + "src": "7767:21:10" + } + ], + "id": 5363, + "name": "MemberAccess", + "src": "7767:28:10" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "active", + "referencedDeclaration": 5000, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5364, + "name": "Identifier", + "src": "7810:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5354, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5365, + "name": "Identifier", + "src": "7820:10:10" + } + ], + "id": 5366, + "name": "IndexAccess", + "src": "7810:21:10" + } + ], + "id": 5367, + "name": "MemberAccess", + "src": "7810:28:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 5368, + "name": "Literal", + "src": "7841:5:10" + } + ], + "id": 5369, + "name": "Assignment", + "src": "7810:36:10" + } + ], + "id": 5370, + "name": "ExpressionStatement", + "src": "7810:36:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5088, + "type": "function (bytes32,address)", + "value": "ExchangeDeactivated" + }, + "id": 5371, + "name": "Identifier", + "src": "7865:19:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5354, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5372, + "name": "Identifier", + "src": "7902:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5373, + "name": "Identifier", + "src": "7930:3:10" + } + ], + "id": 5374, + "name": "MemberAccess", + "src": "7930:10:10" + } + ], + "id": 5375, + "name": "FunctionCall", + "src": "7865:89:10" + } + ], + "id": 5376, + "name": "EmitStatement", + "src": "7860:94:10" + } + ], + "id": 5377, + "name": "Block", + "src": "7796:169:10" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "active", + "referencedDeclaration": 5000, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5378, + "name": "Identifier", + "src": "7985:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5354, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5379, + "name": "Identifier", + "src": "7995:10:10" + } + ], + "id": 5380, + "name": "IndexAccess", + "src": "7985:21:10" + } + ], + "id": 5381, + "name": "MemberAccess", + "src": "7985:28:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 5382, + "name": "Literal", + "src": "8016:4:10" + } + ], + "id": 5383, + "name": "Assignment", + "src": "7985:35:10" + } + ], + "id": 5384, + "name": "ExpressionStatement", + "src": "7985:35:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5082, + "type": "function (bytes32,address)", + "value": "ExchangeActivated" + }, + "id": 5385, + "name": "Identifier", + "src": "8039:17:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5354, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5386, + "name": "Identifier", + "src": "8074:10:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5387, + "name": "Identifier", + "src": "8102:3:10" + } + ], + "id": 5388, + "name": "MemberAccess", + "src": "8102:10:10" + } + ], + "id": 5389, + "name": "FunctionCall", + "src": "8039:87:10" + } + ], + "id": 5390, + "name": "EmitStatement", + "src": "8034:92:10" + } + ], + "id": 5391, + "name": "Block", + "src": "7971:166:10" + } + ], + "id": 5392, + "name": "IfStatement", + "src": "7764:373:10" + } + ], + "id": 5393, + "name": "Block", + "src": "7754:389:10" + } + ], + "id": 5394, + "name": "FunctionDefinition", + "src": "7632:511:10" + }, + { + "attributes": { + "documentation": "@dev getRate\n gets the current fixed rate for an exchange\n@param exchangeId a unique exchange idnetifier\n@return fixed rate value", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getRate", + "scope": 5550, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeId", + "scope": 5407, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5395, + "name": "ElementaryTypeName", + "src": "8353:7:10" + } + ], + "id": 5396, + "name": "VariableDeclaration", + "src": "8353:18:10" + } + ], + "id": 5397, + "name": "ParameterList", + "src": "8343:34:10" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5407, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5398, + "name": "ElementaryTypeName", + "src": "8424:7:10" + } + ], + "id": 5399, + "name": "VariableDeclaration", + "src": "8424:7:10" + } + ], + "id": 5400, + "name": "ParameterList", + "src": "8423:9:10" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 5400 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "fixedRate", + "referencedDeclaration": 5008, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5401, + "name": "Identifier", + "src": "8454:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5396, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5402, + "name": "Identifier", + "src": "8464:10:10" + } + ], + "id": 5403, + "name": "IndexAccess", + "src": "8454:21:10" + } + ], + "id": 5404, + "name": "MemberAccess", + "src": "8454:31:10" + } + ], + "id": 5405, + "name": "Return", + "src": "8447:38:10" + } + ], + "id": 5406, + "name": "Block", + "src": "8437:55:10" + } + ], + "id": 5407, + "name": "FunctionDefinition", + "src": "8327:165:10" + }, + { + "attributes": { + "documentation": "@dev getSupply\n gets the current supply of datatokens in an fixed\n rate exchagne\n@param exchangeId the exchange ID\n@return supply", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getSupply", + "scope": 5550, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeId", + "scope": 5472, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5408, + "name": "ElementaryTypeName", + "src": "8707:7:10" + } + ], + "id": 5409, + "name": "VariableDeclaration", + "src": "8707:18:10" + } + ], + "id": 5410, + "name": "ParameterList", + "src": "8706:20:10" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "supply", + "scope": 5472, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5411, + "name": "ElementaryTypeName", + "src": "8772:7:10" + } + ], + "id": 5412, + "name": "VariableDeclaration", + "src": "8772:14:10" + } + ], + "id": 5413, + "name": "ParameterList", + "src": "8771:16:10" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "active", + "referencedDeclaration": 5000, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5414, + "name": "Identifier", + "src": "8805:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5409, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5415, + "name": "Identifier", + "src": "8815:10:10" + } + ], + "id": 5416, + "name": "IndexAccess", + "src": "8805:21:10" + } + ], + "id": 5417, + "name": "MemberAccess", + "src": "8805:28:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 5418, + "name": "Literal", + "src": "8837:5:10" + } + ], + "id": 5419, + "name": "BinaryOperation", + "src": "8805:37:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5412, + "type": "uint256", + "value": "supply" + }, + "id": 5420, + "name": "Identifier", + "src": "8856:6:10" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 5421, + "name": "Literal", + "src": "8865:1:10" + } + ], + "id": 5422, + "name": "Assignment", + "src": "8856:10:10" + } + ], + "id": 5423, + "name": "ExpressionStatement", + "src": "8856:10:10" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 5425 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "balance", + "scope": 5469, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5424, + "name": "ElementaryTypeName", + "src": "8895:7:10" + } + ], + "id": 5425, + "name": "VariableDeclaration", + "src": "8895:15:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 5640, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 5426, + "name": "Identifier", + "src": "8913:14:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "dataToken", + "referencedDeclaration": 5004, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5427, + "name": "Identifier", + "src": "8928:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5409, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5428, + "name": "Identifier", + "src": "8938:10:10" + } + ], + "id": 5429, + "name": "IndexAccess", + "src": "8928:21:10" + } + ], + "id": 5430, + "name": "MemberAccess", + "src": "8928:31:10" + } + ], + "id": 5431, + "name": "FunctionCall", + "src": "8913:47:10" + } + ], + "id": 5432, + "name": "MemberAccess", + "src": "8913:74:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "exchangeOwner", + "referencedDeclaration": 5002, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5433, + "name": "Identifier", + "src": "8988:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5409, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5434, + "name": "Identifier", + "src": "8998:10:10" + } + ], + "id": 5435, + "name": "IndexAccess", + "src": "8988:21:10" + } + ], + "id": 5436, + "name": "MemberAccess", + "src": "8988:35:10" + } + ], + "id": 5437, + "name": "FunctionCall", + "src": "8913:111:10" + } + ], + "id": 5438, + "name": "VariableDeclarationStatement", + "src": "8895:129:10" + }, + { + "attributes": { + "assignments": [ + 5440 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "allowance", + "scope": 5469, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5439, + "name": "ElementaryTypeName", + "src": "9038:7:10" + } + ], + "id": 5440, + "name": "VariableDeclaration", + "src": "9038:17:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "allowance", + "referencedDeclaration": 5622, + "type": "function (address,address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 5441, + "name": "Identifier", + "src": "9058:14:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "dataToken", + "referencedDeclaration": 5004, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5442, + "name": "Identifier", + "src": "9073:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5409, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5443, + "name": "Identifier", + "src": "9083:10:10" + } + ], + "id": 5444, + "name": "IndexAccess", + "src": "9073:21:10" + } + ], + "id": 5445, + "name": "MemberAccess", + "src": "9073:31:10" + } + ], + "id": 5446, + "name": "FunctionCall", + "src": "9058:47:10" + } + ], + "id": 5447, + "name": "MemberAccess", + "src": "9058:74:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "exchangeOwner", + "referencedDeclaration": 5002, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5448, + "name": "Identifier", + "src": "9133:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5409, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5449, + "name": "Identifier", + "src": "9143:10:10" + } + ], + "id": 5450, + "name": "IndexAccess", + "src": "9133:21:10" + } + ], + "id": 5451, + "name": "MemberAccess", + "src": "9133:35:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_FixedRateExchange_$5550", + "typeString": "contract FixedRateExchange" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 5452, + "name": "ElementaryTypeNameExpression", + "src": "9170:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7169, + "type": "contract FixedRateExchange", + "value": "this" + }, + "id": 5453, + "name": "Identifier", + "src": "9178:4:10" + } + ], + "id": 5454, + "name": "FunctionCall", + "src": "9170:13:10" + } + ], + "id": 5455, + "name": "FunctionCall", + "src": "9058:126:10" + } + ], + "id": 5456, + "name": "VariableDeclarationStatement", + "src": "9038:146:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5425, + "type": "uint256", + "value": "balance" + }, + "id": 5457, + "name": "Identifier", + "src": "9201:7:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5440, + "type": "uint256", + "value": "allowance" + }, + "id": 5458, + "name": "Identifier", + "src": "9211:9:10" + } + ], + "id": 5459, + "name": "BinaryOperation", + "src": "9201:19:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5412, + "type": "uint256", + "value": "supply" + }, + "id": 5460, + "name": "Identifier", + "src": "9238:6:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5425, + "type": "uint256", + "value": "balance" + }, + "id": 5461, + "name": "Identifier", + "src": "9247:7:10" + } + ], + "id": 5462, + "name": "Assignment", + "src": "9238:16:10" + } + ], + "id": 5463, + "name": "ExpressionStatement", + "src": "9238:16:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5412, + "type": "uint256", + "value": "supply" + }, + "id": 5464, + "name": "Identifier", + "src": "9289:6:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5440, + "type": "uint256", + "value": "allowance" + }, + "id": 5465, + "name": "Identifier", + "src": "9298:9:10" + } + ], + "id": 5466, + "name": "Assignment", + "src": "9289:18:10" + } + ], + "id": 5467, + "name": "ExpressionStatement", + "src": "9289:18:10" + } + ], + "id": 5468, + "name": "IfStatement", + "src": "9198:109:10" + } + ], + "id": 5469, + "name": "Block", + "src": "8881:437:10" + } + ], + "id": 5470, + "name": "IfStatement", + "src": "8802:516:10" + } + ], + "id": 5471, + "name": "Block", + "src": "8792:532:10" + } + ], + "id": 5472, + "name": "FunctionDefinition", + "src": "8688:636:10" + }, + { + "attributes": { + "documentation": "@dev getExchange\n gets all the exchange details\n@param exchangeId a unique exchange idnetifier\n@return all the exchange details including the exchange Owner\n the dataToken contract address, the base token address, the \n fixed rate, whether the exchange is active and the supply or the \n the current data token liquidity.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getExchange", + "scope": 5550, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeId", + "scope": 5527, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5473, + "name": "ElementaryTypeName", + "src": "9772:7:10" + } + ], + "id": 5474, + "name": "VariableDeclaration", + "src": "9772:18:10" + } + ], + "id": 5475, + "name": "ParameterList", + "src": "9762:34:10" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeOwner", + "scope": 5527, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5476, + "name": "ElementaryTypeName", + "src": "9857:7:10" + } + ], + "id": 5477, + "name": "VariableDeclaration", + "src": "9857:21:10" + }, + { + "attributes": { + "constant": false, + "name": "dataToken", + "scope": 5527, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5478, + "name": "ElementaryTypeName", + "src": "9892:7:10" + } + ], + "id": 5479, + "name": "VariableDeclaration", + "src": "9892:17:10" + }, + { + "attributes": { + "constant": false, + "name": "baseToken", + "scope": 5527, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5480, + "name": "ElementaryTypeName", + "src": "9923:7:10" + } + ], + "id": 5481, + "name": "VariableDeclaration", + "src": "9923:17:10" + }, + { + "attributes": { + "constant": false, + "name": "fixedRate", + "scope": 5527, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5482, + "name": "ElementaryTypeName", + "src": "9954:7:10" + } + ], + "id": 5483, + "name": "VariableDeclaration", + "src": "9954:17:10" + }, + { + "attributes": { + "constant": false, + "name": "active", + "scope": 5527, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 5484, + "name": "ElementaryTypeName", + "src": "9985:4:10" + } + ], + "id": 5485, + "name": "VariableDeclaration", + "src": "9985:11:10" + }, + { + "attributes": { + "constant": false, + "name": "supply", + "scope": 5527, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5486, + "name": "ElementaryTypeName", + "src": "10010:7:10" + } + ], + "id": 5487, + "name": "VariableDeclaration", + "src": "10010:14:10" + } + ], + "id": 5488, + "name": "ParameterList", + "src": "9843:191:10" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 5490 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "exchange", + "scope": 5526, + "stateVariable": false, + "storageLocation": "memory", + "type": "struct FixedRateExchange.Exchange", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Exchange", + "referencedDeclaration": 5009, + "type": "struct FixedRateExchange.Exchange" + }, + "id": 5489, + "name": "UserDefinedTypeName", + "src": "10049:8:10" + } + ], + "id": 5490, + "name": "VariableDeclaration", + "src": "10049:24:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5491, + "name": "Identifier", + "src": "10076:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5474, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5492, + "name": "Identifier", + "src": "10086:10:10" + } + ], + "id": 5493, + "name": "IndexAccess", + "src": "10076:21:10" + } + ], + "id": 5494, + "name": "VariableDeclarationStatement", + "src": "10049:48:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5477, + "type": "address", + "value": "exchangeOwner" + }, + "id": 5495, + "name": "Identifier", + "src": "10107:13:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "exchangeOwner", + "referencedDeclaration": 5002, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5490, + "type": "struct FixedRateExchange.Exchange memory", + "value": "exchange" + }, + "id": 5496, + "name": "Identifier", + "src": "10123:8:10" + } + ], + "id": 5497, + "name": "MemberAccess", + "src": "10123:22:10" + } + ], + "id": 5498, + "name": "Assignment", + "src": "10107:38:10" + } + ], + "id": 5499, + "name": "ExpressionStatement", + "src": "10107:38:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5479, + "type": "address", + "value": "dataToken" + }, + "id": 5500, + "name": "Identifier", + "src": "10155:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "dataToken", + "referencedDeclaration": 5004, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5490, + "type": "struct FixedRateExchange.Exchange memory", + "value": "exchange" + }, + "id": 5501, + "name": "Identifier", + "src": "10167:8:10" + } + ], + "id": 5502, + "name": "MemberAccess", + "src": "10167:18:10" + } + ], + "id": 5503, + "name": "Assignment", + "src": "10155:30:10" + } + ], + "id": 5504, + "name": "ExpressionStatement", + "src": "10155:30:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5481, + "type": "address", + "value": "baseToken" + }, + "id": 5505, + "name": "Identifier", + "src": "10195:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "baseToken", + "referencedDeclaration": 5006, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5490, + "type": "struct FixedRateExchange.Exchange memory", + "value": "exchange" + }, + "id": 5506, + "name": "Identifier", + "src": "10207:8:10" + } + ], + "id": 5507, + "name": "MemberAccess", + "src": "10207:18:10" + } + ], + "id": 5508, + "name": "Assignment", + "src": "10195:30:10" + } + ], + "id": 5509, + "name": "ExpressionStatement", + "src": "10195:30:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5483, + "type": "uint256", + "value": "fixedRate" + }, + "id": 5510, + "name": "Identifier", + "src": "10235:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "fixedRate", + "referencedDeclaration": 5008, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5490, + "type": "struct FixedRateExchange.Exchange memory", + "value": "exchange" + }, + "id": 5511, + "name": "Identifier", + "src": "10247:8:10" + } + ], + "id": 5512, + "name": "MemberAccess", + "src": "10247:18:10" + } + ], + "id": 5513, + "name": "Assignment", + "src": "10235:30:10" + } + ], + "id": 5514, + "name": "ExpressionStatement", + "src": "10235:30:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5485, + "type": "bool", + "value": "active" + }, + "id": 5515, + "name": "Identifier", + "src": "10275:6:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "active", + "referencedDeclaration": 5000, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5490, + "type": "struct FixedRateExchange.Exchange memory", + "value": "exchange" + }, + "id": 5516, + "name": "Identifier", + "src": "10284:8:10" + } + ], + "id": 5517, + "name": "MemberAccess", + "src": "10284:15:10" + } + ], + "id": 5518, + "name": "Assignment", + "src": "10275:24:10" + } + ], + "id": 5519, + "name": "ExpressionStatement", + "src": "10275:24:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5487, + "type": "uint256", + "value": "supply" + }, + "id": 5520, + "name": "Identifier", + "src": "10309:6:10" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5472, + "type": "function (bytes32) view returns (uint256)", + "value": "getSupply" + }, + "id": 5521, + "name": "Identifier", + "src": "10318:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5474, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5522, + "name": "Identifier", + "src": "10328:10:10" + } + ], + "id": 5523, + "name": "FunctionCall", + "src": "10318:21:10" + } + ], + "id": 5524, + "name": "Assignment", + "src": "10309:30:10" + } + ], + "id": 5525, + "name": "ExpressionStatement", + "src": "10309:30:10" + } + ], + "id": 5526, + "name": "Block", + "src": "10039:307:10" + } + ], + "id": 5527, + "name": "FunctionDefinition", + "src": "9742:604:10" + }, + { + "attributes": { + "documentation": "@dev getExchanges\n gets all the exchanges list\n@return a list of all registered exchange Ids", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getExchanges", + "scope": 5550, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5528, + "name": "ParameterList", + "src": "10507:2:10" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5536, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes32[]", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "length": null, + "type": "bytes32[]" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5529, + "name": "ElementaryTypeName", + "src": "10559:7:10" + } + ], + "id": 5530, + "name": "ArrayTypeName", + "src": "10559:9:10" + } + ], + "id": 5531, + "name": "VariableDeclaration", + "src": "10559:16:10" + } + ], + "id": 5532, + "name": "ParameterList", + "src": "10558:18:10" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 5532 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5016, + "type": "bytes32[] storage ref", + "value": "exchangeIds" + }, + "id": 5533, + "name": "Identifier", + "src": "10598:11:10" + } + ], + "id": 5534, + "name": "Return", + "src": "10591:18:10" + } + ], + "id": 5535, + "name": "Block", + "src": "10581:35:10" + } + ], + "id": 5536, + "name": "FunctionDefinition", + "src": "10486:130:10" + }, + { + "attributes": { + "documentation": "@dev isActive\n checks whether exchange is active\n@param exchangeId a unique exchange idnetifier\n@return true if exchange is true, otherwise returns false", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isActive", + "scope": 5550, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "exchangeId", + "scope": 5549, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 5537, + "name": "ElementaryTypeName", + "src": "10851:7:10" + } + ], + "id": 5538, + "name": "VariableDeclaration", + "src": "10851:18:10" + } + ], + "id": 5539, + "name": "ParameterList", + "src": "10841:34:10" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5549, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 5540, + "name": "ElementaryTypeName", + "src": "10923:4:10" + } + ], + "id": 5541, + "name": "VariableDeclaration", + "src": "10923:4:10" + } + ], + "id": 5542, + "name": "ParameterList", + "src": "10922:6:10" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 5542 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "active", + "referencedDeclaration": 5000, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct FixedRateExchange.Exchange storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5013, + "type": "mapping(bytes32 => struct FixedRateExchange.Exchange storage ref)", + "value": "exchanges" + }, + "id": 5543, + "name": "Identifier", + "src": "10950:9:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5538, + "type": "bytes32", + "value": "exchangeId" + }, + "id": 5544, + "name": "Identifier", + "src": "10960:10:10" + } + ], + "id": 5545, + "name": "IndexAccess", + "src": "10950:21:10" + } + ], + "id": 5546, + "name": "MemberAccess", + "src": "10950:28:10" + } + ], + "id": 5547, + "name": "Return", + "src": "10943:35:10" + } + ], + "id": 5548, + "name": "Block", + "src": "10933:52:10" + } + ], + "id": 5549, + "name": "FunctionDefinition", + "src": "10824:161:10" + } + ], + "id": 5550, + "name": "ContractDefinition", + "src": "530:10457:10" + } + ], + "id": 5551, + "name": "SourceUnit", + "src": "0:10988:10" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.832Z", + "devdoc": { + "details": "FixedRateExchange is a fixed rate exchange Contract Marketplaces uses this contract to allow consumers exchanging datatokens with ocean token using a fixed exchange rate.", + "methods": { + "CalcInGivenOut(bytes32,uint256)": { + "details": "CalcInGivenOut Calculates how many basetokens are needed to get specifyed amount of datatokens", + "params": { + "dataTokenAmount": "the amount of data tokens to be exchanged", + "exchangeId": "a unique exchange idnetifier " + } + }, + "create(address,address,uint256)": { + "details": "create creates new exchange pairs between base token (ocean token) and data tokens.", + "params": { + "baseToken": "refers to a ocean token contract address", + "dataToken": "refers to a data token contract address", + "fixedRate": "refers to the exact fixed exchange rate in wei" + } + }, + "generateExchangeId(address,address,address)": { + "details": "generateExchangeId creates unique exchange identifier for two token pairs.", + "params": { + "baseToken": "refers to a ocean token contract address", + "dataToken": "refers to a data token contract address", + "exchangeOwner": "exchange owner address" + } + }, + "getExchange(bytes32)": { + "details": "getExchange gets all the exchange details", + "params": { + "exchangeId": "a unique exchange idnetifier" + }, + "return": "all the exchange details including the exchange Owner the dataToken contract address, the base token address, the fixed rate, whether the exchange is active and the supply or the the current data token liquidity." + }, + "getExchanges()": { + "details": "getExchanges gets all the exchanges list", + "return": "a list of all registered exchange Ids" + }, + "getNumberOfExchanges()": { + "details": "getNumberOfExchanges gets the total number of registered exchanges", + "return": "total number of registered exchange IDs" + }, + "getRate(bytes32)": { + "details": "getRate gets the current fixed rate for an exchange", + "params": { + "exchangeId": "a unique exchange idnetifier" + }, + "return": "fixed rate value" + }, + "getSupply(bytes32)": { + "details": "getSupply gets the current supply of datatokens in an fixed rate exchagne", + "params": { + "exchangeId": "the exchange ID" + }, + "return": "supply" + }, + "isActive(bytes32)": { + "details": "isActive checks whether exchange is active", + "params": { + "exchangeId": "a unique exchange idnetifier" + }, + "return": "true if exchange is true, otherwise returns false" + }, + "setRate(bytes32,uint256)": { + "details": "setRate changes the fixed rate for an exchange with a new rate", + "params": { + "exchangeId": "a unique exchange idnetifier", + "newRate": "new fixed rate value" + } + }, + "swap(bytes32,uint256)": { + "details": "swap atomic swap between two registered fixed rate exchange.", + "params": { + "dataTokenAmount": "the amount of data tokens to be exchanged", + "exchangeId": "a unique exchange idnetifier " + } + }, + "toggleExchangeState(bytes32)": { + "details": "toggleExchangeState toggles the active state of an existing exchange", + "params": { + "exchangeId": "a unique exchange idnetifier" + } + } + }, + "title": "FixedRateExchange" + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/IERC20.json b/artifacts/IERC20.json new file mode 100644 index 000000000..56aa59982 --- /dev/null +++ b/artifacts/IERC20.json @@ -0,0 +1,1949 @@ +{ + "contractName": "IERC20", + "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": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "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" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "sender", + "type": "address" + }, + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"amount\",\"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\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"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\":{\"details\":\"Interface of the ERC20 standard as defined in the EIP. Does not include the optional functions; to access them see {ERC20Detailed}.\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. * This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. * Returns a boolean value indicating whether the operation succeeded. * IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {ERC20Detailed}.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n", + "sourcePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "ast": { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 7106 + ] + }, + "id": 7107, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7039, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:19" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", + "fullyImplemented": false, + "id": 7106, + "linearizedBaseContracts": [ + 7106 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": "@dev Returns the amount of tokens in existence.", + "id": 7044, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7040, + "nodeType": "ParameterList", + "parameters": [], + "src": "290:2:19" + }, + "returnParameters": { + "id": 7043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7042, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7044, + "src": "316:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7041, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "316:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "315:9:19" + }, + "scope": 7106, + "src": "270:55:19", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Returns the amount of tokens owned by `account`.", + "id": 7051, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7046, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 7051, + "src": "427:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7045, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "427:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "426:17:19" + }, + "returnParameters": { + "id": 7050, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7049, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7051, + "src": "467:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7048, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "467:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "466:9:19" + }, + "scope": 7106, + "src": "408:68:19", + "stateMutability": "view", + "superFunction": 5640, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", + "id": 7060, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7053, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 7060, + "src": "714:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "714:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7055, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 7060, + "src": "733:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7054, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "733:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "713:35:19" + }, + "returnParameters": { + "id": 7059, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7058, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7060, + "src": "767:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7057, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "767:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "766:6:19" + }, + "scope": 7106, + "src": "696:77:19", + "stateMutability": "nonpayable", + "superFunction": 5649, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", + "id": 7069, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7062, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 7069, + "src": "1067:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7061, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1067:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7064, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 7069, + "src": "1082:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7063, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1082:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1066:32:19" + }, + "returnParameters": { + "id": 7068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7067, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7069, + "src": "1122:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7066, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1122:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1121:9:19" + }, + "scope": 7106, + "src": "1048:83:19", + "stateMutability": "view", + "superFunction": 5622, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", + "id": 7078, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7074, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7071, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 7078, + "src": "1801:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7070, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1801:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7073, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 7078, + "src": "1818:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7072, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1818:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1800:33:19" + }, + "returnParameters": { + "id": 7077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7076, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7078, + "src": "1852:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7075, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1852:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1851:6:19" + }, + "scope": 7106, + "src": "1784:74:19", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", + "id": 7089, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7085, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7080, + "name": "sender", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "2187:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2187:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7082, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "2203:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7081, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2203:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7084, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "2222:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7083, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2222:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2186:51:19" + }, + "returnParameters": { + "id": 7088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7087, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "2256:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7086, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2256:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2255:6:19" + }, + "scope": 7106, + "src": "2165:97:19", + "stateMutability": "nonpayable", + "superFunction": 5633, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", + "id": 7097, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 7096, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7091, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 7097, + "src": "2446:20:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7090, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2446:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7093, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 7097, + "src": "2468:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7092, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2468:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7095, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 7097, + "src": "2488:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7094, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2488:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2445:57:19" + }, + "src": "2431:72:19" + }, + { + "anonymous": false, + "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", + "id": 7105, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 7104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7099, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 7105, + "src": "2677:21:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7098, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2677:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7101, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 7105, + "src": "2700:23:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2700:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7103, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 7105, + "src": "2725:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2725:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2676:63:19" + }, + "src": "2662:78:19" + } + ], + "scope": 7107, + "src": "176:2566:19" + } + ], + "src": "0:2743:19" + }, + "legacyAST": { + "attributes": { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 7106 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ] + }, + "id": 7039, + "name": "PragmaDirective", + "src": "0:23:19" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "interface", + "documentation": "@dev Interface of the ERC20 standard as defined in the EIP. Does not include\nthe optional functions; to access them see {ERC20Detailed}.", + "fullyImplemented": false, + "linearizedBaseContracts": [ + 7106 + ], + "name": "IERC20", + "scope": 7107 + }, + "children": [ + { + "attributes": { + "body": null, + "documentation": "@dev Returns the amount of tokens in existence.", + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "totalSupply", + "scope": 7106, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 7040, + "name": "ParameterList", + "src": "290:2:19" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 7044, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 7041, + "name": "ElementaryTypeName", + "src": "316:7:19" + } + ], + "id": 7042, + "name": "VariableDeclaration", + "src": "316:7:19" + } + ], + "id": 7043, + "name": "ParameterList", + "src": "315:9:19" + } + ], + "id": 7044, + "name": "FunctionDefinition", + "src": "270:55:19" + }, + { + "attributes": { + "body": null, + "documentation": "@dev Returns the amount of tokens owned by `account`.", + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "balanceOf", + "scope": 7106, + "stateMutability": "view", + "superFunction": 5640, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "account", + "scope": 7051, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7045, + "name": "ElementaryTypeName", + "src": "427:7:19" + } + ], + "id": 7046, + "name": "VariableDeclaration", + "src": "427:15:19" + } + ], + "id": 7047, + "name": "ParameterList", + "src": "426:17:19" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 7051, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 7048, + "name": "ElementaryTypeName", + "src": "467:7:19" + } + ], + "id": 7049, + "name": "VariableDeclaration", + "src": "467:7:19" + } + ], + "id": 7050, + "name": "ParameterList", + "src": "466:9:19" + } + ], + "id": 7051, + "name": "FunctionDefinition", + "src": "408:68:19" + }, + { + "attributes": { + "body": null, + "documentation": "@dev Moves `amount` tokens from the caller's account to `recipient`.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "transfer", + "scope": 7106, + "stateMutability": "nonpayable", + "superFunction": 5649, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "recipient", + "scope": 7060, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7052, + "name": "ElementaryTypeName", + "src": "714:7:19" + } + ], + "id": 7053, + "name": "VariableDeclaration", + "src": "714:17:19" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 7060, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 7054, + "name": "ElementaryTypeName", + "src": "733:7:19" + } + ], + "id": 7055, + "name": "VariableDeclaration", + "src": "733:14:19" + } + ], + "id": 7056, + "name": "ParameterList", + "src": "713:35:19" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 7060, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 7057, + "name": "ElementaryTypeName", + "src": "767:4:19" + } + ], + "id": 7058, + "name": "VariableDeclaration", + "src": "767:4:19" + } + ], + "id": 7059, + "name": "ParameterList", + "src": "766:6:19" + } + ], + "id": 7060, + "name": "FunctionDefinition", + "src": "696:77:19" + }, + { + "attributes": { + "body": null, + "documentation": "@dev Returns the remaining number of tokens that `spender` will be\nallowed to spend on behalf of `owner` through {transferFrom}. This is\nzero by default.\n * This value changes when {approve} or {transferFrom} are called.", + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "allowance", + "scope": 7106, + "stateMutability": "view", + "superFunction": 5622, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "owner", + "scope": 7069, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7061, + "name": "ElementaryTypeName", + "src": "1067:7:19" + } + ], + "id": 7062, + "name": "VariableDeclaration", + "src": "1067:13:19" + }, + { + "attributes": { + "constant": false, + "name": "spender", + "scope": 7069, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7063, + "name": "ElementaryTypeName", + "src": "1082:7:19" + } + ], + "id": 7064, + "name": "VariableDeclaration", + "src": "1082:15:19" + } + ], + "id": 7065, + "name": "ParameterList", + "src": "1066:32:19" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 7069, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 7066, + "name": "ElementaryTypeName", + "src": "1122:7:19" + } + ], + "id": 7067, + "name": "VariableDeclaration", + "src": "1122:7:19" + } + ], + "id": 7068, + "name": "ParameterList", + "src": "1121:9:19" + } + ], + "id": 7069, + "name": "FunctionDefinition", + "src": "1048:83:19" + }, + { + "attributes": { + "body": null, + "documentation": "@dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n * Returns a boolean value indicating whether the operation succeeded.\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\nthat someone may use both the old and the new allowance by unfortunate\ntransaction ordering. One possible solution to mitigate this race\ncondition is to first reduce the spender's allowance to 0 and set the\ndesired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * Emits an {Approval} event.", + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "approve", + "scope": 7106, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "spender", + "scope": 7078, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7070, + "name": "ElementaryTypeName", + "src": "1801:7:19" + } + ], + "id": 7071, + "name": "VariableDeclaration", + "src": "1801:15:19" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 7078, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 7072, + "name": "ElementaryTypeName", + "src": "1818:7:19" + } + ], + "id": 7073, + "name": "VariableDeclaration", + "src": "1818:14:19" + } + ], + "id": 7074, + "name": "ParameterList", + "src": "1800:33:19" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 7078, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 7075, + "name": "ElementaryTypeName", + "src": "1852:4:19" + } + ], + "id": 7076, + "name": "VariableDeclaration", + "src": "1852:4:19" + } + ], + "id": 7077, + "name": "ParameterList", + "src": "1851:6:19" + } + ], + "id": 7078, + "name": "FunctionDefinition", + "src": "1784:74:19" + }, + { + "attributes": { + "body": null, + "documentation": "@dev Moves `amount` tokens from `sender` to `recipient` using the\nallowance mechanism. `amount` is then deducted from the caller's\nallowance.\n * Returns a boolean value indicating whether the operation succeeded.\n * Emits a {Transfer} event.", + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "transferFrom", + "scope": 7106, + "stateMutability": "nonpayable", + "superFunction": 5633, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "sender", + "scope": 7089, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7079, + "name": "ElementaryTypeName", + "src": "2187:7:19" + } + ], + "id": 7080, + "name": "VariableDeclaration", + "src": "2187:14:19" + }, + { + "attributes": { + "constant": false, + "name": "recipient", + "scope": 7089, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7081, + "name": "ElementaryTypeName", + "src": "2203:7:19" + } + ], + "id": 7082, + "name": "VariableDeclaration", + "src": "2203:17:19" + }, + { + "attributes": { + "constant": false, + "name": "amount", + "scope": 7089, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 7083, + "name": "ElementaryTypeName", + "src": "2222:7:19" + } + ], + "id": 7084, + "name": "VariableDeclaration", + "src": "2222:14:19" + } + ], + "id": 7085, + "name": "ParameterList", + "src": "2186:51:19" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 7089, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 7086, + "name": "ElementaryTypeName", + "src": "2256:4:19" + } + ], + "id": 7087, + "name": "VariableDeclaration", + "src": "2256:4:19" + } + ], + "id": 7088, + "name": "ParameterList", + "src": "2255:6:19" + } + ], + "id": 7089, + "name": "FunctionDefinition", + "src": "2165:97:19" + }, + { + "attributes": { + "anonymous": false, + "documentation": "@dev Emitted when `value` tokens are moved from one account (`from`) to\nanother (`to`).\n * Note that `value` may be zero.", + "name": "Transfer" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "from", + "scope": 7097, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7090, + "name": "ElementaryTypeName", + "src": "2446:7:19" + } + ], + "id": 7091, + "name": "VariableDeclaration", + "src": "2446:20:19" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "to", + "scope": 7097, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7092, + "name": "ElementaryTypeName", + "src": "2468:7:19" + } + ], + "id": 7093, + "name": "VariableDeclaration", + "src": "2468:18:19" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "value", + "scope": 7097, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 7094, + "name": "ElementaryTypeName", + "src": "2488:7:19" + } + ], + "id": 7095, + "name": "VariableDeclaration", + "src": "2488:13:19" + } + ], + "id": 7096, + "name": "ParameterList", + "src": "2445:57:19" + } + ], + "id": 7097, + "name": "EventDefinition", + "src": "2431:72:19" + }, + { + "attributes": { + "anonymous": false, + "documentation": "@dev Emitted when the allowance of a `spender` for an `owner` is set by\na call to {approve}. `value` is the new allowance.", + "name": "Approval" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "owner", + "scope": 7105, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7098, + "name": "ElementaryTypeName", + "src": "2677:7:19" + } + ], + "id": 7099, + "name": "VariableDeclaration", + "src": "2677:21:19" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "spender", + "scope": 7105, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 7100, + "name": "ElementaryTypeName", + "src": "2700:7:19" + } + ], + "id": 7101, + "name": "VariableDeclaration", + "src": "2700:23:19" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "value", + "scope": 7105, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 7102, + "name": "ElementaryTypeName", + "src": "2725:7:19" + } + ], + "id": 7103, + "name": "VariableDeclaration", + "src": "2725:13:19" + } + ], + "id": 7104, + "name": "ParameterList", + "src": "2676:63:19" + } + ], + "id": 7105, + "name": "EventDefinition", + "src": "2662:78:19" + } + ], + "id": 7106, + "name": "ContractDefinition", + "src": "176:2566:19" + } + ], + "id": 7107, + "name": "SourceUnit", + "src": "0:2743:19" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.862Z", + "devdoc": { + "details": "Interface of the ERC20 standard as defined in the EIP. Does not include the optional functions; to access them see {ERC20Detailed}.", + "methods": { + "allowance(address,address)": { + "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. * This value changes when {approve} or {transferFrom} are called." + }, + "approve(address,uint256)": { + "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. * Returns a boolean value indicating whether the operation succeeded. * IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * Emits an {Approval} event." + }, + "balanceOf(address)": { + "details": "Returns the amount of tokens owned by `account`." + }, + "totalSupply()": { + "details": "Returns the amount of tokens in existence." + }, + "transfer(address,uint256)": { + "details": "Moves `amount` tokens from the caller's account to `recipient`. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event." + }, + "transferFrom(address,address,uint256)": { + "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event." + } + } + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/IERC20Template.json b/artifacts/IERC20Template.json new file mode 100644 index 000000000..d09102110 --- /dev/null +++ b/artifacts/IERC20Template.json @@ -0,0 +1,2981 @@ +{ + "contractName": "IERC20Template", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "name", + "type": "string" + }, + { + "name": "symbol", + "type": "string" + }, + { + "name": "minter", + "type": "address" + }, + { + "name": "cap", + "type": "uint256" + }, + { + "name": "blob", + "type": "string" + }, + { + "name": "collector", + "type": "address" + } + ], + "name": "initialize", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "minter", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "cap", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isMinter", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "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": 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": "account", + "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": false, + "inputs": [ + { + "name": "newMinter", + "type": "address" + } + ], + "name": "proposeMinter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "approveMinter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minter\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"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\":\"cap\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newMinter\",\"type\":\"address\"}],\"name\":\"proposeMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"},{\"name\":\"minter\",\"type\":\"address\"},{\"name\":\"cap\",\"type\":\"uint256\"},{\"name\":\"blob\",\"type\":\"string\"},{\"name\":\"collector\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"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\":\"account\",\"type\":\"address\"}],\"name\":\"isMinter\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"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\":false,\"inputs\":[],\"name\":\"approveMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol\":\"IERC20Template\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol\":{\"keccak256\":\"0x022ebed2ba4949e96a05cc394cf690d8fd3190a4733cebe8cbe930ac25cfde18\",\"urls\":[\"bzzr://2fa3d5cae14f0af7d78f6e1d13bc41854082c03ab2f86462ebb09afda88ee6e9\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity >=0.5.0;\n\ninterface IERC20Template {\n function initialize(\n string calldata name,\n string calldata symbol,\n address minter,\n uint256 cap,\n string calldata blob,\n address collector\n ) external returns (bool);\n\n function mint(address account, uint256 value) external;\n function minter() external view returns(address); \n function name() external view returns (string memory);\n function symbol() external view returns (string memory);\n function decimals() external view returns (uint8);\n function cap() external view returns (uint256);\n function isMinter(address account) external view returns (bool);\n function isInitialized() external view returns (bool);\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external returns (bool);\n function balanceOf(address account) external view returns (uint256);\n function transfer(address to, uint256 value) external returns (bool);\n function proposeMinter(address newMinter) external;\n function approveMinter() external;\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "exportedSymbols": { + "IERC20Template": [ + 5658 + ] + }, + "id": 5659, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5552, + "literals": [ + "solidity", + ">=", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:24:11" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 5658, + "linearizedBaseContracts": [ + 5658 + ], + "name": "IERC20Template", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 5569, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initialize", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5565, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5554, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 5569, + "src": "86:20:11", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5553, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "86:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5556, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 5569, + "src": "116:22:11", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5555, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "116:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5558, + "name": "minter", + "nodeType": "VariableDeclaration", + "scope": 5569, + "src": "148:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5557, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "148:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5560, + "name": "cap", + "nodeType": "VariableDeclaration", + "scope": 5569, + "src": "172:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5559, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "172:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5562, + "name": "blob", + "nodeType": "VariableDeclaration", + "scope": 5569, + "src": "193:20:11", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5561, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "193:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5564, + "name": "collector", + "nodeType": "VariableDeclaration", + "scope": 5569, + "src": "223:17:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5563, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "223:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "76:170:11" + }, + "returnParameters": { + "id": 5568, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5567, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5569, + "src": "265:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5566, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "265:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "264:6:11" + }, + "scope": 5658, + "src": "57:214:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5576, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5574, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5571, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 5576, + "src": "291:15:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5570, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "291:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5573, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 5576, + "src": "308:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5572, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "308:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "290:32:11" + }, + "returnParameters": { + "id": 5575, + "nodeType": "ParameterList", + "parameters": [], + "src": "331:0:11" + }, + "scope": 5658, + "src": "277:55:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5581, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "minter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5577, + "nodeType": "ParameterList", + "parameters": [], + "src": "352:2:11" + }, + "returnParameters": { + "id": 5580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5579, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5581, + "src": "377:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5578, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "377:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "376:9:11" + }, + "scope": 5658, + "src": "337:49:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5586, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5582, + "nodeType": "ParameterList", + "parameters": [], + "src": "408:2:11" + }, + "returnParameters": { + "id": 5585, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5584, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5586, + "src": "434:13:11", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5583, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "434:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "433:15:11" + }, + "scope": 5658, + "src": "395:54:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5591, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5587, + "nodeType": "ParameterList", + "parameters": [], + "src": "469:2:11" + }, + "returnParameters": { + "id": 5590, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5589, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5591, + "src": "495:13:11", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5588, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "495:6:11", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "494:15:11" + }, + "scope": 5658, + "src": "454:56:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5596, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5592, + "nodeType": "ParameterList", + "parameters": [], + "src": "532:2:11" + }, + "returnParameters": { + "id": 5595, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5594, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5596, + "src": "558:5:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5593, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "558:5:11", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "557:7:11" + }, + "scope": 5658, + "src": "515:50:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5601, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "cap", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5597, + "nodeType": "ParameterList", + "parameters": [], + "src": "582:2:11" + }, + "returnParameters": { + "id": 5600, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5599, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5601, + "src": "608:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5598, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "608:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "607:9:11" + }, + "scope": 5658, + "src": "570:47:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5608, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isMinter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5604, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5603, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 5608, + "src": "640:15:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5602, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "640:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "639:17:11" + }, + "returnParameters": { + "id": 5607, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5606, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5608, + "src": "680:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5605, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "680:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "679:6:11" + }, + "scope": 5658, + "src": "622:64:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5613, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isInitialized", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5609, + "nodeType": "ParameterList", + "parameters": [], + "src": "713:2:11" + }, + "returnParameters": { + "id": 5612, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5611, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5613, + "src": "739:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5610, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "739:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "738:6:11" + }, + "scope": 5658, + "src": "691:54:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5622, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5618, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5615, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 5622, + "src": "769:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5614, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "769:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5617, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 5622, + "src": "784:15:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "784:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "768:32:11" + }, + "returnParameters": { + "id": 5621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5620, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5622, + "src": "848:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5619, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "848:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "847:9:11" + }, + "scope": 5658, + "src": "750:107:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5633, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5629, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5624, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 5633, + "src": "893:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5623, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "893:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5626, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 5633, + "src": "915:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5625, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "915:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5628, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 5633, + "src": "935:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5627, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "935:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "883:71:11" + }, + "returnParameters": { + "id": 5632, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5631, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5633, + "src": "973:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5630, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "973:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "972:6:11" + }, + "scope": 5658, + "src": "862:117:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5640, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5636, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5635, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 5640, + "src": "1003:15:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1003:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1002:17:11" + }, + "returnParameters": { + "id": 5639, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5638, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5640, + "src": "1043:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5637, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1043:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1042:9:11" + }, + "scope": 5658, + "src": "984:68:11", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5649, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5645, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5642, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 5649, + "src": "1075:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5641, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1075:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5644, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 5649, + "src": "1087:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5643, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1087:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1074:27:11" + }, + "returnParameters": { + "id": 5648, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5647, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5649, + "src": "1120:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5646, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1120:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1119:6:11" + }, + "scope": 5658, + "src": "1057:69:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5654, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "proposeMinter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5652, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5651, + "name": "newMinter", + "nodeType": "VariableDeclaration", + "scope": 5654, + "src": "1154:17:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5650, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1154:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1153:19:11" + }, + "returnParameters": { + "id": 5653, + "nodeType": "ParameterList", + "parameters": [], + "src": "1181:0:11" + }, + "scope": 5658, + "src": "1131:51:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 5657, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approveMinter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5655, + "nodeType": "ParameterList", + "parameters": [], + "src": "1209:2:11" + }, + "returnParameters": { + "id": 5656, + "nodeType": "ParameterList", + "parameters": [], + "src": "1220:0:11" + }, + "scope": 5658, + "src": "1187:34:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 5659, + "src": "26:1197:11" + } + ], + "src": "0:1224:11" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "exportedSymbols": { + "IERC20Template": [ + 5658 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + ">=", + "0.5", + ".0" + ] + }, + "id": 5552, + "name": "PragmaDirective", + "src": "0:24:11" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "linearizedBaseContracts": [ + 5658 + ], + "name": "IERC20Template", + "scope": 5659 + }, + "children": [ + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "initialize", + "scope": 5658, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "name", + "scope": 5569, + "stateVariable": false, + "storageLocation": "calldata", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5553, + "name": "ElementaryTypeName", + "src": "86:6:11" + } + ], + "id": 5554, + "name": "VariableDeclaration", + "src": "86:20:11" + }, + { + "attributes": { + "constant": false, + "name": "symbol", + "scope": 5569, + "stateVariable": false, + "storageLocation": "calldata", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5555, + "name": "ElementaryTypeName", + "src": "116:6:11" + } + ], + "id": 5556, + "name": "VariableDeclaration", + "src": "116:22:11" + }, + { + "attributes": { + "constant": false, + "name": "minter", + "scope": 5569, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5557, + "name": "ElementaryTypeName", + "src": "148:7:11" + } + ], + "id": 5558, + "name": "VariableDeclaration", + "src": "148:14:11" + }, + { + "attributes": { + "constant": false, + "name": "cap", + "scope": 5569, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5559, + "name": "ElementaryTypeName", + "src": "172:7:11" + } + ], + "id": 5560, + "name": "VariableDeclaration", + "src": "172:11:11" + }, + { + "attributes": { + "constant": false, + "name": "blob", + "scope": 5569, + "stateVariable": false, + "storageLocation": "calldata", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5561, + "name": "ElementaryTypeName", + "src": "193:6:11" + } + ], + "id": 5562, + "name": "VariableDeclaration", + "src": "193:20:11" + }, + { + "attributes": { + "constant": false, + "name": "collector", + "scope": 5569, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5563, + "name": "ElementaryTypeName", + "src": "223:7:11" + } + ], + "id": 5564, + "name": "VariableDeclaration", + "src": "223:17:11" + } + ], + "id": 5565, + "name": "ParameterList", + "src": "76:170:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5569, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 5566, + "name": "ElementaryTypeName", + "src": "265:4:11" + } + ], + "id": 5567, + "name": "VariableDeclaration", + "src": "265:4:11" + } + ], + "id": 5568, + "name": "ParameterList", + "src": "264:6:11" + } + ], + "id": 5569, + "name": "FunctionDefinition", + "src": "57:214:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "mint", + "scope": 5658, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "account", + "scope": 5576, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5570, + "name": "ElementaryTypeName", + "src": "291:7:11" + } + ], + "id": 5571, + "name": "VariableDeclaration", + "src": "291:15:11" + }, + { + "attributes": { + "constant": false, + "name": "value", + "scope": 5576, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5572, + "name": "ElementaryTypeName", + "src": "308:7:11" + } + ], + "id": 5573, + "name": "VariableDeclaration", + "src": "308:13:11" + } + ], + "id": 5574, + "name": "ParameterList", + "src": "290:32:11" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5575, + "name": "ParameterList", + "src": "331:0:11" + } + ], + "id": 5576, + "name": "FunctionDefinition", + "src": "277:55:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "minter", + "scope": 5658, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5577, + "name": "ParameterList", + "src": "352:2:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5581, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5578, + "name": "ElementaryTypeName", + "src": "377:7:11" + } + ], + "id": 5579, + "name": "VariableDeclaration", + "src": "377:7:11" + } + ], + "id": 5580, + "name": "ParameterList", + "src": "376:9:11" + } + ], + "id": 5581, + "name": "FunctionDefinition", + "src": "337:49:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "name", + "scope": 5658, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5582, + "name": "ParameterList", + "src": "408:2:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5586, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5583, + "name": "ElementaryTypeName", + "src": "434:6:11" + } + ], + "id": 5584, + "name": "VariableDeclaration", + "src": "434:13:11" + } + ], + "id": 5585, + "name": "ParameterList", + "src": "433:15:11" + } + ], + "id": 5586, + "name": "FunctionDefinition", + "src": "395:54:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "symbol", + "scope": 5658, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5587, + "name": "ParameterList", + "src": "469:2:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5591, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 5588, + "name": "ElementaryTypeName", + "src": "495:6:11" + } + ], + "id": 5589, + "name": "VariableDeclaration", + "src": "495:13:11" + } + ], + "id": 5590, + "name": "ParameterList", + "src": "494:15:11" + } + ], + "id": 5591, + "name": "FunctionDefinition", + "src": "454:56:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "decimals", + "scope": 5658, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5592, + "name": "ParameterList", + "src": "532:2:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5596, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 5593, + "name": "ElementaryTypeName", + "src": "558:5:11" + } + ], + "id": 5594, + "name": "VariableDeclaration", + "src": "558:5:11" + } + ], + "id": 5595, + "name": "ParameterList", + "src": "557:7:11" + } + ], + "id": 5596, + "name": "FunctionDefinition", + "src": "515:50:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "cap", + "scope": 5658, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5597, + "name": "ParameterList", + "src": "582:2:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5601, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5598, + "name": "ElementaryTypeName", + "src": "608:7:11" + } + ], + "id": 5599, + "name": "VariableDeclaration", + "src": "608:7:11" + } + ], + "id": 5600, + "name": "ParameterList", + "src": "607:9:11" + } + ], + "id": 5601, + "name": "FunctionDefinition", + "src": "570:47:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isMinter", + "scope": 5658, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "account", + "scope": 5608, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5602, + "name": "ElementaryTypeName", + "src": "640:7:11" + } + ], + "id": 5603, + "name": "VariableDeclaration", + "src": "640:15:11" + } + ], + "id": 5604, + "name": "ParameterList", + "src": "639:17:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5608, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 5605, + "name": "ElementaryTypeName", + "src": "680:4:11" + } + ], + "id": 5606, + "name": "VariableDeclaration", + "src": "680:4:11" + } + ], + "id": 5607, + "name": "ParameterList", + "src": "679:6:11" + } + ], + "id": 5608, + "name": "FunctionDefinition", + "src": "622:64:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isInitialized", + "scope": 5658, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5609, + "name": "ParameterList", + "src": "713:2:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5613, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 5610, + "name": "ElementaryTypeName", + "src": "739:4:11" + } + ], + "id": 5611, + "name": "VariableDeclaration", + "src": "739:4:11" + } + ], + "id": 5612, + "name": "ParameterList", + "src": "738:6:11" + } + ], + "id": 5613, + "name": "FunctionDefinition", + "src": "691:54:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "allowance", + "scope": 5658, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "owner", + "scope": 5622, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5614, + "name": "ElementaryTypeName", + "src": "769:7:11" + } + ], + "id": 5615, + "name": "VariableDeclaration", + "src": "769:13:11" + }, + { + "attributes": { + "constant": false, + "name": "spender", + "scope": 5622, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5616, + "name": "ElementaryTypeName", + "src": "784:7:11" + } + ], + "id": 5617, + "name": "VariableDeclaration", + "src": "784:15:11" + } + ], + "id": 5618, + "name": "ParameterList", + "src": "768:32:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5622, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5619, + "name": "ElementaryTypeName", + "src": "848:7:11" + } + ], + "id": 5620, + "name": "VariableDeclaration", + "src": "848:7:11" + } + ], + "id": 5621, + "name": "ParameterList", + "src": "847:9:11" + } + ], + "id": 5622, + "name": "FunctionDefinition", + "src": "750:107:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "transferFrom", + "scope": 5658, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "from", + "scope": 5633, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5623, + "name": "ElementaryTypeName", + "src": "893:7:11" + } + ], + "id": 5624, + "name": "VariableDeclaration", + "src": "893:12:11" + }, + { + "attributes": { + "constant": false, + "name": "to", + "scope": 5633, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5625, + "name": "ElementaryTypeName", + "src": "915:7:11" + } + ], + "id": 5626, + "name": "VariableDeclaration", + "src": "915:10:11" + }, + { + "attributes": { + "constant": false, + "name": "value", + "scope": 5633, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5627, + "name": "ElementaryTypeName", + "src": "935:7:11" + } + ], + "id": 5628, + "name": "VariableDeclaration", + "src": "935:13:11" + } + ], + "id": 5629, + "name": "ParameterList", + "src": "883:71:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5633, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 5630, + "name": "ElementaryTypeName", + "src": "973:4:11" + } + ], + "id": 5631, + "name": "VariableDeclaration", + "src": "973:4:11" + } + ], + "id": 5632, + "name": "ParameterList", + "src": "972:6:11" + } + ], + "id": 5633, + "name": "FunctionDefinition", + "src": "862:117:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "balanceOf", + "scope": 5658, + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "account", + "scope": 5640, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5634, + "name": "ElementaryTypeName", + "src": "1003:7:11" + } + ], + "id": 5635, + "name": "VariableDeclaration", + "src": "1003:15:11" + } + ], + "id": 5636, + "name": "ParameterList", + "src": "1002:17:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5640, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5637, + "name": "ElementaryTypeName", + "src": "1043:7:11" + } + ], + "id": 5638, + "name": "VariableDeclaration", + "src": "1043:7:11" + } + ], + "id": 5639, + "name": "ParameterList", + "src": "1042:9:11" + } + ], + "id": 5640, + "name": "FunctionDefinition", + "src": "984:68:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "transfer", + "scope": 5658, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "to", + "scope": 5649, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5641, + "name": "ElementaryTypeName", + "src": "1075:7:11" + } + ], + "id": 5642, + "name": "VariableDeclaration", + "src": "1075:10:11" + }, + { + "attributes": { + "constant": false, + "name": "value", + "scope": 5649, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 5643, + "name": "ElementaryTypeName", + "src": "1087:7:11" + } + ], + "id": 5644, + "name": "VariableDeclaration", + "src": "1087:13:11" + } + ], + "id": 5645, + "name": "ParameterList", + "src": "1074:27:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 5649, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 5646, + "name": "ElementaryTypeName", + "src": "1120:4:11" + } + ], + "id": 5647, + "name": "VariableDeclaration", + "src": "1120:4:11" + } + ], + "id": 5648, + "name": "ParameterList", + "src": "1119:6:11" + } + ], + "id": 5649, + "name": "FunctionDefinition", + "src": "1057:69:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "proposeMinter", + "scope": 5658, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "newMinter", + "scope": 5654, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5650, + "name": "ElementaryTypeName", + "src": "1154:7:11" + } + ], + "id": 5651, + "name": "VariableDeclaration", + "src": "1154:17:11" + } + ], + "id": 5652, + "name": "ParameterList", + "src": "1153:19:11" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5653, + "name": "ParameterList", + "src": "1181:0:11" + } + ], + "id": 5654, + "name": "FunctionDefinition", + "src": "1131:51:11" + }, + { + "attributes": { + "body": null, + "documentation": null, + "implemented": false, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "approveMinter", + "scope": 5658, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5655, + "name": "ParameterList", + "src": "1209:2:11" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5656, + "name": "ParameterList", + "src": "1220:0:11" + } + ], + "id": 5657, + "name": "FunctionDefinition", + "src": "1187:34:11" + } + ], + "id": 5658, + "name": "ContractDefinition", + "src": "26:1197:11" + } + ], + "id": 5659, + "name": "SourceUnit", + "src": "0:1224:11" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.841Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/Metadata.json b/artifacts/Metadata.json new file mode 100644 index 000000000..82b3e0800 --- /dev/null +++ b/artifacts/Metadata.json @@ -0,0 +1,2505 @@ +{ + "contractName": "Metadata", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "dataToken", + "type": "address" + }, + { + "indexed": true, + "name": "createdBy", + "type": "address" + }, + { + "indexed": false, + "name": "flags", + "type": "bytes" + }, + { + "indexed": false, + "name": "data", + "type": "bytes" + } + ], + "name": "MetadataCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "dataToken", + "type": "address" + }, + { + "indexed": true, + "name": "updatedBy", + "type": "address" + }, + { + "indexed": false, + "name": "flags", + "type": "bytes" + }, + { + "indexed": false, + "name": "data", + "type": "bytes" + } + ], + "name": "MetadataUpdated", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "dataToken", + "type": "address" + }, + { + "name": "flags", + "type": "bytes" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "create", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "dataToken", + "type": "address" + }, + { + "name": "flags", + "type": "bytes" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "update", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"dataToken\",\"type\":\"address\"},{\"name\":\"flags\",\"type\":\"bytes\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"create\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dataToken\",\"type\":\"address\"},{\"name\":\"flags\",\"type\":\"bytes\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"update\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"dataToken\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"createdBy\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"flags\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"MetadataCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"dataToken\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"updatedBy\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"flags\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"MetadataUpdated\",\"type\":\"event\"}],\"devdoc\":{\"details\":\"Metadata stands for Decentralized Document. It allows publishers to publish their dataset metadata in decentralized way. It follows the Ocean DID Document standard: https://github.com/oceanprotocol/OEPs/blob/master/7/v0.2/README.md\",\"methods\":{\"create(address,bytes,bytes)\":{\"details\":\"create creates/publishes new metadata/DDO document on-chain. \",\"params\":{\"data\":\"referes to the actual metadata\",\"dataToken\":\"refers to data token address\",\"flags\":\"special flags associated with metadata\"}},\"update(address,bytes,bytes)\":{\"details\":\"update allows only datatoken minter(s) to update the DDO/metadata content\",\"params\":{\"data\":\"referes to the actual metadata\",\"dataToken\":\"refers to data token address\",\"flags\":\"special flags associated with metadata\"}}},\"title\":\"Metadata \"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/metadata/Metadata.sol\":\"Metadata\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol\":{\"keccak256\":\"0x022ebed2ba4949e96a05cc394cf690d8fd3190a4733cebe8cbe930ac25cfde18\",\"urls\":[\"bzzr://2fa3d5cae14f0af7d78f6e1d13bc41854082c03ab2f86462ebb09afda88ee6e9\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/metadata/Metadata.sol\":{\"keccak256\":\"0x6deddfdc2e45d81e50d58cf216908c18bdbc0c84a1dad53ca2995f14d0217d7d\",\"urls\":[\"bzzr://be7a7be0d067cedb6d2f4acc7457e89dd7c9dbbf2b77725784ed0e9bb67bd64a\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610531806100206000396000f3fe608060405234801561001057600080fd5b50600436106100395760e060020a600035046382743814811461003e578063f89b1f3614610112575b600080fd5b6101106004803603606081101561005457600080fd5b600160a060020a03823516919081019060408101602082013564010000000081111561007f57600080fd5b82018360208201111561009157600080fd5b803590602001918460018302840111640100000000831117156100b357600080fd5b9193909290916020810190356401000000008111156100d157600080fd5b8201836020820111156100e357600080fd5b8035906020019184600183028401116401000000008311171561010557600080fd5b5090925090506101e4565b005b6101106004803603606081101561012857600080fd5b600160a060020a03823516919081019060408101602082013564010000000081111561015357600080fd5b82018360208201111561016557600080fd5b8035906020019184600183028401116401000000008311171561018757600080fd5b9193909290916020810190356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b509092509050610363565b84600081905033600160a060020a031681600160a060020a031663075461726040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561023057600080fd5b505afa158015610244573d6000803e3d6000fd5b505050506040513d602081101561025a57600080fd5b5051600160a060020a0316146102bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806104e46022913960400191505060405180910390fd5b33600160a060020a031687600160a060020a03167ee7283fcf5726344ed567dc39b1822ff824bc90f96c137b622781d3570b81ef888888886040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a350505050505050565b84600081905033600160a060020a031681600160a060020a031663075461726040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156103af57600080fd5b505afa1580156103c3573d6000803e3d6000fd5b505050506040513d60208110156103d957600080fd5b5051600160a060020a03161461043a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806104e46022913960400191505060405180910390fd5b33600160a060020a031687600160a060020a03167fb8c028de5d50845d8e50bbc36728f4e9d523e16a1a431a299e8b216c7b2f5584888888886040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a35050505050505056fe4d657461646174613a20496e76616c69642044617461546f6b656e204d696e746572a165627a7a7230582006e22d0ae25bfc383832a887d6fa3d8cc7ffba238078693831acbbe2cce0d7850029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100395760e060020a600035046382743814811461003e578063f89b1f3614610112575b600080fd5b6101106004803603606081101561005457600080fd5b600160a060020a03823516919081019060408101602082013564010000000081111561007f57600080fd5b82018360208201111561009157600080fd5b803590602001918460018302840111640100000000831117156100b357600080fd5b9193909290916020810190356401000000008111156100d157600080fd5b8201836020820111156100e357600080fd5b8035906020019184600183028401116401000000008311171561010557600080fd5b5090925090506101e4565b005b6101106004803603606081101561012857600080fd5b600160a060020a03823516919081019060408101602082013564010000000081111561015357600080fd5b82018360208201111561016557600080fd5b8035906020019184600183028401116401000000008311171561018757600080fd5b9193909290916020810190356401000000008111156101a557600080fd5b8201836020820111156101b757600080fd5b803590602001918460018302840111640100000000831117156101d957600080fd5b509092509050610363565b84600081905033600160a060020a031681600160a060020a031663075461726040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561023057600080fd5b505afa158015610244573d6000803e3d6000fd5b505050506040513d602081101561025a57600080fd5b5051600160a060020a0316146102bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806104e46022913960400191505060405180910390fd5b33600160a060020a031687600160a060020a03167ee7283fcf5726344ed567dc39b1822ff824bc90f96c137b622781d3570b81ef888888886040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a350505050505050565b84600081905033600160a060020a031681600160a060020a031663075461726040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156103af57600080fd5b505afa1580156103c3573d6000803e3d6000fd5b505050506040513d60208110156103d957600080fd5b5051600160a060020a03161461043a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806104e46022913960400191505060405180910390fd5b33600160a060020a031687600160a060020a03167fb8c028de5d50845d8e50bbc36728f4e9d523e16a1a431a299e8b216c7b2f5584888888886040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a35050505050505056fe4d657461646174613a20496e76616c69642044617461546f6b656e204d696e746572a165627a7a7230582006e22d0ae25bfc383832a887d6fa3d8cc7ffba238078693831acbbe2cce0d7850029", + "sourceMap": "520:1715:12:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;520:1715:12;;;;;;;", + "deployedSourceMap": "520:1715:12:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;520:1715:12;;;;;;-1:-1:-1;;;520:1715:12;;;;;;;;;;;;;;;;;1351:300;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;1351:300:12;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;1351:300:12;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1351:300:12;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1351:300:12;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;1351:300:12;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1351:300:12;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;1351:300:12;;-1:-1:-1;1351:300:12;-1:-1:-1;1351:300:12;:::i;:::-;;1933;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;1933:300:12;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;1933:300:12;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1933:300:12;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1933:300:12;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;1933:300:12;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1933:300:12;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;1933:300:12;;-1:-1:-1;1933:300:12;-1:-1:-1;1933:300:12;:::i;1351:::-;1505:9;896:20;934:9;896:48;;993:10;-1:-1:-1;;;;;975:28:12;:5;-1:-1:-1;;;;;975:12:12;;:14;;;;;-1:-1:-1;;;975:14:12;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;975:14:12;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;975:14:12;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;975:14:12;-1:-1:-1;;;;;975:28:12;;954:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1587:10;-1:-1:-1;;;;;1535:109:12;1564:9;-1:-1:-1;;;;;1535:109:12;;1611:5;;1630:4;;1535:109;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;137:4;117:14;-1:-1;;113:30;157:16;;;1535:109:12;;;;;;;;;;;-1:-1:-1;1535:109:12;;;;;1:33:-1;99:1;81:16;;;74:27;1535:109:12;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1535:109:12;;;;-1:-1:-1;1535:109:12;;-1:-1:-1;;;;;;;1535:109:12;1351:300;;;;;;;:::o;1933:::-;2087:9;896:20;934:9;896:48;;993:10;-1:-1:-1;;;;;975:28:12;:5;-1:-1:-1;;;;;975:12:12;;:14;;;;;-1:-1:-1;;;975:14:12;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;975:14:12;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;975:14:12;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;975:14:12;-1:-1:-1;;;;;975:28:12;;954:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2169:10;-1:-1:-1;;;;;2117:109:12;2146:9;-1:-1:-1;;;;;2117:109:12;;2193:5;;2212:4;;2117:109;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;137:4;117:14;-1:-1;;113:30;157:16;;;2117:109:12;;;;;;;;;;;-1:-1:-1;2117:109:12;;;;;1:33:-1;99:1;81:16;;;74:27;2117:109:12;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;2117:109:12;;;;-1:-1:-1;2117:109:12;;-1:-1:-1;;;;;;;2117:109:12;1933:300;;;;;;;:::o", + "source": "pragma solidity 0.5.7;\n// Copyright BigchainDB GmbH and Ocean Protocol contributors\n// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)\n// Code is Apache-2.0 and docs are CC-BY-4.0\n\nimport '../interfaces/IERC20Template.sol';\n\n\n/**\n* @title Metadata\n* \n* @dev Metadata stands for Decentralized Document. It allows publishers\n* to publish their dataset metadata in decentralized way.\n* It follows the Ocean DID Document standard: \n* https://github.com/oceanprotocol/OEPs/blob/master/7/v0.2/README.md\n*/\ncontract Metadata {\n\n event MetadataCreated(\n address indexed dataToken,\n address indexed createdBy,\n bytes flags,\n bytes data\n );\n event MetadataUpdated(\n address indexed dataToken,\n address indexed updatedBy,\n bytes flags,\n bytes data\n );\n\n modifier onlyDataTokenMinter(address dataToken)\n {\n IERC20Template token = IERC20Template(dataToken);\n require(\n token.minter() == msg.sender,\n 'Metadata: Invalid DataToken Minter'\n );\n _;\n }\n\n /**\n * @dev create\n * creates/publishes new metadata/DDO document on-chain. \n * @param dataToken refers to data token address\n * @param flags special flags associated with metadata\n * @param data referes to the actual metadata\n */\n function create(\n address dataToken,\n bytes calldata flags,\n bytes calldata data\n ) \n external\n onlyDataTokenMinter(dataToken)\n {\n emit MetadataCreated(\n dataToken,\n msg.sender,\n flags,\n data\n );\n }\n\n /**\n * @dev update\n * allows only datatoken minter(s) to update the DDO/metadata content\n * @param dataToken refers to data token address\n * @param flags special flags associated with metadata\n * @param data referes to the actual metadata\n */\n function update(\n address dataToken,\n bytes calldata flags,\n bytes calldata data\n ) \n external\n onlyDataTokenMinter(dataToken)\n {\n emit MetadataUpdated(\n dataToken,\n msg.sender,\n flags,\n data\n );\n }\n}", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/metadata/Metadata.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/metadata/Metadata.sol", + "exportedSymbols": { + "Metadata": [ + 5746 + ] + }, + "id": 5747, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5660, + "literals": [ + "solidity", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "0:22:12" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "../interfaces/IERC20Template.sol", + "id": 5661, + "nodeType": "ImportDirective", + "scope": 5747, + "sourceUnit": 5659, + "src": "185:42:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Metadata\n \n@dev Metadata stands for Decentralized Document. It allows publishers\n to publish their dataset metadata in decentralized way.\n It follows the Ocean DID Document standard: \n https://github.com/oceanprotocol/OEPs/blob/master/7/v0.2/README.md", + "fullyImplemented": true, + "id": 5746, + "linearizedBaseContracts": [ + 5746 + ], + "name": "Metadata", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": null, + "id": 5671, + "name": "MetadataCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 5670, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5663, + "indexed": true, + "name": "dataToken", + "nodeType": "VariableDeclaration", + "scope": 5671, + "src": "576:25:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5662, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "576:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5665, + "indexed": true, + "name": "createdBy", + "nodeType": "VariableDeclaration", + "scope": 5671, + "src": "611:25:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5664, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "611:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5667, + "indexed": false, + "name": "flags", + "nodeType": "VariableDeclaration", + "scope": 5671, + "src": "646:11:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5666, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "646:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5669, + "indexed": false, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 5671, + "src": "667:10:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5668, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "667:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "566:117:12" + }, + "src": "545:139:12" + }, + { + "anonymous": false, + "documentation": null, + "id": 5681, + "name": "MetadataUpdated", + "nodeType": "EventDefinition", + "parameters": { + "id": 5680, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5673, + "indexed": true, + "name": "dataToken", + "nodeType": "VariableDeclaration", + "scope": 5681, + "src": "720:25:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5672, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "720:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5675, + "indexed": true, + "name": "updatedBy", + "nodeType": "VariableDeclaration", + "scope": 5681, + "src": "755:25:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5674, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "755:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5677, + "indexed": false, + "name": "flags", + "nodeType": "VariableDeclaration", + "scope": 5681, + "src": "790:11:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5676, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "790:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5679, + "indexed": false, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 5681, + "src": "811:10:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5678, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "811:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "710:117:12" + }, + "src": "689:139:12" + }, + { + "body": { + "id": 5702, + "nodeType": "Block", + "src": "886:195:12", + "statements": [ + { + "assignments": [ + 5686 + ], + "declarations": [ + { + "constant": false, + "id": 5686, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 5702, + "src": "896:20:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + }, + "typeName": { + "contractScope": null, + "id": 5685, + "name": "IERC20Template", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5658, + "src": "896:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5690, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5688, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5683, + "src": "934:9:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5687, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "919:14:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 5689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "919:25:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "896:48:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 5692, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5686, + "src": "975:5:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 5693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "minter", + "nodeType": "MemberAccess", + "referencedDeclaration": 5581, + "src": "975:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 5694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "975:14:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5695, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "993:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "993:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "975:28:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d657461646174613a20496e76616c69642044617461546f6b656e204d696e746572", + "id": 5698, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1017:36:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9ba73451bed8dd0d71b5cacc7e6cef9558d0637ee599c20ff1ce4f81329b3c5f", + "typeString": "literal_string \"Metadata: Invalid DataToken Minter\"" + }, + "value": "Metadata: Invalid DataToken Minter" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9ba73451bed8dd0d71b5cacc7e6cef9558d0637ee599c20ff1ce4f81329b3c5f", + "typeString": "literal_string \"Metadata: Invalid DataToken Minter\"" + } + ], + "id": 5691, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "954:7:12", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "954:109:12", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5700, + "nodeType": "ExpressionStatement", + "src": "954:109:12" + }, + { + "id": 5701, + "nodeType": "PlaceholderStatement", + "src": "1073:1:12" + } + ] + }, + "documentation": null, + "id": 5703, + "name": "onlyDataTokenMinter", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5684, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5683, + "name": "dataToken", + "nodeType": "VariableDeclaration", + "scope": 5703, + "src": "863:17:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5682, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "863:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "862:19:12" + }, + "src": "834:247:12", + "visibility": "internal" + }, + { + "body": { + "id": 5723, + "nodeType": "Block", + "src": "1520:131:12", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5716, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5705, + "src": "1564:9:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5717, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "1587:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1587:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 5719, + "name": "flags", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5707, + "src": "1611:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "argumentTypes": null, + "id": 5720, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5709, + "src": "1630:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "id": 5715, + "name": "MetadataCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5671, + "src": "1535:15:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,bytes memory,bytes memory)" + } + }, + "id": 5721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1535:109:12", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5722, + "nodeType": "EmitStatement", + "src": "1530:114:12" + } + ] + }, + "documentation": "@dev create\n creates/publishes new metadata/DDO document on-chain. \n@param dataToken refers to data token address\n@param flags special flags associated with metadata\n@param data referes to the actual metadata", + "id": 5724, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 5712, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5705, + "src": "1505:9:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 5713, + "modifierName": { + "argumentTypes": null, + "id": 5711, + "name": "onlyDataTokenMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5703, + "src": "1485:19:12", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1485:30:12" + } + ], + "name": "create", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5710, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5705, + "name": "dataToken", + "nodeType": "VariableDeclaration", + "scope": 5724, + "src": "1376:17:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5704, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1376:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5707, + "name": "flags", + "nodeType": "VariableDeclaration", + "scope": 5724, + "src": "1403:20:12", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5706, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1403:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5709, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 5724, + "src": "1433:19:12", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5708, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1433:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1366:92:12" + }, + "returnParameters": { + "id": 5714, + "nodeType": "ParameterList", + "parameters": [], + "src": "1520:0:12" + }, + "scope": 5746, + "src": "1351:300:12", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 5744, + "nodeType": "Block", + "src": "2102:131:12", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5737, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5726, + "src": "2146:9:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5738, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "2169:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2169:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 5740, + "name": "flags", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5728, + "src": "2193:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "argumentTypes": null, + "id": 5741, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5730, + "src": "2212:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "id": 5736, + "name": "MetadataUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5681, + "src": "2117:15:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,bytes memory,bytes memory)" + } + }, + "id": 5742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2117:109:12", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5743, + "nodeType": "EmitStatement", + "src": "2112:114:12" + } + ] + }, + "documentation": "@dev update\n allows only datatoken minter(s) to update the DDO/metadata content\n@param dataToken refers to data token address\n@param flags special flags associated with metadata\n@param data referes to the actual metadata", + "id": 5745, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 5733, + "name": "dataToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5726, + "src": "2087:9:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 5734, + "modifierName": { + "argumentTypes": null, + "id": 5732, + "name": "onlyDataTokenMinter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5703, + "src": "2067:19:12", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2067:30:12" + } + ], + "name": "update", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5731, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5726, + "name": "dataToken", + "nodeType": "VariableDeclaration", + "scope": 5745, + "src": "1958:17:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5725, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1958:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5728, + "name": "flags", + "nodeType": "VariableDeclaration", + "scope": 5745, + "src": "1985:20:12", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5727, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1985:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5730, + "name": "data", + "nodeType": "VariableDeclaration", + "scope": 5745, + "src": "2015:19:12", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5729, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2015:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1948:92:12" + }, + "returnParameters": { + "id": 5735, + "nodeType": "ParameterList", + "parameters": [], + "src": "2102:0:12" + }, + "scope": 5746, + "src": "1933:300:12", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 5747, + "src": "520:1715:12" + } + ], + "src": "0:2235:12" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/metadata/Metadata.sol", + "exportedSymbols": { + "Metadata": [ + 5746 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "0.5", + ".7" + ] + }, + "id": 5660, + "name": "PragmaDirective", + "src": "0:22:12" + }, + { + "attributes": { + "SourceUnit": 5659, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "../interfaces/IERC20Template.sol", + "scope": 5747, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 5661, + "name": "ImportDirective", + "src": "185:42:12" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": "@title Metadata\n \n@dev Metadata stands for Decentralized Document. It allows publishers\n to publish their dataset metadata in decentralized way.\n It follows the Ocean DID Document standard: \n https://github.com/oceanprotocol/OEPs/blob/master/7/v0.2/README.md", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 5746 + ], + "name": "Metadata", + "scope": 5747 + }, + "children": [ + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "MetadataCreated" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "dataToken", + "scope": 5671, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5662, + "name": "ElementaryTypeName", + "src": "576:7:12" + } + ], + "id": 5663, + "name": "VariableDeclaration", + "src": "576:25:12" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "createdBy", + "scope": 5671, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5664, + "name": "ElementaryTypeName", + "src": "611:7:12" + } + ], + "id": 5665, + "name": "VariableDeclaration", + "src": "611:25:12" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "flags", + "scope": 5671, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 5666, + "name": "ElementaryTypeName", + "src": "646:5:12" + } + ], + "id": 5667, + "name": "VariableDeclaration", + "src": "646:11:12" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "data", + "scope": 5671, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 5668, + "name": "ElementaryTypeName", + "src": "667:5:12" + } + ], + "id": 5669, + "name": "VariableDeclaration", + "src": "667:10:12" + } + ], + "id": 5670, + "name": "ParameterList", + "src": "566:117:12" + } + ], + "id": 5671, + "name": "EventDefinition", + "src": "545:139:12" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "MetadataUpdated" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "dataToken", + "scope": 5681, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5672, + "name": "ElementaryTypeName", + "src": "720:7:12" + } + ], + "id": 5673, + "name": "VariableDeclaration", + "src": "720:25:12" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "updatedBy", + "scope": 5681, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5674, + "name": "ElementaryTypeName", + "src": "755:7:12" + } + ], + "id": 5675, + "name": "VariableDeclaration", + "src": "755:25:12" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "flags", + "scope": 5681, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 5676, + "name": "ElementaryTypeName", + "src": "790:5:12" + } + ], + "id": 5677, + "name": "VariableDeclaration", + "src": "790:11:12" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "data", + "scope": 5681, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 5678, + "name": "ElementaryTypeName", + "src": "811:5:12" + } + ], + "id": 5679, + "name": "VariableDeclaration", + "src": "811:10:12" + } + ], + "id": 5680, + "name": "ParameterList", + "src": "710:117:12" + } + ], + "id": 5681, + "name": "EventDefinition", + "src": "689:139:12" + }, + { + "attributes": { + "documentation": null, + "name": "onlyDataTokenMinter", + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dataToken", + "scope": 5703, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5682, + "name": "ElementaryTypeName", + "src": "863:7:12" + } + ], + "id": 5683, + "name": "VariableDeclaration", + "src": "863:17:12" + } + ], + "id": 5684, + "name": "ParameterList", + "src": "862:19:12" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 5686 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "token", + "scope": 5702, + "stateVariable": false, + "storageLocation": "default", + "type": "contract IERC20Template", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "IERC20Template", + "referencedDeclaration": 5658, + "type": "contract IERC20Template" + }, + "id": 5685, + "name": "UserDefinedTypeName", + "src": "896:14:12" + } + ], + "id": 5686, + "name": "VariableDeclaration", + "src": "896:20:12" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 5687, + "name": "Identifier", + "src": "919:14:12" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5683, + "type": "address", + "value": "dataToken" + }, + "id": 5688, + "name": "Identifier", + "src": "934:9:12" + } + ], + "id": 5689, + "name": "FunctionCall", + "src": "919:25:12" + } + ], + "id": 5690, + "name": "VariableDeclarationStatement", + "src": "896:48:12" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9ba73451bed8dd0d71b5cacc7e6cef9558d0637ee599c20ff1ce4f81329b3c5f", + "typeString": "literal_string \"Metadata: Invalid DataToken Minter\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 5691, + "name": "Identifier", + "src": "954:7:12" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "minter", + "referencedDeclaration": 5581, + "type": "function () view external returns (address)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5686, + "type": "contract IERC20Template", + "value": "token" + }, + "id": 5692, + "name": "Identifier", + "src": "975:5:12" + } + ], + "id": 5693, + "name": "MemberAccess", + "src": "975:12:12" + } + ], + "id": 5694, + "name": "FunctionCall", + "src": "975:14:12" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5695, + "name": "Identifier", + "src": "993:3:12" + } + ], + "id": 5696, + "name": "MemberAccess", + "src": "993:10:12" + } + ], + "id": 5697, + "name": "BinaryOperation", + "src": "975:28:12" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4d657461646174613a20496e76616c69642044617461546f6b656e204d696e746572", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Metadata: Invalid DataToken Minter\"", + "value": "Metadata: Invalid DataToken Minter" + }, + "id": 5698, + "name": "Literal", + "src": "1017:36:12" + } + ], + "id": 5699, + "name": "FunctionCall", + "src": "954:109:12" + } + ], + "id": 5700, + "name": "ExpressionStatement", + "src": "954:109:12" + }, + { + "id": 5701, + "name": "PlaceholderStatement", + "src": "1073:1:12" + } + ], + "id": 5702, + "name": "Block", + "src": "886:195:12" + } + ], + "id": 5703, + "name": "ModifierDefinition", + "src": "834:247:12" + }, + { + "attributes": { + "documentation": "@dev create\n creates/publishes new metadata/DDO document on-chain. \n@param dataToken refers to data token address\n@param flags special flags associated with metadata\n@param data referes to the actual metadata", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "create", + "scope": 5746, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dataToken", + "scope": 5724, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5704, + "name": "ElementaryTypeName", + "src": "1376:7:12" + } + ], + "id": 5705, + "name": "VariableDeclaration", + "src": "1376:17:12" + }, + { + "attributes": { + "constant": false, + "name": "flags", + "scope": 5724, + "stateVariable": false, + "storageLocation": "calldata", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 5706, + "name": "ElementaryTypeName", + "src": "1403:5:12" + } + ], + "id": 5707, + "name": "VariableDeclaration", + "src": "1403:20:12" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 5724, + "stateVariable": false, + "storageLocation": "calldata", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 5708, + "name": "ElementaryTypeName", + "src": "1433:5:12" + } + ], + "id": 5709, + "name": "VariableDeclaration", + "src": "1433:19:12" + } + ], + "id": 5710, + "name": "ParameterList", + "src": "1366:92:12" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5714, + "name": "ParameterList", + "src": "1520:0:12" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5703, + "type": "modifier (address)", + "value": "onlyDataTokenMinter" + }, + "id": 5711, + "name": "Identifier", + "src": "1485:19:12" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5705, + "type": "address", + "value": "dataToken" + }, + "id": 5712, + "name": "Identifier", + "src": "1505:9:12" + } + ], + "id": 5713, + "name": "ModifierInvocation", + "src": "1485:30:12" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5671, + "type": "function (address,address,bytes memory,bytes memory)", + "value": "MetadataCreated" + }, + "id": 5715, + "name": "Identifier", + "src": "1535:15:12" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5705, + "type": "address", + "value": "dataToken" + }, + "id": 5716, + "name": "Identifier", + "src": "1564:9:12" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5717, + "name": "Identifier", + "src": "1587:3:12" + } + ], + "id": 5718, + "name": "MemberAccess", + "src": "1587:10:12" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5707, + "type": "bytes calldata", + "value": "flags" + }, + "id": 5719, + "name": "Identifier", + "src": "1611:5:12" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5709, + "type": "bytes calldata", + "value": "data" + }, + "id": 5720, + "name": "Identifier", + "src": "1630:4:12" + } + ], + "id": 5721, + "name": "FunctionCall", + "src": "1535:109:12" + } + ], + "id": 5722, + "name": "EmitStatement", + "src": "1530:114:12" + } + ], + "id": 5723, + "name": "Block", + "src": "1520:131:12" + } + ], + "id": 5724, + "name": "FunctionDefinition", + "src": "1351:300:12" + }, + { + "attributes": { + "documentation": "@dev update\n allows only datatoken minter(s) to update the DDO/metadata content\n@param dataToken refers to data token address\n@param flags special flags associated with metadata\n@param data referes to the actual metadata", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "update", + "scope": 5746, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "dataToken", + "scope": 5745, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 5725, + "name": "ElementaryTypeName", + "src": "1958:7:12" + } + ], + "id": 5726, + "name": "VariableDeclaration", + "src": "1958:17:12" + }, + { + "attributes": { + "constant": false, + "name": "flags", + "scope": 5745, + "stateVariable": false, + "storageLocation": "calldata", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 5727, + "name": "ElementaryTypeName", + "src": "1985:5:12" + } + ], + "id": 5728, + "name": "VariableDeclaration", + "src": "1985:20:12" + }, + { + "attributes": { + "constant": false, + "name": "data", + "scope": 5745, + "stateVariable": false, + "storageLocation": "calldata", + "type": "bytes", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes" + }, + "id": 5729, + "name": "ElementaryTypeName", + "src": "2015:5:12" + } + ], + "id": 5730, + "name": "VariableDeclaration", + "src": "2015:19:12" + } + ], + "id": 5731, + "name": "ParameterList", + "src": "1948:92:12" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 5735, + "name": "ParameterList", + "src": "2102:0:12" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5703, + "type": "modifier (address)", + "value": "onlyDataTokenMinter" + }, + "id": 5732, + "name": "Identifier", + "src": "2067:19:12" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5726, + "type": "address", + "value": "dataToken" + }, + "id": 5733, + "name": "Identifier", + "src": "2087:9:12" + } + ], + "id": 5734, + "name": "ModifierInvocation", + "src": "2067:30:12" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5681, + "type": "function (address,address,bytes memory,bytes memory)", + "value": "MetadataUpdated" + }, + "id": 5736, + "name": "Identifier", + "src": "2117:15:12" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5726, + "type": "address", + "value": "dataToken" + }, + "id": 5737, + "name": "Identifier", + "src": "2146:9:12" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 5738, + "name": "Identifier", + "src": "2169:3:12" + } + ], + "id": 5739, + "name": "MemberAccess", + "src": "2169:10:12" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5728, + "type": "bytes calldata", + "value": "flags" + }, + "id": 5740, + "name": "Identifier", + "src": "2193:5:12" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5730, + "type": "bytes calldata", + "value": "data" + }, + "id": 5741, + "name": "Identifier", + "src": "2212:4:12" + } + ], + "id": 5742, + "name": "FunctionCall", + "src": "2117:109:12" + } + ], + "id": 5743, + "name": "EmitStatement", + "src": "2112:114:12" + } + ], + "id": 5744, + "name": "Block", + "src": "2102:131:12" + } + ], + "id": 5745, + "name": "FunctionDefinition", + "src": "1933:300:12" + } + ], + "id": 5746, + "name": "ContractDefinition", + "src": "520:1715:12" + } + ], + "id": 5747, + "name": "SourceUnit", + "src": "0:2235:12" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.843Z", + "devdoc": { + "details": "Metadata stands for Decentralized Document. It allows publishers to publish their dataset metadata in decentralized way. It follows the Ocean DID Document standard: https://github.com/oceanprotocol/OEPs/blob/master/7/v0.2/README.md", + "methods": { + "create(address,bytes,bytes)": { + "details": "create creates/publishes new metadata/DDO document on-chain. ", + "params": { + "data": "referes to the actual metadata", + "dataToken": "refers to data token address", + "flags": "special flags associated with metadata" + } + }, + "update(address,bytes,bytes)": { + "details": "update allows only datatoken minter(s) to update the DDO/metadata content", + "params": { + "data": "referes to the actual metadata", + "dataToken": "refers to data token address", + "flags": "special flags associated with metadata" + } + } + }, + "title": "Metadata " + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/Migrations.json b/artifacts/Migrations.json new file mode 100644 index 000000000..41d37191a --- /dev/null +++ b/artifacts/Migrations.json @@ -0,0 +1,963 @@ +{ + "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" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"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\"},{\"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\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/Migrations.sol\":{\"keccak256\":\"0x7c53ff5172c2899c6ac1d858354fa7422822decfd8637c784ab6826f462f01aa\",\"urls\":[\"bzzr://9fd0496ac18ac67c0f2ebdc9b73cadfff96fb0a36beef0b60d1fdd6848b8e8df\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a03191633179055610143806100326000396000f3fe608060405234801561001057600080fd5b506004361061005d577c01000000000000000000000000000000000000000000000000000000006000350463445df0ac81146100625780638da5cb5b1461007c578063fdacd576146100ad575b600080fd5b61006a6100cc565b60408051918252519081900360200190f35b6100846100d2565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100ca600480360360208110156100c357600080fd5b50356100ee565b005b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101145760018190555b5056fea165627a7a723058206675acb8def7ec2f4e99f120c9adb5fa1cf388462481099996d09dbad6f7100a0029", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061005d577c01000000000000000000000000000000000000000000000000000000006000350463445df0ac81146100625780638da5cb5b1461007c578063fdacd576146100ad575b600080fd5b61006a6100cc565b60408051918252519081900360200190f35b6100846100d2565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100ca600480360360208110156100c357600080fd5b50356100ee565b005b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314156101145760018190555b5056fea165627a7a723058206675acb8def7ec2f4e99f120c9adb5fa1cf388462481099996d09dbad6f7100a0029", + "sourceMap": "34:351:1:-;;;134:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;165:5:1;:18;;-1:-1:-1;;;;;;165:18:1;173:10;165:18;;;34:351;;;;;;", + "deployedSourceMap": "34:351:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;34:351:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;89:36;;;:::i;:::-;;;;;;;;;;;;;;;;63:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;274:109;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;274:109:1;;:::i;:::-;;89:36;;;;:::o;63:20::-;;;;;;:::o;274:109::-;249:5;;;;235:10;:19;231:26;;;340:24;:36;;;231:26;274:109;:::o", + "source": "pragma solidity >=0.4.21 <0.7.0;\n\ncontract Migrations {\n \n address public owner;\n uint public last_completed_migration;\n \n constructor() public {\n owner = msg.sender;\n }\n \n modifier restricted() { \n if (msg.sender == owner) _;\n }\n \n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/Migrations.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 195 + ] + }, + "id": 196, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 160, + "literals": [ + "solidity", + ">=", + "0.4", + ".21", + "<", + "0.7", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:32:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 195, + "linearizedBaseContracts": [ + 195 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 162, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "63:20:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "63:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 164, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "89:36:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 163, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "89:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 172, + "nodeType": "Block", + "src": "155:35:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 167, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 162, + "src": "165:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 168, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "173:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "173:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "165:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 171, + "nodeType": "ExpressionStatement", + "src": "165:18:1" + } + ] + }, + "documentation": null, + "id": 173, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 165, + "nodeType": "ParameterList", + "parameters": [], + "src": "145:2:1" + }, + "returnParameters": { + "id": 166, + "nodeType": "ParameterList", + "parameters": [], + "src": "155:0:1" + }, + "scope": 195, + "src": "134:56:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 181, + "nodeType": "Block", + "src": "220:44:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 175, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7121, + "src": "235:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "235:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 177, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 162, + "src": "249:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "235:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 180, + "nodeType": "IfStatement", + "src": "231:26:1", + "trueBody": { + "id": 179, + "nodeType": "PlaceholderStatement", + "src": "256:1:1" + } + } + ] + }, + "documentation": null, + "id": 182, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [], + "src": "217:2:1" + }, + "src": "198:66:1", + "visibility": "internal" + }, + { + "body": { + "id": 193, + "nodeType": "Block", + "src": "330:53:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 189, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 164, + "src": "340:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 190, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "367:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "340:36:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 192, + "nodeType": "ExpressionStatement", + "src": "340:36:1" + } + ] + }, + "documentation": null, + "id": 194, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 187, + "modifierName": { + "argumentTypes": null, + "id": 186, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 182, + "src": "319:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "319:10:1" + } + ], + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 184, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 194, + "src": "296:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 183, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "296:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "295:16:1" + }, + "returnParameters": { + "id": 188, + "nodeType": "ParameterList", + "parameters": [], + "src": "330:0:1" + }, + "scope": 195, + "src": "274:109:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 196, + "src": "34:351:1" + } + ], + "src": "0:386:1" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 195 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + ">=", + "0.4", + ".21", + "<", + "0.7", + ".0" + ] + }, + "id": 160, + "name": "PragmaDirective", + "src": "0:32:1" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 195 + ], + "name": "Migrations", + "scope": 196 + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "owner", + "scope": 195, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 161, + "name": "ElementaryTypeName", + "src": "63:7:1" + } + ], + "id": 162, + "name": "VariableDeclaration", + "src": "63:20:1" + }, + { + "attributes": { + "constant": false, + "name": "last_completed_migration", + "scope": 195, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 163, + "name": "ElementaryTypeName", + "src": "89:4:1" + } + ], + "id": 164, + "name": "VariableDeclaration", + "src": "89:36:1" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "modifiers": [ + null + ], + "name": "", + "scope": 195, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 165, + "name": "ParameterList", + "src": "145:2:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 166, + "name": "ParameterList", + "src": "155:0:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 162, + "type": "address", + "value": "owner" + }, + "id": 167, + "name": "Identifier", + "src": "165:5:1" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 168, + "name": "Identifier", + "src": "173:3:1" + } + ], + "id": 169, + "name": "MemberAccess", + "src": "173:10:1" + } + ], + "id": 170, + "name": "Assignment", + "src": "165:18:1" + } + ], + "id": 171, + "name": "ExpressionStatement", + "src": "165:18:1" + } + ], + "id": 172, + "name": "Block", + "src": "155:35:1" + } + ], + "id": 173, + "name": "FunctionDefinition", + "src": "134:56:1" + }, + { + "attributes": { + "documentation": null, + "name": "restricted", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 174, + "name": "ParameterList", + "src": "217:2:1" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7121, + "type": "msg", + "value": "msg" + }, + "id": 175, + "name": "Identifier", + "src": "235:3:1" + } + ], + "id": 176, + "name": "MemberAccess", + "src": "235:10:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 162, + "type": "address", + "value": "owner" + }, + "id": 177, + "name": "Identifier", + "src": "249:5:1" + } + ], + "id": 178, + "name": "BinaryOperation", + "src": "235:19:1" + }, + { + "id": 179, + "name": "PlaceholderStatement", + "src": "256:1:1" + } + ], + "id": 180, + "name": "IfStatement", + "src": "231:26:1" + } + ], + "id": 181, + "name": "Block", + "src": "220:44:1" + } + ], + "id": 182, + "name": "ModifierDefinition", + "src": "198:66:1" + }, + { + "attributes": { + "documentation": null, + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "setCompleted", + "scope": 195, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "completed", + "scope": 194, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 183, + "name": "ElementaryTypeName", + "src": "296:4:1" + } + ], + "id": 184, + "name": "VariableDeclaration", + "src": "296:14:1" + } + ], + "id": 185, + "name": "ParameterList", + "src": "295:16:1" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 188, + "name": "ParameterList", + "src": "330:0:1" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 182, + "type": "modifier ()", + "value": "restricted" + }, + "id": 186, + "name": "Identifier", + "src": "319:10:1" + } + ], + "id": 187, + "name": "ModifierInvocation", + "src": "319:10:1" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 164, + "type": "uint256", + "value": "last_completed_migration" + }, + "id": 189, + "name": "Identifier", + "src": "340:24:1" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 184, + "type": "uint256", + "value": "completed" + }, + "id": 190, + "name": "Identifier", + "src": "367:9:1" + } + ], + "id": 191, + "name": "Assignment", + "src": "340:36:1" + } + ], + "id": 192, + "name": "ExpressionStatement", + "src": "340:36:1" + } + ], + "id": 193, + "name": "Block", + "src": "330:53:1" + } + ], + "id": 194, + "name": "FunctionDefinition", + "src": "274:109:1" + } + ], + "id": 195, + "name": "ContractDefinition", + "src": "34:351:1" + } + ], + "id": 196, + "name": "SourceUnit", + "src": "0:386:1" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.757Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/OPFCommunityFeeCollector.json b/artifacts/OPFCommunityFeeCollector.json new file mode 100644 index 000000000..d684cbd37 --- /dev/null +++ b/artifacts/OPFCommunityFeeCollector.json @@ -0,0 +1,3496 @@ +{ + "contractName": "OPFCommunityFeeCollector", + "abi": [ + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "newCollector", + "type": "address" + }, + { + "name": "OPFOwnerAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": false, + "inputs": [], + "name": "withdrawETH", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "tokenAddress", + "type": "address" + } + ], + "name": "withdrawToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newCollector", + "type": "address" + } + ], + "name": "changeCollector", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newCollector\",\"type\":\"address\"}],\"name\":\"changeCollector\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawETH\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"newCollector\",\"type\":\"address\"},{\"name\":\"OPFOwnerAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}],\"devdoc\":{\"details\":\"Ocean Protocol Foundation Community Fee Collector contract allows consumers to pay very small fee as part of the exchange of data tokens with ocean token in order to support the community of ocean protocol and provide a sustainble development.\",\"methods\":{\"changeCollector(address)\":{\"details\":\"changeCollector change the current collector address. Only owner can do that.\",\"params\":{\"newCollector\":\"the new collector address \"}},\"constructor\":{\"details\":\"constructor Called prior contract deployment. set the controller address and the contract owner address\",\"params\":{\"OPFOwnerAddress\":\"the contract owner address\",\"newCollector\":\"the fee collector address.\"}},\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"withdrawETH()\":{\"details\":\"withdrawETH transfers all the accumlated ether the collector address\"},\"withdrawToken(address)\":{\"details\":\"withdrawToken transfers all the accumlated tokens the collector address\",\"params\":{\"tokenAddress\":\"the token contract address \"}}},\"title\":\"OPFCommunityFeeCollector\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/communityFee/OPFCommunityFeeCollector.sol\":\"OPFCommunityFeeCollector\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/communityFee/OPFCommunityFeeCollector.sol\":{\"keccak256\":\"0xe535cf1fa8e294c3c258f416672bb0500be90b4ba120db19498155dcc8d328be\",\"urls\":[\"bzzr://1861e37ad3bd204ad5bfe974e6b1950dba47a3fb2d9dd20c7af26c456940c00f\"]},\"/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol\":{\"keccak256\":\"0x022ebed2ba4949e96a05cc394cf690d8fd3190a4733cebe8cbe930ac25cfde18\",\"urls\":[\"bzzr://2fa3d5cae14f0af7d78f6e1d13bc41854082c03ab2f86462ebb09afda88ee6e9\"]},\"openzeppelin-solidity/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzzr://51482c01bddf23793bddee43b60ab9578a62948a4f2082def24ea792a553b055\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0x6fb9d7889769d7cc161225f9ef7a90e468ba9788b253816f8d8b6894d3472c24\",\"urls\":[\"bzzr://ab46c9368bc3abdded5eb85858304518c8a0291060ab42087075d759dbf3925f\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051604080610a838339810180604052604081101561003057600080fd5b508051602090910151600061004c64010000000061012d810204565b60008054600160a060020a031916600160a060020a038316908117825560405192935091600080516020610a63833981519152908290a350600160a060020a038216158015906100a45750600160a060020a03811615155b6100f9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526047815260200180610a1c6047913960600191505060405180910390fd5b60018054600160a060020a031916600160a060020a03841617905561012681640100000000610131810204565b5050610297565b3390565b6101426401000000006101c2810204565b6101ad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6101bf816401000000006101ef810204565b50565b60008054600160a060020a03166101e064010000000061012d810204565b600160a060020a031614905090565b600160a060020a03811661024e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806109f66026913960400191505060405180910390fd5b60008054604051600160a060020a0380851693921691600080516020610a6383398151915291a360008054600160a060020a031916600160a060020a0392909216919091179055565b610750806102a66000396000f3fe60806040526004361061008d576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b1161006b5780638da5cb5b1461010a5780638f32d59b1461013b578063e086e5ec14610164578063f2fde38b1461016c5761008d565b8063715018a61461008f5780637781127e146100a457806389476069146100d7575b005b34801561009b57600080fd5b5061008d61019f565b3480156100b057600080fd5b5061008d600480360360208110156100c757600080fd5b5035600160a060020a0316610252565b3480156100e357600080fd5b5061008d600480360360208110156100fa57600080fd5b5035600160a060020a0316610325565b34801561011657600080fd5b5061011f6104da565b60408051600160a060020a039092168252519081900360200190f35b34801561014757600080fd5b506101506104e9565b604080519115158252519081900360200190f35b61008d61050d565b34801561017857600080fd5b5061008d6004803603602081101561018f57600080fd5b5035600160a060020a0316610547565b6101a76104e9565b6101fb576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b61025a6104e9565b6102ae576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600160a060020a0381166102f65760405160e560020a62461bcd0281526004018080602001828103825260338152602001806106f26033913960400191505060405180910390fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a03811661036d5760405160e560020a62461bcd0281526004018080602001828103825260388152602001806106876038913960400191505060405180910390fd5b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038085169363a9059cbb9391169184916370a08231916024808301926020929190829003018186803b1580156103db57600080fd5b505afa1580156103ef573d6000803e3d6000fd5b505050506040513d602081101561040557600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561046d57600080fd5b505af1158015610481573d6000803e3d6000fd5b505050506040513d602081101561049757600080fd5b50516104d75760405160e560020a62461bcd0281526004018080602001828103825260338152602001806106bf6033913960400191505060405180910390fd5b50565b600054600160a060020a031690565b60008054600160a060020a03166104fe6105ac565b600160a060020a031614905090565b600154604051600160a060020a0390911690303180156108fc02916000818181858888f193505050501580156104d7573d6000803e3d6000fd5b61054f6104e9565b6105a3576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6104d7816105b0565b3390565b600160a060020a0381166105f85760405160e560020a62461bcd0281526004018080602001828103825260268152602001806106616026913960400191505060405180910390fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f5046436f6d6d756e697479466565436f6c6c6563746f723a20696e76616c696420746f6b656e20636f6e747261637420616464726573734f5046436f6d6d756e697479466565436f6c6c6563746f723a206661696c656420746f20776974686472617720746f6b656e734f5046436f6d6d756e697479466565436f6c6c6563746f723a20696e76616c696420636f6c6c6563746f722061646472657373a165627a7a723058205b7cb673b8ea9b9ede556497662b714755b4f5bf8c34f0f9426967eb19fae68700294f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f5046436f6d6d756e697479466565436f6c6c6563746f723a20636f6c6c6563746f722061646472657373206f72206f776e657220697320696e76616c696420616464726573738be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "deployedBytecode": "0x60806040526004361061008d576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b1161006b5780638da5cb5b1461010a5780638f32d59b1461013b578063e086e5ec14610164578063f2fde38b1461016c5761008d565b8063715018a61461008f5780637781127e146100a457806389476069146100d7575b005b34801561009b57600080fd5b5061008d61019f565b3480156100b057600080fd5b5061008d600480360360208110156100c757600080fd5b5035600160a060020a0316610252565b3480156100e357600080fd5b5061008d600480360360208110156100fa57600080fd5b5035600160a060020a0316610325565b34801561011657600080fd5b5061011f6104da565b60408051600160a060020a039092168252519081900360200190f35b34801561014757600080fd5b506101506104e9565b604080519115158252519081900360200190f35b61008d61050d565b34801561017857600080fd5b5061008d6004803603602081101561018f57600080fd5b5035600160a060020a0316610547565b6101a76104e9565b6101fb576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b61025a6104e9565b6102ae576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600160a060020a0381166102f65760405160e560020a62461bcd0281526004018080602001828103825260338152602001806106f26033913960400191505060405180910390fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a03811661036d5760405160e560020a62461bcd0281526004018080602001828103825260388152602001806106876038913960400191505060405180910390fd5b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038085169363a9059cbb9391169184916370a08231916024808301926020929190829003018186803b1580156103db57600080fd5b505afa1580156103ef573d6000803e3d6000fd5b505050506040513d602081101561040557600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561046d57600080fd5b505af1158015610481573d6000803e3d6000fd5b505050506040513d602081101561049757600080fd5b50516104d75760405160e560020a62461bcd0281526004018080602001828103825260338152602001806106bf6033913960400191505060405180910390fd5b50565b600054600160a060020a031690565b60008054600160a060020a03166104fe6105ac565b600160a060020a031614905090565b600154604051600160a060020a0390911690303180156108fc02916000818181858888f193505050501580156104d7573d6000803e3d6000fd5b61054f6104e9565b6105a3576040805160e560020a62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6104d7816105b0565b3390565b600160a060020a0381166105f85760405160e560020a62461bcd0281526004018080602001828103825260268152602001806106616026913960400191505060405180910390fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f5046436f6d6d756e697479466565436f6c6c6563746f723a20696e76616c696420746f6b656e20636f6e747261637420616464726573734f5046436f6d6d756e697479466565436f6c6c6563746f723a206661696c656420746f20776974686472617720746f6b656e734f5046436f6d6d756e697479466565436f6c6c6563746f723a20696e76616c696420636f6c6c6563746f722061646472657373a165627a7a723058205b7cb673b8ea9b9ede556497662b714755b4f5bf8c34f0f9426967eb19fae6870029", + "sourceMap": "616:2308:8:-;;;973:411;8:9:-1;5:2;;;30:1;27;20:12;5:2;973:411:8;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;973:411:8;;;;;;;698:17:17;718:12;:10;;;;:12;:::i;:::-;740:6;:18;;-1:-1:-1;;;;;;740:18:17;-1:-1:-1;;;;;740:18:17;;;;;;;773:43;;740:18;;-1:-1:-1;740:18:17;-1:-1:-1;;;;;;;;;;;773:43:17;740:6;;773:43;-1:-1:-1;;;;;;1131:26:8;;;;;;:70;;-1:-1:-1;;;;;;1172:29:8;;;;1131:70;1110:189;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1309:9;:24;;-1:-1:-1;;;;;;1309:24:8;-1:-1:-1;;;;;1309:24:8;;;;;1343:34;1361:15;1343:17;;;;:34;:::i;:::-;973:411;;616:2308;;788:96:15;867:10;788:96;:::o;1970:107:17:-;1103:9;:7;;;;:9;:::i;:::-;1095:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2042:28;2061:8;2042:18;;;;:28;:::i;:::-;1970:107;:::o;1250:92::-;1290:4;1329:6;;-1:-1:-1;;;;;1329:6:17;1313:12;:10;;;;:12;:::i;:::-;-1:-1:-1;;;;;1313:22:17;;1306:29;;1250:92;:::o;2178:225::-;-1:-1:-1;;;;;2251:22:17;;2243:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2352:6;;;2331:38;;-1:-1:-1;;;;;2331:38:17;;;;2352:6;;;-1:-1:-1;;;;;;;;;;;2331:38:17;;2379:6;:17;;-1:-1:-1;;;;;;2379:17:17;-1:-1:-1;;;;;2379:17:17;;;;;;;;;;2178:225::o;616:2308:8:-;;;;;;;", + "deployedSourceMap": "616:2308:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1684:137:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1684:137:17;;;:::i;2636:286:8:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2636:286:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2636:286:8;-1:-1:-1;;;;;2636:286:8;;:::i;1972:486::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1972:486:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1972:486:8;-1:-1:-1;;;;;1972:486:8;;:::i;899:77:17:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;899:77:17;;;:::i;:::-;;;;-1:-1:-1;;;;;899:77:17;;;;;;;;;;;;;;1250:92;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1250:92:17;;;:::i;:::-;;;;;;;;;;;;;;;;;;1679:120:8;;;:::i;1970:107:17:-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1970:107:17;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1970:107:17;-1:-1:-1;;;;;1970:107:17;;:::i;1684:137::-;1103:9;:7;:9::i;:::-;1095:54;;;;;-1:-1:-1;;;;;1095:54:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1782:1;1766:6;;1745:40;;-1:-1:-1;;;;;1766:6:17;;;;1745:40;;1782:1;;1745:40;1812:1;1795:19;;-1:-1:-1;;1795:19:17;;;1684:137::o;2636:286:8:-;1103:9:17;:7;:9::i;:::-;1095:54;;;;;-1:-1:-1;;;;;1095:54:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2778:26:8;;2757:124;;;;-1:-1:-1;;;;;2757:124:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2891:9;:24;;-1:-1:-1;;2891:24:8;-1:-1:-1;;;;;2891:24:8;;;;;;;;;;2636:286::o;1972:486::-;-1:-1:-1;;;;;2084:26:8;;2063:129;;;;-1:-1:-1;;;;;2063:129:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2280:9;;2307:53;;;;;;2354:4;2307:53;;;;;;-1:-1:-1;;;;;2225:37:8;;;;;;2280:9;;;2225:37;;2307:38;;:53;;;;;;;;;;;;;;2225:37;2307:53;;;5:2:-1;;;;30:1;27;20:12;5:2;2307:53:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2307:53:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2307:53:8;2225:149;;;;;;;;;;-1:-1:-1;;;;;2225:149:8;;;;;;;;;;;;;;;;;;;;2307:53;;2225:149;;;;;;;-1:-1:-1;2225:149:8;;;;5:2:-1;;;;30:1;27;20:12;5:2;2225:149:8;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2225:149:8;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2225:149:8;2203:248;;;;-1:-1:-1;;;;;2203:248:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1972:486;:::o;899:77:17:-;937:7;963:6;-1:-1:-1;;;;;963:6:17;899:77;:::o;1250:92::-;1290:4;1329:6;;-1:-1:-1;;;;;1329:6:17;1313:12;:10;:12::i;:::-;-1:-1:-1;;;;;1313:22:17;;1306:29;;1250:92;:::o;1679:120:8:-;1751:9;;:41;;-1:-1:-1;;;;;1751:9:8;;;;1778:4;1770:21;1751:41;;;;;:9;:41;:9;:41;1770:21;1751:9;:41;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;1970:107:17;1103:9;:7;:9::i;:::-;1095:54;;;;;-1:-1:-1;;;;;1095:54:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2042:28;2061:8;2042:18;:28::i;788:96:15:-;867:10;788:96;:::o;2178:225:17:-;-1:-1:-1;;;;;2251:22:17;;2243:73;;;;-1:-1:-1;;;;;2243:73:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2352:6;;;2331:38;;-1:-1:-1;;;;;2331:38:17;;;;2352:6;;;2331:38;;;2379:6;:17;;-1:-1:-1;;2379:17:17;-1:-1:-1;;;;;2379:17:17;;;;;;;;;;2178:225::o", + "source": "pragma solidity ^0.5.7;\n// Copyright BigchainDB GmbH and Ocean Protocol contributors\n// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)\n// Code is Apache-2.0 and docs are CC-BY-4.0\nimport '../interfaces/IERC20Template.sol';\nimport 'openzeppelin-solidity/contracts/ownership/Ownable.sol';\n\n\n/**\n * @title OPFCommunityFeeCollector\n * @dev Ocean Protocol Foundation Community Fee Collector contract\n * allows consumers to pay very small fee as part of the exchange of \n * data tokens with ocean token in order to support the community of \n * ocean protocol and provide a sustainble development.\n */\ncontract OPFCommunityFeeCollector is Ownable {\n address payable private collector;\n /**\n * @dev constructor\n * Called prior contract deployment. set the controller address and\n * the contract owner address\n * @param newCollector the fee collector address.\n * @param OPFOwnerAddress the contract owner address\n */\n constructor(\n address payable newCollector,\n address OPFOwnerAddress\n ) \n public\n Ownable()\n {\n require(\n newCollector != address(0)&&\n OPFOwnerAddress != address(0), \n 'OPFCommunityFeeCollector: collector address or owner is invalid address'\n );\n collector = newCollector;\n transferOwnership(OPFOwnerAddress);\n }\n /**\n * @dev fallback function\n * this is a default fallback function in which receives\n * the collected ether.\n */\n function() external payable {}\n\n /**\n * @dev withdrawETH\n * transfers all the accumlated ether the collector address\n */\n function withdrawETH() \n external \n payable\n {\n collector.transfer(address(this).balance);\n }\n\n /**\n * @dev withdrawToken\n * transfers all the accumlated tokens the collector address\n * @param tokenAddress the token contract address \n */\n function withdrawToken(\n address tokenAddress\n ) \n external\n {\n require(\n tokenAddress != address(0),\n 'OPFCommunityFeeCollector: invalid token contract address'\n );\n\n require (\n IERC20Template(tokenAddress).transfer(\n collector,\n IERC20Template(tokenAddress).balanceOf(address(this))\n ),\n 'OPFCommunityFeeCollector: failed to withdraw tokens'\n );\n }\n\n /**\n * @dev changeCollector\n * change the current collector address. Only owner can do that.\n * @param newCollector the new collector address \n */\n function changeCollector(\n address payable newCollector\n ) \n external \n onlyOwner \n {\n require(\n newCollector != address(0),\n 'OPFCommunityFeeCollector: invalid collector address'\n );\n collector = newCollector;\n }\n}\n", + "sourcePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/communityFee/OPFCommunityFeeCollector.sol", + "ast": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/communityFee/OPFCommunityFeeCollector.sol", + "exportedSymbols": { + "OPFCommunityFeeCollector": [ + 4398 + ] + }, + "id": 4399, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4287, + "literals": [ + "solidity", + "^", + "0.5", + ".7" + ], + "nodeType": "PragmaDirective", + "src": "0:23:8" + }, + { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "../interfaces/IERC20Template.sol", + "id": 4288, + "nodeType": "ImportDirective", + "scope": 4399, + "sourceUnit": 5659, + "src": "185:42:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "id": 4289, + "nodeType": "ImportDirective", + "scope": 4399, + "sourceUnit": 6633, + "src": "228:63:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4290, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6632, + "src": "653:7:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$6632", + "typeString": "contract Ownable" + } + }, + "id": 4291, + "nodeType": "InheritanceSpecifier", + "src": "653:7:8" + } + ], + "contractDependencies": [ + 6327, + 6632 + ], + "contractKind": "contract", + "documentation": "@title OPFCommunityFeeCollector\n@dev Ocean Protocol Foundation Community Fee Collector contract\n allows consumers to pay very small fee as part of the exchange of \n data tokens with ocean token in order to support the community of \n ocean protocol and provide a sustainble development.", + "fullyImplemented": true, + "id": 4398, + "linearizedBaseContracts": [ + 4398, + 6632, + 6327 + ], + "name": "OPFCommunityFeeCollector", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 4293, + "name": "collector", + "nodeType": "VariableDeclaration", + "scope": 4398, + "src": "667:33:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 4292, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "667:15:8", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 4325, + "nodeType": "Block", + "src": "1100:284:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 4307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4303, + "name": "newCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4295, + "src": "1131:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1155:1:8", + "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": 4304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1147:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1147:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1131:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4308, + "name": "OPFOwnerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4297, + "src": "1172:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4310, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1199:1:8", + "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": 4309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1191:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1191:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1172:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1131:70:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f5046436f6d6d756e697479466565436f6c6c6563746f723a20636f6c6c6563746f722061646472657373206f72206f776e657220697320696e76616c69642061646472657373", + "id": 4314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1216:73:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_616ec9f97cdb82b4049f1345a8abc2201a64cabaaef4905e6b8a77d179c5f2d6", + "typeString": "literal_string \"OPFCommunityFeeCollector: collector address or owner is invalid address\"" + }, + "value": "OPFCommunityFeeCollector: collector address or owner is invalid address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_616ec9f97cdb82b4049f1345a8abc2201a64cabaaef4905e6b8a77d179c5f2d6", + "typeString": "literal_string \"OPFCommunityFeeCollector: collector address or owner is invalid address\"" + } + ], + "id": 4302, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1110:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1110:189:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4316, + "nodeType": "ExpressionStatement", + "src": "1110:189:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 4319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4317, + "name": "collector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4293, + "src": "1309:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4318, + "name": "newCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4295, + "src": "1321:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1309:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 4320, + "nodeType": "ExpressionStatement", + "src": "1309:24:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4322, + "name": "OPFOwnerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4297, + "src": "1361:15:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4321, + "name": "transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6607, + "src": "1343:17:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1343:34:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4324, + "nodeType": "ExpressionStatement", + "src": "1343:34:8" + } + ] + }, + "documentation": "@dev constructor\n Called prior contract deployment. set the controller address and\n the contract owner address\n@param newCollector the fee collector address.\n@param OPFOwnerAddress the contract owner address", + "id": 4326, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [], + "id": 4300, + "modifierName": { + "argumentTypes": null, + "id": 4299, + "name": "Ownable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6632, + "src": "1086:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Ownable_$6632_$", + "typeString": "type(contract Ownable)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1086:9:8" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4298, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4295, + "name": "newCollector", + "nodeType": "VariableDeclaration", + "scope": 4326, + "src": "994:28:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 4294, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "994:15:8", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4297, + "name": "OPFOwnerAddress", + "nodeType": "VariableDeclaration", + "scope": 4326, + "src": "1032:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4296, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1032:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "984:77:8" + }, + "returnParameters": { + "id": 4301, + "nodeType": "ParameterList", + "parameters": [], + "src": "1100:0:8" + }, + "scope": 4398, + "src": "973:411:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 4329, + "nodeType": "Block", + "src": "1562:2:8", + "statements": [] + }, + "documentation": "@dev fallback function\n this is a default fallback function in which receives\n the collected ether.", + "id": 4330, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4327, + "nodeType": "ParameterList", + "parameters": [], + "src": "1542:2:8" + }, + "returnParameters": { + "id": 4328, + "nodeType": "ParameterList", + "parameters": [], + "src": "1562:0:8" + }, + "scope": 4398, + "src": "1534:30:8", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4342, + "nodeType": "Block", + "src": "1741:58:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4337, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7163, + "src": "1778:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OPFCommunityFeeCollector_$4398", + "typeString": "contract OPFCommunityFeeCollector" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OPFCommunityFeeCollector_$4398", + "typeString": "contract OPFCommunityFeeCollector" + } + ], + "id": 4336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1770:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1770:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 4339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1770:21:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4333, + "name": "collector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4293, + "src": "1751:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 4335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1751:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 4340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1751:41:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4341, + "nodeType": "ExpressionStatement", + "src": "1751:41:8" + } + ] + }, + "documentation": "@dev withdrawETH\n transfers all the accumlated ether the collector address", + "id": 4343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdrawETH", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4331, + "nodeType": "ParameterList", + "parameters": [], + "src": "1699:2:8" + }, + "returnParameters": { + "id": 4332, + "nodeType": "ParameterList", + "parameters": [], + "src": "1741:0:8" + }, + "scope": 4398, + "src": "1679:120:8", + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4375, + "nodeType": "Block", + "src": "2053:405:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4349, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4345, + "src": "2084:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4351, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2108:1:8", + "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": 4350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2100:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2100:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2084:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f5046436f6d6d756e697479466565436f6c6c6563746f723a20696e76616c696420746f6b656e20636f6e74726163742061646472657373", + "id": 4354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2124:58:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_96299161c0f4c317613661dd9a3c09a86e2da844da34a8587e90bf981cb919b9", + "typeString": "literal_string \"OPFCommunityFeeCollector: invalid token contract address\"" + }, + "value": "OPFCommunityFeeCollector: invalid token contract address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_96299161c0f4c317613661dd9a3c09a86e2da844da34a8587e90bf981cb919b9", + "typeString": "literal_string \"OPFCommunityFeeCollector: invalid token contract address\"" + } + ], + "id": 4348, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2063:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2063:129:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4356, + "nodeType": "ExpressionStatement", + "src": "2063:129:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4362, + "name": "collector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4293, + "src": "2280:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4368, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7163, + "src": "2354:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OPFCommunityFeeCollector_$4398", + "typeString": "contract OPFCommunityFeeCollector" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OPFCommunityFeeCollector_$4398", + "typeString": "contract OPFCommunityFeeCollector" + } + ], + "id": 4367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2346:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2346:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4364, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4345, + "src": "2322:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4363, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "2307:14:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 4365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2307:28:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 5640, + "src": "2307:38:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 4370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2307:53:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4359, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4345, + "src": "2240:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4358, + "name": "IERC20Template", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "2225:14:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Template_$5658_$", + "typeString": "type(contract IERC20Template)" + } + }, + "id": 4360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2225:28:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Template_$5658", + "typeString": "contract IERC20Template" + } + }, + "id": 4361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5649, + "src": "2225:37:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 4371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2225:149:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f5046436f6d6d756e697479466565436f6c6c6563746f723a206661696c656420746f20776974686472617720746f6b656e73", + "id": 4372, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2388:53:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b132282f5ba4a29f30b106af7588661098ed0503cfccb33f68abb1edfa10480e", + "typeString": "literal_string \"OPFCommunityFeeCollector: failed to withdraw tokens\"" + }, + "value": "OPFCommunityFeeCollector: failed to withdraw tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b132282f5ba4a29f30b106af7588661098ed0503cfccb33f68abb1edfa10480e", + "typeString": "literal_string \"OPFCommunityFeeCollector: failed to withdraw tokens\"" + } + ], + "id": 4357, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2203:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2203:248:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4374, + "nodeType": "ExpressionStatement", + "src": "2203:248:8" + } + ] + }, + "documentation": "@dev withdrawToken\n transfers all the accumlated tokens the collector address\n@param tokenAddress the token contract address ", + "id": 4376, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdrawToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4345, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 4376, + "src": "2004:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2004:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1994:36:8" + }, + "returnParameters": { + "id": 4347, + "nodeType": "ParameterList", + "parameters": [], + "src": "2053:0:8" + }, + "scope": 4398, + "src": "1972:486:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": { + "id": 4396, + "nodeType": "Block", + "src": "2747:175:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 4388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4384, + "name": "newCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4378, + "src": "2778:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2802:1:8", + "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": 4385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2794:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 4387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2794:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2778:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f5046436f6d6d756e697479466565436f6c6c6563746f723a20696e76616c696420636f6c6c6563746f722061646472657373", + "id": 4389, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2818:53:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ccff23dbeddef29f1d56dadd51307fe5ca8848d02e365e74ca46cda6ecdf4fc0", + "typeString": "literal_string \"OPFCommunityFeeCollector: invalid collector address\"" + }, + "value": "OPFCommunityFeeCollector: invalid collector address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ccff23dbeddef29f1d56dadd51307fe5ca8848d02e365e74ca46cda6ecdf4fc0", + "typeString": "literal_string \"OPFCommunityFeeCollector: invalid collector address\"" + } + ], + "id": 4383, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2757:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2757:124:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4391, + "nodeType": "ExpressionStatement", + "src": "2757:124:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 4394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4392, + "name": "collector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4293, + "src": "2891:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4393, + "name": "newCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4378, + "src": "2903:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2891:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 4395, + "nodeType": "ExpressionStatement", + "src": "2891:24:8" + } + ] + }, + "documentation": "@dev changeCollector\n change the current collector address. Only owner can do that.\n@param newCollector the new collector address ", + "id": 4397, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 4381, + "modifierName": { + "argumentTypes": null, + "id": 4380, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "2732:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2732:9:8" + } + ], + "name": "changeCollector", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4378, + "name": "newCollector", + "nodeType": "VariableDeclaration", + "scope": 4397, + "src": "2670:28:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 4377, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2670:15:8", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2660:44:8" + }, + "returnParameters": { + "id": 4382, + "nodeType": "ParameterList", + "parameters": [], + "src": "2747:0:8" + }, + "scope": 4398, + "src": "2636:286:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + } + ], + "scope": 4399, + "src": "616:2308:8" + } + ], + "src": "0:2925:8" + }, + "legacyAST": { + "attributes": { + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/communityFee/OPFCommunityFeeCollector.sol", + "exportedSymbols": { + "OPFCommunityFeeCollector": [ + 4398 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.5", + ".7" + ] + }, + "id": 4287, + "name": "PragmaDirective", + "src": "0:23:8" + }, + { + "attributes": { + "SourceUnit": 5659, + "absolutePath": "/Users/ahmedali/Desktop/work/ocean/contracts/contracts/interfaces/IERC20Template.sol", + "file": "../interfaces/IERC20Template.sol", + "scope": 4399, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 4288, + "name": "ImportDirective", + "src": "185:42:8" + }, + { + "attributes": { + "SourceUnit": 6633, + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "scope": 4399, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 4289, + "name": "ImportDirective", + "src": "228:63:8" + }, + { + "attributes": { + "contractDependencies": [ + 6327, + 6632 + ], + "contractKind": "contract", + "documentation": "@title OPFCommunityFeeCollector\n@dev Ocean Protocol Foundation Community Fee Collector contract\n allows consumers to pay very small fee as part of the exchange of \n data tokens with ocean token in order to support the community of \n ocean protocol and provide a sustainble development.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 4398, + 6632, + 6327 + ], + "name": "OPFCommunityFeeCollector", + "scope": 4399 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Ownable", + "referencedDeclaration": 6632, + "type": "contract Ownable" + }, + "id": 4290, + "name": "UserDefinedTypeName", + "src": "653:7:8" + } + ], + "id": 4291, + "name": "InheritanceSpecifier", + "src": "653:7:8" + }, + { + "attributes": { + "constant": false, + "name": "collector", + "scope": 4398, + "stateVariable": true, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 4292, + "name": "ElementaryTypeName", + "src": "667:15:8" + } + ], + "id": 4293, + "name": "VariableDeclaration", + "src": "667:33:8" + }, + { + "attributes": { + "documentation": "@dev constructor\n Called prior contract deployment. set the controller address and\n the contract owner address\n@param newCollector the fee collector address.\n@param OPFOwnerAddress the contract owner address", + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "name": "", + "scope": 4398, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "newCollector", + "scope": 4326, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 4294, + "name": "ElementaryTypeName", + "src": "994:15:8" + } + ], + "id": 4295, + "name": "VariableDeclaration", + "src": "994:28:8" + }, + { + "attributes": { + "constant": false, + "name": "OPFOwnerAddress", + "scope": 4326, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4296, + "name": "ElementaryTypeName", + "src": "1032:7:8" + } + ], + "id": 4297, + "name": "VariableDeclaration", + "src": "1032:23:8" + } + ], + "id": 4298, + "name": "ParameterList", + "src": "984:77:8" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4301, + "name": "ParameterList", + "src": "1100:0:8" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6632, + "type": "type(contract Ownable)", + "value": "Ownable" + }, + "id": 4299, + "name": "Identifier", + "src": "1086:7:8" + } + ], + "id": 4300, + "name": "ModifierInvocation", + "src": "1086:9:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_616ec9f97cdb82b4049f1345a8abc2201a64cabaaef4905e6b8a77d179c5f2d6", + "typeString": "literal_string \"OPFCommunityFeeCollector: collector address or owner is invalid address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4302, + "name": "Identifier", + "src": "1110:7:8" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "&&", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4295, + "type": "address payable", + "value": "newCollector" + }, + "id": 4303, + "name": "Identifier", + "src": "1131:12:8" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4304, + "name": "ElementaryTypeNameExpression", + "src": "1147:7:8" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4305, + "name": "Literal", + "src": "1155:1:8" + } + ], + "id": 4306, + "name": "FunctionCall", + "src": "1147:10:8" + } + ], + "id": 4307, + "name": "BinaryOperation", + "src": "1131:26:8" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4297, + "type": "address", + "value": "OPFOwnerAddress" + }, + "id": 4308, + "name": "Identifier", + "src": "1172:15:8" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4309, + "name": "ElementaryTypeNameExpression", + "src": "1191:7:8" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4310, + "name": "Literal", + "src": "1199:1:8" + } + ], + "id": 4311, + "name": "FunctionCall", + "src": "1191:10:8" + } + ], + "id": 4312, + "name": "BinaryOperation", + "src": "1172:29:8" + } + ], + "id": 4313, + "name": "BinaryOperation", + "src": "1131:70:8" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4f5046436f6d6d756e697479466565436f6c6c6563746f723a20636f6c6c6563746f722061646472657373206f72206f776e657220697320696e76616c69642061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"OPFCommunityFeeCollector: collector address or owner is invalid address\"", + "value": "OPFCommunityFeeCollector: collector address or owner is invalid address" + }, + "id": 4314, + "name": "Literal", + "src": "1216:73:8" + } + ], + "id": 4315, + "name": "FunctionCall", + "src": "1110:189:8" + } + ], + "id": 4316, + "name": "ExpressionStatement", + "src": "1110:189:8" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4293, + "type": "address payable", + "value": "collector" + }, + "id": 4317, + "name": "Identifier", + "src": "1309:9:8" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4295, + "type": "address payable", + "value": "newCollector" + }, + "id": 4318, + "name": "Identifier", + "src": "1321:12:8" + } + ], + "id": 4319, + "name": "Assignment", + "src": "1309:24:8" + } + ], + "id": 4320, + "name": "ExpressionStatement", + "src": "1309:24:8" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6607, + "type": "function (address)", + "value": "transferOwnership" + }, + "id": 4321, + "name": "Identifier", + "src": "1343:17:8" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4297, + "type": "address", + "value": "OPFOwnerAddress" + }, + "id": 4322, + "name": "Identifier", + "src": "1361:15:8" + } + ], + "id": 4323, + "name": "FunctionCall", + "src": "1343:34:8" + } + ], + "id": 4324, + "name": "ExpressionStatement", + "src": "1343:34:8" + } + ], + "id": 4325, + "name": "Block", + "src": "1100:284:8" + } + ], + "id": 4326, + "name": "FunctionDefinition", + "src": "973:411:8" + }, + { + "attributes": { + "documentation": "@dev fallback function\n this is a default fallback function in which receives\n the collected ether.", + "implemented": true, + "isConstructor": false, + "kind": "fallback", + "modifiers": [ + null + ], + "name": "", + "scope": 4398, + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4327, + "name": "ParameterList", + "src": "1542:2:8" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4328, + "name": "ParameterList", + "src": "1562:0:8" + }, + { + "attributes": { + "statements": [ + null + ] + }, + "children": [], + "id": 4329, + "name": "Block", + "src": "1562:2:8" + } + ], + "id": 4330, + "name": "FunctionDefinition", + "src": "1534:30:8" + }, + { + "attributes": { + "documentation": "@dev withdrawETH\n transfers all the accumlated ether the collector address", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "withdrawETH", + "scope": 4398, + "stateMutability": "payable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4331, + "name": "ParameterList", + "src": "1699:2:8" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4332, + "name": "ParameterList", + "src": "1741:0:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": null, + "type": "function (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4293, + "type": "address payable", + "value": "collector" + }, + "id": 4333, + "name": "Identifier", + "src": "1751:9:8" + } + ], + "id": 4335, + "name": "MemberAccess", + "src": "1751:18:8" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balance", + "referencedDeclaration": null, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OPFCommunityFeeCollector_$4398", + "typeString": "contract OPFCommunityFeeCollector" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4336, + "name": "ElementaryTypeNameExpression", + "src": "1770:7:8" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7163, + "type": "contract OPFCommunityFeeCollector", + "value": "this" + }, + "id": 4337, + "name": "Identifier", + "src": "1778:4:8" + } + ], + "id": 4338, + "name": "FunctionCall", + "src": "1770:13:8" + } + ], + "id": 4339, + "name": "MemberAccess", + "src": "1770:21:8" + } + ], + "id": 4340, + "name": "FunctionCall", + "src": "1751:41:8" + } + ], + "id": 4341, + "name": "ExpressionStatement", + "src": "1751:41:8" + } + ], + "id": 4342, + "name": "Block", + "src": "1741:58:8" + } + ], + "id": 4343, + "name": "FunctionDefinition", + "src": "1679:120:8" + }, + { + "attributes": { + "documentation": "@dev withdrawToken\n transfers all the accumlated tokens the collector address\n@param tokenAddress the token contract address ", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "withdrawToken", + "scope": 4398, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "tokenAddress", + "scope": 4376, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 4344, + "name": "ElementaryTypeName", + "src": "2004:7:8" + } + ], + "id": 4345, + "name": "VariableDeclaration", + "src": "2004:20:8" + } + ], + "id": 4346, + "name": "ParameterList", + "src": "1994:36:8" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4347, + "name": "ParameterList", + "src": "2053:0:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_96299161c0f4c317613661dd9a3c09a86e2da844da34a8587e90bf981cb919b9", + "typeString": "literal_string \"OPFCommunityFeeCollector: invalid token contract address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4348, + "name": "Identifier", + "src": "2063:7:8" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4345, + "type": "address", + "value": "tokenAddress" + }, + "id": 4349, + "name": "Identifier", + "src": "2084:12:8" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4350, + "name": "ElementaryTypeNameExpression", + "src": "2100:7:8" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4351, + "name": "Literal", + "src": "2108:1:8" + } + ], + "id": 4352, + "name": "FunctionCall", + "src": "2100:10:8" + } + ], + "id": 4353, + "name": "BinaryOperation", + "src": "2084:26:8" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4f5046436f6d6d756e697479466565436f6c6c6563746f723a20696e76616c696420746f6b656e20636f6e74726163742061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"OPFCommunityFeeCollector: invalid token contract address\"", + "value": "OPFCommunityFeeCollector: invalid token contract address" + }, + "id": 4354, + "name": "Literal", + "src": "2124:58:8" + } + ], + "id": 4355, + "name": "FunctionCall", + "src": "2063:129:8" + } + ], + "id": 4356, + "name": "ExpressionStatement", + "src": "2063:129:8" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b132282f5ba4a29f30b106af7588661098ed0503cfccb33f68abb1edfa10480e", + "typeString": "literal_string \"OPFCommunityFeeCollector: failed to withdraw tokens\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4357, + "name": "Identifier", + "src": "2203:7:8" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transfer", + "referencedDeclaration": 5649, + "type": "function (address,uint256) external returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 4358, + "name": "Identifier", + "src": "2225:14:8" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4345, + "type": "address", + "value": "tokenAddress" + }, + "id": 4359, + "name": "Identifier", + "src": "2240:12:8" + } + ], + "id": 4360, + "name": "FunctionCall", + "src": "2225:28:8" + } + ], + "id": 4361, + "name": "MemberAccess", + "src": "2225:37:8" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4293, + "type": "address payable", + "value": "collector" + }, + "id": 4362, + "name": "Identifier", + "src": "2280:9:8" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 5640, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract IERC20Template", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5658, + "type": "type(contract IERC20Template)", + "value": "IERC20Template" + }, + "id": 4363, + "name": "Identifier", + "src": "2307:14:8" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4345, + "type": "address", + "value": "tokenAddress" + }, + "id": 4364, + "name": "Identifier", + "src": "2322:12:8" + } + ], + "id": 4365, + "name": "FunctionCall", + "src": "2307:28:8" + } + ], + "id": 4366, + "name": "MemberAccess", + "src": "2307:38:8" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OPFCommunityFeeCollector_$4398", + "typeString": "contract OPFCommunityFeeCollector" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4367, + "name": "ElementaryTypeNameExpression", + "src": "2346:7:8" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 7163, + "type": "contract OPFCommunityFeeCollector", + "value": "this" + }, + "id": 4368, + "name": "Identifier", + "src": "2354:4:8" + } + ], + "id": 4369, + "name": "FunctionCall", + "src": "2346:13:8" + } + ], + "id": 4370, + "name": "FunctionCall", + "src": "2307:53:8" + } + ], + "id": 4371, + "name": "FunctionCall", + "src": "2225:149:8" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4f5046436f6d6d756e697479466565436f6c6c6563746f723a206661696c656420746f20776974686472617720746f6b656e73", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"OPFCommunityFeeCollector: failed to withdraw tokens\"", + "value": "OPFCommunityFeeCollector: failed to withdraw tokens" + }, + "id": 4372, + "name": "Literal", + "src": "2388:53:8" + } + ], + "id": 4373, + "name": "FunctionCall", + "src": "2203:248:8" + } + ], + "id": 4374, + "name": "ExpressionStatement", + "src": "2203:248:8" + } + ], + "id": 4375, + "name": "Block", + "src": "2053:405:8" + } + ], + "id": 4376, + "name": "FunctionDefinition", + "src": "1972:486:8" + }, + { + "attributes": { + "documentation": "@dev changeCollector\n change the current collector address. Only owner can do that.\n@param newCollector the new collector address ", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "changeCollector", + "scope": 4398, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "newCollector", + "scope": 4397, + "stateVariable": false, + "storageLocation": "default", + "type": "address payable", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "payable", + "type": "address payable" + }, + "id": 4377, + "name": "ElementaryTypeName", + "src": "2670:15:8" + } + ], + "id": 4378, + "name": "VariableDeclaration", + "src": "2670:28:8" + } + ], + "id": 4379, + "name": "ParameterList", + "src": "2660:44:8" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 4382, + "name": "ParameterList", + "src": "2747:0:8" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6565, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 4380, + "name": "Identifier", + "src": "2732:9:8" + } + ], + "id": 4381, + "name": "ModifierInvocation", + "src": "2732:9:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ccff23dbeddef29f1d56dadd51307fe5ca8848d02e365e74ca46cda6ecdf4fc0", + "typeString": "literal_string \"OPFCommunityFeeCollector: invalid collector address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 4383, + "name": "Identifier", + "src": "2757:7:8" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4378, + "type": "address payable", + "value": "newCollector" + }, + "id": 4384, + "name": "Identifier", + "src": "2778:12:8" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 4385, + "name": "ElementaryTypeNameExpression", + "src": "2794:7:8" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 4386, + "name": "Literal", + "src": "2802:1:8" + } + ], + "id": 4387, + "name": "FunctionCall", + "src": "2794:10:8" + } + ], + "id": 4388, + "name": "BinaryOperation", + "src": "2778:26:8" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4f5046436f6d6d756e697479466565436f6c6c6563746f723a20696e76616c696420636f6c6c6563746f722061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"OPFCommunityFeeCollector: invalid collector address\"", + "value": "OPFCommunityFeeCollector: invalid collector address" + }, + "id": 4389, + "name": "Literal", + "src": "2818:53:8" + } + ], + "id": 4390, + "name": "FunctionCall", + "src": "2757:124:8" + } + ], + "id": 4391, + "name": "ExpressionStatement", + "src": "2757:124:8" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4293, + "type": "address payable", + "value": "collector" + }, + "id": 4392, + "name": "Identifier", + "src": "2891:9:8" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4378, + "type": "address payable", + "value": "newCollector" + }, + "id": 4393, + "name": "Identifier", + "src": "2903:12:8" + } + ], + "id": 4394, + "name": "Assignment", + "src": "2891:24:8" + } + ], + "id": 4395, + "name": "ExpressionStatement", + "src": "2891:24:8" + } + ], + "id": 4396, + "name": "Block", + "src": "2747:175:8" + } + ], + "id": 4397, + "name": "FunctionDefinition", + "src": "2636:286:8" + } + ], + "id": 4398, + "name": "ContractDefinition", + "src": "616:2308:8" + } + ], + "id": 4399, + "name": "SourceUnit", + "src": "0:2925:8" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.820Z", + "devdoc": { + "details": "Ocean Protocol Foundation Community Fee Collector contract allows consumers to pay very small fee as part of the exchange of data tokens with ocean token in order to support the community of ocean protocol and provide a sustainble development.", + "methods": { + "changeCollector(address)": { + "details": "changeCollector change the current collector address. Only owner can do that.", + "params": { + "newCollector": "the new collector address " + } + }, + "constructor": { + "details": "constructor Called prior contract deployment. set the controller address and the contract owner address", + "params": { + "OPFOwnerAddress": "the contract owner address", + "newCollector": "the fee collector address." + } + }, + "isOwner()": { + "details": "Returns true if the caller is the current owner." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "withdrawETH()": { + "details": "withdrawETH transfers all the accumlated ether the collector address" + }, + "withdrawToken(address)": { + "details": "withdrawToken transfers all the accumlated tokens the collector address", + "params": { + "tokenAddress": "the token contract address " + } + } + }, + "title": "OPFCommunityFeeCollector" + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/Ownable.json b/artifacts/Ownable.json new file mode 100644 index 000000000..35a9a4674 --- /dev/null +++ b/artifacts/Ownable.json @@ -0,0 +1,3279 @@ +{ + "contractName": "Ownable", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}],\"devdoc\":{\"details\":\"Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. * This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract setting the deployer as the initial owner.\"},\"isOwner()\":{\"details\":\"Returns true if the caller is the current owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":\"Ownable\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzzr://51482c01bddf23793bddee43b60ab9578a62948a4f2082def24ea792a553b055\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0x6fb9d7889769d7cc161225f9ef7a90e468ba9788b253816f8d8b6894d3472c24\",\"urls\":[\"bzzr://ab46c9368bc3abdded5eb85858304518c8a0291060ab42087075d759dbf3925f\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.5.0;\n\nimport \"../GSN/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n", + "sourcePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "ast": { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "exportedSymbols": { + "Ownable": [ + 6632 + ] + }, + "id": 6633, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6516, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:17" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/GSN/Context.sol", + "file": "../GSN/Context.sol", + "id": 6517, + "nodeType": "ImportDirective", + "scope": 6633, + "sourceUnit": 6328, + "src": "25:28:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 6518, + "name": "Context", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6327, + "src": "435:7:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$6327", + "typeString": "contract Context" + } + }, + "id": 6519, + "nodeType": "InheritanceSpecifier", + "src": "435:7:17" + } + ], + "contractDependencies": [ + 6327 + ], + "contractKind": "contract", + "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", + "fullyImplemented": true, + "id": 6632, + "linearizedBaseContracts": [ + 6632, + 6327 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 6521, + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 6632, + "src": "449:22:17", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6520, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "449:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "anonymous": false, + "documentation": null, + "id": 6527, + "name": "OwnershipTransferred", + "nodeType": "EventDefinition", + "parameters": { + "id": 6526, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6523, + "indexed": true, + "name": "previousOwner", + "nodeType": "VariableDeclaration", + "scope": 6527, + "src": "505:29:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6522, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "505:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6525, + "indexed": true, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 6527, + "src": "536:24:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6524, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "536:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "504:57:17" + }, + "src": "478:84:17" + }, + { + "body": { + "id": 6546, + "nodeType": "Block", + "src": "688:135:17", + "statements": [ + { + "assignments": [ + 6531 + ], + "declarations": [ + { + "constant": false, + "id": 6531, + "name": "msgSender", + "nodeType": "VariableDeclaration", + "scope": 6546, + "src": "698:17:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6530, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "698:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6534, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6532, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "718:10:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 6533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "718:12:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "698:32:17" + }, + { + "expression": { + "argumentTypes": null, + "id": 6537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6535, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6521, + "src": "740:6:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6536, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6531, + "src": "749:9:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "740:18:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6538, + "nodeType": "ExpressionStatement", + "src": "740:18:17" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "802:1:17", + "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": 6540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "794:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6542, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "794:10:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 6543, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6531, + "src": "806:9:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6539, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6527, + "src": "773:20:17", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 6544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "773:43:17", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6545, + "nodeType": "EmitStatement", + "src": "768:48:17" + } + ] + }, + "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", + "id": 6547, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6528, + "nodeType": "ParameterList", + "parameters": [], + "src": "676:2:17" + }, + "returnParameters": { + "id": 6529, + "nodeType": "ParameterList", + "parameters": [], + "src": "688:0:17" + }, + "scope": 6632, + "src": "664:159:17", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6554, + "nodeType": "Block", + "src": "946:30:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6552, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6521, + "src": "963:6:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6551, + "id": 6553, + "nodeType": "Return", + "src": "956:13:17" + } + ] + }, + "documentation": "@dev Returns the address of the current owner.", + "id": 6555, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6548, + "nodeType": "ParameterList", + "parameters": [], + "src": "913:2:17" + }, + "returnParameters": { + "id": 6551, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6550, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6555, + "src": "937:7:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6549, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "937:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "936:9:17" + }, + "scope": 6632, + "src": "899:77:17", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 6564, + "nodeType": "Block", + "src": "1085:82:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6558, + "name": "isOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6576, + "src": "1103:7:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 6559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1103:9:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", + "id": 6560, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1114:34:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", + "typeString": "literal_string \"Ownable: caller is not the owner\"" + }, + "value": "Ownable: caller is not the owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", + "typeString": "literal_string \"Ownable: caller is not the owner\"" + } + ], + "id": 6557, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1095:7:17", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1095:54:17", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6562, + "nodeType": "ExpressionStatement", + "src": "1095:54:17" + }, + { + "id": 6563, + "nodeType": "PlaceholderStatement", + "src": "1159:1:17" + } + ] + }, + "documentation": "@dev Throws if called by any account other than the owner.", + "id": 6565, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6556, + "nodeType": "ParameterList", + "parameters": [], + "src": "1082:2:17" + }, + "src": "1064:103:17", + "visibility": "internal" + }, + { + "body": { + "id": 6575, + "nodeType": "Block", + "src": "1296:46:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6570, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "1313:10:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 6571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1313:12:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 6572, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6521, + "src": "1329:6:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1313:22:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 6569, + "id": 6574, + "nodeType": "Return", + "src": "1306:29:17" + } + ] + }, + "documentation": "@dev Returns true if the caller is the current owner.", + "id": 6576, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6566, + "nodeType": "ParameterList", + "parameters": [], + "src": "1266:2:17" + }, + "returnParameters": { + "id": 6569, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6568, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6576, + "src": "1290:4:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6567, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1290:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1289:6:17" + }, + "scope": 6632, + "src": "1250:92:17", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 6594, + "nodeType": "Block", + "src": "1730:91:17", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6582, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6521, + "src": "1766:6:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6584, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1782:1:17", + "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": 6583, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1774:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1774:10:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 6581, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6527, + "src": "1745:20:17", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 6586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1745:40:17", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6587, + "nodeType": "EmitStatement", + "src": "1740:45:17" + }, + { + "expression": { + "argumentTypes": null, + "id": 6592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6588, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6521, + "src": "1795:6:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6590, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1812:1:17", + "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": 6589, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1804:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1804:10:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1795:19:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6593, + "nodeType": "ExpressionStatement", + "src": "1795:19:17" + } + ] + }, + "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", + "id": 6595, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 6579, + "modifierName": { + "argumentTypes": null, + "id": 6578, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "1720:9:17", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1720:9:17" + } + ], + "name": "renounceOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6577, + "nodeType": "ParameterList", + "parameters": [], + "src": "1710:2:17" + }, + "returnParameters": { + "id": 6580, + "nodeType": "ParameterList", + "parameters": [], + "src": "1730:0:17" + }, + "scope": 6632, + "src": "1684:137:17", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 6606, + "nodeType": "Block", + "src": "2032:45:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6603, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6597, + "src": "2061:8:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6602, + "name": "_transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6631, + "src": "2042:18:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2042:28:17", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6605, + "nodeType": "ExpressionStatement", + "src": "2042:28:17" + } + ] + }, + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", + "id": 6607, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 6600, + "modifierName": { + "argumentTypes": null, + "id": 6599, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "2022:9:17", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2022:9:17" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6597, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 6607, + "src": "1997:16:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6596, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1997:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1996:18:17" + }, + "returnParameters": { + "id": 6601, + "nodeType": "ParameterList", + "parameters": [], + "src": "2032:0:17" + }, + "scope": 6632, + "src": "1970:107:17", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 6630, + "nodeType": "Block", + "src": "2233:170:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6613, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6609, + "src": "2251:8:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 6615, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2271:1:17", + "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": 6614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2263:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2263:10:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2251:22:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", + "id": 6618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2275:40:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", + "typeString": "literal_string \"Ownable: new owner is the zero address\"" + }, + "value": "Ownable: new owner is the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", + "typeString": "literal_string \"Ownable: new owner is the zero address\"" + } + ], + "id": 6612, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2243:7:17", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2243:73:17", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6620, + "nodeType": "ExpressionStatement", + "src": "2243:73:17" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6622, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6521, + "src": "2352:6:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 6623, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6609, + "src": "2360:8:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6621, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6527, + "src": "2331:20:17", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 6624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2331:38:17", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6625, + "nodeType": "EmitStatement", + "src": "2326:43:17" + }, + { + "expression": { + "argumentTypes": null, + "id": 6628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6626, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6521, + "src": "2379:6:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6627, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6609, + "src": "2388:8:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2379:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6629, + "nodeType": "ExpressionStatement", + "src": "2379:17:17" + } + ] + }, + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", + "id": 6631, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6610, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6609, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 6631, + "src": "2206:16:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6608, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2206:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2205:18:17" + }, + "returnParameters": { + "id": 6611, + "nodeType": "ParameterList", + "parameters": [], + "src": "2233:0:17" + }, + "scope": 6632, + "src": "2178:225:17", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 6633, + "src": "415:1990:17" + } + ], + "src": "0:2406:17" + }, + "legacyAST": { + "attributes": { + "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol", + "exportedSymbols": { + "Ownable": [ + 6632 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ] + }, + "id": 6516, + "name": "PragmaDirective", + "src": "0:23:17" + }, + { + "attributes": { + "SourceUnit": 6328, + "absolutePath": "openzeppelin-solidity/contracts/GSN/Context.sol", + "file": "../GSN/Context.sol", + "scope": 6633, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 6517, + "name": "ImportDirective", + "src": "25:28:17" + }, + { + "attributes": { + "contractDependencies": [ + 6327 + ], + "contractKind": "contract", + "documentation": "@dev Contract module which provides a basic access control mechanism, where\nthere is an account (an owner) that can be granted exclusive access to\nspecific functions.\n * This module is used through inheritance. It will make available the modifier\n`onlyOwner`, which can be applied to your functions to restrict their use to\nthe owner.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 6632, + 6327 + ], + "name": "Ownable", + "scope": 6633 + }, + "children": [ + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Context", + "referencedDeclaration": 6327, + "type": "contract Context" + }, + "id": 6518, + "name": "UserDefinedTypeName", + "src": "435:7:17" + } + ], + "id": 6519, + "name": "InheritanceSpecifier", + "src": "435:7:17" + }, + { + "attributes": { + "constant": false, + "name": "_owner", + "scope": 6632, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "private" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6520, + "name": "ElementaryTypeName", + "src": "449:7:17" + } + ], + "id": 6521, + "name": "VariableDeclaration", + "src": "449:22:17" + }, + { + "attributes": { + "anonymous": false, + "documentation": null, + "name": "OwnershipTransferred" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "previousOwner", + "scope": 6527, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6522, + "name": "ElementaryTypeName", + "src": "505:7:17" + } + ], + "id": 6523, + "name": "VariableDeclaration", + "src": "505:29:17" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "newOwner", + "scope": 6527, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6524, + "name": "ElementaryTypeName", + "src": "536:7:17" + } + ], + "id": 6525, + "name": "VariableDeclaration", + "src": "536:24:17" + } + ], + "id": 6526, + "name": "ParameterList", + "src": "504:57:17" + } + ], + "id": 6527, + "name": "EventDefinition", + "src": "478:84:17" + }, + { + "attributes": { + "documentation": "@dev Initializes the contract setting the deployer as the initial owner.", + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "modifiers": [ + null + ], + "name": "", + "scope": 6632, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6528, + "name": "ParameterList", + "src": "676:2:17" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6529, + "name": "ParameterList", + "src": "688:0:17" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 6531 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "msgSender", + "scope": 6546, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6530, + "name": "ElementaryTypeName", + "src": "698:7:17" + } + ], + "id": 6531, + "name": "VariableDeclaration", + "src": "698:17:17" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 6532, + "name": "Identifier", + "src": "718:10:17" + } + ], + "id": 6533, + "name": "FunctionCall", + "src": "718:12:17" + } + ], + "id": 6534, + "name": "VariableDeclarationStatement", + "src": "698:32:17" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6521, + "type": "address", + "value": "_owner" + }, + "id": 6535, + "name": "Identifier", + "src": "740:6:17" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6531, + "type": "address", + "value": "msgSender" + }, + "id": 6536, + "name": "Identifier", + "src": "749:9:17" + } + ], + "id": 6537, + "name": "Assignment", + "src": "740:18:17" + } + ], + "id": 6538, + "name": "ExpressionStatement", + "src": "740:18:17" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6527, + "type": "function (address,address)", + "value": "OwnershipTransferred" + }, + "id": 6539, + "name": "Identifier", + "src": "773:20:17" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6540, + "name": "ElementaryTypeNameExpression", + "src": "794:7:17" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6541, + "name": "Literal", + "src": "802:1:17" + } + ], + "id": 6542, + "name": "FunctionCall", + "src": "794:10:17" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6531, + "type": "address", + "value": "msgSender" + }, + "id": 6543, + "name": "Identifier", + "src": "806:9:17" + } + ], + "id": 6544, + "name": "FunctionCall", + "src": "773:43:17" + } + ], + "id": 6545, + "name": "EmitStatement", + "src": "768:48:17" + } + ], + "id": 6546, + "name": "Block", + "src": "688:135:17" + } + ], + "id": 6547, + "name": "FunctionDefinition", + "src": "664:159:17" + }, + { + "attributes": { + "documentation": "@dev Returns the address of the current owner.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "owner", + "scope": 6632, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6548, + "name": "ParameterList", + "src": "913:2:17" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6555, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6549, + "name": "ElementaryTypeName", + "src": "937:7:17" + } + ], + "id": 6550, + "name": "VariableDeclaration", + "src": "937:7:17" + } + ], + "id": 6551, + "name": "ParameterList", + "src": "936:9:17" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6551 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6521, + "type": "address", + "value": "_owner" + }, + "id": 6552, + "name": "Identifier", + "src": "963:6:17" + } + ], + "id": 6553, + "name": "Return", + "src": "956:13:17" + } + ], + "id": 6554, + "name": "Block", + "src": "946:30:17" + } + ], + "id": 6555, + "name": "FunctionDefinition", + "src": "899:77:17" + }, + { + "attributes": { + "documentation": "@dev Throws if called by any account other than the owner.", + "name": "onlyOwner", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6556, + "name": "ParameterList", + "src": "1082:2:17" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", + "typeString": "literal_string \"Ownable: caller is not the owner\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6557, + "name": "Identifier", + "src": "1095:7:17" + }, + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6576, + "type": "function () view returns (bool)", + "value": "isOwner" + }, + "id": 6558, + "name": "Identifier", + "src": "1103:7:17" + } + ], + "id": 6559, + "name": "FunctionCall", + "src": "1103:9:17" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Ownable: caller is not the owner\"", + "value": "Ownable: caller is not the owner" + }, + "id": 6560, + "name": "Literal", + "src": "1114:34:17" + } + ], + "id": 6561, + "name": "FunctionCall", + "src": "1095:54:17" + } + ], + "id": 6562, + "name": "ExpressionStatement", + "src": "1095:54:17" + }, + { + "id": 6563, + "name": "PlaceholderStatement", + "src": "1159:1:17" + } + ], + "id": 6564, + "name": "Block", + "src": "1085:82:17" + } + ], + "id": 6565, + "name": "ModifierDefinition", + "src": "1064:103:17" + }, + { + "attributes": { + "documentation": "@dev Returns true if the caller is the current owner.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isOwner", + "scope": 6632, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6566, + "name": "ParameterList", + "src": "1266:2:17" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6576, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 6567, + "name": "ElementaryTypeName", + "src": "1290:4:17" + } + ], + "id": 6568, + "name": "VariableDeclaration", + "src": "1290:4:17" + } + ], + "id": 6569, + "name": "ParameterList", + "src": "1289:6:17" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6569 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6315, + "type": "function () view returns (address payable)", + "value": "_msgSender" + }, + "id": 6570, + "name": "Identifier", + "src": "1313:10:17" + } + ], + "id": 6571, + "name": "FunctionCall", + "src": "1313:12:17" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6521, + "type": "address", + "value": "_owner" + }, + "id": 6572, + "name": "Identifier", + "src": "1329:6:17" + } + ], + "id": 6573, + "name": "BinaryOperation", + "src": "1313:22:17" + } + ], + "id": 6574, + "name": "Return", + "src": "1306:29:17" + } + ], + "id": 6575, + "name": "Block", + "src": "1296:46:17" + } + ], + "id": 6576, + "name": "FunctionDefinition", + "src": "1250:92:17" + }, + { + "attributes": { + "documentation": "@dev Leaves the contract without owner. It will not be possible to call\n`onlyOwner` functions anymore. Can only be called by the current owner.\n * NOTE: Renouncing ownership will leave the contract without an owner,\nthereby removing any functionality that is only available to the owner.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "renounceOwnership", + "scope": 6632, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6577, + "name": "ParameterList", + "src": "1710:2:17" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6580, + "name": "ParameterList", + "src": "1730:0:17" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6565, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 6578, + "name": "Identifier", + "src": "1720:9:17" + } + ], + "id": 6579, + "name": "ModifierInvocation", + "src": "1720:9:17" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6527, + "type": "function (address,address)", + "value": "OwnershipTransferred" + }, + "id": 6581, + "name": "Identifier", + "src": "1745:20:17" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6521, + "type": "address", + "value": "_owner" + }, + "id": 6582, + "name": "Identifier", + "src": "1766:6:17" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6583, + "name": "ElementaryTypeNameExpression", + "src": "1774:7:17" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6584, + "name": "Literal", + "src": "1782:1:17" + } + ], + "id": 6585, + "name": "FunctionCall", + "src": "1774:10:17" + } + ], + "id": 6586, + "name": "FunctionCall", + "src": "1745:40:17" + } + ], + "id": 6587, + "name": "EmitStatement", + "src": "1740:45:17" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6521, + "type": "address", + "value": "_owner" + }, + "id": 6588, + "name": "Identifier", + "src": "1795:6:17" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6589, + "name": "ElementaryTypeNameExpression", + "src": "1804:7:17" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6590, + "name": "Literal", + "src": "1812:1:17" + } + ], + "id": 6591, + "name": "FunctionCall", + "src": "1804:10:17" + } + ], + "id": 6592, + "name": "Assignment", + "src": "1795:19:17" + } + ], + "id": 6593, + "name": "ExpressionStatement", + "src": "1795:19:17" + } + ], + "id": 6594, + "name": "Block", + "src": "1730:91:17" + } + ], + "id": 6595, + "name": "FunctionDefinition", + "src": "1684:137:17" + }, + { + "attributes": { + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).\nCan only be called by the current owner.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "name": "transferOwnership", + "scope": 6632, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "newOwner", + "scope": 6607, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6596, + "name": "ElementaryTypeName", + "src": "1997:7:17" + } + ], + "id": 6597, + "name": "VariableDeclaration", + "src": "1997:16:17" + } + ], + "id": 6598, + "name": "ParameterList", + "src": "1996:18:17" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6601, + "name": "ParameterList", + "src": "2032:0:17" + }, + { + "attributes": { + "arguments": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6565, + "type": "modifier ()", + "value": "onlyOwner" + }, + "id": 6599, + "name": "Identifier", + "src": "2022:9:17" + } + ], + "id": 6600, + "name": "ModifierInvocation", + "src": "2022:9:17" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6631, + "type": "function (address)", + "value": "_transferOwnership" + }, + "id": 6602, + "name": "Identifier", + "src": "2042:18:17" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6597, + "type": "address", + "value": "newOwner" + }, + "id": 6603, + "name": "Identifier", + "src": "2061:8:17" + } + ], + "id": 6604, + "name": "FunctionCall", + "src": "2042:28:17" + } + ], + "id": 6605, + "name": "ExpressionStatement", + "src": "2042:28:17" + } + ], + "id": 6606, + "name": "Block", + "src": "2032:45:17" + } + ], + "id": 6607, + "name": "FunctionDefinition", + "src": "1970:107:17" + }, + { + "attributes": { + "documentation": "@dev Transfers ownership of the contract to a new account (`newOwner`).", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "_transferOwnership", + "scope": 6632, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "newOwner", + "scope": 6631, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 6608, + "name": "ElementaryTypeName", + "src": "2206:7:17" + } + ], + "id": 6609, + "name": "VariableDeclaration", + "src": "2206:16:17" + } + ], + "id": 6610, + "name": "ParameterList", + "src": "2205:18:17" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6611, + "name": "ParameterList", + "src": "2233:0:17" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", + "typeString": "literal_string \"Ownable: new owner is the zero address\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6612, + "name": "Identifier", + "src": "2243:7:17" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6609, + "type": "address", + "value": "newOwner" + }, + "id": 6613, + "name": "Identifier", + "src": "2251:8:17" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 6614, + "name": "ElementaryTypeNameExpression", + "src": "2263:7:17" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6615, + "name": "Literal", + "src": "2271:1:17" + } + ], + "id": 6616, + "name": "FunctionCall", + "src": "2263:10:17" + } + ], + "id": 6617, + "name": "BinaryOperation", + "src": "2251:22:17" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Ownable: new owner is the zero address\"", + "value": "Ownable: new owner is the zero address" + }, + "id": 6618, + "name": "Literal", + "src": "2275:40:17" + } + ], + "id": 6619, + "name": "FunctionCall", + "src": "2243:73:17" + } + ], + "id": 6620, + "name": "ExpressionStatement", + "src": "2243:73:17" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6527, + "type": "function (address,address)", + "value": "OwnershipTransferred" + }, + "id": 6621, + "name": "Identifier", + "src": "2331:20:17" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6521, + "type": "address", + "value": "_owner" + }, + "id": 6622, + "name": "Identifier", + "src": "2352:6:17" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6609, + "type": "address", + "value": "newOwner" + }, + "id": 6623, + "name": "Identifier", + "src": "2360:8:17" + } + ], + "id": 6624, + "name": "FunctionCall", + "src": "2331:38:17" + } + ], + "id": 6625, + "name": "EmitStatement", + "src": "2326:43:17" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6521, + "type": "address", + "value": "_owner" + }, + "id": 6626, + "name": "Identifier", + "src": "2379:6:17" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6609, + "type": "address", + "value": "newOwner" + }, + "id": 6627, + "name": "Identifier", + "src": "2388:8:17" + } + ], + "id": 6628, + "name": "Assignment", + "src": "2379:17:17" + } + ], + "id": 6629, + "name": "ExpressionStatement", + "src": "2379:17:17" + } + ], + "id": 6630, + "name": "Block", + "src": "2233:170:17" + } + ], + "id": 6631, + "name": "FunctionDefinition", + "src": "2178:225:17" + } + ], + "id": 6632, + "name": "ContractDefinition", + "src": "415:1990:17" + } + ], + "id": 6633, + "name": "SourceUnit", + "src": "0:2406:17" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.856Z", + "devdoc": { + "details": "Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. * This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.", + "methods": { + "constructor": { + "details": "Initializes the contract setting the deployer as the initial owner." + }, + "isOwner()": { + "details": "Returns true if the caller is the current owner." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. * NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + } + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/SafeMath.json b/artifacts/SafeMath.json new file mode 100644 index 000000000..fed42a31d --- /dev/null +++ b/artifacts/SafeMath.json @@ -0,0 +1,5061 @@ +{ + "contractName": "SafeMath", + "abi": [], + "metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. * Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. * Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"openzeppelin-solidity/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzzr://292843005e754e752644f767477ec5ad7a1ffc91ddb18c38b8079c62f3993cad\"]}},\"version\":1}", + "bytecode": "0x604c6023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820a16d9aa92e36dc4b79f550941cc4825102d469916f8ceb7162b50f0efb0a07120029", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820a16d9aa92e36dc4b79f550941cc4825102d469916f8ceb7162b50f0efb0a07120029", + "sourceMap": "589:4708:16:-;;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": "589:4708:16:-;;;;;;;;", + "source": "pragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n", + "sourcePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "ast": { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 6514 + ] + }, + "id": 6515, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6329, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:16" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", + "fullyImplemented": true, + "id": 6514, + "linearizedBaseContracts": [ + 6514 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 6353, + "nodeType": "Block", + "src": "901:109:16", + "statements": [ + { + "assignments": [ + 6339 + ], + "declarations": [ + { + "constant": false, + "id": 6339, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "911:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "911:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6343, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6340, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6331, + "src": "923:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 6341, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6333, + "src": "927:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "923:5:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "911:17:16" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6345, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6339, + "src": "946:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 6346, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6331, + "src": "951:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "946:6:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", + "id": 6348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "954:29:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", + "typeString": "literal_string \"SafeMath: addition overflow\"" + }, + "value": "SafeMath: addition overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", + "typeString": "literal_string \"SafeMath: addition overflow\"" + } + ], + "id": 6344, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "938:7:16", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "938:46:16", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6350, + "nodeType": "ExpressionStatement", + "src": "938:46:16" + }, + { + "expression": { + "argumentTypes": null, + "id": 6351, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6339, + "src": "1002:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6337, + "id": 6352, + "nodeType": "Return", + "src": "995:8:16" + } + ] + }, + "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", + "id": 6354, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6331, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 6354, + "src": "847:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "847:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6333, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 6354, + "src": "858:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "858:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "846:22:16" + }, + "returnParameters": { + "id": 6337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6336, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6354, + "src": "892:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "892:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "891:9:16" + }, + "scope": 6514, + "src": "834:176:16", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6369, + "nodeType": "Block", + "src": "1341:67:16", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6364, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6356, + "src": "1362:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 6365, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6358, + "src": "1365:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", + "id": 6366, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1368:32:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", + "typeString": "literal_string \"SafeMath: subtraction overflow\"" + }, + "value": "SafeMath: subtraction overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", + "typeString": "literal_string \"SafeMath: subtraction overflow\"" + } + ], + "id": 6363, + "name": "sub", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 6370, + 6397 + ], + "referencedDeclaration": 6397, + "src": "1358:3:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 6367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1358:43:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6362, + "id": 6368, + "nodeType": "Return", + "src": "1351:50:16" + } + ] + }, + "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", + "id": 6370, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6359, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6356, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 6370, + "src": "1287:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6355, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1287:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6358, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 6370, + "src": "1298:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6357, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1298:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1286:22:16" + }, + "returnParameters": { + "id": 6362, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6361, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6370, + "src": "1332:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6360, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1332:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1331:9:16" + }, + "scope": 6514, + "src": "1274:134:16", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6396, + "nodeType": "Block", + "src": "1827:92:16", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6382, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6374, + "src": "1845:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 6383, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6372, + "src": "1850:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1845:6:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 6385, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6376, + "src": "1853:12:16", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 6381, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "1837:7:16", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1837:29:16", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6387, + "nodeType": "ExpressionStatement", + "src": "1837:29:16" + }, + { + "assignments": [ + 6389 + ], + "declarations": [ + { + "constant": false, + "id": 6389, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 6396, + "src": "1876:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6388, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1876:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6393, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6390, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6372, + "src": "1888:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6391, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6374, + "src": "1892:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1888:5:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1876:17:16" + }, + { + "expression": { + "argumentTypes": null, + "id": 6394, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6389, + "src": "1911:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6380, + "id": 6395, + "nodeType": "Return", + "src": "1904:8:16" + } + ] + }, + "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", + "id": 6397, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6377, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6372, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 6397, + "src": "1745:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6371, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1745:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6374, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 6397, + "src": "1756:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6373, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1756:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6376, + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "scope": 6397, + "src": "1767:26:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6375, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1767:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1744:50:16" + }, + "returnParameters": { + "id": 6380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6379, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6397, + "src": "1818:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6378, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1818:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1817:9:16" + }, + "scope": 6514, + "src": "1732:187:16", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6430, + "nodeType": "Block", + "src": "2226:392:16", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6406, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6399, + "src": "2458:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 6407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2463:1:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2458:6:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6412, + "nodeType": "IfStatement", + "src": "2454:45:16", + "trueBody": { + "id": 6411, + "nodeType": "Block", + "src": "2466:33:16", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 6409, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2487:1:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 6405, + "id": 6410, + "nodeType": "Return", + "src": "2480:8:16" + } + ] + } + }, + { + "assignments": [ + 6414 + ], + "declarations": [ + { + "constant": false, + "id": 6414, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 6430, + "src": "2509:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2509:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6418, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6415, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6399, + "src": "2521:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6416, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6401, + "src": "2525:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2521:5:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2509:17:16" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6420, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6414, + "src": "2544:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6421, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6399, + "src": "2548:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2544:5:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 6423, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6401, + "src": "2553:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2544:10:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", + "id": 6425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2556:35:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", + "typeString": "literal_string \"SafeMath: multiplication overflow\"" + }, + "value": "SafeMath: multiplication overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", + "typeString": "literal_string \"SafeMath: multiplication overflow\"" + } + ], + "id": 6419, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "2536:7:16", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2536:56:16", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6427, + "nodeType": "ExpressionStatement", + "src": "2536:56:16" + }, + { + "expression": { + "argumentTypes": null, + "id": 6428, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6414, + "src": "2610:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6405, + "id": 6429, + "nodeType": "Return", + "src": "2603:8:16" + } + ] + }, + "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", + "id": 6431, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 6431, + "src": "2172:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6398, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2172:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6401, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 6431, + "src": "2183:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6400, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2183:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2171:22:16" + }, + "returnParameters": { + "id": 6405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6404, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6431, + "src": "2217:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2217:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2216:9:16" + }, + "scope": 6514, + "src": "2159:459:16", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6446, + "nodeType": "Block", + "src": "3140:63:16", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6441, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6433, + "src": "3161:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 6442, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6435, + "src": "3164:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", + "id": 6443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3167:28:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", + "typeString": "literal_string \"SafeMath: division by zero\"" + }, + "value": "SafeMath: division by zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", + "typeString": "literal_string \"SafeMath: division by zero\"" + } + ], + "id": 6440, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 6447, + 6474 + ], + "referencedDeclaration": 6474, + "src": "3157:3:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 6444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3157:39:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6439, + "id": 6445, + "nodeType": "Return", + "src": "3150:46:16" + } + ] + }, + "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", + "id": 6447, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6433, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 6447, + "src": "3086:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6432, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3086:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6435, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 6447, + "src": "3097:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6434, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3097:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3085:22:16" + }, + "returnParameters": { + "id": 6439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6438, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6447, + "src": "3131:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6437, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3131:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3130:9:16" + }, + "scope": 6514, + "src": "3073:130:16", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6473, + "nodeType": "Block", + "src": "3813:243:16", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6459, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6451, + "src": "3897:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 6460, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3901:1:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3897:5:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 6462, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6453, + "src": "3904:12:16", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 6458, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "3889:7:16", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3889:28:16", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6464, + "nodeType": "ExpressionStatement", + "src": "3889:28:16" + }, + { + "assignments": [ + 6466 + ], + "declarations": [ + { + "constant": false, + "id": 6466, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 6473, + "src": "3927:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3927:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6470, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6467, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6449, + "src": "3939:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6468, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6451, + "src": "3943:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3939:5:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3927:17:16" + }, + { + "expression": { + "argumentTypes": null, + "id": 6471, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "4048:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6457, + "id": 6472, + "nodeType": "Return", + "src": "4041:8:16" + } + ] + }, + "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", + "id": 6474, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6449, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 6474, + "src": "3731:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6448, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3731:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6451, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 6474, + "src": "3742:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3742:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6453, + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "scope": 6474, + "src": "3753:26:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6452, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3753:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3730:50:16" + }, + "returnParameters": { + "id": 6457, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6456, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6474, + "src": "3804:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3804:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3803:9:16" + }, + "scope": 6514, + "src": "3718:338:16", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6489, + "nodeType": "Block", + "src": "4567:61:16", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 6484, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6476, + "src": "4588:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 6485, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6478, + "src": "4591:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", + "id": 6486, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4594:26:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", + "typeString": "literal_string \"SafeMath: modulo by zero\"" + }, + "value": "SafeMath: modulo by zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", + "typeString": "literal_string \"SafeMath: modulo by zero\"" + } + ], + "id": 6483, + "name": "mod", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 6490, + 6513 + ], + "referencedDeclaration": 6513, + "src": "4584:3:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 6487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4584:37:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6482, + "id": 6488, + "nodeType": "Return", + "src": "4577:44:16" + } + ] + }, + "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", + "id": 6490, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6479, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6476, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 6490, + "src": "4513:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4513:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6478, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 6490, + "src": "4524:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6477, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4524:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4512:22:16" + }, + "returnParameters": { + "id": 6482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6481, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6490, + "src": "4558:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6480, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4558:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4557:9:16" + }, + "scope": 6514, + "src": "4500:128:16", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 6512, + "nodeType": "Block", + "src": "5227:68:16", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6502, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6494, + "src": "5245:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 6503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5250:1:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5245:6:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 6505, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6496, + "src": "5253:12:16", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 6501, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "src": "5237:7:16", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5237:29:16", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6507, + "nodeType": "ExpressionStatement", + "src": "5237:29:16" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6508, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6492, + "src": "5283:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 6509, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6494, + "src": "5287:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5283:5:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6500, + "id": 6511, + "nodeType": "Return", + "src": "5276:12:16" + } + ] + }, + "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", + "id": 6513, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6497, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6492, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 6513, + "src": "5145:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6491, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5145:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6494, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 6513, + "src": "5156:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6493, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5156:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6496, + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "scope": 6513, + "src": "5167:26:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6495, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5167:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5144:50:16" + }, + "returnParameters": { + "id": 6500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6499, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6513, + "src": "5218:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6498, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5218:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5217:9:16" + }, + "scope": 6514, + "src": "5132:163:16", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 6515, + "src": "589:4708:16" + } + ], + "src": "0:5298:16" + }, + "legacyAST": { + "attributes": { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 6514 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ] + }, + "id": 6329, + "name": "PragmaDirective", + "src": "0:23:16" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "library", + "documentation": "@dev Wrappers over Solidity's arithmetic operations with added overflow\nchecks.\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\nin bugs, because programmers usually assume that an overflow raises an\nerror, which is the standard behavior in high level programming languages.\n`SafeMath` restores this intuition by reverting the transaction when an\noperation overflows.\n * Using this library instead of the unchecked operations eliminates an entire\nclass of bugs, so it's recommended to use it always.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 6514 + ], + "name": "SafeMath", + "scope": 6515 + }, + "children": [ + { + "attributes": { + "documentation": "@dev Returns the addition of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `+` operator.\n * Requirements:\n- Addition cannot overflow.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "add", + "scope": 6514, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 6354, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6330, + "name": "ElementaryTypeName", + "src": "847:7:16" + } + ], + "id": 6331, + "name": "VariableDeclaration", + "src": "847:9:16" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 6354, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6332, + "name": "ElementaryTypeName", + "src": "858:7:16" + } + ], + "id": 6333, + "name": "VariableDeclaration", + "src": "858:9:16" + } + ], + "id": 6334, + "name": "ParameterList", + "src": "846:22:16" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6354, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6335, + "name": "ElementaryTypeName", + "src": "892:7:16" + } + ], + "id": 6336, + "name": "VariableDeclaration", + "src": "892:7:16" + } + ], + "id": 6337, + "name": "ParameterList", + "src": "891:9:16" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 6339 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 6353, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6338, + "name": "ElementaryTypeName", + "src": "911:7:16" + } + ], + "id": 6339, + "name": "VariableDeclaration", + "src": "911:9:16" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6331, + "type": "uint256", + "value": "a" + }, + "id": 6340, + "name": "Identifier", + "src": "923:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6333, + "type": "uint256", + "value": "b" + }, + "id": 6341, + "name": "Identifier", + "src": "927:1:16" + } + ], + "id": 6342, + "name": "BinaryOperation", + "src": "923:5:16" + } + ], + "id": 6343, + "name": "VariableDeclarationStatement", + "src": "911:17:16" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", + "typeString": "literal_string \"SafeMath: addition overflow\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6344, + "name": "Identifier", + "src": "938:7:16" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6339, + "type": "uint256", + "value": "c" + }, + "id": 6345, + "name": "Identifier", + "src": "946:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6331, + "type": "uint256", + "value": "a" + }, + "id": 6346, + "name": "Identifier", + "src": "951:1:16" + } + ], + "id": 6347, + "name": "BinaryOperation", + "src": "946:6:16" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "536166654d6174683a206164646974696f6e206f766572666c6f77", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"SafeMath: addition overflow\"", + "value": "SafeMath: addition overflow" + }, + "id": 6348, + "name": "Literal", + "src": "954:29:16" + } + ], + "id": 6349, + "name": "FunctionCall", + "src": "938:46:16" + } + ], + "id": 6350, + "name": "ExpressionStatement", + "src": "938:46:16" + }, + { + "attributes": { + "functionReturnParameters": 6337 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6339, + "type": "uint256", + "value": "c" + }, + "id": 6351, + "name": "Identifier", + "src": "1002:1:16" + } + ], + "id": 6352, + "name": "Return", + "src": "995:8:16" + } + ], + "id": 6353, + "name": "Block", + "src": "901:109:16" + } + ], + "id": 6354, + "name": "FunctionDefinition", + "src": "834:176:16" + }, + { + "attributes": { + "documentation": "@dev Returns the subtraction of two unsigned integers, reverting on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "sub", + "scope": 6514, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 6370, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6355, + "name": "ElementaryTypeName", + "src": "1287:7:16" + } + ], + "id": 6356, + "name": "VariableDeclaration", + "src": "1287:9:16" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 6370, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6357, + "name": "ElementaryTypeName", + "src": "1298:7:16" + } + ], + "id": 6358, + "name": "VariableDeclaration", + "src": "1298:9:16" + } + ], + "id": 6359, + "name": "ParameterList", + "src": "1286:22:16" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6370, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6360, + "name": "ElementaryTypeName", + "src": "1332:7:16" + } + ], + "id": 6361, + "name": "VariableDeclaration", + "src": "1332:7:16" + } + ], + "id": 6362, + "name": "ParameterList", + "src": "1331:9:16" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6362 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", + "typeString": "literal_string \"SafeMath: subtraction overflow\"" + } + ], + "overloadedDeclarations": [ + 6370, + 6397 + ], + "referencedDeclaration": 6397, + "type": "function (uint256,uint256,string memory) pure returns (uint256)", + "value": "sub" + }, + "id": 6363, + "name": "Identifier", + "src": "1358:3:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6356, + "type": "uint256", + "value": "a" + }, + "id": 6364, + "name": "Identifier", + "src": "1362:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6358, + "type": "uint256", + "value": "b" + }, + "id": 6365, + "name": "Identifier", + "src": "1365:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"SafeMath: subtraction overflow\"", + "value": "SafeMath: subtraction overflow" + }, + "id": 6366, + "name": "Literal", + "src": "1368:32:16" + } + ], + "id": 6367, + "name": "FunctionCall", + "src": "1358:43:16" + } + ], + "id": 6368, + "name": "Return", + "src": "1351:50:16" + } + ], + "id": 6369, + "name": "Block", + "src": "1341:67:16" + } + ], + "id": 6370, + "name": "FunctionDefinition", + "src": "1274:134:16" + }, + { + "attributes": { + "documentation": "@dev Returns the subtraction of two unsigned integers, reverting with custom message on\noverflow (when the result is negative).\n * Counterpart to Solidity's `-` operator.\n * Requirements:\n- Subtraction cannot overflow.\n * _Available since v2.4.0._", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "sub", + "scope": 6514, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 6397, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6371, + "name": "ElementaryTypeName", + "src": "1745:7:16" + } + ], + "id": 6372, + "name": "VariableDeclaration", + "src": "1745:9:16" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 6397, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6373, + "name": "ElementaryTypeName", + "src": "1756:7:16" + } + ], + "id": 6374, + "name": "VariableDeclaration", + "src": "1756:9:16" + }, + { + "attributes": { + "constant": false, + "name": "errorMessage", + "scope": 6397, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 6375, + "name": "ElementaryTypeName", + "src": "1767:6:16" + } + ], + "id": 6376, + "name": "VariableDeclaration", + "src": "1767:26:16" + } + ], + "id": 6377, + "name": "ParameterList", + "src": "1744:50:16" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6397, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6378, + "name": "ElementaryTypeName", + "src": "1818:7:16" + } + ], + "id": 6379, + "name": "VariableDeclaration", + "src": "1818:7:16" + } + ], + "id": 6380, + "name": "ParameterList", + "src": "1817:9:16" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6381, + "name": "Identifier", + "src": "1837:7:16" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6374, + "type": "uint256", + "value": "b" + }, + "id": 6382, + "name": "Identifier", + "src": "1845:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6372, + "type": "uint256", + "value": "a" + }, + "id": 6383, + "name": "Identifier", + "src": "1850:1:16" + } + ], + "id": 6384, + "name": "BinaryOperation", + "src": "1845:6:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6376, + "type": "string memory", + "value": "errorMessage" + }, + "id": 6385, + "name": "Identifier", + "src": "1853:12:16" + } + ], + "id": 6386, + "name": "FunctionCall", + "src": "1837:29:16" + } + ], + "id": 6387, + "name": "ExpressionStatement", + "src": "1837:29:16" + }, + { + "attributes": { + "assignments": [ + 6389 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 6396, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6388, + "name": "ElementaryTypeName", + "src": "1876:7:16" + } + ], + "id": 6389, + "name": "VariableDeclaration", + "src": "1876:9:16" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "-", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6372, + "type": "uint256", + "value": "a" + }, + "id": 6390, + "name": "Identifier", + "src": "1888:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6374, + "type": "uint256", + "value": "b" + }, + "id": 6391, + "name": "Identifier", + "src": "1892:1:16" + } + ], + "id": 6392, + "name": "BinaryOperation", + "src": "1888:5:16" + } + ], + "id": 6393, + "name": "VariableDeclarationStatement", + "src": "1876:17:16" + }, + { + "attributes": { + "functionReturnParameters": 6380 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6389, + "type": "uint256", + "value": "c" + }, + "id": 6394, + "name": "Identifier", + "src": "1911:1:16" + } + ], + "id": 6395, + "name": "Return", + "src": "1904:8:16" + } + ], + "id": 6396, + "name": "Block", + "src": "1827:92:16" + } + ], + "id": 6397, + "name": "FunctionDefinition", + "src": "1732:187:16" + }, + { + "attributes": { + "documentation": "@dev Returns the multiplication of two unsigned integers, reverting on\noverflow.\n * Counterpart to Solidity's `*` operator.\n * Requirements:\n- Multiplication cannot overflow.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "mul", + "scope": 6514, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 6431, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6398, + "name": "ElementaryTypeName", + "src": "2172:7:16" + } + ], + "id": 6399, + "name": "VariableDeclaration", + "src": "2172:9:16" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 6431, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6400, + "name": "ElementaryTypeName", + "src": "2183:7:16" + } + ], + "id": 6401, + "name": "VariableDeclaration", + "src": "2183:9:16" + } + ], + "id": 6402, + "name": "ParameterList", + "src": "2171:22:16" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6431, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6403, + "name": "ElementaryTypeName", + "src": "2217:7:16" + } + ], + "id": 6404, + "name": "VariableDeclaration", + "src": "2217:7:16" + } + ], + "id": 6405, + "name": "ParameterList", + "src": "2216:9:16" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6399, + "type": "uint256", + "value": "a" + }, + "id": 6406, + "name": "Identifier", + "src": "2458:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6407, + "name": "Literal", + "src": "2463:1:16" + } + ], + "id": 6408, + "name": "BinaryOperation", + "src": "2458:6:16" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6405 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6409, + "name": "Literal", + "src": "2487:1:16" + } + ], + "id": 6410, + "name": "Return", + "src": "2480:8:16" + } + ], + "id": 6411, + "name": "Block", + "src": "2466:33:16" + } + ], + "id": 6412, + "name": "IfStatement", + "src": "2454:45:16" + }, + { + "attributes": { + "assignments": [ + 6414 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 6430, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6413, + "name": "ElementaryTypeName", + "src": "2509:7:16" + } + ], + "id": 6414, + "name": "VariableDeclaration", + "src": "2509:9:16" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6399, + "type": "uint256", + "value": "a" + }, + "id": 6415, + "name": "Identifier", + "src": "2521:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6401, + "type": "uint256", + "value": "b" + }, + "id": 6416, + "name": "Identifier", + "src": "2525:1:16" + } + ], + "id": 6417, + "name": "BinaryOperation", + "src": "2521:5:16" + } + ], + "id": 6418, + "name": "VariableDeclarationStatement", + "src": "2509:17:16" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", + "typeString": "literal_string \"SafeMath: multiplication overflow\"" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6419, + "name": "Identifier", + "src": "2536:7:16" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6414, + "type": "uint256", + "value": "c" + }, + "id": 6420, + "name": "Identifier", + "src": "2544:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6399, + "type": "uint256", + "value": "a" + }, + "id": 6421, + "name": "Identifier", + "src": "2548:1:16" + } + ], + "id": 6422, + "name": "BinaryOperation", + "src": "2544:5:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6401, + "type": "uint256", + "value": "b" + }, + "id": 6423, + "name": "Identifier", + "src": "2553:1:16" + } + ], + "id": 6424, + "name": "BinaryOperation", + "src": "2544:10:16" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"SafeMath: multiplication overflow\"", + "value": "SafeMath: multiplication overflow" + }, + "id": 6425, + "name": "Literal", + "src": "2556:35:16" + } + ], + "id": 6426, + "name": "FunctionCall", + "src": "2536:56:16" + } + ], + "id": 6427, + "name": "ExpressionStatement", + "src": "2536:56:16" + }, + { + "attributes": { + "functionReturnParameters": 6405 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6414, + "type": "uint256", + "value": "c" + }, + "id": 6428, + "name": "Identifier", + "src": "2610:1:16" + } + ], + "id": 6429, + "name": "Return", + "src": "2603:8:16" + } + ], + "id": 6430, + "name": "Block", + "src": "2226:392:16" + } + ], + "id": 6431, + "name": "FunctionDefinition", + "src": "2159:459:16" + }, + { + "attributes": { + "documentation": "@dev Returns the integer division of two unsigned integers. Reverts on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "div", + "scope": 6514, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 6447, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6432, + "name": "ElementaryTypeName", + "src": "3086:7:16" + } + ], + "id": 6433, + "name": "VariableDeclaration", + "src": "3086:9:16" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 6447, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6434, + "name": "ElementaryTypeName", + "src": "3097:7:16" + } + ], + "id": 6435, + "name": "VariableDeclaration", + "src": "3097:9:16" + } + ], + "id": 6436, + "name": "ParameterList", + "src": "3085:22:16" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6447, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6437, + "name": "ElementaryTypeName", + "src": "3131:7:16" + } + ], + "id": 6438, + "name": "VariableDeclaration", + "src": "3131:7:16" + } + ], + "id": 6439, + "name": "ParameterList", + "src": "3130:9:16" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6439 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", + "typeString": "literal_string \"SafeMath: division by zero\"" + } + ], + "overloadedDeclarations": [ + 6447, + 6474 + ], + "referencedDeclaration": 6474, + "type": "function (uint256,uint256,string memory) pure returns (uint256)", + "value": "div" + }, + "id": 6440, + "name": "Identifier", + "src": "3157:3:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6433, + "type": "uint256", + "value": "a" + }, + "id": 6441, + "name": "Identifier", + "src": "3161:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6435, + "type": "uint256", + "value": "b" + }, + "id": 6442, + "name": "Identifier", + "src": "3164:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "536166654d6174683a206469766973696f6e206279207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"SafeMath: division by zero\"", + "value": "SafeMath: division by zero" + }, + "id": 6443, + "name": "Literal", + "src": "3167:28:16" + } + ], + "id": 6444, + "name": "FunctionCall", + "src": "3157:39:16" + } + ], + "id": 6445, + "name": "Return", + "src": "3150:46:16" + } + ], + "id": 6446, + "name": "Block", + "src": "3140:63:16" + } + ], + "id": 6447, + "name": "FunctionDefinition", + "src": "3073:130:16" + }, + { + "attributes": { + "documentation": "@dev Returns the integer division of two unsigned integers. Reverts with custom message on\ndivision by zero. The result is rounded towards zero.\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n`revert` opcode (which leaves remaining gas untouched) while Solidity\nuses an invalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "div", + "scope": 6514, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 6474, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6448, + "name": "ElementaryTypeName", + "src": "3731:7:16" + } + ], + "id": 6449, + "name": "VariableDeclaration", + "src": "3731:9:16" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 6474, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6450, + "name": "ElementaryTypeName", + "src": "3742:7:16" + } + ], + "id": 6451, + "name": "VariableDeclaration", + "src": "3742:9:16" + }, + { + "attributes": { + "constant": false, + "name": "errorMessage", + "scope": 6474, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 6452, + "name": "ElementaryTypeName", + "src": "3753:6:16" + } + ], + "id": 6453, + "name": "VariableDeclaration", + "src": "3753:26:16" + } + ], + "id": 6454, + "name": "ParameterList", + "src": "3730:50:16" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6474, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6455, + "name": "ElementaryTypeName", + "src": "3804:7:16" + } + ], + "id": 6456, + "name": "VariableDeclaration", + "src": "3804:7:16" + } + ], + "id": 6457, + "name": "ParameterList", + "src": "3803:9:16" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6458, + "name": "Identifier", + "src": "3889:7:16" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6451, + "type": "uint256", + "value": "b" + }, + "id": 6459, + "name": "Identifier", + "src": "3897:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6460, + "name": "Literal", + "src": "3901:1:16" + } + ], + "id": 6461, + "name": "BinaryOperation", + "src": "3897:5:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6453, + "type": "string memory", + "value": "errorMessage" + }, + "id": 6462, + "name": "Identifier", + "src": "3904:12:16" + } + ], + "id": 6463, + "name": "FunctionCall", + "src": "3889:28:16" + } + ], + "id": 6464, + "name": "ExpressionStatement", + "src": "3889:28:16" + }, + { + "attributes": { + "assignments": [ + 6466 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 6473, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6465, + "name": "ElementaryTypeName", + "src": "3927:7:16" + } + ], + "id": 6466, + "name": "VariableDeclaration", + "src": "3927:9:16" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6449, + "type": "uint256", + "value": "a" + }, + "id": 6467, + "name": "Identifier", + "src": "3939:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6451, + "type": "uint256", + "value": "b" + }, + "id": 6468, + "name": "Identifier", + "src": "3943:1:16" + } + ], + "id": 6469, + "name": "BinaryOperation", + "src": "3939:5:16" + } + ], + "id": 6470, + "name": "VariableDeclarationStatement", + "src": "3927:17:16" + }, + { + "attributes": { + "functionReturnParameters": 6457 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6466, + "type": "uint256", + "value": "c" + }, + "id": 6471, + "name": "Identifier", + "src": "4048:1:16" + } + ], + "id": 6472, + "name": "Return", + "src": "4041:8:16" + } + ], + "id": 6473, + "name": "Block", + "src": "3813:243:16" + } + ], + "id": 6474, + "name": "FunctionDefinition", + "src": "3718:338:16" + }, + { + "attributes": { + "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "mod", + "scope": 6514, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 6490, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6475, + "name": "ElementaryTypeName", + "src": "4513:7:16" + } + ], + "id": 6476, + "name": "VariableDeclaration", + "src": "4513:9:16" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 6490, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6477, + "name": "ElementaryTypeName", + "src": "4524:7:16" + } + ], + "id": 6478, + "name": "VariableDeclaration", + "src": "4524:9:16" + } + ], + "id": 6479, + "name": "ParameterList", + "src": "4512:22:16" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6490, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6480, + "name": "ElementaryTypeName", + "src": "4558:7:16" + } + ], + "id": 6481, + "name": "VariableDeclaration", + "src": "4558:7:16" + } + ], + "id": 6482, + "name": "ParameterList", + "src": "4557:9:16" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 6482 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", + "typeString": "literal_string \"SafeMath: modulo by zero\"" + } + ], + "overloadedDeclarations": [ + 6490, + 6513 + ], + "referencedDeclaration": 6513, + "type": "function (uint256,uint256,string memory) pure returns (uint256)", + "value": "mod" + }, + "id": 6483, + "name": "Identifier", + "src": "4584:3:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6476, + "type": "uint256", + "value": "a" + }, + "id": 6484, + "name": "Identifier", + "src": "4588:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6478, + "type": "uint256", + "value": "b" + }, + "id": 6485, + "name": "Identifier", + "src": "4591:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "536166654d6174683a206d6f64756c6f206279207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"SafeMath: modulo by zero\"", + "value": "SafeMath: modulo by zero" + }, + "id": 6486, + "name": "Literal", + "src": "4594:26:16" + } + ], + "id": 6487, + "name": "FunctionCall", + "src": "4584:37:16" + } + ], + "id": 6488, + "name": "Return", + "src": "4577:44:16" + } + ], + "id": 6489, + "name": "Block", + "src": "4567:61:16" + } + ], + "id": 6490, + "name": "FunctionDefinition", + "src": "4500:128:16" + }, + { + "attributes": { + "documentation": "@dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\nReverts with custom message when dividing by zero.\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\nopcode (which leaves remaining gas untouched) while Solidity uses an\ninvalid opcode to revert (consuming all remaining gas).\n * Requirements:\n- The divisor cannot be zero.\n * _Available since v2.4.0._", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "mod", + "scope": 6514, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 6513, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6491, + "name": "ElementaryTypeName", + "src": "5145:7:16" + } + ], + "id": 6492, + "name": "VariableDeclaration", + "src": "5145:9:16" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 6513, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6493, + "name": "ElementaryTypeName", + "src": "5156:7:16" + } + ], + "id": 6494, + "name": "VariableDeclaration", + "src": "5156:9:16" + }, + { + "attributes": { + "constant": false, + "name": "errorMessage", + "scope": 6513, + "stateVariable": false, + "storageLocation": "memory", + "type": "string", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string" + }, + "id": 6495, + "name": "ElementaryTypeName", + "src": "5167:6:16" + } + ], + "id": 6496, + "name": "VariableDeclaration", + "src": "5167:26:16" + } + ], + "id": 6497, + "name": "ParameterList", + "src": "5144:50:16" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 6513, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 6498, + "name": "ElementaryTypeName", + "src": "5218:7:16" + } + ], + "id": 6499, + "name": "VariableDeclaration", + "src": "5218:7:16" + } + ], + "id": 6500, + "name": "ParameterList", + "src": "5217:9:16" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "overloadedDeclarations": [ + 7124, + 7125 + ], + "referencedDeclaration": 7125, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 6501, + "name": "Identifier", + "src": "5237:7:16" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6494, + "type": "uint256", + "value": "b" + }, + "id": 6502, + "name": "Identifier", + "src": "5245:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 6503, + "name": "Literal", + "src": "5250:1:16" + } + ], + "id": 6504, + "name": "BinaryOperation", + "src": "5245:6:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6496, + "type": "string memory", + "value": "errorMessage" + }, + "id": 6505, + "name": "Identifier", + "src": "5253:12:16" + } + ], + "id": 6506, + "name": "FunctionCall", + "src": "5237:29:16" + } + ], + "id": 6507, + "name": "ExpressionStatement", + "src": "5237:29:16" + }, + { + "attributes": { + "functionReturnParameters": 6500 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "%", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6492, + "type": "uint256", + "value": "a" + }, + "id": 6508, + "name": "Identifier", + "src": "5283:1:16" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 6494, + "type": "uint256", + "value": "b" + }, + "id": 6509, + "name": "Identifier", + "src": "5287:1:16" + } + ], + "id": 6510, + "name": "BinaryOperation", + "src": "5283:5:16" + } + ], + "id": 6511, + "name": "Return", + "src": "5276:12:16" + } + ], + "id": 6512, + "name": "Block", + "src": "5227:68:16" + } + ], + "id": 6513, + "name": "FunctionDefinition", + "src": "5132:163:16" + } + ], + "id": 6514, + "name": "ContractDefinition", + "src": "589:4708:16" + } + ], + "id": 6515, + "name": "SourceUnit", + "src": "0:5298:16" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.4", + "updatedAt": "2021-04-26T10:46:14.854Z", + "devdoc": { + "details": "Wrappers over Solidity's arithmetic operations with added overflow checks. * Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. * Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.", + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/artifacts/address.json b/artifacts/address.json new file mode 100644 index 000000000..0f4804d84 --- /dev/null +++ b/artifacts/address.json @@ -0,0 +1,44 @@ +{ + "rinkeby": { + "DTFactory": "0x3fd7A00106038Fb5c802c6d63fa7147Fe429E83a", + "BFactory": "0x53eDF9289B0898e1652Ce009AACf8D25fA9A42F8", + "FixedRateExchange": "0xeD1DfC5F3a589CfC4E8B91C1fbfC18FC6699Fbde", + "Metadata": "0xFD8a7b6297153397B7eb4356C47dbd381d58bFF4", + "Ocean": "0x8967BCF84170c91B0d24D4302C2376283b0B3a07" + }, + "ropsten": { + "DTFactory": "0x6ebcCa6df2CAba986FCF44E64Ee82251c1455Dcc", + "BFactory": "0x75be6e18c80A487C8b49663bf14f80A6495045B2", + "FixedRateExchange": "0xA7a711A09396DF82D9be46A26B48BafdB9BB4fA6", + "Metadata": "0x3cd7Ef1F207E1a46AAd7D5d7F5f0A5cF081Fc726", + "Ocean": "0x5e8DCB2AfA23844bcc311B00Ad1A0C30025aADE9" + }, + "development": { + "DTFactory": "0x626aD26c7Ea494b11DbFd5dD487fA98BA32CaA42", + "BFactory": "0x5eb4bcA8C86Cba7176eCc014A6D7B44c31aC9460", + "FixedRateExchange": "0x879a308bD4b73425a03cd63ae1Fe03F3EF93BaF1", + "Metadata": "0xb49cE3689D956417BEDc9F7d848885F8085B1064", + "Ocean": "0x10345ffBE11e8724b67ee4bB4d70dD4f8a940D84" + }, + "mainnet": { + "DTFactory": "0x57317f97E9EA49eBd19f7c9bB7c180b8cDcbDeB9", + "BFactory": "0xbe0083053744ECb871510C88dC0f6b77Da162706", + "FixedRateExchange": "0x608d05214E42722B94a54cF6114d4840FCfF84e1", + "Metadata": "0x1a4b70d8c9DcA47cD6D0Fb3c52BB8634CA1C0Fdf", + "Ocean": "0x967da4048cD07aB37855c090aAF366e4ce1b9F48" + }, + "polygon": { + "DTFactory": "0xF6410bf5d773C7a41ebFf972f38e7463FA242477", + "BFactory": "0x69B6E54Ad2b3c2801d11d8Ad56ea1d892555b776", + "FixedRateExchange": "0x2112Eb973af1DBf83a4f11eda82f7a7527D7Fde5", + "Metadata": "0x80E63f73cAc60c1662f27D2DFd2EA834acddBaa8", + "Ocean": "0x282d8efCe846A88B159800bd4130ad77443Fa1A1" + }, + "moonbeamalpha": { + "DTFactory": "0x80E63f73cAc60c1662f27D2DFd2EA834acddBaa8", + "BFactory": "0x30E4CC2C7A9c6aA2b2Ce93586E3Df24a3A00bcDD", + "FixedRateExchange": "0xDEfD0018969cd2d4E648209F876ADe184815f038", + "Metadata": "0x9C9eE07b8Ce907D2f9244F8317C1Ed29A3193bAe", + "Ocean": "0x3c21a90599b5B7f37014cA5Bf30d3f1b73d7e391" + } +} diff --git a/docs/README.md b/docs/README.md index 7fa04ef4c..fc754e018 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,7 +1,7 @@ # Ocean-Contracts Core Documentation ## Deployments -- [Here are addresses](../ocean_abis/address.json) of contracts deployed to Ethereum mainnet and more. +- [Here are addresses](../artifacts/address.json) of contracts deployed to Ethereum mainnet and more. ## Contracts - [DataTokenFactory](contracts/DTFactory.md) diff --git a/docs/RELEASE_PROCESS.md b/docs/RELEASE_PROCESS.md index 62a68d10d..a8660dd61 100644 --- a/docs/RELEASE_PROCESS.md +++ b/docs/RELEASE_PROCESS.md @@ -8,7 +8,7 @@ Releases are managed manually. They are always manually triggered from a develop - Generate artifacts: ```bash yarn compile -cp ./build/contracts/* ./ocean_abis/ +cp ./build/contracts/* ./artifacts/ ``` - Update contracts documentation ```bash diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js index 8dfa89ae4..40409fadc 100644 --- a/migrations/2_deploy_contracts.js +++ b/migrations/2_deploy_contracts.js @@ -14,7 +14,7 @@ let communityCollector = '0x7DF5273aD9A6fCce64D45c64c1E43cfb6F861725' let OPFOwner = '0x7DF5273aD9A6fCce64D45c64c1E43cfb6F861725' module.exports = function(deployer, network, accounts) { deployer.then(async () => { - const addressFile = './ocean_abis/address.json' + const addressFile = './artifacts/address.json' let oldAddresses try { oldAddresses = JSON.parse(fs.readFileSync(addressFile)) diff --git a/package.json b/package.json index d1287afc2..06a21bc9a 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "doc:generate": "npx solidity-docgen --solc-module ./node_modules/solc -o docs/contracts", "release": "release-it --non-interactive", "changelog": "auto-changelog -p", - "export:artifacts": "npm run clean && npm run compile && cp ./build/contracts/*.json ./ocean_abis", + "export:artifacts": "npm run clean && npm run compile && cp ./build/contracts/*.json ./artifacts", "deploy": "npm run deploy:development", "deploy:ganache": "npm run deploy:development", "deploy:development": "npm run clean && npm run compile && export NETWORK='development' && truffle migrate && npm run export:artifacts", @@ -38,7 +38,7 @@ }, "files": [ "docs/**/*", - "ocean_abis/*", + "artifacts/*", "README.md" ], "repository": { diff --git a/scripts/deploy_docker.sh b/scripts/deploy_docker.sh index 6e85ad3b7..a620269b1 100755 --- a/scripts/deploy_docker.sh +++ b/scripts/deploy_docker.sh @@ -8,13 +8,13 @@ echo "deploy contracts is ${DEPLOY_CONTRACTS}" if [ "${DEPLOY_CONTRACTS}" = "true" ] then # remove ready flag if we deploy contracts - rm -f /ocean-contracts/ocean_abis/ready + rm -f /ocean-contracts/artifacts/ready export NETWORK="${NETWORK_NAME:-development}" npm run deploy:${NETWORK} # set flag to indicate contracts are ready - touch /ocean-contracts/ocean_abis/ready + touch /ocean-contracts/artifacts/ready fi # Fix file permissions diff --git a/scripts/deploy_pypi.sh b/scripts/deploy_pypi.sh index a03edd0f9..6f7dfd922 100644 --- a/scripts/deploy_pypi.sh +++ b/scripts/deploy_pypi.sh @@ -4,6 +4,9 @@ pip install --upgrade --user travis pip pip install --upgrade --user travis twine six==1.10.0 wheel==0.31.0 setuptools pip list shopt -s nullglob +mkdir ./ocean_abis +cp -r ./artifacts/* ./ocean_abis/ +mv ./artifacts/__init__.py ./ocean_abis/ abifiles=( ./ocean_abis/* ) [ "${#abifiles[@]}" -lt "1" ] && echo "ABI Files for development environment not found" && exit 1 python setup.py sdist bdist_wheel