ocean-subgraph/abis/BFactory.json

2987 lines
129 KiB
JSON

{
"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": {}
}
}