From 49461245d4b5f7ad4a69e130048c2e6ba3a8e886 Mon Sep 17 00:00:00 2001 From: ssallam Date: Fri, 20 Nov 2020 13:12:02 +0100 Subject: [PATCH] Add mappings for BFactory and BPool events with handlers --- .gitattributes | 1 + .gitignore | 61 + README.md | 32 +- abis/BFactory.json | 3034 ++ abis/BPool.json | 66949 ++++++++++++++++++++++++++++++++++++++ abis/BToken.json | 14010 ++++++++ package-lock.json | 6919 ++++ package.json | 25 + schema.graphql | 117 + src/mappings/factory.ts | 52 + src/mappings/helpers.ts | 230 + src/mappings/pool.ts | 397 + subgraph.yaml | 76 + tsconfig.json | 6 + 14 files changed, 91908 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 abis/BFactory.json create mode 100644 abis/BPool.json create mode 100644 abis/BToken.json create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 schema.graphql create mode 100644 src/mappings/factory.ts create mode 100644 src/mappings/helpers.ts create mode 100644 src/mappings/pool.ts create mode 100644 subgraph.yaml create mode 100644 tsconfig.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..52031de --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.sol linguist-language=Solidity diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ad46b30 --- /dev/null +++ b/.gitignore @@ -0,0 +1,61 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next diff --git a/README.md b/README.md index a64bb5a..096ac5f 100644 --- a/README.md +++ b/README.md @@ -1 +1,31 @@ -# ocean.subgraph \ No newline at end of file +# Ocean Protocol Subgraph + +## Running locally +* Install the Graph: `https://thegraph.com/docs/quick-start` + * You can skip running ganache-cli and connect directly to `mainnet` using Infura + +```bash +git clone https://github.com/graphprotocol/graph-node/ +cd graph-node/docker +./setup.sh +# Update this line in the `docker-compose.yml` file with your Infura ProjectId +# ethereum: 'mainnet:https://mainnet.infura.io/v3/INFURA_PROJECT_ID' +docker-compose up + +``` + +* Install Graph CLI globally with npm +```bash +npm install -g @graphprotocol/graph-cli +``` + +* Once the graph node is ready, do the following to deploy the ocean-subgraph to the local graph-node +```bash +git clone https://github.com/oceanprotocol/ocean-subgraph/ +cd ocean-subgraph +npm i +npm run codegen +npm run create:local +npm run deploy:local + +``` diff --git a/abis/BFactory.json b/abis/BFactory.json new file mode 100644 index 0000000..5a10968 --- /dev/null +++ b/abis/BFactory.json @@ -0,0 +1,3034 @@ +{ + "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\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BFactory.sol\":\"BFactory\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BConst.sol\":{\"keccak256\":\"0x21675a0793e0be762a27e09ed3b0bd86e035c73ac3078dd841c38804445d5f5a\",\"urls\":[\"bzzr://47016ef4a80276f320b28a058fc92e7d9d93433bb5e4aa934668383cbefad77e\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BFactory.sol\":{\"keccak256\":\"0xbe79e34d5d123d52d92d4b576e822574d8a61462aec76042ccf70848c8ad9d1c\",\"urls\":[\"bzzr://b6dbeb70ebcdee5e23b973e6025abeb4dd3bc85dd5714fe8f1ab095d0b739ba1\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BMath.sol\":{\"keccak256\":\"0x2e3f07713561f2a0983999255794f5741c5854633b8524675767fde35f1b98c2\",\"urls\":[\"bzzr://e8c50205e3f6bd1d37fcdf178486f9560814e28ed8467af5a4ceb30651991cf8\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BNum.sol\":{\"keccak256\":\"0xc4e5c934d6b04c1fad116ea81c2fa65eaa2700e4e48bcc5045c8c96f55e729c8\",\"urls\":[\"bzzr://a3946b7fd2095ca3c7c4bb3daf3078cc48e20b0e107f113e10fb0c6ebaa77e74\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BPool.sol\":{\"keccak256\":\"0x5317eb03e13ef8512444d550ce4811c67610fef0ece0d45f583fc14658bb2d92\",\"urls\":[\"bzzr://0557c64a1179384e994a9675724430e4db5b2dd15fdc7e59b9b6fdfa65f12dcb\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BToken.sol\":{\"keccak256\":\"0xad046b7ad912f72a90330abb3abddc3aa711077c0021d6a9d0dba2c99534e51b\",\"urls\":[\"bzzr://159aed1b631f2af168fd17235b6827859cb5d6cb7e95abeff3cc3d8079710f41\"]},\"/home/travis/build/oceanprotocol/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": "0x608060405234801561001057600080fd5b5060405160208061069f8339810180604052602081101561003057600080fd5b5051600160a060020a038116610091576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610672602d913960400191505060405180910390fd5b60008054600160a060020a03909216600160a060020a03199092169190911790556105b1806100c16000396000f3fe608060405234801561001057600080fd5b5060043610610133576000357c010000000000000000000000000000000000000000000000000000000090048063ba019dab116100bf578063c36596a61161008e578063c36596a61461015a578063c6580d12146101ce578063d556c5dc146101d6578063e4a28a5214610138578063ec093021146101de57610133565b8063ba019dab14610192578063bae6ae121461019a578063bc063e1a146101be578063bc694ea2146101c657610133565b8063867378c511610106578063867378c51461016a5780639381cd2b14610172578063992e2a921461017a578063b0e0d13614610182578063b7b800a41461018a57610133565b806309a3bbe414610138578063189d00ca14610152578063218b53821461015a57806376c7a3c714610162575b600080fd5b6101406101e6565b60408051918252519081900360200190f35b6101406101f3565b610140610207565b610140610213565b610140610225565b610140610239565b610140610246565b610140610252565b610140610257565b61014061025c565b6101a2610261565b60408051600160a060020a039092168252519081900360200190f35b610140610270565b610140610280565b61014061028c565b6101a2610291565b6101406104a0565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b620f4240670de0b6b3a7640000610203565b64e8d4a51000670de0b6b3a7640000610203565b68056bc75e2d6310000081565b6704a03ce68d21555681565b600881565b600281565b600181565b600054600160a060020a031681565b600a670de0b6b3a7640000610203565b671bc16d674ec7ffff81565b600081565b600080546102a790600160a060020a03166104b0565b9050600160a060020a038116610308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806105626024913960400191505060405180910390fd5b604080517f506de97400000000000000000000000000000000000000000000000000000000815233600482015230602482015264e8d4a5100060448201526000606482018190526084820181905291518392600160a060020a0384169263506de9749260a48083019360209383900390910190829087803b15801561038c57600080fd5b505af11580156103a0573d6000803e3d6000fd5b505050506040513d60208110156103b657600080fd5b505161042357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4552525f494e495449414c495a455f42504f4f4c000000000000000000000000604482015290519081900360640190fd5b60008054604051600160a060020a0391821692918516917f83d56eda3b93446228a036eafbbbcb38aa8f27a21a302b860469af9cb27c84eb91a360408051600160a060020a0384168152905133917fb19f201dd081bc52562d1f83f3585fd08caa9de15534e6e4787f5ae63d39106c919081900360200190a25090565b6002670de0b6b3a7640000610203565b6040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081526c010000000000000000000000008202601482018190527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000602883015260009160378184f060408051600160a060020a038316815290519194507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c925081900360200190a15091905056fe42466163746f72793a20696e76616c69642062706f6f6c207a65726f2061646472657373a165627a7a72305820ddcddd1650c55b817d297fa03f4dd1c79629208959489c7158f54b71f7b5110e002942466163746f72793a20696e76616c69642062706f6f6c2074656d706c617465207a65726f2061646472657373", + "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610133576000357c010000000000000000000000000000000000000000000000000000000090048063ba019dab116100bf578063c36596a61161008e578063c36596a61461015a578063c6580d12146101ce578063d556c5dc146101d6578063e4a28a5214610138578063ec093021146101de57610133565b8063ba019dab14610192578063bae6ae121461019a578063bc063e1a146101be578063bc694ea2146101c657610133565b8063867378c511610106578063867378c51461016a5780639381cd2b14610172578063992e2a921461017a578063b0e0d13614610182578063b7b800a41461018a57610133565b806309a3bbe414610138578063189d00ca14610152578063218b53821461015a57806376c7a3c714610162575b600080fd5b6101406101e6565b60408051918252519081900360200190f35b6101406101f3565b610140610207565b610140610213565b610140610225565b610140610239565b610140610246565b610140610252565b610140610257565b61014061025c565b6101a2610261565b60408051600160a060020a039092168252519081900360200190f35b610140610270565b610140610280565b61014061028c565b6101a2610291565b6101406104a0565b6802b5e3af16b188000081565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b620f4240670de0b6b3a7640000610203565b64e8d4a51000670de0b6b3a7640000610203565b68056bc75e2d6310000081565b6704a03ce68d21555681565b600881565b600281565b600181565b600054600160a060020a031681565b600a670de0b6b3a7640000610203565b671bc16d674ec7ffff81565b600081565b600080546102a790600160a060020a03166104b0565b9050600160a060020a038116610308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806105626024913960400191505060405180910390fd5b604080517f506de97400000000000000000000000000000000000000000000000000000000815233600482015230602482015264e8d4a5100060448201526000606482018190526084820181905291518392600160a060020a0384169263506de9749260a48083019360209383900390910190829087803b15801561038c57600080fd5b505af11580156103a0573d6000803e3d6000fd5b505050506040513d60208110156103b657600080fd5b505161042357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4552525f494e495449414c495a455f42504f4f4c000000000000000000000000604482015290519081900360640190fd5b60008054604051600160a060020a0391821692918516917f83d56eda3b93446228a036eafbbbcb38aa8f27a21a302b860469af9cb27c84eb91a360408051600160a060020a0384168152905133917fb19f201dd081bc52562d1f83f3585fd08caa9de15534e6e4787f5ae63d39106c919081900360200190a25090565b6002670de0b6b3a7640000610203565b6040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081526c010000000000000000000000008202601482018190527f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000602883015260009160378184f060408051600160a060020a038316815290519194507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c925081900360200190a15091905056fe42466163746f72793a20696e76616c69642062706f6f6c207a65726f2061646472657373a165627a7a72305820ddcddd1650c55b817d297fa03f4dd1c79629208959489c7158f54b71f7b5110e0029", + "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:13;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:13;;;;;;1674:34;;-1:-1:-1;1732:35:13;;-1:-1:-1;1732:35:13;;;;;;;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": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BFactory.sol", + "ast": { + "absolutePath": "/home/travis/build/oceanprotocol/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": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BPool.sol", + "file": "./BPool.sol", + "id": 283, + "nodeType": "ImportDirective", + "scope": 377, + "sourceUnit": 3779, + "src": "185:21:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BConst.sol", + "file": "./BConst.sol", + "id": 284, + "nodeType": "ImportDirective", + "scope": 377, + "sourceUnit": 281, + "src": "207:22:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/utils/Deployer.sol", + "file": "../utils/Deployer.sol", + "id": 285, + "nodeType": "ImportDirective", + "scope": 377, + "sourceUnit": 5732, + "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": 5731, + "src": "679:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Deployer_$5731", + "typeString": "contract Deployer" + } + }, + "id": 289, + "nodeType": "InheritanceSpecifier", + "src": "679:8:3" + } + ], + "contractDependencies": [ + 280, + 5731 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 376, + "linearizedBaseContracts": [ + 376, + 5731, + 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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 5730, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6588, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": { + "absolutePath": "/home/travis/build/oceanprotocol/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": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BPool.sol", + "file": "./BPool.sol", + "id": 283, + "nodeType": "ImportDirective", + "scope": 377, + "sourceUnit": 3779, + "src": "185:21:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BConst.sol", + "file": "./BConst.sol", + "id": 284, + "nodeType": "ImportDirective", + "scope": 377, + "sourceUnit": 281, + "src": "207:22:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/utils/Deployer.sol", + "file": "../utils/Deployer.sol", + "id": 285, + "nodeType": "ImportDirective", + "scope": 377, + "sourceUnit": 5732, + "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": 5731, + "src": "679:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Deployer_$5731", + "typeString": "contract Deployer" + } + }, + "id": 289, + "nodeType": "InheritanceSpecifier", + "src": "679:8:3" + } + ], + "contractDependencies": [ + 280, + 5731 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 376, + "linearizedBaseContracts": [ + 376, + 5731, + 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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 5730, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6588, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.4", + "updatedAt": "2020-10-22T12:03:05.065Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/abis/BPool.json b/abis/BPool.json new file mode 100644 index 0000000..aab87e1 --- /dev/null +++ b/abis/BPool.json @@ -0,0 +1,66949 @@ +{ + "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\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BPool.sol\":\"BPool\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BConst.sol\":{\"keccak256\":\"0x21675a0793e0be762a27e09ed3b0bd86e035c73ac3078dd841c38804445d5f5a\",\"urls\":[\"bzzr://47016ef4a80276f320b28a058fc92e7d9d93433bb5e4aa934668383cbefad77e\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BMath.sol\":{\"keccak256\":\"0x2e3f07713561f2a0983999255794f5741c5854633b8524675767fde35f1b98c2\",\"urls\":[\"bzzr://e8c50205e3f6bd1d37fcdf178486f9560814e28ed8467af5a4ceb30651991cf8\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BNum.sol\":{\"keccak256\":\"0xc4e5c934d6b04c1fad116ea81c2fa65eaa2700e4e48bcc5045c8c96f55e729c8\",\"urls\":[\"bzzr://a3946b7fd2095ca3c7c4bb3daf3078cc48e20b0e107f113e10fb0c6ebaa77e74\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BPool.sol\":{\"keccak256\":\"0x5317eb03e13ef8512444d550ce4811c67610fef0ece0d45f583fc14658bb2d92\",\"urls\":[\"bzzr://0557c64a1179384e994a9675724430e4db5b2dd15fdc7e59b9b6fdfa65f12dcb\"]},\"/home/travis/build/oceanprotocol/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": "0x60c0604052601360808190527f42616c616e63657220506f6f6c20546f6b656e0000000000000000000000000060a090815262000040916003919062000169565b506040805180820190915260038082527f42505400000000000000000000000000000000000000000000000000000000006020909201918252620000879160049162000169565b506005805460ff19908116601217909155600c80549091169055348015620000ae57600080fd5b50620000cd338064e8d4a51000600080640100000000620000d4810204565b506200020e565b6006805460058054600160a060020a0397881662010000026201000060b060020a0319909116179055600794909455911515740100000000000000000000000000000000000000000260a060020a60ff021995909416600160a060020a03199093169290921793909316919091179091556008805491151560ff19928316179055600c80549091166001179081905560ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001ac57805160ff1916838001178555620001dc565b82800160010185558215620001dc579182015b82811115620001dc578251825591602001919060010190620001bf565b50620001ea929150620001ee565b5090565b6200020b91905b80821115620001ea5760008155600101620001f5565b90565b615e7a806200021e6000396000f3fe608060405234801561001057600080fd5b506004361061040e576000357c0100000000000000000000000000000000000000000000000000000000900480638c28cbe811610232578063be3bbd2e11610142578063d73dd623116100d5578063ec093021116100a4578063ec09302114610d35578063f1b8a9b714610d3d578063f8b2cb4f14610d63578063f8d6aed414610d89578063fde924f714610dc45761040e565b8063d73dd62314610ca9578063dd62ed3e14610cd5578063e4a28a5214610514578063e4e1e53814610d035761040e565b8063cd2ed8fb11610111578063cd2ed8fb14610c25578063cf5e7bd314610c2d578063d1d7bc9114610c53578063d4cadf6814610ca15761040e565b8063be3bbd2e14610bbd578063c36596a614610588578063c6580d1214610c15578063cc77828d14610c1d5761040e565b8063a221ee49116101c5578063b7b800a411610194578063b7b800a414610b62578063ba019dab14610b6a578063ba9530a614610b72578063bc063e1a14610bad578063bc694ea214610bb55761040e565b8063a221ee4914610a82578063a9059cbb14610ab7578063b02f0b7314610ae3578063b0e0d13614610b5a5761040e565b80639381cd2b116102015780639381cd2b14610a44578063948d8ce614610a4c57806395d89b4114610a72578063992e2a9214610a7a5761040e565b80638c28cbe8146109e85780638d4e408314610a0e57806392eefe9b14610a16578063936c347714610a3c5761040e565b806346ab38f11161032d5780636d06dfa0116102c05780638201aa3f1161028f5780638201aa3f146108ef57806382f652ad1461092f5780638656b6531461096a578063867378c5146109a557806389298012146109ad5761040e565b80636d06dfa01461083657806370a082311461086857806376c7a3c71461088e5780637c5e9ea4146108965761040e565b8063506de974116102fc578063506de974146107575780635c1bbaf71461079d5780635db34277146107d8578063661884631461080a5761040e565b806346ab38f11461068757806349b59552146106b95780634bb278f3146106d85780634f69c0d4146106e05761040e565b8063218b5382116103a5578063313ce56711610374578063313ce5671461061057806334e199071461062e578063392e53cd1461064d5780633fdddaa2146106555761040e565b8063218b53821461058857806323b872dd146105905780632f37b624146105c65780633018205f146105ec5761040e565b80631446a7ff116103e15780631446a7ff1461051c57806315e84af91461054a57806318160ddd14610578578063189d00ca146105805761040e565b806302c967481461041357806306fdde0314610457578063095ea7b3146104d457806309a3bbe414610514575b600080fd5b6104456004803603606081101561042957600080fd5b50600160a060020a038135169060208101359060400135610dcc565b60408051918252519081900360200190f35b61045f61113d565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610499578181015183820152602001610481565b50505050905090810190601f1680156104c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610500600480360360408110156104ea57600080fd5b50600160a060020a0381351690602001356111d3565b604080519115158252519081900360200190f35b610445611228565b6104456004803603604081101561053257600080fd5b50600160a060020a0381358116916020013516611235565b6104456004803603604081101561056057600080fd5b50600160a060020a038135811691602001351661138f565b6104456114e0565b6104456114e6565b6104456114fa565b610500600480360360608110156105a657600080fd5b50600160a060020a03813581169160208101359091169060400135611506565b610500600480360360208110156105dc57600080fd5b5035600160a060020a031661166b565b6105f4611689565b60408051600160a060020a039092168252519081900360200190f35b6106186116ea565b6040805160ff9092168252519081900360200190f35b61064b6004803603602081101561064457600080fd5b50356116f3565b005b610500611917565b61064b6004803603606081101561066b57600080fd5b50600160a060020a038135169060208101359060400135611920565b6104456004803603606081101561069d57600080fd5b50600160a060020a038135169060208101359060400135611d6c565b61064b600480360360208110156106cf57600080fd5b5035151561207c565b61064b61220d565b61064b600480360360408110156106f657600080fd5b8135919081019060408101602082013564010000000081111561071857600080fd5b82018360208201111561072a57600080fd5b8035906020019184602083028401116401000000008311171561074c57600080fd5b509092509050612424565b610500600480360360a081101561076d57600080fd5b50600160a060020a038135811691602081013590911690604081013590606081013515159060800135151561270b565b610445600480360360c08110156107b357600080fd5b5080359060208101359060408101359060608101359060808101359060a001356128f9565b610445600480360360608110156107ee57600080fd5b50600160a060020a0381351690602081013590604001356129b1565b6105006004803603604081101561082057600080fd5b50600160a060020a038135169060200135612c94565b6104456004803603606081101561084c57600080fd5b50600160a060020a038135169060208101359060400135612d6c565b6104456004803603602081101561087e57600080fd5b5035600160a060020a031661307d565b610445613098565b6108d6600480360360a08110156108ac57600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356130aa565b6040805192835260208301919091528051918290030190f35b6108d6600480360360a081101561090557600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356135ac565b610445600480360360c081101561094557600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613a95565b610445600480360360c081101561098057600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613b54565b610445613bf5565b610445600480360360c08110156109c357600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613c09565b61064b600480360360208110156109fe57600080fd5b5035600160a060020a0316613cb9565b610500613e8a565b61064b60048036036020811015610a2c57600080fd5b5035600160a060020a0316613e93565b610445614039565b610445614091565b61044560048036036020811015610a6257600080fd5b5035600160a060020a031661409e565b61045f61416c565b6104456141cd565b610445600480360360a0811015610a9857600080fd5b50803590602081013590604081013590606081013590608001356141d9565b61050060048036036040811015610acd57600080fd5b50600160a060020a03813516906020013561423e565b61064b60048036036040811015610af957600080fd5b81359190810190604081016020820135640100000000811115610b1b57600080fd5b820183602082011115610b2d57600080fd5b80359060200191846020830284011164010000000083111715610b4f57600080fd5b509092509050614254565b61044561459a565b61044561459f565b6104456145a4565b610445600480360360c0811015610b8857600080fd5b5080359060208101359060408101359060608101359060808101359060a001356145a9565b61044561462a565b61044561463a565b610bc5614646565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610c01578181015183820152602001610be9565b505050509050019250505060405180910390f35b61044561473e565b610bc5614743565b610445614794565b61064b60048036036020811015610c4357600080fd5b5035600160a060020a031661479a565b61064b600480360360e0811015610c6957600080fd5b50600160a060020a03813581169160208101359160408201359160608101359091169060808101359060a08101359060c00135614b27565b610445614cd0565b61050060048036036040811015610cbf57600080fd5b50600160a060020a038135169060200135614d28565b61044560048036036040811015610ceb57600080fd5b50600160a060020a0381358116916020013516614da9565b61064b60048036036060811015610d1957600080fd5b50600160a060020a038135169060208101359060400135614dd4565b610445615058565b61044560048036036020811015610d5357600080fd5b5035600160a060020a0316615068565b61044560048036036020811015610d7957600080fd5b5035600160a060020a0316615148565b610445600480360360c0811015610d9f57600080fd5b5080359060208101359060408101359060608101359060808101359060a00135615216565b610500615299565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615610e7d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16610ed4576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16610f32576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a60205260409020600390810154610f6791670de0b6b3a76400005b046001016152a9565b831115610fbe576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754610ff894939291908990613a95565b91508161103d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115611083576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b611091816003015485615392565b600382015560006110a283826152a9565b604080518781529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36110f03384615403565b6111026110fd8483615392565b615411565b60055461111e90620100009004600160a060020a03168261541d565b611129863387615427565b50506005805461ff00191690559392505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b820191906000526020600020905b8154815290600101906020018083116111ac57829003601f168201915b5050505050905090565b336000818152600160209081526040808320600160a060020a03871680855290835281842086905581518681529151939490939092600080516020615dcf833981519152928290030190a35060015b92915050565b6802b5e3af16b188000081565b600554600090610100900460ff1615611286576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff166112e4576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16611342576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825281206003808401546002808601549284015490840154939461138694929392906141d9565b95945050505050565b600554600090610100900460ff16156113e0576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1661143e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661149c576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825290206003808301546002808501549284015490840154600754611386949291906141d9565b60025490565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600033600160a060020a03851614806115425750600160a060020a03841660009081526001602090815260408083203384529091529020548211155b611596576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42544f4b454e5f4241445f43414c4c45520000000000000000000000604482015290519081900360640190fd5b6115a184848461551c565b33600160a060020a038516148015906115df5750600160a060020a038416600090815260016020908152604080832033845290915290205460001914155b1561166157600160a060020a03841660009081526001602090815260408083203384529091529020546116129083615392565b600160a060020a0385811660009081526001602090815260408083203380855290835292819020859055805194855251928716939192600080516020615dcf8339815191529281900390910190a35b5060019392505050565b600160a060020a03166000908152600a602052604090205460ff1690565b600554600090610100900460ff16156116da576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600654600160a060020a031690565b60055460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156117a2576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16156117fa576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a0316331461184a576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b64e8d4a510008110156118a7576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a0000811115611907576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6007556005805461ff0019169055565b600c5460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156119cf576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a0390911614611a30576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff16611a8e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615611ad7576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b670de0b6b3a7640000811015611b37576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b6802b5e3af16b1880000811115611b98576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b620f4240821015611bf3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4d494e5f42414c414e43450000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206002015480821115611c9657611c2c600b54611c278484615392565b615638565b600b8190556802b5e3af16b18800001015611c91576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f4d41585f544f54414c5f574549474854000000000000000000000000604482015290519081900360640190fd5b611cb7565b80821015611cb757611cb3600b54611cae8385615392565b615392565b600b555b600160a060020a0384166000908152600a602052604090206002810183905560030180549084905580841115611d0057611cfb8533611cf68785615392565b615695565b611d5a565b80841015611d5a576000611d148286615392565b90506000611d238260006152a9565b9050611d398733611d348585615392565b615427565b600554611d57908890620100009004600160a060020a031683615427565b50505b50506005805461ff0019169055505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615611e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16611e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16611ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754611f0c94939291908990613c09565b915082821015611f54576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a60205260409020600390810154611f8491670de0b6b3a7640000610f5e565b821115611fdb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b611fe9816003015483615392565b60038201556000611ffa85826152a9565b604080518581529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36120483386615403565b6120556110fd8683615392565b60055461207190620100009004600160a060020a03168261541d565b611129863385615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561212b576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1615612183576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a031633146121d3576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805491151560a060020a0274ff0000000000000000000000000000000000000000199092169190911790556005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156122bc576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a039091161461231d576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b60085460ff1615612366576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600211156123c1576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b6008805460ff191660011790556006805474ff0000000000000000000000000000000000000000191660a060020a17905561240468056bc75e2d63100000615707565b6124173368056bc75e2d6310000061541d565b6005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156124d3576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661252a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006125346114e0565b905060006125428583615710565b905080612587576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b60005b6009548110156126f7576000600982815481106125a357fe5b6000918252602080832090910154600160a060020a0316808352600a9091526040822060030154909250906125d885836152a9565b90508061261d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87878581811061262957fe5b90506020020135811115612675576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206003015461269b9082615638565b600160a060020a0384166000818152600a6020908152604091829020600301939093558051848152905191923392600080516020615d6f8339815191529281900390910190a36126ec833383615695565b50505060010161258a565b5061270185615707565b611d5a338661541d565b600c5460009060ff1615612769576040805160e560020a62461bcd02815260206004820152601760248201527f4552525f414c52454144595f494e495449414c495a4544000000000000000000604482015290519081900360640190fd5b600160a060020a0386166127c7576040805160e560020a62461bcd02815260206004820152601e60248201527f4552525f494e56414c49445f434f4e54524f4c4c45525f414444524553530000604482015290519081900360640190fd5b600160a060020a038516612825576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f464143544f52595f414444524553530000000000604482015290519081900360640190fd5b64e8d4a51000841015612882576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a00008411156128e2576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6128ef868686868661584c565b9695505050505050565b6000806129068786615710565b905060006129148786615638565b905060006129228289615710565b90506000612938670de0b6b3a764000085615710565b9050600061294683836158f8565b90506000612954828e6152a9565b90506000612962828f615392565b9050600061298161297b670de0b6b3a76400008a615392565b8b6152a9565b905061299e82612999670de0b6b3a764000084615392565b615710565b9f9e505050505050505050505050505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612a62576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612ab9576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612b17576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060030154612b49906002670de0b6b3a76400005b046152a9565b831115612ba0576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612bda94939291908990613b54565b915082821015612c22576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b612c30816003015485615638565b6003820155604080518581529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a3612c6c82615707565b612c76338361541d565b612c81853386615695565b506005805461ff00191690559392505050565b336000908152600160209081526040808320600160a060020a038616845290915281205480831115612ce957336000908152600160209081526040808320600160a060020a0388168452909152812055612d18565b612cf38184615392565b336000908152600160209081526040808320600160a060020a03891684529091529020555b336000818152600160209081526040808320600160a060020a038916808552908352928190205481519081529051929392600080516020615dcf833981519152929181900390910190a35060019392505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612f0c949392919089906128f9565b915081612f51576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115612f97576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a6020526040902060030154612fc7906002670de0b6b3a7640000612b43565b82111561301e576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b61302c816003015483615638565b6003820155604080518381529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a361306884615707565b613072338561541d565b612c81853384615695565b600160a060020a031660009081526020819052604090205490565b620f4240670de0b6b3a76400006114f6565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561314a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166131b7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613215576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613276576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a6020526040808220928816825290206003808201546132af91670de0b6b3a7640000610f5e565b861115613306576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600061332783600301548460020154846003015485600201546007546141d9565b905085811115613381576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6133a183600301548460020154846003015485600201548b600754615216565b9450888511156133e9576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b6133f7836003015486615638565b836003018190555061340d826003015488615392565b6003808401829055840154600280860154908501546007546134309491906141d9565b935080841015613478576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156134d0576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6134da8588615710565b81111561351f576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d43378888b604051808381526020018281526020019250505060405180910390a46135878a3387615695565b613592883389615427565b5050506005805461ff001916905590969095509350505050565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561364c576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166136b9576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613717576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613778576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a60205260408082209288168252902060038201546137b2906002670de0b6b3a7640000612b43565b881115613809576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600061382a83600301548460020154846003015485600201546007546141d9565b905085811115613884576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6138a483600301548460020154846003015485600201548d6007546145a9565b9450868510156138ec576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b6138fa83600301548a615638565b8360030181905550613910826003015486615392565b6003808401829055840154600280860154908501546007546139339491906141d9565b93508084101561397b576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156139d3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6139dd8986615710565b811115613a22576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d433788c89604051808381526020018281526020019250505060405180910390a4613a8a8a338b615695565b613592883387615427565b600080613aa28786615710565b90506000613ab8670de0b6b3a764000083615392565b90506000613ac682866152a9565b90506000613ae087612999670de0b6b3a764000085615392565b90506000613aee8c83615392565b90506000613afc828e615710565b90506000613b0a82886158f8565b90506000613b18828e6152a9565b90506000613b268e83615392565b9050613b3f81612999670de0b6b3a76400006000615392565b99505050505050505050509695505050505050565b600080613b618786615710565b90506000613b80613b7a670de0b6b3a764000084615392565b856152a9565b90506000613b9f86613b9a670de0b6b3a764000085615392565b6152a9565b90506000613bad8b83615638565b90506000613bbb828d615710565b90506000613bc982876158f8565b90506000613bd7828d6152a9565b9050613be3818d615392565b9e9d5050505050505050505050505050565b64e8d4a51000670de0b6b3a76400006114f6565b600080613c168786615710565b90506000613c3185613b9a670de0b6b3a76400006000615392565b90506000613c3f8883615392565b90506000613c4d828a615710565b90506000613c6c82613c67670de0b6b3a764000088615710565b6158f8565b90506000613c7a828e6152a9565b90506000613c888e83615392565b90506000613ca161297b670de0b6b3a76400008a615392565b905061299e82613b9a670de0b6b3a764000084615392565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613d68576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0381166000908152600a602052604090205460ff16613dd5576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038316916370a08231916024808301926020929190829003018186803b158015613e3457600080fd5b505afa158015613e48573d6000803e3d6000fd5b505050506040513d6020811015613e5e57600080fd5b5051600160a060020a039091166000908152600a60205260409020600301556005805461ff0019169055565b60085460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613f42576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a038116613faf576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f4d414e414745525f414444524553530000000000604482015290519081900360640190fd5b600654600160a060020a03163314613fff576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790556005805461ff0019169055565b600554600090610100900460ff161561408a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600b5490565b68056bc75e2d6310000081565b600554600090610100900460ff16156140ef576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661414d576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206002015490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b6704a03ce68d21555681565b6000806141e68787615710565b905060006141f48686615710565b905060006142028383615710565b90506000614224670de0b6b3a7640000612999670de0b6b3a764000089615392565b905061423082826152a9565b9a9950505050505050505050565b600061424b33848461551c565b50600192915050565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614303576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661435a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006143646114e0565b905060006143738560006152a9565b905060006143818683615392565b9050600061438f8285615710565b9050806143d4576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b6143de3388615403565b6005546143fa90620100009004600160a060020a03168461541d565b61440382615411565b60005b6009548110156145855760006009828154811061441f57fe5b6000918252602080832090910154600160a060020a0316808352600a90915260408220600301549092509061445485836152a9565b905080614499576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b8989858181106144a557fe5b905060200201358110156144f1576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a60205260409020600301546145179082615392565b600160a060020a0384166000818152600a60209081526040918290206003019390935580518481529051919233927fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed9281900390910190a361457a833383615427565b505050600101614406565b50506005805461ff0019169055505050505050565b600881565b600281565b600181565b6000806145b68786615710565b905060006145cc670de0b6b3a764000085615392565b90506145d885826152a9565b905060006145ea8a6129998c85615638565b905060006145f882856158f8565b9050600061460e670de0b6b3a764000083615392565b905061461a8a826152a9565b9c9b505050505050505050505050565b600a670de0b6b3a76400006114f6565b671bc16d674ec7ffff81565b600554606090610100900460ff1615614697576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60085460ff166146df576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60098054806020026020016040519081016040528092919081815260200182805480156111c957602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311614717575050505050905090565b600081565b600554606090610100900460ff16156146df576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60095490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614849576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a03909116146148aa576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a602052604090205460ff16614908576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615614951576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a60205260408120600301549061497882826152a9565b600b54600160a060020a0385166000908152600a60205260409020600201549192506149a391615392565b600b55600160a060020a0383166000908152600a60205260409020600101546009805460001981019190829081106149d757fe5b60009182526020909120015460098054600160a060020a0390921691849081106149fd57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555081600a600060098581548110614a3d57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600101556009805480614a7057fe5b600082815260208082206000199084018101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556040805160808101825283815280830184815281830185815260608301868152600160a060020a038c168752600a909552929094209051815460ff19169015151781559251600184015551600283015551600390910155614b098533611d348787615392565b600554611d5a908690620100009004600160a060020a031685615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600160a060020a038716614be6576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f44415441544f4b454e5f41444452455353000000604482015290519081900360640190fd5b600160a060020a038416614c44576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f42415345544f4b454e5f41444452455353000000604482015290519081900360640190fd5b614c4f878787614dd4565b604080518781529051600160a060020a038916913391600080516020615d6f8339815191529181900360200190a3614c88848484614dd4565b604080518481529051600160a060020a038616913391600080516020615d6f8339815191529181900360200190a3614cbf816116f3565b614cc761220d565b50505050505050565b600554600090610100900460ff1615614d21576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b5060075490565b336000908152600160209081526040808320600160a060020a0386168452909152812054614d569083615638565b336000818152600160209081526040808320600160a060020a038916808552908352928190208590558051948552519193600080516020615dcf833981519152929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600654600160a060020a03163314614e85576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1615614ef6576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f49535f424f554e440000000000000000000000000000000000000000604482015290519081900360640190fd5b60085460ff1615614f3f576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600811614f99576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b604080516080810182526001808252600980546020808501918252600085870181815260608701828152600160a060020a038c16808452600a9094529782209651875460ff1916901515178755925186860155915160028601559451600390940193909355805491820181559091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805473ffffffffffffffffffffffffffffffffffffffff19169091179055615053838383611920565b505050565b6002670de0b6b3a76400006114f6565b600554600090610100900460ff16156150b9576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16615117576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a6020526040902060020154600b54615141908290615710565b9392505050565b600554600090610100900460ff1615615199576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff166151f7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206003015490565b6000806152238588615710565b905060006152318786615392565b9050600061523f8883615710565b9050600061524d82856158f8565b905061526181670de0b6b3a7640000615392565b9050615275670de0b6b3a764000087615392565b945061528a6152848c836152a9565b86615710565b9b9a5050505050505050505050565b60065460a060020a900460ff1690565b60008282028315806152c35750828482816152c057fe5b04145b615317576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6706f05b59d3b2000081018181101561537a576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6000670de0b6b3a7640000825b049695505050505050565b60008060006153a18585615a1b565b9150915080156153fb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b61540d8282615a40565b5050565b61541a81615a4b565b50565b61540d8282615b27565b604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03848116600483015260248201849052915160009286169163a9059cbb91604480830192602092919082900301818787803b15801561549357600080fd5b505af11580156154a7573d6000803e3d6000fd5b505050506040513d60208110156154bd57600080fd5b5051905080615516576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f45524332305f46414c53450000000000000000000000000000000000604482015290519081900360640190fd5b50505050565b600160a060020a03831660009081526020819052604090205481111561558c576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152602081905260409020546155af9082615392565b600160a060020a0380851660009081526020819052604080822093909355908416815220546155de9082615638565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082820183811015615141576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301523060248301526044820184905291516000928616916323b872dd91606480830192602092919082900301818787803b15801561549357600080fd5b61541a81615b32565b600081615767576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f4449565f5a45524f0000000000000000000000000000000000000000604482015290519081900360640190fd5b670de0b6b3a7640000830283158061578f5750670de0b6b3a764000084828161578c57fe5b04145b6157e3576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b60028304810181811015615841576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b600084828161538757fe5b6006805460058054600160a060020a03978816620100000275ffffffffffffffffffffffffffffffffffffffff00001990911617905560079490945591151560a060020a0274ff0000000000000000000000000000000000000000199590941673ffffffffffffffffffffffffffffffffffffffff199093169290921793909316919091179091556008805491151560ff19928316179055600c80549091166001179081905560ff1690565b60006001831015615953576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42504f575f424153455f544f4f5f4c4f570000000000000000000000604482015290519081900360640190fd5b671bc16d674ec7ffff8311156159b3576040805160e560020a62461bcd02815260206004820152601660248201527f4552525f42504f575f424153455f544f4f5f4849474800000000000000000000604482015290519081900360640190fd5b60006159be83615ba7565b905060006159cc8483615392565b905060006159e2866159dd85615bc2565b615bd0565b9050816159f3579250611222915050565b6000615a0487846305f5e100615c30565b9050615a1082826152a9565b979650505050505050565b600080828410615a315750508082036000615a39565b505081810360015b9250929050565b61540d82308361551c565b30600090815260208190526040902054811115615ab2576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b30600090815260208190526040902054615acc9082615392565b30600090815260208190526040902055600254615ae99082615392565b60025560408051828152905160009130917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b61540d30838361551c565b30600090815260208190526040902054615b4c9082615638565b30600090815260208190526040902055600254615b699082615638565b60025560408051828152905130916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b6000670de0b6b3a7640000615bbb83615bc2565b0292915050565b670de0b6b3a7640000900490565b6000828160028406615bea57670de0b6b3a7640000615bec565b815b90506002840493505b8315615c2857615c0582836152a9565b91506002840615615c1d57615c1a81836152a9565b90505b600284049350615bf5565b949350505050565b6000828180615c4787670de0b6b3a7640000615a1b565b9092509050670de0b6b3a764000080600060015b888410615cff576000670de0b6b3a764000082029050600080615c8f8a615c8a85670de0b6b3a7640000615392565b615a1b565b91509150615ca187613b9a848c6152a9565b9650615cad8784615710565b965086615cbc57505050615cff565b8715615cc6579315935b8015615cd0579315935b8415615ce757615ce08688615392565b9550615cf4565b615cf18688615638565b95505b505050600101615c5b565b5090999850505050505050505056fe4552525f4e4f545f46494e414c495a45440000000000000000000000000000004552525f5245454e5452590000000000000000000000000000000000000000004552525f4c494d49545f494e000000000000000000000000000000000000000063982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a4552525f4e4f545f434f4e54524f4c4c455200000000000000000000000000004552525f4e4f545f424f554e44000000000000000000000000000000000000008c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9254552525f49535f46494e414c495a4544000000000000000000000000000000004552525f4c494d49545f4f5554000000000000000000000000000000000000004552525f4d4154485f415050524f580000000000000000000000000000000000a165627a7a723058207bcbca44799ae1f6beadc2a7a0bab5e141b86fb59884e8cd794df13a11591fb70029", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061040e576000357c0100000000000000000000000000000000000000000000000000000000900480638c28cbe811610232578063be3bbd2e11610142578063d73dd623116100d5578063ec093021116100a4578063ec09302114610d35578063f1b8a9b714610d3d578063f8b2cb4f14610d63578063f8d6aed414610d89578063fde924f714610dc45761040e565b8063d73dd62314610ca9578063dd62ed3e14610cd5578063e4a28a5214610514578063e4e1e53814610d035761040e565b8063cd2ed8fb11610111578063cd2ed8fb14610c25578063cf5e7bd314610c2d578063d1d7bc9114610c53578063d4cadf6814610ca15761040e565b8063be3bbd2e14610bbd578063c36596a614610588578063c6580d1214610c15578063cc77828d14610c1d5761040e565b8063a221ee49116101c5578063b7b800a411610194578063b7b800a414610b62578063ba019dab14610b6a578063ba9530a614610b72578063bc063e1a14610bad578063bc694ea214610bb55761040e565b8063a221ee4914610a82578063a9059cbb14610ab7578063b02f0b7314610ae3578063b0e0d13614610b5a5761040e565b80639381cd2b116102015780639381cd2b14610a44578063948d8ce614610a4c57806395d89b4114610a72578063992e2a9214610a7a5761040e565b80638c28cbe8146109e85780638d4e408314610a0e57806392eefe9b14610a16578063936c347714610a3c5761040e565b806346ab38f11161032d5780636d06dfa0116102c05780638201aa3f1161028f5780638201aa3f146108ef57806382f652ad1461092f5780638656b6531461096a578063867378c5146109a557806389298012146109ad5761040e565b80636d06dfa01461083657806370a082311461086857806376c7a3c71461088e5780637c5e9ea4146108965761040e565b8063506de974116102fc578063506de974146107575780635c1bbaf71461079d5780635db34277146107d8578063661884631461080a5761040e565b806346ab38f11461068757806349b59552146106b95780634bb278f3146106d85780634f69c0d4146106e05761040e565b8063218b5382116103a5578063313ce56711610374578063313ce5671461061057806334e199071461062e578063392e53cd1461064d5780633fdddaa2146106555761040e565b8063218b53821461058857806323b872dd146105905780632f37b624146105c65780633018205f146105ec5761040e565b80631446a7ff116103e15780631446a7ff1461051c57806315e84af91461054a57806318160ddd14610578578063189d00ca146105805761040e565b806302c967481461041357806306fdde0314610457578063095ea7b3146104d457806309a3bbe414610514575b600080fd5b6104456004803603606081101561042957600080fd5b50600160a060020a038135169060208101359060400135610dcc565b60408051918252519081900360200190f35b61045f61113d565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610499578181015183820152602001610481565b50505050905090810190601f1680156104c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610500600480360360408110156104ea57600080fd5b50600160a060020a0381351690602001356111d3565b604080519115158252519081900360200190f35b610445611228565b6104456004803603604081101561053257600080fd5b50600160a060020a0381358116916020013516611235565b6104456004803603604081101561056057600080fd5b50600160a060020a038135811691602001351661138f565b6104456114e0565b6104456114e6565b6104456114fa565b610500600480360360608110156105a657600080fd5b50600160a060020a03813581169160208101359091169060400135611506565b610500600480360360208110156105dc57600080fd5b5035600160a060020a031661166b565b6105f4611689565b60408051600160a060020a039092168252519081900360200190f35b6106186116ea565b6040805160ff9092168252519081900360200190f35b61064b6004803603602081101561064457600080fd5b50356116f3565b005b610500611917565b61064b6004803603606081101561066b57600080fd5b50600160a060020a038135169060208101359060400135611920565b6104456004803603606081101561069d57600080fd5b50600160a060020a038135169060208101359060400135611d6c565b61064b600480360360208110156106cf57600080fd5b5035151561207c565b61064b61220d565b61064b600480360360408110156106f657600080fd5b8135919081019060408101602082013564010000000081111561071857600080fd5b82018360208201111561072a57600080fd5b8035906020019184602083028401116401000000008311171561074c57600080fd5b509092509050612424565b610500600480360360a081101561076d57600080fd5b50600160a060020a038135811691602081013590911690604081013590606081013515159060800135151561270b565b610445600480360360c08110156107b357600080fd5b5080359060208101359060408101359060608101359060808101359060a001356128f9565b610445600480360360608110156107ee57600080fd5b50600160a060020a0381351690602081013590604001356129b1565b6105006004803603604081101561082057600080fd5b50600160a060020a038135169060200135612c94565b6104456004803603606081101561084c57600080fd5b50600160a060020a038135169060208101359060400135612d6c565b6104456004803603602081101561087e57600080fd5b5035600160a060020a031661307d565b610445613098565b6108d6600480360360a08110156108ac57600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356130aa565b6040805192835260208301919091528051918290030190f35b6108d6600480360360a081101561090557600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356135ac565b610445600480360360c081101561094557600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613a95565b610445600480360360c081101561098057600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613b54565b610445613bf5565b610445600480360360c08110156109c357600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613c09565b61064b600480360360208110156109fe57600080fd5b5035600160a060020a0316613cb9565b610500613e8a565b61064b60048036036020811015610a2c57600080fd5b5035600160a060020a0316613e93565b610445614039565b610445614091565b61044560048036036020811015610a6257600080fd5b5035600160a060020a031661409e565b61045f61416c565b6104456141cd565b610445600480360360a0811015610a9857600080fd5b50803590602081013590604081013590606081013590608001356141d9565b61050060048036036040811015610acd57600080fd5b50600160a060020a03813516906020013561423e565b61064b60048036036040811015610af957600080fd5b81359190810190604081016020820135640100000000811115610b1b57600080fd5b820183602082011115610b2d57600080fd5b80359060200191846020830284011164010000000083111715610b4f57600080fd5b509092509050614254565b61044561459a565b61044561459f565b6104456145a4565b610445600480360360c0811015610b8857600080fd5b5080359060208101359060408101359060608101359060808101359060a001356145a9565b61044561462a565b61044561463a565b610bc5614646565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610c01578181015183820152602001610be9565b505050509050019250505060405180910390f35b61044561473e565b610bc5614743565b610445614794565b61064b60048036036020811015610c4357600080fd5b5035600160a060020a031661479a565b61064b600480360360e0811015610c6957600080fd5b50600160a060020a03813581169160208101359160408201359160608101359091169060808101359060a08101359060c00135614b27565b610445614cd0565b61050060048036036040811015610cbf57600080fd5b50600160a060020a038135169060200135614d28565b61044560048036036040811015610ceb57600080fd5b50600160a060020a0381358116916020013516614da9565b61064b60048036036060811015610d1957600080fd5b50600160a060020a038135169060208101359060400135614dd4565b610445615058565b61044560048036036020811015610d5357600080fd5b5035600160a060020a0316615068565b61044560048036036020811015610d7957600080fd5b5035600160a060020a0316615148565b610445600480360360c0811015610d9f57600080fd5b5080359060208101359060408101359060608101359060808101359060a00135615216565b610500615299565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615610e7d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16610ed4576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16610f32576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a60205260409020600390810154610f6791670de0b6b3a76400005b046001016152a9565b831115610fbe576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754610ff894939291908990613a95565b91508161103d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115611083576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b611091816003015485615392565b600382015560006110a283826152a9565b604080518781529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36110f03384615403565b6111026110fd8483615392565b615411565b60055461111e90620100009004600160a060020a03168261541d565b611129863387615427565b50506005805461ff00191690559392505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b820191906000526020600020905b8154815290600101906020018083116111ac57829003601f168201915b5050505050905090565b336000818152600160209081526040808320600160a060020a03871680855290835281842086905581518681529151939490939092600080516020615dcf833981519152928290030190a35060015b92915050565b6802b5e3af16b188000081565b600554600090610100900460ff1615611286576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff166112e4576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16611342576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825281206003808401546002808601549284015490840154939461138694929392906141d9565b95945050505050565b600554600090610100900460ff16156113e0576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1661143e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661149c576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825290206003808301546002808501549284015490840154600754611386949291906141d9565b60025490565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600033600160a060020a03851614806115425750600160a060020a03841660009081526001602090815260408083203384529091529020548211155b611596576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42544f4b454e5f4241445f43414c4c45520000000000000000000000604482015290519081900360640190fd5b6115a184848461551c565b33600160a060020a038516148015906115df5750600160a060020a038416600090815260016020908152604080832033845290915290205460001914155b1561166157600160a060020a03841660009081526001602090815260408083203384529091529020546116129083615392565b600160a060020a0385811660009081526001602090815260408083203380855290835292819020859055805194855251928716939192600080516020615dcf8339815191529281900390910190a35b5060019392505050565b600160a060020a03166000908152600a602052604090205460ff1690565b600554600090610100900460ff16156116da576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600654600160a060020a031690565b60055460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156117a2576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16156117fa576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a0316331461184a576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b64e8d4a510008110156118a7576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a0000811115611907576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6007556005805461ff0019169055565b600c5460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156119cf576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a0390911614611a30576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff16611a8e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615611ad7576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b670de0b6b3a7640000811015611b37576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b6802b5e3af16b1880000811115611b98576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b620f4240821015611bf3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4d494e5f42414c414e43450000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206002015480821115611c9657611c2c600b54611c278484615392565b615638565b600b8190556802b5e3af16b18800001015611c91576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f4d41585f544f54414c5f574549474854000000000000000000000000604482015290519081900360640190fd5b611cb7565b80821015611cb757611cb3600b54611cae8385615392565b615392565b600b555b600160a060020a0384166000908152600a602052604090206002810183905560030180549084905580841115611d0057611cfb8533611cf68785615392565b615695565b611d5a565b80841015611d5a576000611d148286615392565b90506000611d238260006152a9565b9050611d398733611d348585615392565b615427565b600554611d57908890620100009004600160a060020a031683615427565b50505b50506005805461ff0019169055505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615611e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16611e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16611ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754611f0c94939291908990613c09565b915082821015611f54576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a60205260409020600390810154611f8491670de0b6b3a7640000610f5e565b821115611fdb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b611fe9816003015483615392565b60038201556000611ffa85826152a9565b604080518581529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36120483386615403565b6120556110fd8683615392565b60055461207190620100009004600160a060020a03168261541d565b611129863385615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561212b576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1615612183576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a031633146121d3576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805491151560a060020a0274ff0000000000000000000000000000000000000000199092169190911790556005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156122bc576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a039091161461231d576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b60085460ff1615612366576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600211156123c1576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b6008805460ff191660011790556006805474ff0000000000000000000000000000000000000000191660a060020a17905561240468056bc75e2d63100000615707565b6124173368056bc75e2d6310000061541d565b6005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156124d3576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661252a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006125346114e0565b905060006125428583615710565b905080612587576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b60005b6009548110156126f7576000600982815481106125a357fe5b6000918252602080832090910154600160a060020a0316808352600a9091526040822060030154909250906125d885836152a9565b90508061261d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87878581811061262957fe5b90506020020135811115612675576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206003015461269b9082615638565b600160a060020a0384166000818152600a6020908152604091829020600301939093558051848152905191923392600080516020615d6f8339815191529281900390910190a36126ec833383615695565b50505060010161258a565b5061270185615707565b611d5a338661541d565b600c5460009060ff1615612769576040805160e560020a62461bcd02815260206004820152601760248201527f4552525f414c52454144595f494e495449414c495a4544000000000000000000604482015290519081900360640190fd5b600160a060020a0386166127c7576040805160e560020a62461bcd02815260206004820152601e60248201527f4552525f494e56414c49445f434f4e54524f4c4c45525f414444524553530000604482015290519081900360640190fd5b600160a060020a038516612825576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f464143544f52595f414444524553530000000000604482015290519081900360640190fd5b64e8d4a51000841015612882576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a00008411156128e2576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6128ef868686868661584c565b9695505050505050565b6000806129068786615710565b905060006129148786615638565b905060006129228289615710565b90506000612938670de0b6b3a764000085615710565b9050600061294683836158f8565b90506000612954828e6152a9565b90506000612962828f615392565b9050600061298161297b670de0b6b3a76400008a615392565b8b6152a9565b905061299e82612999670de0b6b3a764000084615392565b615710565b9f9e505050505050505050505050505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612a62576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612ab9576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612b17576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060030154612b49906002670de0b6b3a76400005b046152a9565b831115612ba0576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612bda94939291908990613b54565b915082821015612c22576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b612c30816003015485615638565b6003820155604080518581529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a3612c6c82615707565b612c76338361541d565b612c81853386615695565b506005805461ff00191690559392505050565b336000908152600160209081526040808320600160a060020a038616845290915281205480831115612ce957336000908152600160209081526040808320600160a060020a0388168452909152812055612d18565b612cf38184615392565b336000908152600160209081526040808320600160a060020a03891684529091529020555b336000818152600160209081526040808320600160a060020a038916808552908352928190205481519081529051929392600080516020615dcf833981519152929181900390910190a35060019392505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612f0c949392919089906128f9565b915081612f51576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115612f97576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a6020526040902060030154612fc7906002670de0b6b3a7640000612b43565b82111561301e576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b61302c816003015483615638565b6003820155604080518381529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a361306884615707565b613072338561541d565b612c81853384615695565b600160a060020a031660009081526020819052604090205490565b620f4240670de0b6b3a76400006114f6565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561314a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166131b7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613215576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613276576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a6020526040808220928816825290206003808201546132af91670de0b6b3a7640000610f5e565b861115613306576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600061332783600301548460020154846003015485600201546007546141d9565b905085811115613381576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6133a183600301548460020154846003015485600201548b600754615216565b9450888511156133e9576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b6133f7836003015486615638565b836003018190555061340d826003015488615392565b6003808401829055840154600280860154908501546007546134309491906141d9565b935080841015613478576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156134d0576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6134da8588615710565b81111561351f576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d43378888b604051808381526020018281526020019250505060405180910390a46135878a3387615695565b613592883389615427565b5050506005805461ff001916905590969095509350505050565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561364c576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166136b9576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613717576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613778576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a60205260408082209288168252902060038201546137b2906002670de0b6b3a7640000612b43565b881115613809576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600061382a83600301548460020154846003015485600201546007546141d9565b905085811115613884576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6138a483600301548460020154846003015485600201548d6007546145a9565b9450868510156138ec576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b6138fa83600301548a615638565b8360030181905550613910826003015486615392565b6003808401829055840154600280860154908501546007546139339491906141d9565b93508084101561397b576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156139d3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6139dd8986615710565b811115613a22576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d433788c89604051808381526020018281526020019250505060405180910390a4613a8a8a338b615695565b613592883387615427565b600080613aa28786615710565b90506000613ab8670de0b6b3a764000083615392565b90506000613ac682866152a9565b90506000613ae087612999670de0b6b3a764000085615392565b90506000613aee8c83615392565b90506000613afc828e615710565b90506000613b0a82886158f8565b90506000613b18828e6152a9565b90506000613b268e83615392565b9050613b3f81612999670de0b6b3a76400006000615392565b99505050505050505050509695505050505050565b600080613b618786615710565b90506000613b80613b7a670de0b6b3a764000084615392565b856152a9565b90506000613b9f86613b9a670de0b6b3a764000085615392565b6152a9565b90506000613bad8b83615638565b90506000613bbb828d615710565b90506000613bc982876158f8565b90506000613bd7828d6152a9565b9050613be3818d615392565b9e9d5050505050505050505050505050565b64e8d4a51000670de0b6b3a76400006114f6565b600080613c168786615710565b90506000613c3185613b9a670de0b6b3a76400006000615392565b90506000613c3f8883615392565b90506000613c4d828a615710565b90506000613c6c82613c67670de0b6b3a764000088615710565b6158f8565b90506000613c7a828e6152a9565b90506000613c888e83615392565b90506000613ca161297b670de0b6b3a76400008a615392565b905061299e82613b9a670de0b6b3a764000084615392565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613d68576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0381166000908152600a602052604090205460ff16613dd5576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038316916370a08231916024808301926020929190829003018186803b158015613e3457600080fd5b505afa158015613e48573d6000803e3d6000fd5b505050506040513d6020811015613e5e57600080fd5b5051600160a060020a039091166000908152600a60205260409020600301556005805461ff0019169055565b60085460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613f42576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a038116613faf576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f4d414e414745525f414444524553530000000000604482015290519081900360640190fd5b600654600160a060020a03163314613fff576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790556005805461ff0019169055565b600554600090610100900460ff161561408a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600b5490565b68056bc75e2d6310000081565b600554600090610100900460ff16156140ef576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661414d576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206002015490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b6704a03ce68d21555681565b6000806141e68787615710565b905060006141f48686615710565b905060006142028383615710565b90506000614224670de0b6b3a7640000612999670de0b6b3a764000089615392565b905061423082826152a9565b9a9950505050505050505050565b600061424b33848461551c565b50600192915050565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614303576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661435a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006143646114e0565b905060006143738560006152a9565b905060006143818683615392565b9050600061438f8285615710565b9050806143d4576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b6143de3388615403565b6005546143fa90620100009004600160a060020a03168461541d565b61440382615411565b60005b6009548110156145855760006009828154811061441f57fe5b6000918252602080832090910154600160a060020a0316808352600a90915260408220600301549092509061445485836152a9565b905080614499576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b8989858181106144a557fe5b905060200201358110156144f1576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a60205260409020600301546145179082615392565b600160a060020a0384166000818152600a60209081526040918290206003019390935580518481529051919233927fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed9281900390910190a361457a833383615427565b505050600101614406565b50506005805461ff0019169055505050505050565b600881565b600281565b600181565b6000806145b68786615710565b905060006145cc670de0b6b3a764000085615392565b90506145d885826152a9565b905060006145ea8a6129998c85615638565b905060006145f882856158f8565b9050600061460e670de0b6b3a764000083615392565b905061461a8a826152a9565b9c9b505050505050505050505050565b600a670de0b6b3a76400006114f6565b671bc16d674ec7ffff81565b600554606090610100900460ff1615614697576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60085460ff166146df576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60098054806020026020016040519081016040528092919081815260200182805480156111c957602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311614717575050505050905090565b600081565b600554606090610100900460ff16156146df576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60095490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614849576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a03909116146148aa576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a602052604090205460ff16614908576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615614951576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a60205260408120600301549061497882826152a9565b600b54600160a060020a0385166000908152600a60205260409020600201549192506149a391615392565b600b55600160a060020a0383166000908152600a60205260409020600101546009805460001981019190829081106149d757fe5b60009182526020909120015460098054600160a060020a0390921691849081106149fd57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555081600a600060098581548110614a3d57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600101556009805480614a7057fe5b600082815260208082206000199084018101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556040805160808101825283815280830184815281830185815260608301868152600160a060020a038c168752600a909552929094209051815460ff19169015151781559251600184015551600283015551600390910155614b098533611d348787615392565b600554611d5a908690620100009004600160a060020a031685615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600160a060020a038716614be6576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f44415441544f4b454e5f41444452455353000000604482015290519081900360640190fd5b600160a060020a038416614c44576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f42415345544f4b454e5f41444452455353000000604482015290519081900360640190fd5b614c4f878787614dd4565b604080518781529051600160a060020a038916913391600080516020615d6f8339815191529181900360200190a3614c88848484614dd4565b604080518481529051600160a060020a038616913391600080516020615d6f8339815191529181900360200190a3614cbf816116f3565b614cc761220d565b50505050505050565b600554600090610100900460ff1615614d21576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b5060075490565b336000908152600160209081526040808320600160a060020a0386168452909152812054614d569083615638565b336000818152600160209081526040808320600160a060020a038916808552908352928190208590558051948552519193600080516020615dcf833981519152929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600654600160a060020a03163314614e85576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1615614ef6576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f49535f424f554e440000000000000000000000000000000000000000604482015290519081900360640190fd5b60085460ff1615614f3f576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600811614f99576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b604080516080810182526001808252600980546020808501918252600085870181815260608701828152600160a060020a038c16808452600a9094529782209651875460ff1916901515178755925186860155915160028601559451600390940193909355805491820181559091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805473ffffffffffffffffffffffffffffffffffffffff19169091179055615053838383611920565b505050565b6002670de0b6b3a76400006114f6565b600554600090610100900460ff16156150b9576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16615117576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a6020526040902060020154600b54615141908290615710565b9392505050565b600554600090610100900460ff1615615199576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff166151f7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206003015490565b6000806152238588615710565b905060006152318786615392565b9050600061523f8883615710565b9050600061524d82856158f8565b905061526181670de0b6b3a7640000615392565b9050615275670de0b6b3a764000087615392565b945061528a6152848c836152a9565b86615710565b9b9a5050505050505050505050565b60065460a060020a900460ff1690565b60008282028315806152c35750828482816152c057fe5b04145b615317576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6706f05b59d3b2000081018181101561537a576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6000670de0b6b3a7640000825b049695505050505050565b60008060006153a18585615a1b565b9150915080156153fb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b61540d8282615a40565b5050565b61541a81615a4b565b50565b61540d8282615b27565b604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03848116600483015260248201849052915160009286169163a9059cbb91604480830192602092919082900301818787803b15801561549357600080fd5b505af11580156154a7573d6000803e3d6000fd5b505050506040513d60208110156154bd57600080fd5b5051905080615516576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f45524332305f46414c53450000000000000000000000000000000000604482015290519081900360640190fd5b50505050565b600160a060020a03831660009081526020819052604090205481111561558c576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152602081905260409020546155af9082615392565b600160a060020a0380851660009081526020819052604080822093909355908416815220546155de9082615638565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082820183811015615141576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301523060248301526044820184905291516000928616916323b872dd91606480830192602092919082900301818787803b15801561549357600080fd5b61541a81615b32565b600081615767576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f4449565f5a45524f0000000000000000000000000000000000000000604482015290519081900360640190fd5b670de0b6b3a7640000830283158061578f5750670de0b6b3a764000084828161578c57fe5b04145b6157e3576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b60028304810181811015615841576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b600084828161538757fe5b6006805460058054600160a060020a03978816620100000275ffffffffffffffffffffffffffffffffffffffff00001990911617905560079490945591151560a060020a0274ff0000000000000000000000000000000000000000199590941673ffffffffffffffffffffffffffffffffffffffff199093169290921793909316919091179091556008805491151560ff19928316179055600c80549091166001179081905560ff1690565b60006001831015615953576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42504f575f424153455f544f4f5f4c4f570000000000000000000000604482015290519081900360640190fd5b671bc16d674ec7ffff8311156159b3576040805160e560020a62461bcd02815260206004820152601660248201527f4552525f42504f575f424153455f544f4f5f4849474800000000000000000000604482015290519081900360640190fd5b60006159be83615ba7565b905060006159cc8483615392565b905060006159e2866159dd85615bc2565b615bd0565b9050816159f3579250611222915050565b6000615a0487846305f5e100615c30565b9050615a1082826152a9565b979650505050505050565b600080828410615a315750508082036000615a39565b505081810360015b9250929050565b61540d82308361551c565b30600090815260208190526040902054811115615ab2576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b30600090815260208190526040902054615acc9082615392565b30600090815260208190526040902055600254615ae99082615392565b60025560408051828152905160009130917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b61540d30838361551c565b30600090815260208190526040902054615b4c9082615638565b30600090815260208190526040902055600254615b699082615638565b60025560408051828152905130916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b6000670de0b6b3a7640000615bbb83615bc2565b0292915050565b670de0b6b3a7640000900490565b6000828160028406615bea57670de0b6b3a7640000615bec565b815b90506002840493505b8315615c2857615c0582836152a9565b91506002840615615c1d57615c1a81836152a9565b90505b600284049350615bf5565b949350505050565b6000828180615c4787670de0b6b3a7640000615a1b565b9092509050670de0b6b3a764000080600060015b888410615cff576000670de0b6b3a764000082029050600080615c8f8a615c8a85670de0b6b3a7640000615392565b615a1b565b91509150615ca187613b9a848c6152a9565b9650615cad8784615710565b965086615cbc57505050615cff565b8715615cc6579315935b8015615cd0579315935b8415615ce757615ce08688615392565b9550615cf4565b615cf18688615638565b95505b505050600101615c5b565b5090999850505050505050505056fe4552525f4e4f545f46494e414c495a45440000000000000000000000000000004552525f5245454e5452590000000000000000000000000000000000000000004552525f4c494d49545f494e000000000000000000000000000000000000000063982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a4552525f4e4f545f434f4e54524f4c4c455200000000000000000000000000004552525f4e4f545f424f554e44000000000000000000000000000000000000008c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9254552525f49535f46494e414c495a4544000000000000000000000000000000004552525f4c494d49545f4f5554000000000000000000000000000000000000004552525f4d4154485f415050524f580000000000000000000000000000000000a165627a7a723058207bcbca44799ae1f6beadc2a7a0bab5e141b86fb59884e8cd794df13a11591fb70029", + "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:537: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;2973:11;2980:3;2973:6;:11::i;:::-;2959:25;;2997:11;3011:16;3016:3;3021:5;3011:4;:16::i;:::-;2997:30;;3038:13;3054:24;3060:4;3066:11;3071:5;3066:4;:11::i;:::-;3054:5;:24::i;:::-;3038:40;-1:-1:-1;3093:11:5;3089:57;;3127:8;-1:-1:-1;3120:15:5;;-1:-1:-1;;3120:15:5;3089:57;3156:18;3177:40;3188:4;3194:6;1444:13:2;3177:10:5;:40::i;:::-;3156:61;;3234:29;3239:8;3249:13;3234:4;:29::i;:::-;3227:36;2733:537;-1:-1:-1;;;;;;;2733:537: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;3276:1047::-;3372:4;3424:3;3372:4;;3460:20;3469:4;730:6:2;3460:8:5;:20::i;:::-;3437:43;;-1:-1:-1;3437:43:5;-1:-1:-1;730:6:2;;3490:9:5;3815:1;3801:495;3826:9;3818:4;:17;3801:495;;3856:9;730:6:2;3868:1:5;:8;3856:20;;3891:6;3899:9;3912:29;3921:1;3924:16;3929:4;730:6:2;3924:4:5;:16::i;:::-;3912:8;:29::i;:::-;3890:51;;;;3962:22;3967:4;3973:10;3978:1;3981;3973:4;:10::i;3962:22::-;3955:29;;4005:16;4010:4;4016;4005;:16::i;:::-;3998:23;-1:-1:-1;4039:9:5;4035:20;;4050:5;;;;;4035:20;4074:4;4070:30;;;4091:9;;;4070:30;4118:4;4114:30;;;4135:9;;;4114:30;4162:8;4158:128;;;4196:15;4201:3;4206:4;4196;:15::i;:::-;4190:21;;4158:128;;;4256:15;4261:3;4266:4;4256;:15::i;:::-;4250:21;;4158:128;-1:-1:-1;;;3837:3:5;;3801:495;;;-1:-1:-1;4313:3:5;;3276:1047;-1:-1:-1;;;;;;;;;3276:1047: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": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BPool.sol", + "ast": { + "absolutePath": "/home/travis/build/oceanprotocol/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": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BToken.sol", + "file": "./BToken.sol", + "id": 1425, + "nodeType": "ImportDirective", + "scope": 3779, + "sourceUnit": 4286, + "src": "186:22:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/oceanprotocol/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, + 6537 + ], + "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, + 6537, + 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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6586, + "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": 6537, + "src": "12444:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$", + "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_$6537", + "typeString": "contract IERC20" + } + }, + "id": 2445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 6482, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6586, + "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": 6537, + "src": "25198:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$", + "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_$6537", + "typeString": "contract IERC20" + } + }, + "id": 3692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6520, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6537, + "src": "25416:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$", + "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_$6537", + "typeString": "contract IERC20" + } + }, + "id": 3720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6491, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": { + "absolutePath": "/home/travis/build/oceanprotocol/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": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BToken.sol", + "file": "./BToken.sol", + "id": 1425, + "nodeType": "ImportDirective", + "scope": 3779, + "sourceUnit": 4286, + "src": "186:22:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/travis/build/oceanprotocol/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, + 6537 + ], + "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, + 6537, + 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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6586, + "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": 6537, + "src": "12444:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$", + "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_$6537", + "typeString": "contract IERC20" + } + }, + "id": 2445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 6482, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6586, + "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": 6537, + "src": "25198:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$", + "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_$6537", + "typeString": "contract IERC20" + } + }, + "id": 3692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6520, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6537, + "src": "25416:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$", + "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_$6537", + "typeString": "contract IERC20" + } + }, + "id": 3720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6491, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.4", + "updatedAt": "2020-10-22T12:03:05.087Z", + "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/abis/BToken.json b/abis/BToken.json new file mode 100644 index 0000000..14b9af1 --- /dev/null +++ b/abis/BToken.json @@ -0,0 +1,14010 @@ +{ + "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\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BToken.sol\":\"BToken\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BConst.sol\":{\"keccak256\":\"0x21675a0793e0be762a27e09ed3b0bd86e035c73ac3078dd841c38804445d5f5a\",\"urls\":[\"bzzr://47016ef4a80276f320b28a058fc92e7d9d93433bb5e4aa934668383cbefad77e\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BNum.sol\":{\"keccak256\":\"0xc4e5c934d6b04c1fad116ea81c2fa65eaa2700e4e48bcc5045c8c96f55e729c8\",\"urls\":[\"bzzr://a3946b7fd2095ca3c7c4bb3daf3078cc48e20b0e107f113e10fb0c6ebaa77e74\"]},\"/home/travis/build/oceanprotocol/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": "0x60c0604052601360808190527f42616c616e63657220506f6f6c20546f6b656e0000000000000000000000000060a090815261003e91600391906100a3565b506040805180820190915260038082527f42505400000000000000000000000000000000000000000000000000000000006020909201918252610083916004916100a3565b506005805460ff1916601217905534801561009d57600080fd5b5061013e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100e457805160ff1916838001178555610111565b82800160010185558215610111579182015b828111156101115782518255916020019190600101906100f6565b5061011d929150610121565b5090565b61013b91905b8082111561011d5760008155600101610127565b90565b610bc88061014d6000396000f3fe608060405234801561001057600080fd5b50600436106101c6576000357c01000000000000000000000000000000000000000000000000000000009004806395d89b4111610116578063bc694ea2116100b4578063d73dd6231161008e578063d73dd623146103e4578063dd62ed3e14610410578063e4a28a5214610288578063ec0930211461043e576101c6565b8063bc694ea2146103d4578063c36596a6146102b2578063c6580d12146103dc576101c6565b8063b0e0d136116100f0578063b0e0d136146103b4578063b7b800a4146103bc578063ba019dab146103c4578063bc063e1a146103cc576101c6565b806395d89b4114610378578063992e2a9214610380578063a9059cbb14610388576101c6565b806323b872dd1161018357806370a082311161015d57806370a082311461033a57806376c7a3c714610360578063867378c5146103685780639381cd2b14610370576101c6565b806323b872dd146102ba578063313ce567146102f0578063661884631461030e576101c6565b806306fdde03146101cb578063095ea7b31461024857806309a3bbe41461028857806318160ddd146102a2578063189d00ca146102aa578063218b5382146102b2575b600080fd5b6101d3610446565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561020d5781810151838201526020016101f5565b50505050905090810190601f16801561023a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025e57600080fd5b50600160a060020a0381351690602001356104dc565b604080519115158252519081900360200190f35b610290610530565b60408051918252519081900360200190f35b61029061053d565b610290610543565b610290610557565b610274600480360360608110156102d057600080fd5b50600160a060020a03813581169160208101359091169060400135610563565b6102f86106c8565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032457600080fd5b50600160a060020a0381351690602001356106d1565b6102906004803603602081101561035057600080fd5b5035600160a060020a03166107a9565b6102906107c4565b6102906107d6565b6102906107ea565b6101d36107f7565b610290610858565b6102746004803603604081101561039e57600080fd5b50600160a060020a038135169060200135610864565b61029061087a565b61029061087f565b610290610884565b610290610889565b610290610899565b6102906108a5565b610274600480360360408110156103fa57600080fd5b50600160a060020a0381351690602001356108aa565b6102906004803603604081101561042657600080fd5b50600160a060020a038135811691602001351661092b565b610290610956565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104d25780601f106104a7576101008083540402835291602001916104d2565b820191906000526020600020905b8154815290600101906020018083116104b557829003601f168201915b5050505050905090565b336000818152600160209081526040808320600160a060020a03871680855290835281842086905581518681529151939490939092600080516020610b7d833981519152928290030190a350600192915050565b6802b5e3af16b188000081565b60025490565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600033600160a060020a038516148061059f5750600160a060020a03841660009081526001602090815260408083203384529091529020548211155b6105f3576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42544f4b454e5f4241445f43414c4c45520000000000000000000000604482015290519081900360640190fd5b6105fe848484610966565b33600160a060020a0385161480159061063c5750600160a060020a038416600090815260016020908152604080832033845290915290205460001914155b156106be57600160a060020a038416600090815260016020908152604080832033845290915290205461066f9083610a82565b600160a060020a0385811660009081526001602090815260408083203380855290835292819020859055805194855251928716939192600080516020610b7d8339815191529281900390910190a35b5060019392505050565b60055460ff1690565b336000908152600160209081526040808320600160a060020a03861684529091528120548083111561072657336000908152600160209081526040808320600160a060020a0388168452909152812055610755565b6107308184610a82565b336000908152600160209081526040808320600160a060020a03891684529091529020555b336000818152600160209081526040808320600160a060020a038916808552908352928190205481519081529051929392600080516020610b7d833981519152929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b620f4240670de0b6b3a7640000610553565b64e8d4a51000670de0b6b3a7640000610553565b68056bc75e2d6310000081565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104d25780601f106104a7576101008083540402835291602001916104d2565b6704a03ce68d21555681565b6000610871338484610966565b50600192915050565b600881565b600281565b600181565b600a670de0b6b3a7640000610553565b671bc16d674ec7ffff81565b600081565b336000908152600160209081526040808320600160a060020a03861684529091528120546108d89083610af3565b336000818152600160209081526040808320600160a060020a038916808552908352928190208590558051948552519193600080516020610b7d833981519152929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6002670de0b6b3a7640000610553565b600160a060020a0383166000908152602081905260409020548111156109d6576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152602081905260409020546109f99082610a82565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a289082610af3565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000806000610a918585610b57565b915091508015610aeb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b600082820183811015610b50576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b9392505050565b600080828410610b6d5750508082036000610b75565b505081810360015b925092905056fe8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a165627a7a72305820118805bb64d4c864b5a76fa6ca987b24e407431ab691f2998760e51f5551899a0029", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c6576000357c01000000000000000000000000000000000000000000000000000000009004806395d89b4111610116578063bc694ea2116100b4578063d73dd6231161008e578063d73dd623146103e4578063dd62ed3e14610410578063e4a28a5214610288578063ec0930211461043e576101c6565b8063bc694ea2146103d4578063c36596a6146102b2578063c6580d12146103dc576101c6565b8063b0e0d136116100f0578063b0e0d136146103b4578063b7b800a4146103bc578063ba019dab146103c4578063bc063e1a146103cc576101c6565b806395d89b4114610378578063992e2a9214610380578063a9059cbb14610388576101c6565b806323b872dd1161018357806370a082311161015d57806370a082311461033a57806376c7a3c714610360578063867378c5146103685780639381cd2b14610370576101c6565b806323b872dd146102ba578063313ce567146102f0578063661884631461030e576101c6565b806306fdde03146101cb578063095ea7b31461024857806309a3bbe41461028857806318160ddd146102a2578063189d00ca146102aa578063218b5382146102b2575b600080fd5b6101d3610446565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561020d5781810151838201526020016101f5565b50505050905090810190601f16801561023a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603604081101561025e57600080fd5b50600160a060020a0381351690602001356104dc565b604080519115158252519081900360200190f35b610290610530565b60408051918252519081900360200190f35b61029061053d565b610290610543565b610290610557565b610274600480360360608110156102d057600080fd5b50600160a060020a03813581169160208101359091169060400135610563565b6102f86106c8565b6040805160ff9092168252519081900360200190f35b6102746004803603604081101561032457600080fd5b50600160a060020a0381351690602001356106d1565b6102906004803603602081101561035057600080fd5b5035600160a060020a03166107a9565b6102906107c4565b6102906107d6565b6102906107ea565b6101d36107f7565b610290610858565b6102746004803603604081101561039e57600080fd5b50600160a060020a038135169060200135610864565b61029061087a565b61029061087f565b610290610884565b610290610889565b610290610899565b6102906108a5565b610274600480360360408110156103fa57600080fd5b50600160a060020a0381351690602001356108aa565b6102906004803603604081101561042657600080fd5b50600160a060020a038135811691602001351661092b565b610290610956565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104d25780601f106104a7576101008083540402835291602001916104d2565b820191906000526020600020905b8154815290600101906020018083116104b557829003601f168201915b5050505050905090565b336000818152600160209081526040808320600160a060020a03871680855290835281842086905581518681529151939490939092600080516020610b7d833981519152928290030190a350600192915050565b6802b5e3af16b188000081565b60025490565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600033600160a060020a038516148061059f5750600160a060020a03841660009081526001602090815260408083203384529091529020548211155b6105f3576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42544f4b454e5f4241445f43414c4c45520000000000000000000000604482015290519081900360640190fd5b6105fe848484610966565b33600160a060020a0385161480159061063c5750600160a060020a038416600090815260016020908152604080832033845290915290205460001914155b156106be57600160a060020a038416600090815260016020908152604080832033845290915290205461066f9083610a82565b600160a060020a0385811660009081526001602090815260408083203380855290835292819020859055805194855251928716939192600080516020610b7d8339815191529281900390910190a35b5060019392505050565b60055460ff1690565b336000908152600160209081526040808320600160a060020a03861684529091528120548083111561072657336000908152600160209081526040808320600160a060020a0388168452909152812055610755565b6107308184610a82565b336000908152600160209081526040808320600160a060020a03891684529091529020555b336000818152600160209081526040808320600160a060020a038916808552908352928190205481519081529051929392600080516020610b7d833981519152929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b620f4240670de0b6b3a7640000610553565b64e8d4a51000670de0b6b3a7640000610553565b68056bc75e2d6310000081565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104d25780601f106104a7576101008083540402835291602001916104d2565b6704a03ce68d21555681565b6000610871338484610966565b50600192915050565b600881565b600281565b600181565b600a670de0b6b3a7640000610553565b671bc16d674ec7ffff81565b600081565b336000908152600160209081526040808320600160a060020a03861684529091528120546108d89083610af3565b336000818152600160209081526040808320600160a060020a038916808552908352928190208590558051948552519193600080516020610b7d833981519152929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6002670de0b6b3a7640000610553565b600160a060020a0383166000908152602081905260409020548111156109d6576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152602081905260409020546109f99082610a82565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a289082610af3565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000806000610a918585610b57565b915091508015610aeb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b600082820183811015610b50576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b9392505050565b600080828410610b6d5750508082036000610b75565b505081810360015b925092905056fe8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a165627a7a72305820118805bb64d4c864b5a76fa6ca987b24e407431ab691f2998760e51f5551899a0029", + "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": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BToken.sol", + "ast": { + "absolutePath": "/home/travis/build/oceanprotocol/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": "/home/travis/build/oceanprotocol/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": 6538, + "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": 6580, + "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": 6580, + "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": 6580, + "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": 6580, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6580, + "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": 6580, + "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": 6580, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6580, + "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": 6580, + "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": 6537, + "src": "2843:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$6537", + "typeString": "contract IERC20" + } + }, + "id": 3983, + "nodeType": "InheritanceSpecifier", + "src": "2843:6:7" + } + ], + "contractDependencies": [ + 280, + 1422, + 3979, + 6537 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4285, + "linearizedBaseContracts": [ + 4285, + 6537, + 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": 6500, + "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": 6482, + "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": 6475, + "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": 6552, + "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": 6552, + "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": [ + 6536 + ], + "referencedDeclaration": 6536, + "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": 6509, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6536 + ], + "referencedDeclaration": 6536, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6536 + ], + "referencedDeclaration": 6536, + "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": 6552, + "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": 6491, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6536 + ], + "referencedDeclaration": 6536, + "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": 6520, + "visibility": "external" + } + ], + "scope": 4286, + "src": "2812:2299:7" + } + ], + "src": "643:4469:7" + }, + "legacyAST": { + "absolutePath": "/home/travis/build/oceanprotocol/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": "/home/travis/build/oceanprotocol/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": 6538, + "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": 6580, + "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": 6580, + "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": 6580, + "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": 6580, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6580, + "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": 6580, + "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": 6580, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6580, + "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": 6580, + "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": 6537, + "src": "2843:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$6537", + "typeString": "contract IERC20" + } + }, + "id": 3983, + "nodeType": "InheritanceSpecifier", + "src": "2843:6:7" + } + ], + "contractDependencies": [ + 280, + 1422, + 3979, + 6537 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4285, + "linearizedBaseContracts": [ + 4285, + 6537, + 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": 6500, + "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": 6482, + "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": 6475, + "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": 6552, + "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": 6552, + "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": [ + 6536 + ], + "referencedDeclaration": 6536, + "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": 6509, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6536 + ], + "referencedDeclaration": 6536, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6536 + ], + "referencedDeclaration": 6536, + "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": 6552, + "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": 6491, + "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": 6552, + "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": 6552, + "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": [ + 6555, + 6556 + ], + "referencedDeclaration": 6556, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": 6552, + "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": [ + 6536 + ], + "referencedDeclaration": 6536, + "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": 6520, + "visibility": "external" + } + ], + "scope": 4286, + "src": "2812:2299:7" + } + ], + "src": "643:4469:7" + }, + "compiler": { + "name": "solc", + "version": "0.5.7+commit.6da8b019.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.4", + "updatedAt": "2020-10-22T12:03:05.101Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..e37497b --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6919 @@ +{ + "name": "oceanpools", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@graphprotocol/graph-cli": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@graphprotocol/graph-cli/-/graph-cli-0.18.0.tgz", + "integrity": "sha512-UsLB2LAwnVfUgkd4D0Rbfqq6ImLlDq9TEL/tBMYmZkB7pgnJZ/gJT5ouC33Gh0yhdXOYqWRk/KUcxSpgsKviPw==", + "dev": true, + "requires": { + "assemblyscript": "git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3", + "chalk": "^3.0.0", + "chokidar": "^3.0.2", + "debug": "^4.1.1", + "docker-compose": "^0.23.2", + "dockerode": "^2.5.8", + "fs-extra": "^8.1.0", + "glob": "^7.1.2", + "gluegun": "^4.1.2", + "graphql": "^14.0.2", + "immutable": "^3.8.2", + "ipfs-http-client": "^34.0.0", + "jayson": "^3.0.2", + "js-yaml": "^3.13.1", + "keytar": "^5.0.0", + "node-fetch": "^2.3.0", + "pkginfo": "^0.4.1", + "prettier": "^1.13.5", + "request": "^2.88.0", + "tmp": "^0.1.0", + "yaml": "^1.5.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@graphprotocol/graph-ts": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/@graphprotocol/graph-ts/-/graph-ts-0.18.1.tgz", + "integrity": "sha512-vwDZjsnHlRKg8vdR+bfPdHwDixf0ozY6FU9CyVjrGLQpsEEISoNwsSCriUXE4Wv57LhmZEl8Ce3dhiPoqsv9tg==", + "dev": true, + "requires": { + "assemblyscript": "git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3" + } + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=", + "dev": true + }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" + }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "requires": { + "defer-to-connect": "^1.0.1" + } + }, + "@truffle/blockchain-utils": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.0.11.tgz", + "integrity": "sha512-9MyQ/20M96clhIcC7fVFIckGSB8qMsmcdU6iYt98HXJ9GOLNKsCaJFz1OVsJncVreYwTUhoEXTrVBc8zrmPDJQ==" + }, + "@truffle/contract-schema": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@truffle/contract-schema/-/contract-schema-3.3.2.tgz", + "integrity": "sha512-PFNUHlcMFh6CDLDXTYCpm1G5rM5EJlneA9ml5y1TbkLgjLMICI2XLilimFZ/DC0THQekHpoQC+W/QMD/OTiTiw==", + "requires": { + "ajv": "^6.10.0", + "crypto-js": "^3.1.9-1", + "debug": "^4.1.0" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "@truffle/error": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.0.6.tgz", + "integrity": "sha512-QUM9ZWiwlXGixFGpV18g5I6vua6/r+ZV9W/5DQA5go9A3eZUNPHPaTKMIQPJLYn6+ZV5jg5H28zCHq56LHF3yA==" + }, + "@types/connect": { + "version": "3.4.33", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.33.tgz", + "integrity": "sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/express-serve-static-core": { + "version": "4.17.13", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.13.tgz", + "integrity": "sha512-RgDi5a4nuzam073lRGKTUIaL3eF2+H7LJvJ8eUnCI0wA6SNjXc44DCmWNiTLs/AZ7QlsFWZiw/gTG3nSQGL0fA==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "@types/lodash": { + "version": "4.14.165", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.165.tgz", + "integrity": "sha512-tjSSOTHhI5mCHTy/OOXYIhi2Wt1qcbHmuXD1Ha7q70CgI/I71afO4XtLb/cVexki1oVYchpul/TOuu3Arcdxrg==", + "dev": true + }, + "@types/node": { + "version": "10.17.45", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.45.tgz", + "integrity": "sha512-a+oe0zGtwRsSDynACia/z1e4gKPNnDhAV3G6GWY6ZNCzaujNCdKC7dE2JFkGHAlUhCRHgXNmWbh417bi9dEXBw==" + }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "@types/qs": { + "version": "6.9.5", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz", + "integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==", + "dev": true + }, + "@types/range-parser": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz", + "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==", + "dev": true + }, + "JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, + "requires": { + "event-target-shim": "^5.0.0" + } + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "apisauce": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/apisauce/-/apisauce-1.1.2.tgz", + "integrity": "sha512-AqOrOVk71JPSqugA6PdrkE2S0w1GC/f3xPZPMHJ1O+Z73pwT2uoGnr8JbfmB/gvO2cnygYzlBOnkD/mN6W1FMQ==", + "dev": true, + "requires": { + "axios": "^0.19.0", + "ramda": "^0.25.0" + } + }, + "app-module-path": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", + "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=" + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "array.prototype.map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", + "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.4" + } + }, + "asmcrypto.js": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-2.3.2.tgz", + "integrity": "sha512-3FgFARf7RupsZETQ1nHnhLUUvpcttcCq1iZCaVAbJZbCZ5VNRrNyvpDyHTOb0KC3llFcsyOT/a99NZcCbeiEsA==", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "assemblyscript": { + "version": "git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3", + "from": "git+https://github.com/AssemblyScript/assemblyscript.git#36040d5b5312f19a025782b5e36663823494c2f3", + "dev": true, + "requires": { + "@protobufjs/utf8": "^1.1.0", + "binaryen": "77.0.0-nightly.20190407", + "glob": "^7.1.3", + "long": "^4.0.0", + "opencollective-postinstall": "^2.0.0", + "source-map-support": "^0.5.11" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + } + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "dev": true, + "requires": { + "follow-redirects": "1.5.10" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "requires": { + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "regenerator-runtime": "^0.10.5" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + } + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bignumber.js": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==" + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" + }, + "binaryen": { + "version": "77.0.0-nightly.20190407", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-77.0.0-nightly.20190407.tgz", + "integrity": "sha512-1mxYNvQ0xywMe582K7V6Vo2zzhZZxMTeGHH8aE/+/AND8f64D8Q1GThVY3RVRwGY/4p+p95ccw9Xbw2ovFXRIg==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "blakejs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", + "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + } + }, + "borc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/borc/-/borc-2.1.2.tgz", + "integrity": "sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w==", + "dev": true, + "requires": { + "bignumber.js": "^9.0.0", + "buffer": "^5.5.0", + "commander": "^2.15.0", + "ieee754": "^1.1.13", + "iso-url": "~0.4.7", + "json-text-sequence": "~0.1.0", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", + "dev": true + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==" + } + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "bn.js": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==" + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "dev": true, + "requires": { + "base-x": "^3.0.2" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + } + } + }, + "call-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", + "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.0" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "chokidar": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", + "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.4.0" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "cids": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", + "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "class-is": "^1.1.0", + "multibase": "~0.6.0", + "multicodec": "^1.0.0", + "multihashes": "~0.4.15" + }, + "dependencies": { + "multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "varint": "^5.0.0" + } + } + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-is": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-spinners": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz", + "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==", + "dev": true + }, + "cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "dev": true, + "requires": { + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^2.1.1" + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, + "core-js": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + } + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "crypto-js": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", + "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==" + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "requires": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + } + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "requires": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + } + }, + "decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "requires": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "dependencies": { + "file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==" + } + } + }, + "decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "requires": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + } + }, + "decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "requires": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + } + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "delimit-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", + "integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "requires": { + "repeating": "^2.0.0" + } + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, + "detect-node": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", + "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "docker-compose": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/docker-compose/-/docker-compose-0.23.5.tgz", + "integrity": "sha512-y3swhij4q3pyX45kJH7OMHZjoHPfiaTe8RPAQQ9fbamKQHI+k+1HnZm0T9NbbMFusTn0het0eK4WjXGM+rcF2A==", + "dev": true + }, + "docker-modem": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-1.0.9.tgz", + "integrity": "sha512-lVjqCSCIAUDZPAZIeyM125HXfNvOmYYInciphNrLrylUtKyW66meAjSPXWchKVzoIYZx69TPnAepVSSkeawoIw==", + "dev": true, + "requires": { + "JSONStream": "1.3.2", + "debug": "^3.2.6", + "readable-stream": "~1.0.26-4", + "split-ca": "^1.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "dockerode": { + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-2.5.8.tgz", + "integrity": "sha512-+7iOUYBeDTScmOmQqpUYQaE7F4vvIt6+gIZNHWhqAQEI887tiPFB9OvXI/HzQYqfUNvukMK+9myLW63oTJPZpw==", + "dev": true, + "requires": { + "concat-stream": "~1.6.2", + "docker-modem": "^1.0.8", + "tar-fs": "~1.16.3" + } + }, + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" + }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "dev": true, + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", + "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==", + "dev": true + }, + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "enquirer": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.4.tgz", + "integrity": "sha512-pkYrrDZumL2VS6VBGDhqbajCM2xpkUNLuKfGPjfKaSIBKYopQbqEFyrOkRMIb2HDR/rO1kGhEt/5twBwtzKBXw==", + "dev": true, + "requires": { + "ansi-colors": "^3.2.1" + }, + "dependencies": { + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true + } + } + }, + "err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + }, + "dependencies": { + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } + } + }, + "es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==" + }, + "es-get-iterator": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.1.tgz", + "integrity": "sha512-qorBw8Y7B15DVLaJWy6WdEV/ZkieBcu6QCq/xzWzGOKJqgG1j754vXRfZ3NY7HSShneqU43mPB4OkQBTkvHhFw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.1", + "has-symbols": "^1.0.1", + "is-arguments": "^1.0.4", + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-string": "^1.0.5", + "isarray": "^2.0.5" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "dev": true + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "requires": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + } + }, + "eth-lib": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", + "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", + "xhr-request-promise": "^0.1.2" + } + }, + "ethers": { + "version": "4.0.48", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.48.tgz", + "integrity": "sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g==", + "requires": { + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.5.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true + }, + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz", + "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "p-finally": "^2.0.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "p-finally": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", + "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", + "dev": true + } + } + }, + "expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" + }, + "explain-error": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/explain-error/-/explain-error-1.0.4.tgz", + "integrity": "sha1-p5PTrAytTGq1cemWj7urbLJTKSk=", + "dev": true + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz", + "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==" + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "requires": { + "pend": "~1.2.0" + } + }, + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "requires": { + "is-buffer": "~2.0.3" + } + }, + "flatmap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/flatmap/-/flatmap-0.0.3.tgz", + "integrity": "sha1-Hxik2TgVLUlZZfnJWNkjqy3WabQ=", + "dev": true + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dev": true, + "requires": { + "debug": "=3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-jetpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/fs-jetpack/-/fs-jetpack-2.4.0.tgz", + "integrity": "sha512-S/o9Dd7K9A7gicVU32eT8G0kHcmSu0rCVdP79P0MWInKFb8XpTc8Syhoo66k9no+HDshtlh4pUJTws8X+8fdFQ==", + "dev": true, + "requires": { + "minimatch": "^3.0.2", + "rimraf": "^2.6.3" + } + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "get-intrinsic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", + "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "global": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "requires": { + "min-document": "^2.19.0", + "process": "~0.5.1" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + }, + "gluegun": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/gluegun/-/gluegun-4.5.0.tgz", + "integrity": "sha512-nZskG9hMePmI/YMmWb58cTGW7X2vCbbEFak8Zs91p8QgMG8ToaZYdW5HKmzLOsy1cnGs2WcjhOvhUFAFH71FAg==", + "dev": true, + "requires": { + "apisauce": "^1.0.1", + "app-module-path": "^2.2.0", + "cli-table3": "~0.5.0", + "colors": "^1.3.3", + "cosmiconfig": "6.0.0", + "cross-spawn": "^7.0.0", + "ejs": "^2.6.1", + "enquirer": "2.3.4", + "execa": "^3.0.0", + "fs-jetpack": "^2.2.2", + "lodash.camelcase": "^4.3.0", + "lodash.kebabcase": "^4.1.1", + "lodash.lowercase": "^4.3.0", + "lodash.lowerfirst": "^4.3.1", + "lodash.pad": "^4.5.1", + "lodash.padend": "^4.6.1", + "lodash.padstart": "^4.6.1", + "lodash.repeat": "^4.1.0", + "lodash.snakecase": "^4.1.1", + "lodash.startcase": "^4.4.0", + "lodash.trim": "^4.5.1", + "lodash.trimend": "^4.5.1", + "lodash.trimstart": "^4.5.1", + "lodash.uppercase": "^4.3.0", + "lodash.upperfirst": "^4.3.1", + "ora": "^4.0.0", + "pluralize": "^8.0.0", + "ramdasauce": "^2.1.0", + "semver": "^7.0.0", + "which": "^2.0.0", + "yargs-parser": "^16.1.0" + }, + "dependencies": { + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + }, + "yargs-parser": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz", + "integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "graphql": { + "version": "14.7.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.7.0.tgz", + "integrity": "sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==", + "dev": true, + "requires": { + "iterall": "^1.2.2" + } + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, + "hi-base32": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/hi-base32/-/hi-base32-0.5.0.tgz", + "integrity": "sha512-DDRmxSyoYuvjUb9EnXdoiMChBZ7ZcUVJsK5Frd3kqMhuBxvmZdnBeynAVfj7/ECbn++CekcoprvC/rprHPAtow==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "requires": { + "punycode": "2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + } + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "immutable": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", + "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=", + "dev": true + }, + "import-fresh": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", + "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "ip-regex": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz", + "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A==", + "dev": true + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "ipfs-block": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/ipfs-block/-/ipfs-block-0.8.1.tgz", + "integrity": "sha512-0FaCpmij+jZBoUYhjoB5ptjdl9QzvrdRIoBmUU5JiBnK2GA+4YM/ifklaB8ePRhA/rRzhd+KYBjvMFMAL4NrVQ==", + "dev": true, + "requires": { + "cids": "~0.7.0", + "class-is": "^1.1.0" + } + }, + "ipfs-http-client": { + "version": "34.0.0", + "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-34.0.0.tgz", + "integrity": "sha512-4RCkk8ix4Dqn6sxqFVwuXWCZ1eLFPsVaj6Ijvu1fs9VYgxgVudsW9PWwarlr4mw1xUCmPWYyXnEbGgzBrfMy0Q==", + "dev": true, + "requires": { + "abort-controller": "^3.0.0", + "async": "^2.6.1", + "bignumber.js": "^9.0.0", + "bl": "^3.0.0", + "bs58": "^4.0.1", + "buffer": "^5.4.2", + "cids": "~0.7.1", + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "end-of-stream": "^1.4.1", + "err-code": "^2.0.0", + "explain-error": "^1.0.4", + "flatmap": "0.0.3", + "glob": "^7.1.3", + "ipfs-block": "~0.8.1", + "ipfs-utils": "~0.0.3", + "ipld-dag-cbor": "~0.15.0", + "ipld-dag-pb": "~0.17.3", + "ipld-raw": "^4.0.0", + "is-ipfs": "~0.6.1", + "is-pull-stream": "0.0.0", + "is-stream": "^2.0.0", + "iso-stream-http": "~0.1.2", + "iso-url": "~0.4.6", + "iterable-ndjson": "^1.1.0", + "just-kebab-case": "^1.1.0", + "just-map-keys": "^1.1.0", + "kind-of": "^6.0.2", + "ky": "^0.11.2", + "ky-universal": "^0.2.2", + "lru-cache": "^5.1.1", + "multiaddr": "^6.0.6", + "multibase": "~0.6.0", + "multicodec": "~0.5.1", + "multihashes": "~0.4.14", + "once": "^1.4.0", + "peer-id": "~0.12.3", + "peer-info": "~0.15.1", + "promise-nodeify": "^3.0.1", + "promisify-es6": "^1.0.3", + "pull-defer": "~0.2.3", + "pull-stream": "^3.6.9", + "pull-to-stream": "~0.1.1", + "pump": "^3.0.0", + "qs": "^6.5.2", + "readable-stream": "^3.1.1", + "stream-to-pull-stream": "^1.7.2", + "tar-stream": "^2.0.1", + "through2": "^3.0.1" + }, + "dependencies": { + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", + "dev": true + }, + "bl": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-3.0.1.tgz", + "integrity": "sha512-jrCW5ZhfQ/Vt07WX1Ngs+yn9BDqPL/gw28S7s9H6QK/gupnizNzJAss5akW20ISgOrbLTlXOOCTJeNUQqruAWQ==", + "dev": true, + "requires": { + "readable-stream": "^3.0.1" + } + }, + "concat-stream": { + "version": "github:hugomrdias/concat-stream#057bc7b5d6d8df26c8cf00a3f151b6721a0a8034", + "from": "github:hugomrdias/concat-stream#057bc7b5d6d8df26c8cf00a3f151b6721a0a8034", + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^3.0.2" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "ndjson": { + "version": "github:hugomrdias/ndjson#4db16da6b42e5b39bf300c3a7cde62abb3fa3a11", + "from": "github:hugomrdias/ndjson#4db16da6b42e5b39bf300c3a7cde62abb3fa3a11", + "requires": { + "json-stringify-safe": "^5.0.1", + "minimist": "^1.2.0", + "split2": "^3.1.0", + "through2": "^3.0.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "tar-stream": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.4.tgz", + "integrity": "sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw==", + "dev": true, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "bl": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", + "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + } + } + } + } + }, + "ipfs-utils": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-0.0.4.tgz", + "integrity": "sha512-7cZf6aGj2FG3XJWhCNwn4mS93Q0GEWjtBZvEHqzgI43U2qzNDCyzfS1pei1Y5F+tw/zDJ5U4XG0G9reJxR53Ig==", + "dev": true, + "requires": { + "buffer": "^5.2.1", + "is-buffer": "^2.0.3", + "is-electron": "^2.2.0", + "is-pull-stream": "0.0.0", + "is-stream": "^2.0.0", + "kind-of": "^6.0.2", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "ipld-dag-cbor": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/ipld-dag-cbor/-/ipld-dag-cbor-0.15.3.tgz", + "integrity": "sha512-m23nG7ZyoVFnkK55/bLAErc7EfiMgaEQlqHWDTGzPI+O5r6bPfp+qbL5zTVSIT8tpbHmu174dwerVtLoVgeVyA==", + "dev": true, + "requires": { + "borc": "^2.1.2", + "buffer": "^5.5.0", + "cids": "~0.8.0", + "is-circular": "^1.0.2", + "multicodec": "^1.0.0", + "multihashing-async": "~0.8.0" + }, + "dependencies": { + "cids": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.8.3.tgz", + "integrity": "sha512-yoXTbV3llpm+EBGWKeL9xKtksPE/s6DPoDSY4fn8I8TEW1zehWXPSB0pwAXVDlLaOlrw+sNynj995uD9abmPhA==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "class-is": "^1.1.0", + "multibase": "^1.0.0", + "multicodec": "^1.0.1", + "multihashes": "^1.0.1" + } + }, + "multibase": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-1.0.1.tgz", + "integrity": "sha512-KcCxpBVY8fdVKu4dJMAahq4F/2Z/9xqEjIiR7PiMe7LRGeorFn2NLmicN6nLBCqQvft6MG2Lc9X5P0IdyvnxEw==", + "dev": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "varint": "^5.0.0" + } + }, + "multihashes": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-1.0.1.tgz", + "integrity": "sha512-S27Tepg4i8atNiFaU5ZOm3+gl3KQlUanLs/jWcBxQHFttgq+5x1OgbQmf2d8axJ/48zYGBd/wT9d723USMFduw==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "multibase": "^1.0.1", + "varint": "^5.0.0" + } + } + } + }, + "ipld-dag-pb": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.17.4.tgz", + "integrity": "sha512-YwCxETEMuXVspOKOhjIOHJvKvB/OZfCDkpSFiYBQN2/JQjM9y/RFCYzIQGm0wg7dCFLrhvfjAZLTSaKs65jzWA==", + "dev": true, + "requires": { + "cids": "~0.7.0", + "class-is": "^1.1.0", + "multicodec": "~0.5.1", + "multihashing-async": "~0.7.0", + "protons": "^1.0.1", + "stable": "~0.1.8" + }, + "dependencies": { + "err-code": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", + "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", + "dev": true + }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "multihashing-async": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.7.0.tgz", + "integrity": "sha512-SCbfl3f+DzJh+/5piukga9ofIOxwfT05t8R4jfzZIJ88YE9zU9+l3K2X+XB19MYyxqvyK9UJRNWbmQpZqQlbRA==", + "dev": true, + "requires": { + "blakejs": "^1.1.0", + "buffer": "^5.2.1", + "err-code": "^1.1.2", + "js-sha3": "~0.8.0", + "multihashes": "~0.4.13", + "murmurhash3js-revisited": "^3.0.0" + } + } + } + }, + "ipld-raw": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/ipld-raw/-/ipld-raw-4.0.1.tgz", + "integrity": "sha512-WjIdtZ06jJEar8zh+BHB84tE6ZdbS/XNa7+XCArOYfmeJ/c01T9VQpeMwdJQYn5c3s5UvvCu7y4VIi3vk2g1bA==", + "dev": true, + "requires": { + "cids": "~0.7.0", + "multicodec": "^1.0.0", + "multihashing-async": "~0.8.0" + }, + "dependencies": { + "multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "varint": "^5.0.0" + } + } + } + }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==" + }, + "is-callable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==" + }, + "is-circular": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-circular/-/is-circular-1.0.2.tgz", + "integrity": "sha512-YttjnrswnUYRVJvxCvu8z+PGMUSzC2JttP0OEXezlAEdp3EXzhf7IZ3j0gRAybJBQupedIZFhY61Tga6E0qASA==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + }, + "is-electron": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.0.tgz", + "integrity": "sha512-SpMppC2XR3YdxSzczXReBjqs2zGscWQpBIKqwXYBFic0ERaxNVgwLCHwOLZeESfdJQjX0RDvrJ1lBXX2ij+G1Q==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, + "is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true + }, + "is-ip": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-3.1.0.tgz", + "integrity": "sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q==", + "dev": true, + "requires": { + "ip-regex": "^4.0.0" + } + }, + "is-ipfs": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.6.3.tgz", + "integrity": "sha512-HyRot1dvLcxImtDqPxAaY1miO6WsiP/z7Yxpg2qpaLWv5UdhAPtLvHJ4kMLM0w8GSl8AFsVF23PHe1LzuWrUlQ==", + "dev": true, + "requires": { + "bs58": "^4.0.1", + "cids": "~0.7.0", + "mafmt": "^7.0.0", + "multiaddr": "^7.2.1", + "multibase": "~0.6.0", + "multihashes": "~0.4.13" + }, + "dependencies": { + "multiaddr": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-7.5.0.tgz", + "integrity": "sha512-GvhHsIGDULh06jyb6ev+VfREH9evJCFIRnh3jUt9iEZ6XDbyoisZRFEI9bMvK/AiR6y66y6P+eoBw9mBYMhMvw==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "cids": "~0.8.0", + "class-is": "^1.1.0", + "is-ip": "^3.1.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" + }, + "dependencies": { + "cids": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.8.3.tgz", + "integrity": "sha512-yoXTbV3llpm+EBGWKeL9xKtksPE/s6DPoDSY4fn8I8TEW1zehWXPSB0pwAXVDlLaOlrw+sNynj995uD9abmPhA==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "class-is": "^1.1.0", + "multibase": "^1.0.0", + "multicodec": "^1.0.1", + "multihashes": "^1.0.1" + }, + "dependencies": { + "multibase": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-1.0.1.tgz", + "integrity": "sha512-KcCxpBVY8fdVKu4dJMAahq4F/2Z/9xqEjIiR7PiMe7LRGeorFn2NLmicN6nLBCqQvft6MG2Lc9X5P0IdyvnxEw==", + "dev": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + } + } + }, + "multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "dev": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "multihashes": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-1.0.1.tgz", + "integrity": "sha512-S27Tepg4i8atNiFaU5ZOm3+gl3KQlUanLs/jWcBxQHFttgq+5x1OgbQmf2d8axJ/48zYGBd/wT9d723USMFduw==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "multibase": "^1.0.1", + "varint": "^5.0.0" + }, + "dependencies": { + "multibase": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-1.0.1.tgz", + "integrity": "sha512-KcCxpBVY8fdVKu4dJMAahq4F/2Z/9xqEjIiR7PiMe7LRGeorFn2NLmicN6nLBCqQvft6MG2Lc9X5P0IdyvnxEw==", + "dev": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + } + } + } + } + }, + "multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "varint": "^5.0.0" + } + } + } + }, + "is-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", + "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==" + }, + "is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=" + }, + "is-negative-zero": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", + "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=" + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-promise": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-1.0.1.tgz", + "integrity": "sha1-MVc3YcBX4zwukaq56W2gjO++duU=", + "dev": true + }, + "is-pull-stream": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/is-pull-stream/-/is-pull-stream-0.0.0.tgz", + "integrity": "sha1-o7w9HG0wVRUcRr3m85nv7SFEDKk=", + "dev": true + }, + "is-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, + "is-set": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", + "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "iso-random-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-1.1.1.tgz", + "integrity": "sha512-YEt/7xOwTdu4KXIgtdgGFkiLUsBaddbnkmHyaFdjJYIcD7V4gpQHPvYC5tyh3kA0PQ01y9lWm1ruVdf8Mqzovg==", + "dev": true, + "requires": { + "buffer": "^5.4.3", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "iso-stream-http": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/iso-stream-http/-/iso-stream-http-0.1.2.tgz", + "integrity": "sha512-oHEDNOysIMTNypbg2f1SlydqRBvjl4ZbSE9+0awVxnkx3K2stGTFwB/kpVqnB6UEfF8QD36kAjDwZvqyXBLMnQ==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "iso-url": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.7.tgz", + "integrity": "sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog==", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "iterable-ndjson": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/iterable-ndjson/-/iterable-ndjson-1.1.0.tgz", + "integrity": "sha512-OOp1Lb0o3k5MkXHx1YaIY5Z0ELosZfTnBaas9f8opJVcZGBIONA2zY/6CYE+LKkqrSDooIneZbrBGgOZnHPkrg==", + "dev": true, + "requires": { + "string_decoder": "^1.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + } + } + }, + "iterall": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", + "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", + "dev": true + }, + "iterate-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", + "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==" + }, + "iterate-value": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", + "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", + "requires": { + "es-get-iterator": "^1.0.2", + "iterate-iterator": "^1.0.1" + } + }, + "jayson": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-3.3.4.tgz", + "integrity": "sha512-p2stl9m1C0vM8mdXM1m8shn0v5ECohD5gEDRzLD6CPv02pxRm1lv0jEz0HX6RvfJ/uO9z9Zzlzti7/uqq+Rh5g==", + "dev": true, + "requires": { + "@types/connect": "^3.4.33", + "@types/express-serve-static-core": "^4.17.9", + "@types/lodash": "^4.14.159", + "@types/node": "^12.12.54", + "JSONStream": "^1.3.5", + "commander": "^2.20.3", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.20", + "uuid": "^3.4.0" + }, + "dependencies": { + "@types/node": { + "version": "12.19.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.5.tgz", + "integrity": "sha512-Wgdl27uw/jUYUFyajUGKSjDNGxmJrZi9sjeG6UJImgUtKbJoO9aldx+1XODN1EpNDX9DirvbvHHmTsNlb8GwMA==", + "dev": true + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } + } + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json-text-sequence": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", + "integrity": "sha1-py8hfcSvxGKf/1/rME3BvVGi89I=", + "dev": true, + "requires": { + "delimit-stream": "0.1.0" + } + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "just-kebab-case": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/just-kebab-case/-/just-kebab-case-1.1.0.tgz", + "integrity": "sha512-QkuwuBMQ9BQHMUEkAtIA4INLrkmnnveqlFB1oFi09gbU0wBdZo6tTnyxNWMR84zHxBuwK7GLAwqN8nrvVxOLTA==", + "dev": true + }, + "just-map-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/just-map-keys/-/just-map-keys-1.1.0.tgz", + "integrity": "sha512-oNKi+4y7fr8lXnhKYpBbCkiwHRVkAnx0VDkCeTDtKKMzGr1Lz1Yym+RSieKUTKim68emC5Yxrb4YmiF9STDO+g==", + "dev": true + }, + "keypair": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/keypair/-/keypair-1.0.1.tgz", + "integrity": "sha1-dgNxknCvtlZO04oiCHoG/Jqk6hs=", + "dev": true + }, + "keytar": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/keytar/-/keytar-5.6.0.tgz", + "integrity": "sha512-ueulhshHSGoryfRXaIvTj0BV1yB0KddBGhGoqCxSN9LR1Ks1GKuuCdVhF+2/YOs5fMl6MlTI9On1a4DHDXoTow==", + "requires": { + "nan": "2.14.1", + "prebuild-install": "5.3.3" + }, + "dependencies": { + "nan": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==" + } + } + }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "requires": { + "json-buffer": "3.0.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "ky": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/ky/-/ky-0.11.2.tgz", + "integrity": "sha512-5Aou5BWue5/mkPqIRqzSWW+0Hkl403pr/2AIrCKYw7cVl/Xoe8Xe4KLBO0PRjbz7GnRe1/8wW1KhqQNFFE7/GQ==", + "dev": true + }, + "ky-universal": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/ky-universal/-/ky-universal-0.2.2.tgz", + "integrity": "sha512-fb32o/fKy/ux2ALWa9HU2hvGtfOq7/vn2nH0FpVE+jwNzyTeORlAbj3Fiw+WLMbUlmVqZIWupnLZ2USHvqwZHw==", + "dev": true, + "requires": { + "abort-controller": "^3.0.0", + "node-fetch": "^2.3.0" + } + }, + "libp2p-crypto": { + "version": "0.16.3", + "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.3.tgz", + "integrity": "sha512-ro7/5Tu+f8p2+qDS1JrROnO++nNaAaBFs+VVXVHLuTMnbnMASu1eUtSlWPk1uOwikAlBFTvfqe5J1bK6Bpq6Pg==", + "dev": true, + "requires": { + "asmcrypto.js": "^2.3.2", + "asn1.js": "^5.0.1", + "async": "^2.6.1", + "bn.js": "^4.11.8", + "browserify-aes": "^1.2.0", + "bs58": "^4.0.1", + "iso-random-stream": "^1.1.0", + "keypair": "^1.0.1", + "libp2p-crypto-secp256k1": "~0.3.0", + "multihashing-async": "~0.5.1", + "node-forge": "~0.9.1", + "pem-jwk": "^2.0.0", + "protons": "^1.0.1", + "rsa-pem-to-jwk": "^1.1.3", + "tweetnacl": "^1.0.0", + "ursa-optional": "~0.10.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "multihashing-async": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.5.2.tgz", + "integrity": "sha512-mmyG6M/FKxrpBh9xQDUvuJ7BbqT93ZeEeH5X6LeMYKoYshYLr9BDdCsvDtZvn+Egf+/Xi+aOznrWL4vp3s+p0Q==", + "dev": true, + "requires": { + "blakejs": "^1.1.0", + "js-sha3": "~0.8.0", + "multihashes": "~0.4.13", + "murmurhash3js": "^3.0.1", + "nodeify": "^1.0.1" + } + }, + "tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "dev": true + } + } + }, + "libp2p-crypto-secp256k1": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/libp2p-crypto-secp256k1/-/libp2p-crypto-secp256k1-0.3.1.tgz", + "integrity": "sha512-evrfK/CeUSd/lcELUdDruyPBvxDmLairth75S32OLl3H+++2m2fV24JEtxzdFS9JH3xEFw0h6JFO8DBa1bP9dA==", + "dev": true, + "requires": { + "async": "^2.6.2", + "bs58": "^4.0.1", + "multihashing-async": "~0.6.0", + "nodeify": "^1.0.1", + "safe-buffer": "^5.1.2", + "secp256k1": "^3.6.2" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "multihashing-async": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.6.0.tgz", + "integrity": "sha512-Qv8pgg99Lewc191A5nlXy0bSd2amfqlafNJZmarU6Sj7MZVjpR94SCxQjf4DwPtgWZkiLqsjUQBXA2RSq+hYyA==", + "dev": true, + "requires": { + "blakejs": "^1.1.0", + "js-sha3": "~0.8.0", + "multihashes": "~0.4.13", + "murmurhash3js": "^3.0.1", + "nodeify": "^1.0.1" + } + } + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "requires": { + "p-locate": "^5.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", + "dev": true + }, + "lodash.lowercase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.lowercase/-/lodash.lowercase-4.3.0.tgz", + "integrity": "sha1-RlFaztSssLcJMTMzOvBo5MOxTp0=", + "dev": true + }, + "lodash.lowerfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.lowerfirst/-/lodash.lowerfirst-4.3.1.tgz", + "integrity": "sha1-3jx7EuAsZSSgBZwvbLfFxSZVoT0=", + "dev": true + }, + "lodash.pad": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz", + "integrity": "sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=", + "dev": true + }, + "lodash.padend": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", + "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=", + "dev": true + }, + "lodash.padstart": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", + "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=", + "dev": true + }, + "lodash.repeat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-4.1.0.tgz", + "integrity": "sha1-/H3oEx2MisB+S0n3T/6CnR8r7EQ=", + "dev": true + }, + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", + "dev": true + }, + "lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha1-lDbjTtJgk+1/+uGTYUQ1CRXZrdg=", + "dev": true + }, + "lodash.trim": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trim/-/lodash.trim-4.5.1.tgz", + "integrity": "sha1-NkJefukL5KpeJ7zruFt9EepHqlc=", + "dev": true + }, + "lodash.trimend": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trimend/-/lodash.trimend-4.5.1.tgz", + "integrity": "sha1-EoBENyhrmMrYmWt5QU4RMAEUCC8=", + "dev": true + }, + "lodash.trimstart": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.trimstart/-/lodash.trimstart-4.5.1.tgz", + "integrity": "sha1-j/TexTLYJIavWVc8OURZFOlEp/E=", + "dev": true + }, + "lodash.uppercase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.uppercase/-/lodash.uppercase-4.3.0.tgz", + "integrity": "sha1-xASr/RRp+Tkx+bskz2zH1XBZvHM=", + "dev": true + }, + "lodash.upperfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "integrity": "sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=", + "dev": true + }, + "log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "requires": { + "chalk": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "dev": true + }, + "looper": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/looper/-/looper-3.0.0.tgz", + "integrity": "sha1-LvpUw7HLq6m5Su4uWRSwvlf7t0k=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "mafmt": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/mafmt/-/mafmt-7.1.0.tgz", + "integrity": "sha512-vpeo9S+hepT3k2h5iFxzEHvvR0GPBx9uKaErmnRzYNcaKb03DgOArjEMlgG4a9LcuZZ89a3I8xbeto487n26eA==", + "dev": true, + "requires": { + "multiaddr": "^7.3.0" + }, + "dependencies": { + "cids": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.8.3.tgz", + "integrity": "sha512-yoXTbV3llpm+EBGWKeL9xKtksPE/s6DPoDSY4fn8I8TEW1zehWXPSB0pwAXVDlLaOlrw+sNynj995uD9abmPhA==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "class-is": "^1.1.0", + "multibase": "^1.0.0", + "multicodec": "^1.0.1", + "multihashes": "^1.0.1" + }, + "dependencies": { + "multibase": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-1.0.1.tgz", + "integrity": "sha512-KcCxpBVY8fdVKu4dJMAahq4F/2Z/9xqEjIiR7PiMe7LRGeorFn2NLmicN6nLBCqQvft6MG2Lc9X5P0IdyvnxEw==", + "dev": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + } + } + }, + "multiaddr": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-7.5.0.tgz", + "integrity": "sha512-GvhHsIGDULh06jyb6ev+VfREH9evJCFIRnh3jUt9iEZ6XDbyoisZRFEI9bMvK/AiR6y66y6P+eoBw9mBYMhMvw==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "cids": "~0.8.0", + "class-is": "^1.1.0", + "is-ip": "^3.1.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" + } + }, + "multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "dev": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "varint": "^5.0.0" + } + }, + "multihashes": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-1.0.1.tgz", + "integrity": "sha512-S27Tepg4i8atNiFaU5ZOm3+gl3KQlUanLs/jWcBxQHFttgq+5x1OgbQmf2d8axJ/48zYGBd/wT9d723USMFduw==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "multibase": "^1.0.1", + "varint": "^5.0.0" + }, + "dependencies": { + "multibase": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-1.0.1.tgz", + "integrity": "sha512-KcCxpBVY8fdVKu4dJMAahq4F/2Z/9xqEjIiR7PiMe7LRGeorFn2NLmicN6nLBCqQvft6MG2Lc9X5P0IdyvnxEw==", + "dev": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + } + } + } + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "requires": { + "dom-walk": "^0.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, + "mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "requires": { + "mkdirp": "*" + } + }, + "mocha": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.1.2.tgz", + "integrity": "sha512-I8FRAcuACNMLQn3lS4qeWLxXqLvGf6r2CaLstDpZmMUUSmvW6Cnm1AuHxgbc7ctZVRcfwspCRbDHymPsi3dkJw==", + "requires": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.4.2", + "debug": "4.1.1", + "diff": "4.0.2", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.14.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.2", + "object.assign": "4.1.0", + "promise.allsettled": "1.0.2", + "serialize-javascript": "4.0.0", + "strip-json-comments": "3.0.1", + "supports-color": "7.1.0", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.0.0", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "mock-fs": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.13.0.tgz", + "integrity": "sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multiaddr": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.1.1.tgz", + "integrity": "sha512-Q1Ika0F9MNhMtCs62Ue+GWIJtRFEhZ3Xz8wH7/MZDVZTWhil1/H2bEGN02kUees3hkI3q1oHSjmXYDM0gxaFjQ==", + "dev": true, + "requires": { + "bs58": "^4.0.1", + "class-is": "^1.1.0", + "hi-base32": "~0.5.0", + "ip": "^1.1.5", + "is-ip": "^2.0.0", + "varint": "^5.0.0" + }, + "dependencies": { + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true + }, + "is-ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-2.0.0.tgz", + "integrity": "sha1-aO6gfooKCpTC0IDdZ0xzGrKkYas=", + "dev": true, + "requires": { + "ip-regex": "^2.0.0" + } + } + } + }, + "multibase": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", + "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", + "dev": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "multicodec": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", + "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", + "dev": true, + "requires": { + "varint": "^5.0.0" + } + }, + "multihashes": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", + "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" + }, + "dependencies": { + "multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "dev": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + } + } + }, + "multihashing-async": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.8.2.tgz", + "integrity": "sha512-2lKa1autuCy8x7KIEj9aVNbAb3aIMRFYIwN7mq/zD4pxgNIVgGlm+f6GKY4880EOF2Y3GktHYssRy7TAJQ2DyQ==", + "dev": true, + "requires": { + "blakejs": "^1.1.0", + "buffer": "^5.4.3", + "err-code": "^2.0.0", + "js-sha3": "^0.8.0", + "multihashes": "^1.0.1", + "murmurhash3js-revisited": "^3.0.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "multibase": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-1.0.1.tgz", + "integrity": "sha512-KcCxpBVY8fdVKu4dJMAahq4F/2Z/9xqEjIiR7PiMe7LRGeorFn2NLmicN6nLBCqQvft6MG2Lc9X5P0IdyvnxEw==", + "dev": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "multihashes": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-1.0.1.tgz", + "integrity": "sha512-S27Tepg4i8atNiFaU5ZOm3+gl3KQlUanLs/jWcBxQHFttgq+5x1OgbQmf2d8axJ/48zYGBd/wT9d723USMFduw==", + "dev": true, + "requires": { + "buffer": "^5.6.0", + "multibase": "^1.0.1", + "varint": "^5.0.0" + } + } + } + }, + "murmurhash3js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/murmurhash3js/-/murmurhash3js-3.0.1.tgz", + "integrity": "sha1-Ppg+W0fCoG9DpxMXTn5DXKBEuZg=", + "dev": true + }, + "murmurhash3js-revisited": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz", + "integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==", + "dev": true + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" + }, + "nano-json-stream-parser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" + }, + "napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "node-abi": { + "version": "2.19.3", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.19.3.tgz", + "integrity": "sha512-9xZrlyfvKhWme2EXFKQhZRp1yNWT/uI1luYPr3sFl+H4keYY4xR+1jO7mvTTijIsHf1M+QDe9uWuKeEpLInIlg==", + "requires": { + "semver": "^5.4.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true + }, + "node-forge": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.2.tgz", + "integrity": "sha512-naKSScof4Wn+aoHU6HBsifh92Zeicm1GDQKd1vp3Y/kOi8ub0DozCa9KpvYNCXslFHYRmLNiqRopGdTGwNLpNw==", + "dev": true + }, + "nodeify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nodeify/-/nodeify-1.0.1.tgz", + "integrity": "sha1-ZKtpp7268DzhB7TwM1yHwLnpGx0=", + "dev": true, + "requires": { + "is-promise": "~1.0.0", + "promise": "~1.3.0" + } + }, + "noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "requires": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "oboe": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", + "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", + "requires": { + "http-https": "^1.0.0" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opencollective-postinstall": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", + "dev": true + }, + "optimist": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", + "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", + "dev": true, + "requires": { + "wordwrap": "~0.0.2" + } + }, + "ora": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-4.1.1.tgz", + "integrity": "sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A==", + "dev": true, + "requires": { + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.2.0", + "is-interactive": "^1.0.0", + "log-symbols": "^3.0.0", + "mute-stream": "0.0.8", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "original-require": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/original-require/-/original-require-1.0.1.tgz", + "integrity": "sha1-DxMEcVhM0zURxew4yNWSE/msXiA=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-limit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", + "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "requires": { + "p-finally": "^1.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-headers": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", + "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==" + }, + "parse-json": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", + "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "pbkdf2": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "peer-id": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.12.5.tgz", + "integrity": "sha512-3xVWrtIvNm9/OPzaQBgXDrfWNx63AftgFQkvqO6YSZy7sP3Fuadwwbn54F/VO9AnpyW/26i0WRQz9FScivXrmw==", + "dev": true, + "requires": { + "async": "^2.6.3", + "class-is": "^1.1.0", + "libp2p-crypto": "~0.16.1", + "multihashes": "~0.4.15" + } + }, + "peer-info": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/peer-info/-/peer-info-0.15.1.tgz", + "integrity": "sha512-Y91Q2tZRC0CpSTPd1UebhGqniOrOAk/aj60uYUcWJXCoLTAnGu+4LJGoiay8ayudS6ice7l3SKhgL/cS62QacA==", + "dev": true, + "requires": { + "mafmt": "^6.0.2", + "multiaddr": "^6.0.3", + "peer-id": "~0.12.2", + "unique-by": "^1.0.0" + }, + "dependencies": { + "mafmt": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/mafmt/-/mafmt-6.0.10.tgz", + "integrity": "sha512-FjHDnew6dW9lUu3eYwP0FvvJl9uvNbqfoJM+c1WJcSyutNEIlyu6v3f/rlPnD1cnmue38IjuHlhBdIh3btAiyw==", + "dev": true, + "requires": { + "multiaddr": "^6.1.0" + } + } + } + }, + "pem-jwk": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pem-jwk/-/pem-jwk-2.0.0.tgz", + "integrity": "sha512-rFxu7rVoHgQ5H9YsP50dDWf0rHjreVA2z0yPiWr5WdH/UHb29hKtF7h6l8vNd1cbYR1t0QL+JKhW55a2ZV4KtA==", + "dev": true, + "requires": { + "asn1.js": "^5.0.1" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkginfo": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", + "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=", + "dev": true + }, + "pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true + }, + "prebuild-install": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.3.tgz", + "integrity": "sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g==", + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.7.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^3.0.3", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + }, + "dependencies": { + "bl": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", + "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "requires": { + "mimic-response": "^2.0.0" + } + }, + "mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "simple-get": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", + "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", + "requires": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "tar-stream": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.4.tgz", + "integrity": "sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw==", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + } + } + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + }, + "prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "dev": true + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" + }, + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-1.3.0.tgz", + "integrity": "sha1-5cyaTIJ45GZP/twBx9qEhCsEAXU=", + "dev": true, + "requires": { + "is-promise": "~1" + } + }, + "promise-nodeify": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/promise-nodeify/-/promise-nodeify-3.0.1.tgz", + "integrity": "sha512-ghsSuzZXJX8iO7WVec2z7GI+Xk/EyiD+JZK7AZKhUqYfpLa/Zs4ylUD+CwwnKlG6G3HnkUPMAi6PO7zeqGKssg==", + "dev": true + }, + "promise.allsettled": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", + "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", + "requires": { + "array.prototype.map": "^1.0.1", + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "iterate-value": "^1.0.0" + } + }, + "promisify-es6": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/promisify-es6/-/promisify-es6-1.0.3.tgz", + "integrity": "sha512-N9iVG+CGJsI4b4ZGazjwLnxErD2d9Pe4DPvvXSxYA9tFNu8ymXME4Qs5HIQ0LMJpNM7zj+m0NlNnNeqFpKzqnA==", + "dev": true + }, + "protocol-buffers-schema": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.4.0.tgz", + "integrity": "sha512-G/2kcamPF2S49W5yaMGdIpkG6+5wZF0fzBteLKgEHjbNzqjZQ85aAs1iJGto31EJaSTkNvHs5IXuHSaTLWBAiA==", + "dev": true + }, + "protons": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/protons/-/protons-1.2.1.tgz", + "integrity": "sha512-2oqDyc/SN+tNcJf8XxrXhYL7sQn2/OMl8mSdD7NVGsWjMEmAbks4eDVnCyf0vAoRbBWyWTEXWk4D8XfuKVl3zg==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "protocol-buffers-schema": "^3.3.1", + "signed-varint": "^2.0.1", + "varint": "^5.0.0" + } + }, + "proxy-addr": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.1" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "pull-defer": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/pull-defer/-/pull-defer-0.2.3.tgz", + "integrity": "sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA==", + "dev": true + }, + "pull-stream": { + "version": "3.6.14", + "resolved": "https://registry.npmjs.org/pull-stream/-/pull-stream-3.6.14.tgz", + "integrity": "sha512-KIqdvpqHHaTUA2mCYcLG1ibEbu/LCKoJZsBWyv9lSYtPkJPBq8m3Hxa103xHi6D2thj5YXa0TqK3L3GUkwgnew==", + "dev": true + }, + "pull-to-stream": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pull-to-stream/-/pull-to-stream-0.1.1.tgz", + "integrity": "sha512-thZkMv6F9PILt9zdvpI2gxs19mkDrlixYKX6cOBxAW16i1NZH+yLAmF4r8QfJ69zuQh27e01JZP9y27tsH021w==", + "dev": true, + "requires": { + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "ramda": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.25.0.tgz", + "integrity": "sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ==", + "dev": true + }, + "ramdasauce": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ramdasauce/-/ramdasauce-2.1.3.tgz", + "integrity": "sha512-Ml3CPim4SKwmg5g9UI77lnRSeKr/kQw7YhQ6rfdMcBYy6DMlwmkEwQqjygJ3OhxPR+NfFfpjKl3Tf8GXckaqqg==", + "dev": true, + "requires": { + "ramda": "^0.24.1" + }, + "dependencies": { + "ramda": { + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.24.1.tgz", + "integrity": "sha1-w7d1UZfzW43DUCIoJixMkd22uFc=", + "dev": true + } + } + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "randomhex": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/randomhex/-/randomhex-0.1.5.tgz", + "integrity": "sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU=" + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + } + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + } + } + }, + "readdirp": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "requires": { + "picomatch": "^2.2.1" + } + }, + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rsa-pem-to-jwk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/rsa-pem-to-jwk/-/rsa-pem-to-jwk-1.1.3.tgz", + "integrity": "sha1-JF52vbfnI0z+58oDLTG1TDj6uY4=", + "dev": true, + "requires": { + "object-assign": "^2.0.0", + "rsa-unpack": "0.0.6" + }, + "dependencies": { + "object-assign": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", + "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", + "dev": true + } + } + }, + "rsa-unpack": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/rsa-unpack/-/rsa-unpack-0.0.6.tgz", + "integrity": "sha1-9Q69VqYoN45jHylxYQJs6atO3bo=", + "dev": true, + "requires": { + "optimist": "~0.3.5" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" + }, + "scryptsy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", + "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==" + }, + "secp256k1": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", + "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "dev": true, + "requires": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.5.2", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + } + }, + "seek-bzip": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "requires": { + "commander": "^2.8.1" + } + }, + "semver": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", + "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==" + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "requires": { + "randombytes": "^2.1.0" + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "servify": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", + "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "requires": { + "body-parser": "^1.16.0", + "cors": "^2.8.1", + "express": "^4.14.0", + "request": "^2.79.0", + "xhr": "^2.3.3" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "signed-varint": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/signed-varint/-/signed-varint-2.0.1.tgz", + "integrity": "sha1-UKmYnafJjCxh2tEZvJdHDvhSgSk=", + "dev": true, + "requires": { + "varint": "~5.0.0" + } + }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "requires": { + "source-map": "^0.5.6" + } + }, + "split-ca": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split-ca/-/split-ca-1.0.1.tgz", + "integrity": "sha1-bIOv82kvphJW4M0ZfgXp3hV2kaY=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "stream-to-pull-stream": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz", + "integrity": "sha512-6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg==", + "dev": true, + "requires": { + "looper": "^3.0.0", + "pull-stream": "^3.2.3" + } + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string.prototype.trimend": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz", + "integrity": "sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + }, + "dependencies": { + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } + } + }, + "string.prototype.trimstart": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz", + "integrity": "sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + }, + "dependencies": { + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "requires": { + "is-natural-number": "^4.0.1" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==" + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "swarm-js": { + "version": "0.1.39", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", + "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", + "requires": { + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "decompress": "^4.0.0", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^7.1.0", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request-promise": "^0.1.2" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "^1.0.1" + } + } + } + }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "tar-fs": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", + "dev": true, + "requires": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + }, + "dependencies": { + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "tmp": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", + "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", + "dev": true, + "requires": { + "rimraf": "^2.6.3" + } + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + }, + "truffle": { + "version": "5.1.53", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.1.53.tgz", + "integrity": "sha512-JXuuhPOsh/K9K9PJTcZDRy6ByxreOrchMIM1SgEVRi85MF6XWQSZwwV1kXF+JRtP938lfRmmpgWQb1MzFBY7qw==", + "requires": { + "app-module-path": "^2.2.0", + "mocha": "8.1.2", + "original-require": "1.0.1" + } + }, + "truffle-contract": { + "version": "4.0.31", + "resolved": "https://registry.npmjs.org/truffle-contract/-/truffle-contract-4.0.31.tgz", + "integrity": "sha512-u3q+p1wiX5C2GpnluGx/d2iaJk7bcWshk2/TohiJyA2iQiTfkS7M4n9D9tY3JqpXR8PmD/TrA69RylO0RhITFA==", + "requires": { + "@truffle/blockchain-utils": "^0.0.11", + "@truffle/contract-schema": "^3.0.14", + "@truffle/error": "^0.0.6", + "bignumber.js": "^7.2.1", + "ethers": "^4.0.0-beta.1", + "truffle-interface-adapter": "^0.2.5", + "web3": "1.2.1", + "web3-core-promievent": "1.2.1", + "web3-eth-abi": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "truffle-hdwallet-provider": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/truffle-hdwallet-provider/-/truffle-hdwallet-provider-1.0.17.tgz", + "integrity": "sha512-s6DvSP83jiIAc6TUcpr7Uqnja1+sLGJ8og3X7n41vfyC4OCaKmBtXL5HOHf+SsU3iblOvnbFDgmN6Y1VBL/fsg==", + "requires": { + "any-promise": "^1.3.0", + "bindings": "^1.3.1", + "web3": "1.2.1", + "websocket": "^1.0.28" + } + }, + "truffle-interface-adapter": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/truffle-interface-adapter/-/truffle-interface-adapter-0.2.5.tgz", + "integrity": "sha512-EL39OpP8FcZ99ne1Rno3jImfb92Nectd4iVsZzoEUCBfbwHe7sr0k+i45guoruSoP8nMUE81Mov2s8I5pi6d9Q==", + "requires": { + "bn.js": "^4.11.8", + "ethers": "^4.0.32", + "lodash": "^4.17.13", + "web3": "1.2.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" + }, + "unique-by": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-by/-/unique-by-1.0.0.tgz", + "integrity": "sha1-UiDIa6e8Vy+3E610ZRRwy2RCEr0=", + "dev": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "uri-js": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", + "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", + "requires": { + "punycode": "^2.1.0" + } + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "requires": { + "prepend-http": "^2.0.0" + } + }, + "url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + }, + "ursa-optional": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/ursa-optional/-/ursa-optional-0.10.2.tgz", + "integrity": "sha512-TKdwuLboBn7M34RcvVTuQyhvrA8gYKapuVdm0nBP0mnBc7oECOfUQZrY91cefL3/nm64ZyrejSRrhTVdX7NG/A==", + "dev": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.14.2" + } + }, + "utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + }, + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "dev": true + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "web3": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.1.tgz", + "integrity": "sha512-nNMzeCK0agb5i/oTWNdQ1aGtwYfXzHottFP2Dz0oGIzavPMGSKyVlr8ibVb1yK5sJBjrWVnTdGaOC2zKDFuFRw==", + "requires": { + "web3-bzz": "1.2.1", + "web3-core": "1.2.1", + "web3-eth": "1.2.1", + "web3-eth-personal": "1.2.1", + "web3-net": "1.2.1", + "web3-shh": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-bzz": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.1.tgz", + "integrity": "sha512-LdOO44TuYbGIPfL4ilkuS89GQovxUpmLz6C1UC7VYVVRILeZS740FVB3j9V4P4FHUk1RenaDfKhcntqgVCHtjw==", + "requires": { + "got": "9.6.0", + "swarm-js": "0.1.39", + "underscore": "1.9.1" + } + }, + "web3-core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.1.tgz", + "integrity": "sha512-5ODwIqgl8oIg/0+Ai4jsLxkKFWJYE0uLuE1yUKHNVCL4zL6n3rFjRMpKPokd6id6nJCNgeA64KdWQ4XfpnjdMg==", + "requires": { + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-requestmanager": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-core-helpers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz", + "integrity": "sha512-Gx3sTEajD5r96bJgfuW377PZVFmXIH4TdqDhgGwd2lZQCcMi+DA4TgxJNJGxn0R3aUVzyyE76j4LBrh412mXrw==", + "requires": { + "underscore": "1.9.1", + "web3-eth-iban": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-core-method": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.1.tgz", + "integrity": "sha512-Ghg2WS23qi6Xj8Od3VCzaImLHseEA7/usvnOItluiIc5cKs00WYWsNy2YRStzU9a2+z8lwQywPYp0nTzR/QXdQ==", + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1", + "web3-core-promievent": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-core-promievent": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz", + "integrity": "sha512-IVUqgpIKoeOYblwpex4Hye6npM0aMR+kU49VP06secPeN0rHMyhGF0ZGveWBrGvf8WDPI7jhqPBFIC6Jf3Q3zw==", + "requires": { + "any-promise": "1.3.0", + "eventemitter3": "3.1.2" + } + }, + "web3-core-requestmanager": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz", + "integrity": "sha512-xfknTC69RfYmLKC+83Jz73IC3/sS2ZLhGtX33D4Q5nQ8yc39ElyAolxr9sJQS8kihOcM6u4J+8gyGMqsLcpIBg==", + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1", + "web3-providers-http": "1.2.1", + "web3-providers-ipc": "1.2.1", + "web3-providers-ws": "1.2.1" + } + }, + "web3-core-subscriptions": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz", + "integrity": "sha512-nmOwe3NsB8V8UFsY1r+sW6KjdOS68h8nuh7NzlWxBQT/19QSUGiERRTaZXWu5BYvo1EoZRMxCKyCQpSSXLc08g==", + "requires": { + "eventemitter3": "3.1.2", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1" + } + }, + "web3-eth": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.1.tgz", + "integrity": "sha512-/2xly4Yry5FW1i+uygPjhfvgUP/MS/Dk+PDqmzp5M88tS86A+j8BzKc23GrlA8sgGs0645cpZK/999LpEF5UdA==", + "requires": { + "underscore": "1.9.1", + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-eth-abi": "1.2.1", + "web3-eth-accounts": "1.2.1", + "web3-eth-contract": "1.2.1", + "web3-eth-ens": "1.2.1", + "web3-eth-iban": "1.2.1", + "web3-eth-personal": "1.2.1", + "web3-net": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-eth-abi": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.1.tgz", + "integrity": "sha512-jI/KhU2a/DQPZXHjo2GW0myEljzfiKOn+h1qxK1+Y9OQfTcBMxrQJyH5AP89O6l6NZ1QvNdq99ThAxBFoy5L+g==", + "requires": { + "ethers": "4.0.0-beta.3", + "underscore": "1.9.1", + "web3-utils": "1.2.1" + }, + "dependencies": { + "elliptic": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", + "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "ethers": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", + "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", + "requires": { + "@types/node": "^10.3.2", + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.3.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.3", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "scrypt-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", + "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" + } + } + }, + "web3-eth-accounts": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz", + "integrity": "sha512-26I4qq42STQ8IeKUyur3MdQ1NzrzCqPsmzqpux0j6X/XBD7EjZ+Cs0lhGNkSKH5dI3V8CJasnQ5T1mNKeWB7nQ==", + "requires": { + "any-promise": "1.3.0", + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.7", + "scryptsy": "2.1.0", + "semver": "6.2.0", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-utils": "1.2.1" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + } + } + }, + "web3-eth-contract": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz", + "integrity": "sha512-kYFESbQ3boC9bl2rYVghj7O8UKMiuKaiMkxvRH5cEDHil8V7MGEGZNH0slSdoyeftZVlaWSMqkRP/chfnKND0g==", + "requires": { + "underscore": "1.9.1", + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-promievent": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-eth-abi": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-eth-ens": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz", + "integrity": "sha512-lhP1kFhqZr2nnbu3CGIFFrAnNxk2veXpOXBY48Tub37RtobDyHijHgrj+xTh+mFiPokyrapVjpFsbGa+Xzye4Q==", + "requires": { + "eth-ens-namehash": "2.0.8", + "underscore": "1.9.1", + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-promievent": "1.2.1", + "web3-eth-abi": "1.2.1", + "web3-eth-contract": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-eth-iban": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz", + "integrity": "sha512-9gkr4QPl1jCU+wkgmZ8EwODVO3ovVj6d6JKMos52ggdT2YCmlfvFVF6wlGLwi0VvNa/p+0BjJzaqxnnG/JewjQ==", + "requires": { + "bn.js": "4.11.8", + "web3-utils": "1.2.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + } + } + }, + "web3-eth-personal": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz", + "integrity": "sha512-RNDVSiaSoY4aIp8+Hc7z+X72H7lMb3fmAChuSBADoEc7DsJrY/d0R5qQDK9g9t2BO8oxgLrLNyBP/9ub2Hc6Bg==", + "requires": { + "web3-core": "1.2.1", + "web3-core-helpers": "1.2.1", + "web3-core-method": "1.2.1", + "web3-net": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-net": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.1.tgz", + "integrity": "sha512-Yt1Bs7WgnLESPe0rri/ZoPWzSy55ovioaP35w1KZydrNtQ5Yq4WcrAdhBzcOW7vAkIwrsLQsvA+hrOCy7mNauw==", + "requires": { + "web3-core": "1.2.1", + "web3-core-method": "1.2.1", + "web3-utils": "1.2.1" + } + }, + "web3-providers-http": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.1.tgz", + "integrity": "sha512-BDtVUVolT9b3CAzeGVA/np1hhn7RPUZ6YYGB/sYky+GjeO311Yoq8SRDUSezU92x8yImSC2B+SMReGhd1zL+bQ==", + "requires": { + "web3-core-helpers": "1.2.1", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz", + "integrity": "sha512-oPEuOCwxVx8L4CPD0TUdnlOUZwGBSRKScCz/Ws2YHdr9Ium+whm+0NLmOZjkjQp5wovQbyBzNa6zJz1noFRvFA==", + "requires": { + "oboe": "2.1.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1" + } + }, + "web3-providers-ws": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz", + "integrity": "sha512-oqsQXzu+ejJACVHy864WwIyw+oB21nw/pI65/sD95Zi98+/HQzFfNcIFneF1NC4bVF3VNX4YHTNq2I2o97LAiA==", + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.1", + "websocket": "github:web3-js/WebSocket-Node#ef5ea2f41daf4a2113b80c9223df884b4d56c400" + } + }, + "web3-shh": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.1.tgz", + "integrity": "sha512-/3Cl04nza5kuFn25bV3FJWa0s3Vafr5BlT933h26xovQ6HIIz61LmvNQlvX1AhFL+SNJOTcQmK1SM59vcyC8bA==", + "requires": { + "web3-core": "1.2.1", + "web3-core-method": "1.2.1", + "web3-core-subscriptions": "1.2.1", + "web3-net": "1.2.1" + } + }, + "web3-utils": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.1.tgz", + "integrity": "sha512-Mrcn3l58L+yCKz3zBryM6JZpNruWuT0OCbag8w+reeNROSGVlXzUQkU+gtAwc9JCZ7tKUyg67+2YUGqUjVcyBA==", + "requires": { + "bn.js": "4.11.8", + "eth-lib": "0.2.7", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randomhex": "0.1.5", + "underscore": "1.9.1", + "utf8": "3.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } + } + }, + "websocket": { + "version": "1.0.29", + "resolved": "github:web3-js/WebSocket-Node#ef5ea2f41daf4a2113b80c9223df884b4d56c400", + "requires": { + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "nan": "^2.14.0", + "typedarray-to-buffer": "^3.1.5", + "yaeti": "^0.0.6" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=" + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "workerpool": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz", + "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==" + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + }, + "xhr": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", + "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", + "requires": { + "global": "~4.3.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "xhr-request": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", + "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "requires": { + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" + } + }, + "xhr-request-promise": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", + "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", + "requires": { + "xhr-request": "^1.1.0" + } + }, + "xhr2-cookies": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", + "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", + "requires": { + "cookiejar": "^2.1.1" + } + }, + "xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + }, + "yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, + "yaml": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.1.tgz", + "integrity": "sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA==", + "requires": { + "camelcase": "^5.3.1", + "decamelize": "^1.2.0", + "flat": "^4.1.0", + "is-plain-obj": "^1.1.0", + "yargs": "^14.2.3" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "yargs": { + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", + "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", + "requires": { + "cliui": "^5.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^15.0.1" + } + }, + "yargs-parser": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", + "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a640c11 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "oceanpools", + "version": "0.1.0", + "scripts": { + "create": "graph create oceanprotocol/ocean-subgraph --node https://api.thegraph.com/deploy/", + "create:local": "graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020", + "codegen": "graph codegen --output-dir src/types/", + "build": "graph build", + "deploy": "graph deploy oceanprotocol/oceanpools --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/", + "deploy:beta": "graph deploy oceanprotocol/oceanpools-beta --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/", + "deploy:local": "graph deploy oceanprotocol/ocean-subgraph subgraph.yaml --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020" + }, + "devDependencies": { + "@graphprotocol/graph-cli": "^0.18.0", + "@graphprotocol/graph-ts": "^0.18.1" + }, + "dependencies": { + "babel-polyfill": "^6.26.0", + "babel-register": "^6.26.0", + "keytar": "^5.0.0", + "truffle": "^5.1.0", + "truffle-contract": "^4.0.5", + "truffle-hdwallet-provider": "^1.0.4" + } +} diff --git a/schema.graphql b/schema.graphql new file mode 100644 index 0000000..202e68b --- /dev/null +++ b/schema.graphql @@ -0,0 +1,117 @@ +type OceanPools @entity { + id: ID! + color: String! # Bronze, Silver, Gold + poolCount: Int! # Number of pools + finalizedPoolCount: Int! # Number of finalized pools + pools: [Pool!] @derivedFrom(field: "factoryID") + txCount: BigInt! # Number of txs + totalLiquidity: BigDecimal! # All the pools liquidity value in Ocean + totalSwapVolume: BigDecimal! # All the swap volume in Ocean + totalSwapFee: BigDecimal! # All the swap fee in Ocean +} + +type Pool @entity { + id: ID! # Pool address + controller: Bytes! # Controller address + publicSwap: Boolean! # isPublicSwap + finalized: Boolean! # isFinalized + symbol: String # Pool token symbol + name: String # Pool token name + cap: BigInt # Maximum supply if any + active: Boolean! # isActive + swapFee: BigDecimal! # Swap Fees + totalWeight: BigDecimal! + totalShares: BigDecimal! # Total pool token shares + totalSwapVolume: BigDecimal! # Total swap volume in OCEAN + totalSwapFee: BigDecimal! # Total swap fee in OCEAN + liquidity: BigDecimal! # Pool liquidity value in OCEAN + tokensList: [Bytes!]! # Temp workaround until graph supports filtering on derived field + tokens: [PoolToken!] @derivedFrom(field: "poolId") + shares: [PoolShare!] @derivedFrom(field: "poolId") + createTime: Int! # Block time pool was created + tokensCount: BigInt! # Number of tokens in the pool + holdersCount: BigInt! # Number of addresses holding a positive balance of BPT + joinsCount: BigInt! # liquidity has been added + exitsCount: BigInt! # liquidity has been removed + swapsCount: BigInt! + factoryID: OceanPools! + tx: Bytes # Pool creation transaction id + swaps: [Swap!] @derivedFrom(field: "poolAddress") +} + +type PoolToken @entity { + id: ID! # poolId + token address + poolId: Pool! + symbol: String + name: String + decimals: Int! + address: String! + balance: BigDecimal! + denormWeight: BigDecimal! +} + +type PoolShare @entity { + id: ID! # poolId + userAddress + userAddress: User! + poolId: Pool! + balance: BigDecimal! +} + +type User @entity { + id: ID! + sharesOwned: [PoolShare!] @derivedFrom(field: "userAddress") + txs: [Transaction!] @derivedFrom(field: "userAddress") + swaps: [Swap!] @derivedFrom(field: "userAddress") +} + +type Swap @entity { + id: ID! # + caller: Bytes! # + tokenIn: Bytes! # + tokenInSym: String! # + tokenOut: Bytes! # + tokenOutSym: String! # + tokenAmountIn: BigDecimal! # + tokenAmountOut: BigDecimal! # + poolAddress: Pool + userAddress: User # User address that initiates the swap + value: BigDecimal! # Swap value in OCEAN + feeValue: BigDecimal! # Swap fee value in OCEAN + poolTotalSwapVolume: BigDecimal! # Total pool swap volume in OCEAN + poolTotalSwapFee: BigDecimal! # Total pool swap fee in OCEAN + poolLiquidity: BigDecimal! # Pool liquidity value in OCEAN + timestamp: Int! +} + +type Transaction @entity { + id: ID! # Log ID + tx: Bytes! + event: String + block: Int! + timestamp: Int! + gasUsed: BigDecimal! + gasPrice: BigDecimal! + poolAddress: Pool + userAddress: User + action: SwapType + sender: Bytes +} + +type TokenPrice @entity { + id: ID! + symbol: String + name: String + decimals: Int! + price: BigDecimal! + poolLiquidity: BigDecimal! + poolTokenId: String +} + +enum SwapType { + swapExactAmountIn, + swapExactAmountOut, + joinswapExternAmountIn, + joinswapPoolAmountOut, + exitswapPoolAmountIn, + exitswapExternAmountOut +} \ No newline at end of file diff --git a/src/mappings/factory.ts b/src/mappings/factory.ts new file mode 100644 index 0000000..07e57a7 --- /dev/null +++ b/src/mappings/factory.ts @@ -0,0 +1,52 @@ +import { Address, BigInt, BigDecimal } from '@graphprotocol/graph-ts' +import { BPoolRegistered } from '../types/Factory/Factory' +import { OceanPools, Pool } from '../types/schema' +import { Pool as PoolContract } from '../types/templates' +import { + ZERO_BD, +} from './helpers' +import { log } from '@graphprotocol/graph-ts' + +export function handleNewPool(event: BPoolRegistered): void { + let factory = OceanPools.load('1') + + // if no factory yet, set up blank initial + if (factory == null) { + factory = new OceanPools('1') + factory.color = 'Bronze' + factory.poolCount = 0 + factory.finalizedPoolCount = 0 + factory.txCount = BigInt.fromI32(0) + factory.totalLiquidity = ZERO_BD + factory.totalSwapVolume = ZERO_BD + factory.totalSwapFee = ZERO_BD + } + + let pool = new Pool(event.params.bpoolAddress.toHexString()) + log.error('************************ handleNewPool: poolId {}', [pool.id.toString()]) + pool.controller = event.params.registeredBy + pool.publicSwap = false + pool.finalized = false + pool.active = true + pool.swapFee = BigDecimal.fromString('0.000001') + pool.totalWeight = ZERO_BD + pool.totalShares = ZERO_BD + pool.totalSwapVolume = ZERO_BD + pool.totalSwapFee = ZERO_BD + pool.liquidity = ZERO_BD + pool.createTime = event.block.timestamp.toI32() + pool.tokensCount = BigInt.fromI32(0) + pool.holdersCount = BigInt.fromI32(0) + pool.joinsCount = BigInt.fromI32(0) + pool.exitsCount = BigInt.fromI32(0) + pool.swapsCount = BigInt.fromI32(0) + pool.factoryID = event.address.toHexString() + pool.tokensList = [] + pool.tx = event.transaction.hash + pool.save() + + factory.poolCount = factory.poolCount + 1 + factory.save() + + PoolContract.create(event.params.bpoolAddress) +} \ No newline at end of file diff --git a/src/mappings/helpers.ts b/src/mappings/helpers.ts new file mode 100644 index 0000000..65e2c86 --- /dev/null +++ b/src/mappings/helpers.ts @@ -0,0 +1,230 @@ +import { + BigDecimal, + Address, + BigInt, + Bytes, + dataSource, + ethereum +} from '@graphprotocol/graph-ts' +import { + Pool, + User, + PoolToken, + PoolShare, + TokenPrice, + Transaction, + OceanPools +} from '../types/schema' +import { BToken } from '../types/templates/Pool/BToken' +import { log } from '@graphprotocol/graph-ts' + +export let ZERO_BD = BigDecimal.fromString('0') + +let network = dataSource.network() + +export let OCEAN: string = (network == 'mainnet') + ? '0x967da4048cD07aB37855c090aAF366e4ce1b9F48' + : '0x8967BCF84170c91B0d24D4302C2376283b0B3a07' + +export function hexToDecimal(hexString: String, decimals: i32): BigDecimal { + let bytes = Bytes.fromHexString(hexString).reverse() as Bytes + let bi = BigInt.fromUnsignedBytes(bytes) + let scale = BigInt.fromI32(10).pow(decimals as u8).toBigDecimal() + return bi.divDecimal(scale) +} + +export function bigIntToDecimal(amount: BigInt, decimals: i32): BigDecimal { + let scale = BigInt.fromI32(10).pow(decimals as u8).toBigDecimal() + return amount.toBigDecimal().div(scale) +} + +export function tokenToDecimal(amount: BigDecimal, decimals: i32): BigDecimal { + let scale = BigInt.fromI32(10).pow(decimals as u8).toBigDecimal() + return amount.div(scale) +} + +export function createPoolShareEntity(id: string, pool: string, user: string): void { + let poolShare = new PoolShare(id) + + createUserEntity(user) + + poolShare.userAddress = user + poolShare.poolId = pool + poolShare.balance = ZERO_BD + poolShare.save() +} + +export function createPoolTokenEntity(id: string, pool: string, address: string): void { + let token = BToken.bind(Address.fromString(address)) + let symbol = '' + let name = '' + let decimals = 18 + + // COMMENT THE LINES BELOW OUT FOR LOCAL DEV ON KOVAN + let symbolCall = token.try_symbol() + let nameCall = token.try_name() + + if (!symbolCall.reverted) { + symbol = symbolCall.value + } + + if (!nameCall.reverted) { + name = nameCall.value + } + + // COMMENT THE LINES ABOVE OUT FOR LOCAL DEV ON KOVAN + + // !!! COMMENT THE LINES BELOW OUT FOR NON-LOCAL DEPLOYMENT + // This code allows Symbols to be added when testing on local Kovan + /* + if(address == '0xd0a1e359811322d97991e03f863a0c30c2cf029c') + symbol = 'WETH'; + else if(address == '0x1528f3fcc26d13f7079325fb78d9442607781c8c') + symbol = 'DAI' + else if(address == '0xef13c0c8abcaf5767160018d268f9697ae4f5375') + symbol = 'MKR' + else if(address == '0x2f375e94fc336cdec2dc0ccb5277fe59cbf1cae5') + symbol = 'USDC' + else if(address == '0x1f1f156e0317167c11aa412e3d1435ea29dc3cce') + symbol = 'BAT' + else if(address == '0x86436bce20258a6dcfe48c9512d4d49a30c4d8c4') + symbol = 'SNX' + else if(address == '0x8c9e6c40d3402480ace624730524facc5482798c') + symbol = 'REP' + */ + // !!! COMMENT THE LINES ABOVE OUT FOR NON-LOCAL DEPLOYMENT + + let poolToken = new PoolToken(id) + poolToken.poolId = pool + poolToken.address = address + poolToken.name = name + poolToken.symbol = symbol + poolToken.decimals = decimals + poolToken.balance = ZERO_BD + poolToken.denormWeight = ZERO_BD + poolToken.save() +} + +export function updatePoolLiquidity(id: string): void { + let pool = Pool.load(id) + let tokensList: Array = pool.tokensList + + if (!tokensList || pool.tokensCount.lt(BigInt.fromI32(2)) || !pool.publicSwap) return + + // Find pool liquidity + + let hasPrice = false + let hasOceanPrice = false + let poolLiquidity = ZERO_BD + + // if (tokensList.includes(Address.fromString(OCEAN))) { + // let oceanPoolTokenId = id.concat('-').concat(OCEAN) + // let oceanPoolToken = PoolToken.load(oceanPoolTokenId) + // poolLiquidity = oceanPoolToken.balance.div(oceanPoolToken.denormWeight).times(pool.totalWeight) + // hasPrice = true + // hasOceanPrice = true + // } else { + // let DT = tokensList[1].toHexString() + // let dtTokenPrice = TokenPrice.load(DT) + // if (dtTokenPrice !== null) { + // let poolTokenId = id.concat('-').concat(DT) + // let poolToken = PoolToken.load(poolTokenId) + // poolLiquidity = wethTokenPrice.price.times(poolToken.balance).div(poolToken.denormWeight).times(pool.totalWeight) + // hasPrice = true + // } + // } + // + // // Create or update token price + // + // if (hasPrice) { + // for (let i: i32 = 0; i < tokensList.length; i++) { + // let tokenPriceId = tokensList[i].toHexString() + // let tokenPrice = TokenPrice.load(tokenPriceId) + // if (tokenPrice == null) { + // tokenPrice = new TokenPrice(tokenPriceId) + // tokenPrice.poolTokenId = '' + // tokenPrice.poolLiquidity = ZERO_BD + // } + // + // let poolTokenId = id.concat('-').concat(tokenPriceId) + // let poolToken = PoolToken.load(poolTokenId) + // + // if ( + // (tokenPrice.poolTokenId == poolTokenId || poolLiquidity.gt(tokenPrice.poolLiquidity)) && + // (tokenPriceId != WETH.toString() || (pool.tokensCount.equals(BigInt.fromI32(2)) && hasUsdPrice)) + // ) { + // tokenPrice.price = ZERO_BD + // + // if (poolToken.balance.gt(ZERO_BD)) { + // tokenPrice.price = poolLiquidity.div(pool.totalWeight).times(poolToken.denormWeight).div(poolToken.balance) + // } + // + // tokenPrice.symbol = poolToken.symbol + // tokenPrice.name = poolToken.name + // tokenPrice.decimals = poolToken.decimals + // tokenPrice.poolLiquidity = poolLiquidity + // tokenPrice.poolTokenId = poolTokenId + // tokenPrice.save() + // } + // } + // } + + // Update pool liquidity + + let liquidity = ZERO_BD + let denormWeight = ZERO_BD + + for (let i: i32 = 0; i < tokensList.length; i++) { + let tokenPriceId = tokensList[i].toHexString() + let tokenPrice = TokenPrice.load(tokenPriceId) + if (tokenPrice !== null) { + let poolTokenId = id.concat('-').concat(tokenPriceId) + let poolToken = PoolToken.load(poolTokenId) + if (poolToken.denormWeight.gt(denormWeight)) { + denormWeight = poolToken.denormWeight + liquidity = tokenPrice.price.times(poolToken.balance).div(poolToken.denormWeight).times(pool.totalWeight) + } + } + } + + let factory = OceanPools.load('1') + factory.totalLiquidity = factory.totalLiquidity.minus(pool.liquidity).plus(liquidity) + factory.save() + + pool.liquidity = liquidity + pool.save() +} + +export function decrPoolCount(finalized: boolean): void { + let factory = OceanPools.load('1') + factory.poolCount -= 1 + if (finalized) factory.finalizedPoolCount -= 1 + factory.save() +} + +export function saveTransaction(event: ethereum.Event, eventName: string): void { + let tx = event.transaction.hash.toHexString().concat('-').concat(event.logIndex.toString()) + let userAddress = event.transaction.from.toHex() + let transaction = Transaction.load(tx) + if (transaction == null) { + transaction = new Transaction(tx) + } + transaction.event = eventName + transaction.poolAddress = event.address.toHex() + transaction.userAddress = userAddress + transaction.gasUsed = event.transaction.gasUsed.toBigDecimal() + transaction.gasPrice = event.transaction.gasPrice.toBigDecimal() + transaction.tx = event.transaction.hash + transaction.timestamp = event.block.timestamp.toI32() + transaction.block = event.block.number.toI32() + transaction.save() + + createUserEntity(userAddress) +} + +export function createUserEntity(address: string): void { + if (User.load(address) == null) { + let user = new User(address) + user.save() + } +} diff --git a/src/mappings/pool.ts b/src/mappings/pool.ts new file mode 100644 index 0000000..fefbaf3 --- /dev/null +++ b/src/mappings/pool.ts @@ -0,0 +1,397 @@ + +import { BigInt, Address, Bytes, store, BigDecimal } from '@graphprotocol/graph-ts' +import { LOG_CALL, LOG_JOIN, LOG_EXIT, LOG_SWAP, Transfer, GulpCall } from '../types/templates/Pool/Pool' +import { Pool as BPool } from '../types/templates/Pool/Pool' +import { log } from '@graphprotocol/graph-ts' + +import { + OceanPools, + Pool, + PoolToken, + PoolShare, + Swap, + TokenPrice +} from '../types/schema' +import { + hexToDecimal, + bigIntToDecimal, + tokenToDecimal, + createPoolShareEntity, + createPoolTokenEntity, + updatePoolLiquidity, + saveTransaction, + ZERO_BD, + decrPoolCount +} from './helpers' + +/************************************ + ********** Pool Controls *********** + ************************************/ + +export function handleSetSwapFee(event: LOG_CALL, swapFeeStr: string=null): void { + let poolId = event.address.toHex() + let pool = Pool.load(poolId) + if (!swapFeeStr) { + swapFeeStr = event.params.data.toHexString().slice(-40) + } + pool.swapFee = hexToDecimal(swapFeeStr, 18) + pool.save() + + saveTransaction(event, 'setSwapFee') +} + +export function handleSetController(event: LOG_CALL): void { + let poolId = event.address.toHex() + let pool = Pool.load(poolId) + let controller = Address.fromString(event.params.data.toHexString().slice(-40)) + pool.controller = controller + pool.save() + + saveTransaction(event, 'setController') +} + +export function handleSetPublicSwap(event: LOG_CALL): void { + let poolId = event.address.toHex() + let pool = Pool.load(poolId) + let publicSwap = event.params.data.toHexString().slice(-1) == '1' + pool.publicSwap = publicSwap + pool.save() + + saveTransaction(event, 'setPublicSwap') +} + +export function handleFinalize(event: LOG_CALL): void { + let poolId = event.address.toHex() + let pool = Pool.load(poolId) + // let balance = BigDecimal.fromString('100') + pool.finalized = true + pool.symbol = 'BPT' + pool.publicSwap = true + // pool.totalShares = balance + pool.save() + + /* + let poolShareId = poolId.concat('-').concat(event.params.caller.toHex()) + let poolShare = PoolShare.load(poolShareId) + if (poolShare == null) { + createPoolShareEntity(poolShareId, poolId, event.params.caller.toHex()) + poolShare = PoolShare.load(poolShareId) + } + poolShare.balance = balance + poolShare.save() + */ + + let factory = OceanPools.load('1') + factory.finalizedPoolCount = factory.finalizedPoolCount + 1 + factory.save() + + saveTransaction(event, 'finalize') +} + +export function handleSetup(event: LOG_CALL): void { + let poolId = event.address.toHex() + + let data = event.params.data.toHexString() + let dataTokenAddress = data.slice(34,74) + let dataTokenAmount = data.slice(98,162) + let dataTokenWeight = data.slice(162,226) + let baseTokenAddress = data.slice(226, 290-24) + let baseTokenAmount = data.slice(290,354) + let baseTokenWeight = data.slice(354,418) + let swapFee = data.slice(418) + _handleRebind(event, poolId, dataTokenAddress, dataTokenAmount, dataTokenWeight) + _handleRebind(event, poolId, baseTokenAddress, baseTokenAmount, baseTokenWeight) + handleSetSwapFee(event, swapFee) + handleFinalize(event) + + saveTransaction(event, 'setup') + +} + +export function _handleRebind(event: LOG_CALL, poolId: string, tokenAddress: string, balanceStr: string, denormWeightStr: string): void { + let pool = Pool.load(poolId) + let tokenBytes = Bytes.fromHexString(tokenAddress) as Bytes + let tokensList = pool.tokensList || [] + if (tokensList.indexOf(tokenBytes) == -1 ) { + tokensList.push(tokenBytes) + } + pool.tokensList = tokensList + pool.tokensCount = BigInt.fromI32(tokensList.length) + + let address = Address.fromString(tokenAddress) + let denormWeight = hexToDecimal(denormWeightStr, 18) + + let poolTokenId = poolId.concat('-').concat(address.toHexString()) + let poolToken = PoolToken.load(poolTokenId) + if (poolToken == null) { + createPoolTokenEntity(poolTokenId, poolId, address.toHexString()) + poolToken = PoolToken.load(poolTokenId) + pool.totalWeight += denormWeight + } else { + let oldWeight = poolToken.denormWeight + if (denormWeight > oldWeight) { + pool.totalWeight = pool.totalWeight + (denormWeight - oldWeight) + } else { + pool.totalWeight = pool.totalWeight - (oldWeight - denormWeight) + } + } + + let balance = hexToDecimal(balanceStr, poolToken.decimals) + + poolToken.balance = balance + poolToken.denormWeight = denormWeight + poolToken.save() + + if (balance.equals(ZERO_BD)) { + decrPoolCount(pool.finalized) + pool.active = false + } + pool.save() + + updatePoolLiquidity(poolId) +} + +export function handleRebind(event: LOG_CALL): void { + let poolId = event.address.toHex() + _handleRebind( + event, + poolId, + event.params.data.toHexString().slice(34,74), + event.params.data.toHexString().slice(74,138), + event.params.data.toHexString().slice(138) + ) + + saveTransaction(event, 'rebind') + +} + +/************************************ + ********** JOINS & EXITS *********** + ************************************/ + +export function handleJoinPool(event: LOG_JOIN): void { + let poolId = event.address.toHex() + + let pool = Pool.load(poolId) + pool.joinsCount = pool.joinsCount.plus(BigInt.fromI32(1)) + pool.save() + + let address = event.params.tokenIn.toHex() + let poolTokenId = poolId.concat('-').concat(address.toString()) + let poolToken = PoolToken.load(poolTokenId) + if (!poolToken) { + return + } + poolToken.decimals = BigInt.fromI32(18).toI32() + let tokenAmountIn = tokenToDecimal(event.params.tokenAmountIn.toBigDecimal(), poolToken.decimals) + poolToken.balance = poolToken.balance.plus(tokenAmountIn) + poolToken.save() + + updatePoolLiquidity(poolId) + saveTransaction(event, 'join') +} + +export function handleExitPool(event: LOG_EXIT): void { + let poolId = event.address.toHex() + + let address = event.params.tokenOut.toHex() + let poolTokenId = poolId.concat('-').concat(address.toString()) + let poolToken = PoolToken.load(poolTokenId) + if (!poolToken) { + return + } + let tokenAmountOut = tokenToDecimal(event.params.tokenAmountOut.toBigDecimal(), poolToken.decimals) + let newAmount = poolToken.balance.minus(tokenAmountOut) + poolToken.balance = newAmount + poolToken.save() + + let pool = Pool.load(poolId) + pool.exitsCount = pool.exitsCount.plus(BigInt.fromI32(1)) + if (newAmount.equals(ZERO_BD)) { + decrPoolCount(pool.finalized) + pool.active = false + } + pool.save() + + updatePoolLiquidity(poolId) + saveTransaction(event, 'exit') +} + +/************************************ + ************** SWAPS *************** + ************************************/ + +export function handleSwap(event: LOG_SWAP): void { + let poolId = event.address.toHex() + + let tokenIn = event.params.tokenIn.toHex() + let poolTokenInId = poolId.concat('-').concat(tokenIn.toString()) + let poolTokenIn = PoolToken.load(poolTokenInId) + if (!poolTokenIn) { + return + } + let tokenAmountIn = tokenToDecimal(event.params.tokenAmountIn.toBigDecimal(), poolTokenIn.decimals) + let newAmountIn = poolTokenIn.balance.plus(tokenAmountIn) + poolTokenIn.balance = newAmountIn + poolTokenIn.save() + + let tokenOut = event.params.tokenOut.toHex() + let poolTokenOutId = poolId.concat('-').concat(tokenOut.toString()) + let poolTokenOut = PoolToken.load(poolTokenOutId) + let tokenAmountOut = tokenToDecimal(event.params.tokenAmountOut.toBigDecimal(), poolTokenOut.decimals) + let newAmountOut = poolTokenOut.balance.minus(tokenAmountOut) + poolTokenOut.balance = newAmountOut + poolTokenOut.save() + + updatePoolLiquidity(poolId) + + let swapId = event.transaction.hash.toHexString().concat('-').concat(event.logIndex.toString()) + let swap = Swap.load(swapId) + if (swap == null) { + swap = new Swap(swapId) + } + + let pool = Pool.load(poolId) + let tokensList: Array = pool.tokensList + let tokenOutPriceValue = ZERO_BD + let tokenOutPrice = TokenPrice.load(tokenOut) + + if (tokenOutPrice != null) { + tokenOutPriceValue = tokenOutPrice.price + } else { + for (let i: i32 = 0; i < tokensList.length; i++) { + let tokenPriceId = tokensList[i].toHexString() + if (!tokenOutPriceValue.gt(ZERO_BD) && tokenPriceId !== tokenOut) { + let tokenPrice = TokenPrice.load(tokenPriceId) + if (tokenPrice !== null && tokenPrice.price.gt(ZERO_BD)) { + let poolTokenId = poolId.concat('-').concat(tokenPriceId) + let poolToken = PoolToken.load(poolTokenId) + tokenOutPriceValue = tokenPrice.price + .times(poolToken.balance) + .div(poolToken.denormWeight) + .times(poolTokenOut.denormWeight) + .div(poolTokenOut.balance) + } + } + } + } + + let totalSwapVolume = pool.totalSwapVolume + let totalSwapFee = pool.totalSwapFee + let liquidity = pool.liquidity + let swapValue = ZERO_BD + let swapFeeValue = ZERO_BD + + if (tokenOutPriceValue.gt(ZERO_BD)) { + swapValue = tokenOutPriceValue.times(tokenAmountOut) + swapFeeValue = swapValue.times(pool.swapFee) + totalSwapVolume = totalSwapVolume.plus(swapValue) + totalSwapFee = totalSwapFee.plus(swapFeeValue) + + let factory = OceanPools.load('1') + factory.totalSwapVolume = factory.totalSwapVolume.plus(swapValue) + factory.totalSwapFee = factory.totalSwapFee.plus(swapFeeValue) + factory.save() + + pool.totalSwapVolume = totalSwapVolume + pool.totalSwapFee = totalSwapFee + } + pool.swapsCount += BigInt.fromI32(1) + if (newAmountIn.equals(ZERO_BD) || newAmountOut.equals(ZERO_BD)) { + decrPoolCount(pool.finalized) + pool.active = false + } + pool.save() + + swap.caller = event.params.caller + swap.tokenIn = event.params.tokenIn + swap.tokenInSym = poolTokenIn.symbol + swap.tokenOut = event.params.tokenOut + swap.tokenOutSym = poolTokenOut.symbol + swap.tokenAmountIn = tokenAmountIn + swap.tokenAmountOut = tokenAmountOut + swap.poolAddress = event.address.toHex() + swap.userAddress = event.transaction.from.toHex() + swap.poolTotalSwapVolume = totalSwapVolume + swap.poolTotalSwapFee = totalSwapFee + swap.poolLiquidity = liquidity + swap.value = swapValue + swap.feeValue = swapFeeValue + swap.timestamp = event.block.timestamp.toI32() + swap.save() + + saveTransaction(event, 'swap') +} + +/************************************ + *********** POOL SHARES ************ + ************************************/ + + export function handleTransfer(event: Transfer): void { + let poolId = event.address.toHex() + + let ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' + + let isMint = event.params.from.toHex() == ZERO_ADDRESS + let isBurn = event.params.to.toHex() == ZERO_ADDRESS + + let poolShareFromId = poolId.concat('-').concat(event.params.from.toHex()) + let poolShareFrom = PoolShare.load(poolShareFromId) + let poolShareFromBalance = poolShareFrom == null ? ZERO_BD : poolShareFrom.balance + + let poolShareToId = poolId.concat('-').concat(event.params.to.toHex()) + let poolShareTo = PoolShare.load(poolShareToId) + let poolShareToBalance = poolShareTo == null ? ZERO_BD : poolShareTo.balance + + let pool = Pool.load(poolId) + + if (isMint) { + if (poolShareTo == null) { + createPoolShareEntity(poolShareToId, poolId, event.params.to.toHex()) + poolShareTo = PoolShare.load(poolShareToId) + } + poolShareTo.balance += tokenToDecimal(event.params.value.toBigDecimal(), 18) + poolShareTo.save() + pool.totalShares += tokenToDecimal(event.params.value.toBigDecimal(), 18) + } else if (isBurn) { + if (poolShareFrom == null) { + createPoolShareEntity(poolShareFromId, poolId, event.params.from.toHex()) + poolShareFrom = PoolShare.load(poolShareFromId) + } + poolShareFrom.balance -= tokenToDecimal(event.params.value.toBigDecimal(), 18) + poolShareFrom.save() + pool.totalShares -= tokenToDecimal(event.params.value.toBigDecimal(), 18) + } else { + if (poolShareTo == null) { + createPoolShareEntity(poolShareToId, poolId, event.params.to.toHex()) + poolShareTo = PoolShare.load(poolShareToId) + } + poolShareTo.balance += tokenToDecimal(event.params.value.toBigDecimal(), 18) + poolShareTo.save() + + if (poolShareFrom == null) { + createPoolShareEntity(poolShareFromId, poolId, event.params.from.toHex()) + poolShareFrom = PoolShare.load(poolShareFromId) + } + poolShareFrom.balance -= tokenToDecimal(event.params.value.toBigDecimal(), 18) + poolShareFrom.save() + } + + if ( + poolShareTo !== null + && poolShareTo.balance.notEqual(ZERO_BD) + && poolShareToBalance.equals(ZERO_BD) + ) { + pool.holdersCount += BigInt.fromI32(1) + } + + if ( + poolShareFrom !== null + && poolShareFrom.balance.equals(ZERO_BD) + && poolShareFromBalance.notEqual(ZERO_BD) + ) { + pool.holdersCount -= BigInt.fromI32(1) + } + + pool.save() +} \ No newline at end of file diff --git a/subgraph.yaml b/subgraph.yaml new file mode 100644 index 0000000..a7c2834 --- /dev/null +++ b/subgraph.yaml @@ -0,0 +1,76 @@ +specVersion: 0.0.2 +description: Ocean provides data sharing through IDOs +repository: https://github.com/oceanprotocol/ocean-subgraph +schema: + file: ./schema.graphql +dataSources: + - kind: ethereum/contract + name: Factory + network: mainnet + source: + address: "0xbe0083053744ECb871510C88dC0f6b77Da162706" + abi: Factory + startBlock: 11105585 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappings/factory.ts + entities: + - OceanPools + abis: + - name: Factory + file: ./abis/BFactory.json + eventHandlers: + - event: BPoolRegistered(address,indexed address) + handler: handleNewPool +templates: + - kind: ethereum/contract + name: Pool + network: mainnet + source: + abi: Pool + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ./src/mappings/pool.ts + entities: + - Pool + - OceanPools + - Swap + abis: + - name: Pool + file: ./abis/BPool.json + - name: BToken + file: ./abis/BToken.json + eventHandlers: + - event: LOG_CALL(indexed bytes4,indexed address,bytes) + topic0: "0x34e1990700000000000000000000000000000000000000000000000000000000" + handler: handleSetSwapFee + - event: LOG_CALL(indexed bytes4,indexed address,bytes) + topic0: "0x92eefe9b00000000000000000000000000000000000000000000000000000000" + handler: handleSetController + - event: LOG_CALL(indexed bytes4,indexed address,bytes) + topic0: "0x49b5955200000000000000000000000000000000000000000000000000000000" + handler: handleSetPublicSwap + - event: LOG_CALL(indexed bytes4,indexed address,bytes) + topic0: "0x4bb278f300000000000000000000000000000000000000000000000000000000" + handler: handleFinalize + - event: LOG_CALL(indexed bytes4,indexed address,bytes) + topic0: "0xd1d7bc9100000000000000000000000000000000000000000000000000000000" + handler: handleSetup + - event: LOG_CALL(indexed bytes4,indexed address,bytes) + topic0: "0x3fdddaa200000000000000000000000000000000000000000000000000000000" + handler: handleRebind + - event: LOG_CALL(indexed bytes4,indexed address,bytes) + topic0: "0xe4e1e53800000000000000000000000000000000000000000000000000000000" + handler: handleRebind + - event: LOG_JOIN(indexed address,indexed address,uint256) + handler: handleJoinPool + - event: LOG_EXIT(indexed address,indexed address,uint256) + handler: handleExitPool + - event: LOG_SWAP(indexed address,indexed address,indexed address,uint256,uint256) + handler: handleSwap + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..2d3ce67 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "./node_modules/@graphprotocol/graph-ts/tsconfig.json", + "compilerOptions": { + "types": ["@graphprotocol/graph-ts"] + } +} \ No newline at end of file