cic-internal-integration/apps/cic-eth/tests/testdata/bancor/ConverterUpgrader.json

18634 lines
891 KiB
JSON

{
"contractName": "ConverterUpgrader",
"abi": [
{
"inputs": [
{
"internalType": "contract IContractRegistry",
"name": "_registry",
"type": "address"
},
{
"internalType": "contract IEtherToken",
"name": "_etherToken",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "contract IConverter",
"name": "_converter",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "ConverterOwned",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_oldConverter",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_newConverter",
"type": "address"
}
],
"name": "ConverterUpgrade",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_prevOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "OwnerUpdate",
"type": "event"
},
{
"inputs": [],
"name": "acceptOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "etherToken",
"outputs": [
{
"internalType": "contract IEtherToken",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "newOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "onlyOwnerCanUpdateRegistry",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "prevRegistry",
"outputs": [
{
"internalType": "contract IContractRegistry",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "registry",
"outputs": [
{
"internalType": "contract IContractRegistry",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "restoreRegistry",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bool",
"name": "_onlyOwnerCanUpdateRegistry",
"type": "bool"
}
],
"name": "restrictRegistryUpdate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "updateRegistry",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint16",
"name": "_version",
"type": "uint16"
}
],
"name": "upgrade",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_version",
"type": "bytes32"
}
],
"name": "upgrade",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IConverter",
"name": "_converter",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_version",
"type": "bytes32"
}
],
"name": "upgradeOld",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"contract IEtherToken\",\"name\":\"_etherToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"ConverterOwned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_oldConverter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newConverter\",\"type\":\"address\"}],\"name\":\"ConverterUpgrade\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"etherToken\",\"outputs\":[{\"internalType\":\"contract IEtherToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_version\",\"type\":\"bytes32\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_version\",\"type\":\"bytes32\"}],\"name\":\"upgradeOld\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Converter Upgrader The converter upgrader contract allows upgrading an older converter contract (0.4 and up) to the latest version. To begin the upgrade process, simply execute the 'upgrade' function. At the end of the process, the ownership of the newly upgraded converter will be transferred back to the original owner and the original owner will need to execute the 'acceptOwnership' function. The address of the new converter is available in the ConverterUpgrade event. Note that for older converters that don't yet have the 'upgrade' function, ownership should first be transferred manually to the ConverterUpgrader contract using the 'transferOwnership' function and then the upgrader 'upgrade' function should be executed directly.\",\"events\":{\"ConverterOwned(address,address)\":{\"details\":\"triggered when the contract accept a converter ownership\",\"params\":{\"_converter\":\"converter address\",\"_owner\":\"new owner - local upgrader address\"}},\"ConverterUpgrade(address,address)\":{\"details\":\"triggered when the upgrading process is done\",\"params\":{\"_newConverter\":\"new converter address\",\"_oldConverter\":\"old converter address\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"constructor\":{\"details\":\"initializes a new ConverterUpgrader instance\",\"params\":{\"_registry\":\"address of a contract registry contract\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"upgrade(bytes32)\":{\"details\":\"upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success. can only be called by a converter\",\"params\":{\"_version\":\"old converter version\"}},\"upgrade(uint16)\":{\"details\":\"upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success. can only be called by a converter\",\"params\":{\"_version\":\"old converter version\"}},\"upgradeOld(address,bytes32)\":{\"details\":\"upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success.\",\"params\":{\"_converter\":\"old converter contract address\",\"_version\":\"old converter version\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterUpgrader.sol\":\"ConverterUpgrader\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterUpgrader.sol\":{\"keccak256\":\"0x323711379e7fb617613e4260e5e04f745103cbcda30ff8d61ec29529b99d7526\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://770228b2605de3fe44710a54e9ab5116e58e652e9be23c3d0fecb82c7171b6a5\",\"dweb:/ipfs/QmWpJzUtG9Kpq39tFQ6K6pmk69H5HhYamiJAwKSRdcmCPL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol\":{\"keccak256\":\"0x40a8b6a5dd24f48b0c51c9f784c2e5df5afbadad9459873c25163f13f68c99dd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://6ad87f96e9e812869d79396d3415f89fabd1f068861f1c5c92bac09898938070\",\"dweb:/ipfs/QmaHUVyRsjUrQNtWnRhSnfPXMbwnFgpNwZvL9BMC5Xxagb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol\":{\"keccak256\":\"0x2420b67eec33085ab879f4962fc0b98d14ae227f2afccc85308e6333ca1b49fd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://074f808b01138b47d823eff0a15512005144cab48f450ff35ee41cb36adab3e5\",\"dweb:/ipfs/QmS2hpadJLAJCCavW7Gq8TTo8AUEJgqCe1BSFFUQ2MvGiW\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol\":{\"keccak256\":\"0x39f4f7af694f7f24373901d8edd57245c6e59970cd1b35137ded4bbebe2155bb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://30d1011854960be9ab326844d4d97324084955593b2903bee969aba6b1b5f8e9\",\"dweb:/ipfs/QmeTQNZRDNrboKD3ikyMj3tNVHGsa1GqBuAXytJAhhK5Az\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50604051611d60380380611d608339818101604052604081101561003357600080fd5b508051602090910151600080546001600160a01b0319163317905581806100598161009c565b50600280546001600160a01b039283166001600160a01b0319918216811790925560038054821690921790915560048054939092169216919091179055506100fa565b6001600160a01b0381166100f7576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b611c57806101096000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806390f58c961161008c578063bc444e1311610066578063bc444e13146101a1578063d4ee1d90146101be578063f2cfed87146101c6578063f2fde38b146101f2576100ea565b806390f58c9614610170578063b4a176d314610191578063b8066bcb14610199576100ea565b806361cd756e116100c857806361cd756e1461013457806379ba5097146101585780637b103999146101605780638da5cb5b14610168576100ea565b8063024c7ec7146100ef5780632fe8a6ad1461011057806349d10b641461012c575b600080fd5b61010e6004803603602081101561010557600080fd5b50351515610218565b005b61011861023e565b604080519115158252519081900360200190f35b61010e61024e565b61013c610456565b604080516001600160a01b039092168252519081900360200190f35b61010e610465565b61013c61051c565b61013c61052b565b61010e6004803603602081101561018657600080fd5b503561ffff1661053a565b61010e61054b565b61013c610577565b61010e600480360360208110156101b757600080fd5b5035610586565b61013c610590565b61010e600480360360408110156101dc57600080fd5b506001600160a01b03813516906020013561059f565b61010e6004803603602081101561020857600080fd5b50356001600160a01b0316610977565b6102206109f5565b60038054911515600160a01b0260ff60a01b19909216919091179055565b600354600160a01b900460ff1681565b6000546001600160a01b03163314806102715750600354600160a01b900460ff16155b6102b6576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006102d46f436f6e7472616374526567697374727960801b610a4a565b6002549091506001600160a01b038083169116148015906102fd57506001600160a01b03811615155b610345576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156103a757600080fd5b505afa1580156103bb573d6000803e3d6000fd5b505050506040513d60208110156103d157600080fd5b50516001600160a01b03161415610426576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6003546001600160a01b031681565b6001546001600160a01b031633146104b8576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b6105483361ffff831661059f565b50565b6105536109f5565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6004546001600160a01b031681565b610548338261059f565b6001546001600160a01b031681565b60008290506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105df57600080fd5b505afa1580156105f3573d6000803e3d6000fd5b505050506040513d602081101561060957600080fd5b5051905061061682610aca565b600061062183610b56565b905061062d8382610e56565b6106378382611175565b610641838261124a565b6000836001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561067c57600080fd5b505afa158015610690573d6000803e3d6000fd5b505050506040513d60208110156106a657600080fd5b5051905060006106b585611641565b80156107225750846001600160a01b03166322f3e2d46040518163ffffffff1660e01b815260040160206040518083038186803b1580156106f557600080fd5b505afa158015610709573d6000803e3d6000fd5b505050506040513d602081101561071f57600080fd5b50515b9050846001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076757600080fd5b505afa15801561077b573d6000803e3d6000fd5b505050506040513d602081101561079157600080fd5b50516001600160a01b0316141561085d57846001600160a01b03166321e6b53d846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156107f157600080fd5b505af1158015610805573d6000803e3d6000fd5b50505050826001600160a01b031663cdc91c696040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561084457600080fd5b505af1158015610858573d6000803e3d6000fd5b505050505b610868858483611758565b846001600160a01b031663f2fde38b856040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156108b757600080fd5b505af11580156108cb573d6000803e3d6000fd5b50505050826001600160a01b031663f2fde38b856040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561091e57600080fd5b505af1158015610932573d6000803e3d6000fd5b50506040516001600160a01b038087169350881691507f522b846327aea07106ec4d64ae4b6d6dea47689884dab650fd3a1f2e1d6a270190600090a350505050505050565b61097f6109f5565b6000546001600160a01b03828116911614156109d3576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a48576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015610a9657600080fd5b505afa158015610aaa573d6000803e3d6000fd5b505050506040513d6020811015610ac057600080fd5b505190505b919050565b806001600160a01b03166379ba50976040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b0557600080fd5b505af1158015610b19573d6000803e3d6000fd5b50506040513092506001600160a01b03841691507ff764604894fa993d4370a9cb28b81c11deb1aafdb2909156173ae3833dad807590600090a350565b600080826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b9257600080fd5b505afa158015610ba6573d6000803e3d6000fd5b505050506040513d6020811015610bbc57600080fd5b5051604080516394c275ad60e01b815290519192506000916001600160a01b038616916394c275ad916004808301926020929190829003018186803b158015610c0457600080fd5b505afa158015610c18573d6000803e3d6000fd5b505050506040513d6020811015610c2e57600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038716916371f52bf3916004808301926020929190829003018186803b158015610c7657600080fd5b505afa158015610c8a573d6000803e3d6000fd5b505050506040513d6020811015610ca057600080fd5b505190506000610caf86611641565b15610d2057856001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ced57600080fd5b505afa158015610d01573d6000803e3d6000fd5b505050506040513d6020811015610d1757600080fd5b50519050610d31565b60018261ffff161115610d31575060015b6000610d4f6f436f6e766572746572466163746f727960801b610a4a565b60025460408051630afb25b560e11b815261ffff861660048201526001600160a01b038981166024830152928316604482015263ffffffff881660648201529051929350600092918416916315f64b6a9160848082019260209290919082900301818787803b158015610dc157600080fd5b505af1158015610dd5573d6000803e3d6000fd5b505050506040513d6020811015610deb57600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038316916379ba50979160048082019260009290919082900301818387803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b50929a9950505050505050505050565b6000826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b158015610e9157600080fd5b505afa158015610ea5573d6000803e3d6000fd5b505050506040513d6020811015610ebb57600080fd5b5051905060005b8161ffff168161ffff16101561116f576000846001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b158015610f1c57600080fd5b505afa158015610f30573d6000803e3d6000fd5b505050506040513d6020811015610f4657600080fd5b505160408051630e53aae960e01b81526001600160a01b038084166004830152915192935060009291881691630e53aae99160248082019260a092909190829003018186803b158015610f9857600080fd5b505afa158015610fac573d6000803e3d6000fd5b505050506040513d60a0811015610fc257600080fd5b506020015190506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156110725760408051631a9274b160e21b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015263ffffffff8316602482015290516001600160a01b03871691636a49d2c491604480830192600092919082900301818387803b15801561105557600080fd5b505af1158015611069573d6000803e3d6000fd5b50505050611165565b6004546001600160a01b03838116911614156110ef5760408051631a9274b160e21b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015263ffffffff8316602482015290516001600160a01b03871691636a49d2c491604480830192600092919082900301818387803b15801561105557600080fd5b846001600160a01b0316636a49d2c483836040518363ffffffff1660e01b815260040180836001600160a01b031681526020018263ffffffff16815260200192505050600060405180830381600087803b15801561114c57600080fd5b505af1158015611160573d6000803e3d6000fd5b505050505b5050600101610ec2565b50505050565b6000826001600160a01b031663579cd3ca6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111b057600080fd5b505afa1580156111c4573d6000803e3d6000fd5b505050506040513d60208110156111da57600080fd5b50516040805163ecbca55d60e01b815263ffffffff8316600482015290519192506001600160a01b0384169163ecbca55d9160248082019260009290919082900301818387803b15801561122d57600080fd5b505af1158015611241573d6000803e3d6000fd5b50505050505050565b600080836001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561128657600080fd5b505afa15801561129a573d6000803e3d6000fd5b505050506040513d60208110156112b057600080fd5b5051905060005b8161ffff168161ffff16101561163a576000856001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b15801561131157600080fd5b505afa158015611325573d6000803e3d6000fd5b505050506040513d602081101561133b57600080fd5b505190506001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156113d057856001600160a01b031663690d8320866040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156113b357600080fd5b505af11580156113c7573d6000803e3d6000fd5b50505050611631565b6004546001600160a01b038281169116141561154457600460009054906101000a90046001600160a01b03166001600160a01b03166370a08231876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561144857600080fd5b505afa15801561145c573d6000803e3d6000fd5b505050506040513d602081101561147257600080fd5b50516004805460408051632f1a9acf60e11b81526001600160a01b03928316938101939093523060248401526044830184905251929650881691635e35359e9160648082019260009290919082900301818387803b1580156114d357600080fd5b505af11580156114e7573d6000803e3d6000fd5b5050600480546040805163040b850f60e31b81526001600160a01b038b811694820194909452602481018a9052905192909116935063205c2878925060448082019260009290919082900301818387803b1580156113b357600080fd5b604080516370a0823160e01b81526001600160a01b038881166004830152915183928316916370a08231916024808301926020929190829003018186803b15801561158e57600080fd5b505afa1580156115a2573d6000803e3d6000fd5b505050506040513d60208110156115b857600080fd5b505160408051632f1a9acf60e11b81526001600160a01b038481166004830152898116602483015260448201849052915192975090891691635e35359e9160648082019260009290919082900301818387803b15801561161757600080fd5b505af115801561162b573d6000803e3d6000fd5b50505050505b506001016112b7565b5050505050565b60408051600481526024810182526020810180516001600160e01b031663349814a760e21b1781529151815160009384926060926001600160a01b03881692610fa0928792909182918083835b602083106116ad5780518252601f19909201916020918201910161168e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303818686fa925050503d806000811461170e576040519150601f19603f3d011682016040523d82523d6000602084013e611713565b606091505b5091509150818015611726575080516020145b1561174d5780806020019051602081101561174057600080fd5b50519350610ac592505050565b506000949350505050565b61176183611641565b61176a57611c1c565b6000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117a557600080fd5b505afa1580156117b9573d6000803e3d6000fd5b505050506040513d60208110156117cf57600080fd5b50519050600261ffff8216141561116f57600084905060008490506000826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561182557600080fd5b505afa158015611839573d6000803e3d6000fd5b505050506040513d602081101561184f57600080fd5b5051905060005b8161ffff168161ffff1610156119d1576000846001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b1580156118b057600080fd5b505afa1580156118c4573d6000803e3d6000fd5b505050506040513d60208110156118da57600080fd5b50516040805162178c6760e21b81526001600160a01b038084166004830152915192935060009291881691625e319c91602480820192602092909190829003018186803b15801561192a57600080fd5b505afa15801561193e573d6000803e3d6000fd5b505050506040513d602081101561195457600080fd5b505160408051635fbed35d60e11b81526001600160a01b0385811660048301526024820184905291519293509087169163bf7da6ba9160448082019260009290919082900301818387803b1580156119ab57600080fd5b505af11580156119bf573d6000803e3d6000fd5b50506001909401935061185692505050565b50846119e05750505050611c1c565b6000836001600160a01b0316630337e3fb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1b57600080fd5b505afa158015611a2f573d6000803e3d6000fd5b505050506040513d6020811015611a4557600080fd5b505160408051632630c12f60e01b815290519192506000916001600160a01b03871691632630c12f916004808301926020929190829003018186803b158015611a8d57600080fd5b505afa158015611aa1573d6000803e3d6000fd5b505050506040513d6020811015611ab757600080fd5b50516040805163b9e1715b60e01b815290519192506000916001600160a01b0384169163b9e1715b916004808301926020929190829003018186803b158015611aff57600080fd5b505afa158015611b13573d6000803e3d6000fd5b505050506040513d6020811015611b2957600080fd5b50516040805163f997fda760e01b815290519192506000916001600160a01b0385169163f997fda7916004808301926020929190829003018186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b50516040805163119b90cd60e01b81526001600160a01b0387811660048301528581166024830152808416604483015291519293509088169163119b90cd9160648082019260009290919082900301818387803b158015611bfb57600080fd5b505af1158015611c0f573d6000803e3d6000fd5b5050505050505050505050505b50505056fea2646970667358221220111fd1a2ce055791c689823e173085bc0f337d75226fe3b9173a5cb0977f91e864736f6c634300060c0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806390f58c961161008c578063bc444e1311610066578063bc444e13146101a1578063d4ee1d90146101be578063f2cfed87146101c6578063f2fde38b146101f2576100ea565b806390f58c9614610170578063b4a176d314610191578063b8066bcb14610199576100ea565b806361cd756e116100c857806361cd756e1461013457806379ba5097146101585780637b103999146101605780638da5cb5b14610168576100ea565b8063024c7ec7146100ef5780632fe8a6ad1461011057806349d10b641461012c575b600080fd5b61010e6004803603602081101561010557600080fd5b50351515610218565b005b61011861023e565b604080519115158252519081900360200190f35b61010e61024e565b61013c610456565b604080516001600160a01b039092168252519081900360200190f35b61010e610465565b61013c61051c565b61013c61052b565b61010e6004803603602081101561018657600080fd5b503561ffff1661053a565b61010e61054b565b61013c610577565b61010e600480360360208110156101b757600080fd5b5035610586565b61013c610590565b61010e600480360360408110156101dc57600080fd5b506001600160a01b03813516906020013561059f565b61010e6004803603602081101561020857600080fd5b50356001600160a01b0316610977565b6102206109f5565b60038054911515600160a01b0260ff60a01b19909216919091179055565b600354600160a01b900460ff1681565b6000546001600160a01b03163314806102715750600354600160a01b900460ff16155b6102b6576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006102d46f436f6e7472616374526567697374727960801b610a4a565b6002549091506001600160a01b038083169116148015906102fd57506001600160a01b03811615155b610345576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156103a757600080fd5b505afa1580156103bb573d6000803e3d6000fd5b505050506040513d60208110156103d157600080fd5b50516001600160a01b03161415610426576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6003546001600160a01b031681565b6001546001600160a01b031633146104b8576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b6105483361ffff831661059f565b50565b6105536109f5565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6004546001600160a01b031681565b610548338261059f565b6001546001600160a01b031681565b60008290506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105df57600080fd5b505afa1580156105f3573d6000803e3d6000fd5b505050506040513d602081101561060957600080fd5b5051905061061682610aca565b600061062183610b56565b905061062d8382610e56565b6106378382611175565b610641838261124a565b6000836001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561067c57600080fd5b505afa158015610690573d6000803e3d6000fd5b505050506040513d60208110156106a657600080fd5b5051905060006106b585611641565b80156107225750846001600160a01b03166322f3e2d46040518163ffffffff1660e01b815260040160206040518083038186803b1580156106f557600080fd5b505afa158015610709573d6000803e3d6000fd5b505050506040513d602081101561071f57600080fd5b50515b9050846001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076757600080fd5b505afa15801561077b573d6000803e3d6000fd5b505050506040513d602081101561079157600080fd5b50516001600160a01b0316141561085d57846001600160a01b03166321e6b53d846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156107f157600080fd5b505af1158015610805573d6000803e3d6000fd5b50505050826001600160a01b031663cdc91c696040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561084457600080fd5b505af1158015610858573d6000803e3d6000fd5b505050505b610868858483611758565b846001600160a01b031663f2fde38b856040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156108b757600080fd5b505af11580156108cb573d6000803e3d6000fd5b50505050826001600160a01b031663f2fde38b856040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561091e57600080fd5b505af1158015610932573d6000803e3d6000fd5b50506040516001600160a01b038087169350881691507f522b846327aea07106ec4d64ae4b6d6dea47689884dab650fd3a1f2e1d6a270190600090a350505050505050565b61097f6109f5565b6000546001600160a01b03828116911614156109d3576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a48576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015610a9657600080fd5b505afa158015610aaa573d6000803e3d6000fd5b505050506040513d6020811015610ac057600080fd5b505190505b919050565b806001600160a01b03166379ba50976040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b0557600080fd5b505af1158015610b19573d6000803e3d6000fd5b50506040513092506001600160a01b03841691507ff764604894fa993d4370a9cb28b81c11deb1aafdb2909156173ae3833dad807590600090a350565b600080826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b9257600080fd5b505afa158015610ba6573d6000803e3d6000fd5b505050506040513d6020811015610bbc57600080fd5b5051604080516394c275ad60e01b815290519192506000916001600160a01b038616916394c275ad916004808301926020929190829003018186803b158015610c0457600080fd5b505afa158015610c18573d6000803e3d6000fd5b505050506040513d6020811015610c2e57600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038716916371f52bf3916004808301926020929190829003018186803b158015610c7657600080fd5b505afa158015610c8a573d6000803e3d6000fd5b505050506040513d6020811015610ca057600080fd5b505190506000610caf86611641565b15610d2057856001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ced57600080fd5b505afa158015610d01573d6000803e3d6000fd5b505050506040513d6020811015610d1757600080fd5b50519050610d31565b60018261ffff161115610d31575060015b6000610d4f6f436f6e766572746572466163746f727960801b610a4a565b60025460408051630afb25b560e11b815261ffff861660048201526001600160a01b038981166024830152928316604482015263ffffffff881660648201529051929350600092918416916315f64b6a9160848082019260209290919082900301818787803b158015610dc157600080fd5b505af1158015610dd5573d6000803e3d6000fd5b505050506040513d6020811015610deb57600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038316916379ba50979160048082019260009290919082900301818387803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b50929a9950505050505050505050565b6000826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b158015610e9157600080fd5b505afa158015610ea5573d6000803e3d6000fd5b505050506040513d6020811015610ebb57600080fd5b5051905060005b8161ffff168161ffff16101561116f576000846001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b158015610f1c57600080fd5b505afa158015610f30573d6000803e3d6000fd5b505050506040513d6020811015610f4657600080fd5b505160408051630e53aae960e01b81526001600160a01b038084166004830152915192935060009291881691630e53aae99160248082019260a092909190829003018186803b158015610f9857600080fd5b505afa158015610fac573d6000803e3d6000fd5b505050506040513d60a0811015610fc257600080fd5b506020015190506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156110725760408051631a9274b160e21b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015263ffffffff8316602482015290516001600160a01b03871691636a49d2c491604480830192600092919082900301818387803b15801561105557600080fd5b505af1158015611069573d6000803e3d6000fd5b50505050611165565b6004546001600160a01b03838116911614156110ef5760408051631a9274b160e21b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015263ffffffff8316602482015290516001600160a01b03871691636a49d2c491604480830192600092919082900301818387803b15801561105557600080fd5b846001600160a01b0316636a49d2c483836040518363ffffffff1660e01b815260040180836001600160a01b031681526020018263ffffffff16815260200192505050600060405180830381600087803b15801561114c57600080fd5b505af1158015611160573d6000803e3d6000fd5b505050505b5050600101610ec2565b50505050565b6000826001600160a01b031663579cd3ca6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111b057600080fd5b505afa1580156111c4573d6000803e3d6000fd5b505050506040513d60208110156111da57600080fd5b50516040805163ecbca55d60e01b815263ffffffff8316600482015290519192506001600160a01b0384169163ecbca55d9160248082019260009290919082900301818387803b15801561122d57600080fd5b505af1158015611241573d6000803e3d6000fd5b50505050505050565b600080836001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561128657600080fd5b505afa15801561129a573d6000803e3d6000fd5b505050506040513d60208110156112b057600080fd5b5051905060005b8161ffff168161ffff16101561163a576000856001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b15801561131157600080fd5b505afa158015611325573d6000803e3d6000fd5b505050506040513d602081101561133b57600080fd5b505190506001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156113d057856001600160a01b031663690d8320866040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156113b357600080fd5b505af11580156113c7573d6000803e3d6000fd5b50505050611631565b6004546001600160a01b038281169116141561154457600460009054906101000a90046001600160a01b03166001600160a01b03166370a08231876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561144857600080fd5b505afa15801561145c573d6000803e3d6000fd5b505050506040513d602081101561147257600080fd5b50516004805460408051632f1a9acf60e11b81526001600160a01b03928316938101939093523060248401526044830184905251929650881691635e35359e9160648082019260009290919082900301818387803b1580156114d357600080fd5b505af11580156114e7573d6000803e3d6000fd5b5050600480546040805163040b850f60e31b81526001600160a01b038b811694820194909452602481018a9052905192909116935063205c2878925060448082019260009290919082900301818387803b1580156113b357600080fd5b604080516370a0823160e01b81526001600160a01b038881166004830152915183928316916370a08231916024808301926020929190829003018186803b15801561158e57600080fd5b505afa1580156115a2573d6000803e3d6000fd5b505050506040513d60208110156115b857600080fd5b505160408051632f1a9acf60e11b81526001600160a01b038481166004830152898116602483015260448201849052915192975090891691635e35359e9160648082019260009290919082900301818387803b15801561161757600080fd5b505af115801561162b573d6000803e3d6000fd5b50505050505b506001016112b7565b5050505050565b60408051600481526024810182526020810180516001600160e01b031663349814a760e21b1781529151815160009384926060926001600160a01b03881692610fa0928792909182918083835b602083106116ad5780518252601f19909201916020918201910161168e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303818686fa925050503d806000811461170e576040519150601f19603f3d011682016040523d82523d6000602084013e611713565b606091505b5091509150818015611726575080516020145b1561174d5780806020019051602081101561174057600080fd5b50519350610ac592505050565b506000949350505050565b61176183611641565b61176a57611c1c565b6000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117a557600080fd5b505afa1580156117b9573d6000803e3d6000fd5b505050506040513d60208110156117cf57600080fd5b50519050600261ffff8216141561116f57600084905060008490506000826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561182557600080fd5b505afa158015611839573d6000803e3d6000fd5b505050506040513d602081101561184f57600080fd5b5051905060005b8161ffff168161ffff1610156119d1576000846001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b1580156118b057600080fd5b505afa1580156118c4573d6000803e3d6000fd5b505050506040513d60208110156118da57600080fd5b50516040805162178c6760e21b81526001600160a01b038084166004830152915192935060009291881691625e319c91602480820192602092909190829003018186803b15801561192a57600080fd5b505afa15801561193e573d6000803e3d6000fd5b505050506040513d602081101561195457600080fd5b505160408051635fbed35d60e11b81526001600160a01b0385811660048301526024820184905291519293509087169163bf7da6ba9160448082019260009290919082900301818387803b1580156119ab57600080fd5b505af11580156119bf573d6000803e3d6000fd5b50506001909401935061185692505050565b50846119e05750505050611c1c565b6000836001600160a01b0316630337e3fb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1b57600080fd5b505afa158015611a2f573d6000803e3d6000fd5b505050506040513d6020811015611a4557600080fd5b505160408051632630c12f60e01b815290519192506000916001600160a01b03871691632630c12f916004808301926020929190829003018186803b158015611a8d57600080fd5b505afa158015611aa1573d6000803e3d6000fd5b505050506040513d6020811015611ab757600080fd5b50516040805163b9e1715b60e01b815290519192506000916001600160a01b0384169163b9e1715b916004808301926020929190829003018186803b158015611aff57600080fd5b505afa158015611b13573d6000803e3d6000fd5b505050506040513d6020811015611b2957600080fd5b50516040805163f997fda760e01b815290519192506000916001600160a01b0385169163f997fda7916004808301926020929190829003018186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b50516040805163119b90cd60e01b81526001600160a01b0387811660048301528581166024830152808416604483015291519293509088169163119b90cd9160648082019260009290919082900301818387803b158015611bfb57600080fd5b505af1158015611c0f573d6000803e3d6000fd5b5050505050505050505050505b50505056fea2646970667358221220111fd1a2ce055791c689823e173085bc0f337d75226fe3b9173a5cb0977f91e864736f6c634300060c0033",
"immutableReferences": {},
"sourceMap": "1251:11574:12:-:0;;;2216:150;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2216:150:12;;;;;;;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;2216:150:12;;594:23:64;2216:150:12;594:13:64;:23::i;:::-;-1:-1:-1;2122:8:56::1;:39:::0;;-1:-1:-1;;;;;2122:39:56;;::::1;-1:-1:-1::0;;;;;;2122:39:56;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;::::1;::::0;;::::1;::::0;;;2334:10:12::1;:24:::0;;;;;::::1;::::0;::::1;::::0;;;::::1;::::0;;-1:-1:-1;1251:11574:12;;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;1251:11574:12:-;;;;;;;",
"deployedSourceMap": "1251:11574:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3655:224:56;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:56;;;;:::i;:::-;;1333:38;;;:::i;:::-;;;;;;;;;;;;;;;;;;2300:925;;;:::i;1243:37::-;;;:::i;:::-;;;;-1:-1:-1;;;;;1243:37:56;;;;;;;;;;;;;;1422:217:57;;;:::i;1154:33:56:-;;;:::i;219:29:57:-;;;:::i;3336:131:12:-;;;;;;;;;;;;;;;;-1:-1:-1;3336:131:12;;;;:::i;3304:137:56:-;;;:::i;1444:29:12:-;;;:::i;2794:114::-;;;;;;;;;;;;;;;;-1:-1:-1;2794:114:12;;:::i;255:23:57:-;;;:::i;3916:1113:12:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3916:1113:12;;;;;;;;:::i;1164:167:57:-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;3655:224:56:-;726:12:57;:10;:12::i;:::-;3815:26:56::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:56::1;-1:-1:-1::0;;;;3815:56:56;;::::1;::::0;;;::::1;::::0;;3655:224::o;1333:38::-;;;-1:-1:-1;;;1333:38:56;;;;;:::o;2300:925::-;2417:5;;-1:-1:-1;;;;;2417:5:56;2403:10;:19;;:50;;-1:-1:-1;2427:26:56;;-1:-1:-1;;;2427:26:56;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:56;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:56;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:56;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:56;:11;-1:-1:-1;;;;;2907:21:56;;-1:-1:-1;;;2907:40:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:56;-1:-1:-1;;;;;2907:54:56;;;2899:87;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:56;;;-1:-1:-1;;;;;;3078:23:56;;;;;;;3195:22;;;;;;;;;;;2300:925::o;1243:37::-;;;-1:-1:-1;;;;;1243:37:56;;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;1154:33:56:-;;;-1:-1:-1;;;;;1154:33:56;;:::o;219:29:57:-;;;-1:-1:-1;;;;;219:29:57;;:::o;3336:131:12:-;3397:62;3419:10;3440:17;;;3397:10;:62::i;:::-;3336:131;:::o;3304:137:56:-;726:12:57;:10;:12::i;:::-;3421::56::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:56::1;-1:-1:-1::0;;;;;3421:12:56;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;1444:29:12:-;;;-1:-1:-1;;;;;1444:29:12;;:::o;2794:114::-;2856:44;2878:10;2891:8;2856:10;:44::i;255:23:57:-;;;-1:-1:-1;;;;;255:23:57;;:::o;3916:1113:12:-;4014:20;4048:10;4014:45;;4070:17;4090:9;-1:-1:-1;;;;;4090:15:12;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4090:17:12;;-1:-1:-1;4118:35:12;4143:9;4118:24;:35::i;:::-;4164:23;4190:26;4206:9;4190:15;:26::i;:::-;4164:52;;4227:37;4240:9;4251:12;4227;:37::i;:::-;4275:42;4293:9;4304:12;4275:17;:42::i;:::-;4328:48;4352:9;4363:12;4328:23;:48::i;:::-;4387:23;4413:9;-1:-1:-1;;;;;4413:15:12;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4413:17:12;;-1:-1:-1;4511:13:12;4527:33;4550:9;4527:22;:33::i;:::-;:57;;;;;4564:9;-1:-1:-1;;;;;4564:18:12;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4564:20:12;4527:57;4511:73;;4627:9;-1:-1:-1;;;;;4601:36:12;:6;-1:-1:-1;;;;;4601:12:12;;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4601:14:12;-1:-1:-1;;;;;4601:36:12;;4597:175;;;4654:9;-1:-1:-1;;;;;4654:32:12;;4695:12;4654:55;;;;;;;;;;;;;-1:-1:-1;;;;;4654:55:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4724:12;-1:-1:-1;;;;;4724:34:12;;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4597:175;4784:57;4807:9;4818:12;4832:8;4784:22;:57::i;:::-;4854:9;-1:-1:-1;;;;;4854:27:12;;4882:9;4854:38;;;;;;;;;;;;;-1:-1:-1;;;;;4854:38:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4903:12;-1:-1:-1;;;;;4903:30:12;;4934:9;4903:41;;;;;;;;;;;;;-1:-1:-1;;;;;4903:41:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4962:59:12;;-1:-1:-1;;;;;4962:59:12;;;;-1:-1:-1;4962:59:12;;;-1:-1:-1;4962:59:12;;;;;3916:1113;;;;;;;:::o;1164:167:57:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;4077:133:56:-;4169:8;;:33;;;-1:-1:-1;;;4169:33:56;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:56;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:56;;-1:-1:-1;4077:133:56;;;;:::o;5416:178:12:-;5495:13;-1:-1:-1;;;;;5495:29:12;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5542:44:12;;5580:4;;-1:-1:-1;;;;;;5542:44:12;;;-1:-1:-1;5542:44:12;;;;;5416:178;:::o;5930:992::-;5998:10;6021:23;6047:13;-1:-1:-1;;;;;6047:19:12;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6047:21:12;6105:32;;;-1:-1:-1;;;6105:32:12;;;;6047:21;;-1:-1:-1;6079:23:12;;-1:-1:-1;;;;;6105:30:12;;;;;:32;;;;;6047:21;;6105:32;;;;;;;:30;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6105:32:12;6175:35;;;-1:-1:-1;;;6175:35:12;;;;6105:32;;-1:-1:-1;6148:24:12;;-1:-1:-1;;;;;6175:33:12;;;;;:35;;;;;6105:32;;6175:35;;;;;;;:33;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6175:35:12;;-1:-1:-1;6264:14:12;6364:37;6387:13;6364:22;:37::i;:::-;6360:279;;;6426:13;-1:-1:-1;;;;;6426:27:12;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6426:29:12;;-1:-1:-1;6360:279:12;;;6612:1;6592:17;:21;;;6588:51;;;-1:-1:-1;6638:1:12;6588:51;6652:34;6707:28;-1:-1:-1;;;6707:9:12;:28::i;:::-;6820:8;;6770:77;;;-1:-1:-1;;;6770:77:12;;;;;;;;;-1:-1:-1;;;;;6770:77:12;;;;;;;6820:8;;;6770:77;;;;;;;;;;;;;6652:84;;-1:-1:-1;6747:20:12;;6770:32;;;;;;:77;;;;;;;;;;;;;;;6747:20;6770:32;:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6770:77:12;6860:27;;;-1:-1:-1;;;6860:27:12;;;;6770:77;;-1:-1:-1;;;;;;6860:25:12;;;;;:27;;;;;;;;;;;;;;;;:25;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6905:9:12;;5930:992;-1:-1:-1;;;;;;;;;;5930:992:12:o;7267:883::-;7360:24;7387:13;-1:-1:-1;;;;;7387:33:12;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7387:35:12;;-1:-1:-1;7440:8:12;7435:708;7458:17;7454:21;;:1;:21;;;7435:708;;;7497:26;7526:13;-1:-1:-1;;;;;7526:29:12;;7556:1;7526:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7526:32:12;7599:40;;;-1:-1:-1;;;7599:40:12;;-1:-1:-1;;;;;7599:40:12;;;;;;;;;7526:32;;-1:-1:-1;7576:13:12;;7599:24;;;;;;:40;;;;;;;;;;;;;;;:24;:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7599:40:12;;;;-1:-1:-1;;;;;;7690:37:12;;1394:42;7690:37;7686:446;;;7748:53;;;-1:-1:-1;;;7748:53:12;;1394:42;7748:53;;;;;;;;;;;;;-1:-1:-1;;;;;7748:24:12;;;;;:53;;;;;-1:-1:-1;;7748:53:12;;;;;;;-1:-1:-1;7748:24:12;:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7686:446;;;7894:10;;-1:-1:-1;;;;;7876:28:12;;;7894:10;;7876:28;7872:260;;;7925:53;;;-1:-1:-1;;;7925:53:12;;1394:42;7925:53;;;;;;;;;;;;;-1:-1:-1;;;;;7925:24:12;;;;;:53;;;;;-1:-1:-1;;7925:53:12;;;;;;;-1:-1:-1;7925:24:12;:53;;;;;;;;;;7872:260;8068:13;-1:-1:-1;;;;;8068:24:12;;8093:14;8109:6;8068:48;;;;;;;;;;;;;-1:-1:-1;;;;;8068:48:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7872:260;-1:-1:-1;;7477:3:12;;7435:708;;;;7267:883;;;:::o;8390:214::-;8488:20;8511:13;-1:-1:-1;;;;;8511:27:12;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8511:29:12;8551:45;;;-1:-1:-1;;;8551:45:12;;;;;;;;;;;8511:29;;-1:-1:-1;;;;;;8551:30:12;;;;;:45;;;;;-1:-1:-1;;8551:45:12;;;;;;;;-1:-1:-1;8551:30:12;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8390:214;;;:::o;9061:1185::-;9165:22;9198:24;9225:13;-1:-1:-1;;;;;9225:33:12;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9225:35:12;;-1:-1:-1;9278:8:12;9273:966;9296:17;9292:21;;:1;:21;;;9273:966;;;9335:26;9364:13;-1:-1:-1;;;;;9364:29:12;;9394:1;9364:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9364:32:12;;-1:-1:-1;;;;;;9445:37:12;;1394:42;9445:37;9441:787;;;9503:13;-1:-1:-1;;;;;9503:25:12;;9537:13;9503:49;;;;;;;;;;;;;-1:-1:-1;;;;;9503:49:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9441:787;;;9645:10;;-1:-1:-1;;;;;9627:28:12;;;9645:10;;9627:28;9623:605;;;9693:10;;;;;;;;;-1:-1:-1;;;;;9693:10:12;-1:-1:-1;;;;;9693:20:12;;9722:13;9693:44;;;;;;;;;;;;;-1:-1:-1;;;;;9693:44:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9693:44:12;9785:10;;;9756:71;;;-1:-1:-1;;;9756:71:12;;-1:-1:-1;;;;;9785:10:12;;;9756:71;;;;;;;9805:4;9756:71;;;;;;;;;;;9693:44;;-1:-1:-1;9756:28:12;;;;;:71;;;;;9785:10;;9756:71;;;;;;;;9785:10;9756:28;:71;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;9846:10:12;;;:61;;;-1:-1:-1;;;9846:61:12;;-1:-1:-1;;;;;9846:61:12;;;;;;;;;;;;;;;;;;:10;;;;;-1:-1:-1;9846:21:12;;-1:-1:-1;9846:61:12;;;;;:10;;:61;;;;;;;;:10;;:61;;;;;;;;;;9623:605;10071:43;;;-1:-1:-1;;;10071:43:12;;-1:-1:-1;;;;;10071:43:12;;;;;;;;;10021:14;;10071:19;;;;;:43;;;;;;;;;;;;;;:19;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10071:43:12;10133:79;;;-1:-1:-1;;;10133:79:12;;-1:-1:-1;;;;;10133:79:12;;;;;;;;;;;;;;;;;;;;;;10071:43;;-1:-1:-1;10133:28:12;;;;;;:79;;;;;-1:-1:-1;;10133:79:12;;;;;;;;-1:-1:-1;10133:28:12;:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9623:605;;-1:-1:-1;9315:3:12;;9273:966;;;;9061:1185;;;;:::o;12402:420::-;12517:54;;;;;;;;;;;;;;;;-1:-1:-1;;;;;12517:54:12;-1:-1:-1;;;12517:54:12;;;12624:49;;;;12480:4;;;;12497:17;;-1:-1:-1;;;;;12624:30:12;;;12661:4;;12517:54;;12624:49;;;;;;12517:54;12624:49;;;;;;;;;;-1:-1:-1;;12624:49:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12582:91;;;;12690:7;:34;;;;;12701:10;:17;12722:2;12701:23;12690:34;12686:104;;;12759:10;12748:30;;;;;;;;;;;;;;;-1:-1:-1;12748:30:12;;-1:-1:-1;12741:37:12;;-1:-1:-1;;;12741:37:12;12686:104;-1:-1:-1;12809:5:12;;12402:420;-1:-1:-1;;;;12402:420:12:o;10566:1562::-;10690:37;10713:13;10690:22;:37::i;:::-;10685:64;;10742:7;;10685:64;10761:20;10784:13;-1:-1:-1;;;;;10784:27:12;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10784:29:12;;-1:-1:-1;10845:1:12;10828:18;;;;10824:1297;;;10863:38;10938:13;10863:90;;10968:38;11043:13;10968:90;;11075:24;11102:12;-1:-1:-1;;;;;11102:32:12;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11102:34:12;;-1:-1:-1;11156:8:12;11151:371;11174:17;11170:21;;:1;:21;;;11151:371;;;11265:31;11299:12;-1:-1:-1;;;;;11299:28:12;;11328:1;11299:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11299:31:12;11367:54;;;-1:-1:-1;;;11367:54:12;;-1:-1:-1;;;;;11367:54:12;;;;;;;;;11299:31;;-1:-1:-1;11349:15:12;;11367:33;;;;;;:54;;;;;11299:31;;11367:54;;;;;;;;:33;:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11367:54:12;11440:66;;;-1:-1:-1;;;11440:66:12;;-1:-1:-1;;;;;11440:66:12;;;;;;;;;;;;;;;11367:54;;-1:-1:-1;11440:36:12;;;;;;:66;;;;;-1:-1:-1;;11440:66:12;;;;;;;;-1:-1:-1;11440:36:12;:66;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11193:3:12;;;;;-1:-1:-1;11151:371:12;;-1:-1:-1;;;11151:371:12;;;11543:9;11538:57;;11573:7;;;;;;11538:57;11657:31;11691:12;-1:-1:-1;;;;;11691:32:12;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11691:34:12;11817:26;;;-1:-1:-1;;;11817:26:12;;;;11691:34;;-1:-1:-1;11790:24:12;;-1:-1:-1;;;;;11817:24:12;;;;;:26;;;;;11691:34;;11817:26;;;;;;;:24;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11817:26:12;11890;;;-1:-1:-1;;;11890:26:12;;;;11817;;-1:-1:-1;11858:29:12;;-1:-1:-1;;;;;11890:24:12;;;;;:26;;;;;11817;;11890;;;;;;;:24;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11890:26:12;11963;;;-1:-1:-1;;;11963:26:12;;;;11890;;-1:-1:-1;11931:29:12;;-1:-1:-1;;;;;11963:24:12;;;;;:26;;;;;11890;;11963;;;;;;;:24;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11963:26:12;12049:60;;;-1:-1:-1;;;12049:60:12;;-1:-1:-1;;;;;12049:60:12;;;;;;;;;;;;;;;;;;;;;;;11963:26;;-1:-1:-1;12049:21:12;;;;;;:60;;;;;-1:-1:-1;;12049:60:12;;;;;;;;-1:-1:-1;12049:21:12;:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10824:1297;;;;;;;10566:1562;;;;;:::o",
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IConverter.sol\";\r\nimport \"./interfaces/IConverterUpgrader.sol\";\r\nimport \"./interfaces/IConverterFactory.sol\";\r\nimport \"../utility/ContractRegistryClient.sol\";\r\nimport \"../utility/interfaces/IWhitelist.sol\";\r\nimport \"../token/interfaces/IEtherToken.sol\";\r\nimport \"./types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol\";\r\n\r\n/**\r\n * @dev Converter Upgrader\r\n *\r\n * The converter upgrader contract allows upgrading an older converter contract (0.4 and up)\r\n * to the latest version.\r\n * To begin the upgrade process, simply execute the 'upgrade' function.\r\n * At the end of the process, the ownership of the newly upgraded converter will be transferred\r\n * back to the original owner and the original owner will need to execute the 'acceptOwnership' function.\r\n *\r\n * The address of the new converter is available in the ConverterUpgrade event.\r\n *\r\n * Note that for older converters that don't yet have the 'upgrade' function, ownership should first\r\n * be transferred manually to the ConverterUpgrader contract using the 'transferOwnership' function\r\n * and then the upgrader 'upgrade' function should be executed directly.\r\n*/\r\ncontract ConverterUpgrader is IConverterUpgrader, ContractRegistryClient {\r\n IERC20Token private constant ETH_RESERVE_ADDRESS = IERC20Token(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);\r\n IEtherToken public etherToken;\r\n\r\n /**\r\n * @dev triggered when the contract accept a converter ownership\r\n *\r\n * @param _converter converter address\r\n * @param _owner new owner - local upgrader address\r\n */\r\n event ConverterOwned(IConverter indexed _converter, address indexed _owner);\r\n\r\n /**\r\n * @dev triggered when the upgrading process is done\r\n *\r\n * @param _oldConverter old converter address\r\n * @param _newConverter new converter address\r\n */\r\n event ConverterUpgrade(address indexed _oldConverter, address indexed _newConverter);\r\n\r\n /**\r\n * @dev initializes a new ConverterUpgrader instance\r\n *\r\n * @param _registry address of a contract registry contract\r\n */\r\n constructor(IContractRegistry _registry, IEtherToken _etherToken) ContractRegistryClient(_registry) public {\r\n etherToken = _etherToken;\r\n }\r\n\r\n /**\r\n * @dev upgrades an old converter to the latest version\r\n * will throw if ownership wasn't transferred to the upgrader before calling this function.\r\n * ownership of the new converter will be transferred back to the original owner.\r\n * fires the ConverterUpgrade event upon success.\r\n * can only be called by a converter\r\n *\r\n * @param _version old converter version\r\n */\r\n function upgrade(bytes32 _version) public override {\r\n upgradeOld(IConverter(msg.sender), _version);\r\n }\r\n\r\n /**\r\n * @dev upgrades an old converter to the latest version\r\n * will throw if ownership wasn't transferred to the upgrader before calling this function.\r\n * ownership of the new converter will be transferred back to the original owner.\r\n * fires the ConverterUpgrade event upon success.\r\n * can only be called by a converter\r\n *\r\n * @param _version old converter version\r\n */\r\n function upgrade(uint16 _version) public override {\r\n upgradeOld(IConverter(msg.sender), bytes32(uint256(_version)));\r\n }\r\n\r\n /**\r\n * @dev upgrades an old converter to the latest version\r\n * will throw if ownership wasn't transferred to the upgrader before calling this function.\r\n * ownership of the new converter will be transferred back to the original owner.\r\n * fires the ConverterUpgrade event upon success.\r\n *\r\n * @param _converter old converter contract address\r\n * @param _version old converter version\r\n */\r\n function upgradeOld(IConverter _converter, bytes32 _version) public {\r\n _version;\r\n IConverter converter = IConverter(_converter);\r\n address prevOwner = converter.owner();\r\n acceptConverterOwnership(converter);\r\n IConverter newConverter = createConverter(converter);\r\n copyReserves(converter, newConverter);\r\n copyConversionFee(converter, newConverter);\r\n transferReserveBalances(converter, newConverter);\r\n IConverterAnchor anchor = converter.token();\r\n\r\n // get the activation status before it's being invalidated\r\n bool activate = isV28OrHigherConverter(converter) && converter.isActive();\r\n\r\n if (anchor.owner() == address(converter)) {\r\n converter.transferTokenOwnership(address(newConverter));\r\n newConverter.acceptAnchorOwnership();\r\n }\r\n\r\n handleTypeSpecificData(converter, newConverter, activate);\r\n\r\n converter.transferOwnership(prevOwner);\r\n newConverter.transferOwnership(prevOwner);\r\n\r\n emit ConverterUpgrade(address(converter), address(newConverter));\r\n }\r\n\r\n /**\r\n * @dev the first step when upgrading a converter is to transfer the ownership to the local contract.\r\n * the upgrader contract then needs to accept the ownership transfer before initiating\r\n * the upgrade process.\r\n * fires the ConverterOwned event upon success\r\n *\r\n * @param _oldConverter converter to accept ownership of\r\n */\r\n function acceptConverterOwnership(IConverter _oldConverter) private {\r\n _oldConverter.acceptOwnership();\r\n emit ConverterOwned(_oldConverter, address(this));\r\n }\r\n\r\n /**\r\n * @dev creates a new converter with same basic data as the original old converter\r\n * the newly created converter will have no reserves at this step.\r\n *\r\n * @param _oldConverter old converter contract address\r\n *\r\n * @return the new converter new converter contract address\r\n */\r\n function createConverter(IConverter _oldConverter) private returns (IConverter) {\r\n IConverterAnchor anchor = _oldConverter.token();\r\n uint32 maxConversionFee = _oldConverter.maxConversionFee();\r\n uint16 reserveTokenCount = _oldConverter.connectorTokenCount();\r\n\r\n // determine new converter type\r\n uint16 newType = 0;\r\n // new converter - get the type from the converter itself\r\n if (isV28OrHigherConverter(_oldConverter))\r\n newType = _oldConverter.converterType();\r\n // old converter - if it has 1 reserve token, the type is a liquid token, otherwise the type liquidity pool\r\n else if (reserveTokenCount > 1)\r\n newType = 1;\r\n\r\n IConverterFactory converterFactory = IConverterFactory(addressOf(CONVERTER_FACTORY));\r\n IConverter converter = converterFactory.createConverter(newType, anchor, registry, maxConversionFee);\r\n\r\n converter.acceptOwnership();\r\n return converter;\r\n }\r\n\r\n /**\r\n * @dev copies the reserves from the old converter to the new one.\r\n * note that this will not work for an unlimited number of reserves due to block gas limit constraints.\r\n *\r\n * @param _oldConverter old converter contract address\r\n * @param _newConverter new converter contract address\r\n */\r\n function copyReserves(IConverter _oldConverter, IConverter _newConverter) private {\r\n uint16 reserveTokenCount = _oldConverter.connectorTokenCount();\r\n\r\n for (uint16 i = 0; i < reserveTokenCount; i++) {\r\n IERC20Token reserveAddress = _oldConverter.connectorTokens(i);\r\n (, uint32 weight, , , ) = _oldConverter.connectors(reserveAddress);\r\n\r\n // Ether reserve\r\n if (reserveAddress == ETH_RESERVE_ADDRESS) {\r\n _newConverter.addReserve(ETH_RESERVE_ADDRESS, weight);\r\n }\r\n // Ether reserve token\r\n else if (reserveAddress == etherToken) {\r\n _newConverter.addReserve(ETH_RESERVE_ADDRESS, weight);\r\n }\r\n // ERC20 reserve token\r\n else {\r\n _newConverter.addReserve(reserveAddress, weight);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @dev copies the conversion fee from the old converter to the new one\r\n *\r\n * @param _oldConverter old converter contract address\r\n * @param _newConverter new converter contract address\r\n */\r\n function copyConversionFee(IConverter _oldConverter, IConverter _newConverter) private {\r\n uint32 conversionFee = _oldConverter.conversionFee();\r\n _newConverter.setConversionFee(conversionFee);\r\n }\r\n\r\n /**\r\n * @dev transfers the balance of each reserve in the old converter to the new one.\r\n * note that the function assumes that the new converter already has the exact same number of\r\n * also, this will not work for an unlimited number of reserves due to block gas limit constraints.\r\n *\r\n * @param _oldConverter old converter contract address\r\n * @param _newConverter new converter contract address\r\n */\r\n function transferReserveBalances(IConverter _oldConverter, IConverter _newConverter) private {\r\n uint256 reserveBalance;\r\n uint16 reserveTokenCount = _oldConverter.connectorTokenCount();\r\n\r\n for (uint16 i = 0; i < reserveTokenCount; i++) {\r\n IERC20Token reserveAddress = _oldConverter.connectorTokens(i);\r\n // Ether reserve\r\n if (reserveAddress == ETH_RESERVE_ADDRESS) {\r\n _oldConverter.withdrawETH(address(_newConverter));\r\n }\r\n // Ether reserve token\r\n else if (reserveAddress == etherToken) {\r\n reserveBalance = etherToken.balanceOf(address(_oldConverter));\r\n _oldConverter.withdrawTokens(etherToken, address(this), reserveBalance);\r\n etherToken.withdrawTo(address(_newConverter), reserveBalance);\r\n }\r\n // ERC20 reserve token\r\n else {\r\n IERC20Token connector = reserveAddress;\r\n reserveBalance = connector.balanceOf(address(_oldConverter));\r\n _oldConverter.withdrawTokens(connector, address(_newConverter), reserveBalance);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @dev handles upgrading custom (type specific) data from the old converter to the new one\r\n *\r\n * @param _oldConverter old converter contract address\r\n * @param _newConverter new converter contract address\r\n * @param _activate activate the new converter\r\n */\r\n function handleTypeSpecificData(IConverter _oldConverter, IConverter _newConverter, bool _activate) private {\r\n if (!isV28OrHigherConverter(_oldConverter))\r\n return;\r\n\r\n uint16 converterType = _oldConverter.converterType();\r\n if (converterType == 2) {\r\n ILiquidityPoolV2Converter oldConverter = ILiquidityPoolV2Converter(address(_oldConverter));\r\n ILiquidityPoolV2Converter newConverter = ILiquidityPoolV2Converter(address(_newConverter));\r\n\r\n uint16 reserveTokenCount = oldConverter.connectorTokenCount();\r\n for (uint16 i = 0; i < reserveTokenCount; i++) {\r\n // copy reserve staked balance\r\n IERC20Token reserveTokenAddress = oldConverter.connectorTokens(i);\r\n uint256 balance = oldConverter.reserveStakedBalance(reserveTokenAddress);\r\n newConverter.setReserveStakedBalance(reserveTokenAddress, balance);\r\n }\r\n\r\n if (!_activate) {\r\n return;\r\n }\r\n\r\n // get the primary reserve token\r\n IERC20Token primaryReserveToken = oldConverter.primaryReserveToken();\r\n\r\n // get the chainlink price oracles\r\n IPriceOracle priceOracle = oldConverter.priceOracle();\r\n IChainlinkPriceOracle oracleA = priceOracle.tokenAOracle();\r\n IChainlinkPriceOracle oracleB = priceOracle.tokenBOracle();\r\n\r\n // activate the new converter\r\n newConverter.activate(primaryReserveToken, oracleA, oracleB);\r\n }\r\n }\r\n\r\n bytes4 private constant IS_V28_OR_HIGHER_FUNC_SELECTOR = bytes4(keccak256(\"isV28OrHigher()\"));\r\n\r\n // using a static call to identify converter version\r\n // can't rely on the version number since the function had a different signature in older converters\r\n function isV28OrHigherConverter(IConverter _converter) internal view returns (bool) {\r\n bytes memory data = abi.encodeWithSelector(IS_V28_OR_HIGHER_FUNC_SELECTOR);\r\n (bool success, bytes memory returnData) = address(_converter).staticcall{ gas: 4000 }(data);\r\n\r\n if (success && returnData.length == 32) {\r\n return abi.decode(returnData, (bool));\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n",
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterUpgrader.sol",
"ast": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterUpgrader.sol",
"exportedSymbols": {
"ConverterUpgrader": [
13009
]
},
"id": 13010,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 12326,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:12"
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol",
"file": "./interfaces/IConverter.sol",
"id": 12327,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 13341,
"src": "77:37:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol",
"file": "./interfaces/IConverterUpgrader.sol",
"id": 12328,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 13661,
"src": "116:45:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol",
"file": "./interfaces/IConverterFactory.sol",
"id": 12329,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 13390,
"src": "163:44:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol",
"file": "../utility/ContractRegistryClient.sol",
"id": 12330,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 21720,
"src": "209:47:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol",
"file": "../utility/interfaces/IWhitelist.sol",
"id": 12331,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 22918,
"src": "258:46:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol",
"file": "../token/interfaces/IEtherToken.sol",
"id": 12332,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 21154,
"src": "306:45:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol",
"file": "./types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol",
"id": 12333,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 18766,
"src": "353:76:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 12335,
"name": "IConverterUpgrader",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13660,
"src": "1281:18:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterUpgrader_$13660",
"typeString": "contract IConverterUpgrader"
}
},
"id": 12336,
"nodeType": "InheritanceSpecifier",
"src": "1281:18:12"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 12337,
"name": "ContractRegistryClient",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21719,
"src": "1301:22:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ContractRegistryClient_$21719",
"typeString": "contract ContractRegistryClient"
}
},
"id": 12338,
"nodeType": "InheritanceSpecifier",
"src": "1301:22:12"
}
],
"contractDependencies": [
13660,
21719,
21818,
22661,
22847
],
"contractKind": "contract",
"documentation": {
"id": 12334,
"nodeType": "StructuredDocumentation",
"src": "433:816:12",
"text": " @dev Converter Upgrader\n The converter upgrader contract allows upgrading an older converter contract (0.4 and up)\n to the latest version.\n To begin the upgrade process, simply execute the 'upgrade' function.\n At the end of the process, the ownership of the newly upgraded converter will be transferred\n back to the original owner and the original owner will need to execute the 'acceptOwnership' function.\n The address of the new converter is available in the ConverterUpgrade event.\n Note that for older converters that don't yet have the 'upgrade' function, ownership should first\n be transferred manually to the ConverterUpgrader contract using the 'transferOwnership' function\n and then the upgrader 'upgrade' function should be executed directly."
},
"fullyImplemented": true,
"id": 13009,
"linearizedBaseContracts": [
13009,
21719,
22661,
21818,
22847,
13660
],
"name": "ConverterUpgrader",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 12343,
"mutability": "constant",
"name": "ETH_RESERVE_ADDRESS",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13009,
"src": "1331:106:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12339,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "1331:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545",
"id": 12341,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1394:42:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12340,
"name": "IERC20Token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21127,
"src": "1382:11:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$",
"typeString": "type(contract IERC20Token)"
}
},
"id": 12342,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1382:55:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"visibility": "private"
},
{
"constant": false,
"functionSelector": "b8066bcb",
"id": 12345,
"mutability": "mutable",
"name": "etherToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13009,
"src": "1444:29:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
},
"typeName": {
"contractScope": null,
"id": 12344,
"name": "IEtherToken",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21153,
"src": "1444:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"value": null,
"visibility": "public"
},
{
"anonymous": false,
"documentation": {
"id": 12346,
"nodeType": "StructuredDocumentation",
"src": "1482:202:12",
"text": " @dev triggered when the contract accept a converter ownership\n @param _converter converter address\n @param _owner new owner - local upgrader address"
},
"id": 12352,
"name": "ConverterOwned",
"nodeType": "EventDefinition",
"parameters": {
"id": 12351,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12348,
"indexed": true,
"mutability": "mutable",
"name": "_converter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12352,
"src": "1711:29:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12347,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "1711:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12350,
"indexed": true,
"mutability": "mutable",
"name": "_owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12352,
"src": "1742:22:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12349,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1742:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1710:55:12"
},
"src": "1690:76:12"
},
{
"anonymous": false,
"documentation": {
"id": 12353,
"nodeType": "StructuredDocumentation",
"src": "1774:189:12",
"text": " @dev triggered when the upgrading process is done\n @param _oldConverter old converter address\n @param _newConverter new converter address"
},
"id": 12359,
"name": "ConverterUpgrade",
"nodeType": "EventDefinition",
"parameters": {
"id": 12358,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12355,
"indexed": true,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12359,
"src": "1992:29:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12354,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1992:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12357,
"indexed": true,
"mutability": "mutable",
"name": "_newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12359,
"src": "2023:29:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12356,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2023:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1991:62:12"
},
"src": "1969:85:12"
},
{
"body": {
"id": 12374,
"nodeType": "Block",
"src": "2323:43:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 12372,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12370,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "2334:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 12371,
"name": "_etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12364,
"src": "2347:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"src": "2334:24:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"id": 12373,
"nodeType": "ExpressionStatement",
"src": "2334:24:12"
}
]
},
"documentation": {
"id": 12360,
"nodeType": "StructuredDocumentation",
"src": "2062:148:12",
"text": " @dev initializes a new ConverterUpgrader instance\n @param _registry address of a contract registry contract"
},
"id": 12375,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 12367,
"name": "_registry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12362,
"src": "2305:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
"typeString": "contract IContractRegistry"
}
}
],
"id": 12368,
"modifierName": {
"argumentTypes": null,
"id": 12366,
"name": "ContractRegistryClient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21719,
"src": "2282:22:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$",
"typeString": "type(contract ContractRegistryClient)"
}
},
"nodeType": "ModifierInvocation",
"src": "2282:33:12"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12365,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12362,
"mutability": "mutable",
"name": "_registry",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12375,
"src": "2228:27:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
"typeString": "contract IContractRegistry"
},
"typeName": {
"contractScope": null,
"id": 12361,
"name": "IContractRegistry",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22831,
"src": "2228:17:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
"typeString": "contract IContractRegistry"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12364,
"mutability": "mutable",
"name": "_etherToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12375,
"src": "2257:23:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
},
"typeName": {
"contractScope": null,
"id": 12363,
"name": "IEtherToken",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21153,
"src": "2257:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2227:54:12"
},
"returnParameters": {
"id": 12369,
"nodeType": "ParameterList",
"parameters": [],
"src": "2323:0:12"
},
"scope": 13009,
"src": "2216:150:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
13654
],
"body": {
"id": 12390,
"nodeType": "Block",
"src": "2845:63:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 12384,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "2878:3:12",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 12385,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2878:10:12",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12383,
"name": "IConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13340,
"src": "2867:10:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$",
"typeString": "type(contract IConverter)"
}
},
"id": 12386,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2867:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12387,
"name": "_version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12378,
"src": "2891:8:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 12382,
"name": "upgradeOld",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12530,
"src": "2856:10:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_bytes32_$returns$__$",
"typeString": "function (contract IConverter,bytes32)"
}
},
"id": 12388,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2856:44:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12389,
"nodeType": "ExpressionStatement",
"src": "2856:44:12"
}
]
},
"documentation": {
"id": 12376,
"nodeType": "StructuredDocumentation",
"src": "2374:414:12",
"text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n can only be called by a converter\n @param _version old converter version"
},
"functionSelector": "bc444e13",
"id": 12391,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 12380,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "2836:8:12"
},
"parameters": {
"id": 12379,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12378,
"mutability": "mutable",
"name": "_version",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12391,
"src": "2811:16:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 12377,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2811:7:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2810:18:12"
},
"returnParameters": {
"id": 12381,
"nodeType": "ParameterList",
"parameters": [],
"src": "2845:0:12"
},
"scope": 13009,
"src": "2794:114:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
13659
],
"body": {
"id": 12412,
"nodeType": "Block",
"src": "3386:81:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 12400,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "3419:3:12",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 12401,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3419:10:12",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12399,
"name": "IConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13340,
"src": "3408:10:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$",
"typeString": "type(contract IConverter)"
}
},
"id": 12402,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3408:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12407,
"name": "_version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12394,
"src": "3448:8:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
],
"id": 12406,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3440:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 12405,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3440:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12408,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3440:17:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 12404,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3432:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
"id": 12403,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "3432:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12409,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3432:26:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 12398,
"name": "upgradeOld",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12530,
"src": "3397:10:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_bytes32_$returns$__$",
"typeString": "function (contract IConverter,bytes32)"
}
},
"id": 12410,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3397:62:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12411,
"nodeType": "ExpressionStatement",
"src": "3397:62:12"
}
]
},
"documentation": {
"id": 12392,
"nodeType": "StructuredDocumentation",
"src": "2916:414:12",
"text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n can only be called by a converter\n @param _version old converter version"
},
"functionSelector": "90f58c96",
"id": 12413,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 12396,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "3377:8:12"
},
"parameters": {
"id": 12395,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12394,
"mutability": "mutable",
"name": "_version",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12413,
"src": "3353:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12393,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "3353:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3352:17:12"
},
"returnParameters": {
"id": 12397,
"nodeType": "ParameterList",
"parameters": [],
"src": "3386:0:12"
},
"scope": 13009,
"src": "3336:131:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 12529,
"nodeType": "Block",
"src": "3984:1045:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 12421,
"name": "_version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12418,
"src": "3995:8:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 12422,
"nodeType": "ExpressionStatement",
"src": "3995:8:12"
},
{
"assignments": [
12424
],
"declarations": [
{
"constant": false,
"id": 12424,
"mutability": "mutable",
"name": "converter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12529,
"src": "4014:20:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12423,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "4014:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12428,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12426,
"name": "_converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12416,
"src": "4048:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12425,
"name": "IConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13340,
"src": "4037:10:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$",
"typeString": "type(contract IConverter)"
}
},
"id": 12427,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4037:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4014:45:12"
},
{
"assignments": [
12430
],
"declarations": [
{
"constant": false,
"id": 12430,
"mutability": "mutable",
"name": "prevOwner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12529,
"src": "4070:17:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12429,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4070:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12434,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12431,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4090:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12432,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "owner",
"nodeType": "MemberAccess",
"referencedDeclaration": 22838,
"src": "4090:15:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
"typeString": "function () view external returns (address)"
}
},
"id": 12433,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4090:17:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4070:37:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12436,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4143:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12435,
"name": "acceptConverterOwnership",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12550,
"src": "4118:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$__$",
"typeString": "function (contract IConverter)"
}
},
"id": 12437,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4118:35:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12438,
"nodeType": "ExpressionStatement",
"src": "4118:35:12"
},
{
"assignments": [
12440
],
"declarations": [
{
"constant": false,
"id": 12440,
"mutability": "mutable",
"name": "newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12529,
"src": "4164:23:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12439,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "4164:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12444,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12442,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4206:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12441,
"name": "createConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12624,
"src": "4190:15:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$_t_contract$_IConverter_$13340_$",
"typeString": "function (contract IConverter) returns (contract IConverter)"
}
},
"id": 12443,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4190:26:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4164:52:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12446,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4240:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12447,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4251:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12445,
"name": "copyReserves",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12697,
"src": "4227:12:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$",
"typeString": "function (contract IConverter,contract IConverter)"
}
},
"id": 12448,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4227:37:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12449,
"nodeType": "ExpressionStatement",
"src": "4227:37:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12451,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4293:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12452,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4304:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12450,
"name": "copyConversionFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12718,
"src": "4275:17:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$",
"typeString": "function (contract IConverter,contract IConverter)"
}
},
"id": 12453,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4275:42:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12454,
"nodeType": "ExpressionStatement",
"src": "4275:42:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12456,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4352:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12457,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4363:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12455,
"name": "transferReserveBalances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12831,
"src": "4328:23:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$",
"typeString": "function (contract IConverter,contract IConverter)"
}
},
"id": 12458,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4328:48:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12459,
"nodeType": "ExpressionStatement",
"src": "4328:48:12"
},
{
"assignments": [
12461
],
"declarations": [
{
"constant": false,
"id": 12461,
"mutability": "mutable",
"name": "anchor",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12529,
"src": "4387:23:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
},
"typeName": {
"contractScope": null,
"id": 12460,
"name": "IConverterAnchor",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13349,
"src": "4387:16:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12465,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12462,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4413:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12463,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "token",
"nodeType": "MemberAccess",
"referencedDeclaration": 13297,
"src": "4413:15:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$",
"typeString": "function () view external returns (contract IConverterAnchor)"
}
},
"id": 12464,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4413:17:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4387:43:12"
},
{
"assignments": [
12467
],
"declarations": [
{
"constant": false,
"id": 12467,
"mutability": "mutable",
"name": "activate",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12529,
"src": "4511:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 12466,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4511:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12475,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 12474,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12469,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4550:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12468,
"name": "isV28OrHigherConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13008,
"src": "4527:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$",
"typeString": "function (contract IConverter) view returns (bool)"
}
},
"id": 12470,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4527:33:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12471,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4564:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12472,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "isActive",
"nodeType": "MemberAccess",
"referencedDeclaration": 13200,
"src": "4564:18:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_bool_$",
"typeString": "function () view external returns (bool)"
}
},
"id": 12473,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4564:20:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4527:57:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4511:73:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 12483,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12476,
"name": "anchor",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12461,
"src": "4601:6:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
"id": 12477,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "owner",
"nodeType": "MemberAccess",
"referencedDeclaration": 22838,
"src": "4601:12:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
"typeString": "function () view external returns (address)"
}
},
"id": 12478,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4601:14:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12481,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4627:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12480,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4619:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12479,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4619:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12482,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4619:18:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "4601:36:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 12499,
"nodeType": "IfStatement",
"src": "4597:175:12",
"trueBody": {
"id": 12498,
"nodeType": "Block",
"src": "4639:133:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12489,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4695:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12488,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4687:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12487,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4687:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12490,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4687:21:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"id": 12484,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4654:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12486,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transferTokenOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 13302,
"src": "4654:32:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$",
"typeString": "function (address) external"
}
},
"id": 12491,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4654:55:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12492,
"nodeType": "ExpressionStatement",
"src": "4654:55:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12493,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4724:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12495,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "acceptAnchorOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 13261,
"src": "4724:34:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
"typeString": "function () external"
}
},
"id": 12496,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4724:36:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12497,
"nodeType": "ExpressionStatement",
"src": "4724:36:12"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12501,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4807:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12502,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4818:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12503,
"name": "activate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12467,
"src": "4832:8:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 12500,
"name": "handleTypeSpecificData",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12953,
"src": "4784:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$_t_bool_$returns$__$",
"typeString": "function (contract IConverter,contract IConverter,bool)"
}
},
"id": 12504,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4784:57:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12505,
"nodeType": "ExpressionStatement",
"src": "4784:57:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12509,
"name": "prevOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12430,
"src": "4882:9:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 12506,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4854:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12508,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transferOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 22843,
"src": "4854:27:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$",
"typeString": "function (address) external"
}
},
"id": 12510,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4854:38:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12511,
"nodeType": "ExpressionStatement",
"src": "4854:38:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12515,
"name": "prevOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12430,
"src": "4934:9:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 12512,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4903:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12514,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transferOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 22843,
"src": "4903:30:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$",
"typeString": "function (address) external"
}
},
"id": 12516,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4903:41:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12517,
"nodeType": "ExpressionStatement",
"src": "4903:41:12"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12521,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4987:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12520,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4979:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12519,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4979:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4979:18:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12525,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "5007:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12524,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4999:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12523,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4999:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12526,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4999:21:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12518,
"name": "ConverterUpgrade",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12359,
"src": "4962:16:12",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 12527,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4962:59:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12528,
"nodeType": "EmitStatement",
"src": "4957:64:12"
}
]
},
"documentation": {
"id": 12414,
"nodeType": "StructuredDocumentation",
"src": "3475:435:12",
"text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n @param _converter old converter contract address\n @param _version old converter version"
},
"functionSelector": "f2cfed87",
"id": 12530,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "upgradeOld",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12419,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12416,
"mutability": "mutable",
"name": "_converter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12530,
"src": "3936:21:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12415,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "3936:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12418,
"mutability": "mutable",
"name": "_version",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12530,
"src": "3959:16:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 12417,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "3959:7:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3935:41:12"
},
"returnParameters": {
"id": 12420,
"nodeType": "ParameterList",
"parameters": [],
"src": "3984:0:12"
},
"scope": 13009,
"src": "3916:1113:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 12549,
"nodeType": "Block",
"src": "5484:110:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12536,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12533,
"src": "5495:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12538,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "acceptOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 22846,
"src": "5495:29:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
"typeString": "function () external"
}
},
"id": 12539,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5495:31:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12540,
"nodeType": "ExpressionStatement",
"src": "5495:31:12"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12542,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12533,
"src": "5557:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12545,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "5580:4:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ConverterUpgrader_$13009",
"typeString": "contract ConverterUpgrader"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ConverterUpgrader_$13009",
"typeString": "contract ConverterUpgrader"
}
],
"id": 12544,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "5572:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12543,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5572:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5572:13:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12541,
"name": "ConverterOwned",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12352,
"src": "5542:14:12",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverter_$13340_$_t_address_$returns$__$",
"typeString": "function (contract IConverter,address)"
}
},
"id": 12547,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5542:44:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12548,
"nodeType": "EmitStatement",
"src": "5537:49:12"
}
]
},
"documentation": {
"id": 12531,
"nodeType": "StructuredDocumentation",
"src": "5037:373:12",
"text": " @dev the first step when upgrading a converter is to transfer the ownership to the local contract.\n the upgrader contract then needs to accept the ownership transfer before initiating\n the upgrade process.\n fires the ConverterOwned event upon success\n @param _oldConverter converter to accept ownership of"
},
"id": 12550,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "acceptConverterOwnership",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12534,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12533,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12550,
"src": "5450:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12532,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "5450:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5449:26:12"
},
"returnParameters": {
"id": 12535,
"nodeType": "ParameterList",
"parameters": [],
"src": "5484:0:12"
},
"scope": 13009,
"src": "5416:178:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 12623,
"nodeType": "Block",
"src": "6010:912:12",
"statements": [
{
"assignments": [
12559
],
"declarations": [
{
"constant": false,
"id": 12559,
"mutability": "mutable",
"name": "anchor",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6021:23:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
},
"typeName": {
"contractScope": null,
"id": 12558,
"name": "IConverterAnchor",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13349,
"src": "6021:16:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12563,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12560,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12553,
"src": "6047:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12561,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "token",
"nodeType": "MemberAccess",
"referencedDeclaration": 13297,
"src": "6047:19:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$",
"typeString": "function () view external returns (contract IConverterAnchor)"
}
},
"id": 12562,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6047:21:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6021:47:12"
},
{
"assignments": [
12565
],
"declarations": [
{
"constant": false,
"id": 12565,
"mutability": "mutable",
"name": "maxConversionFee",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6079:23:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 12564,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "6079:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12569,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12566,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12553,
"src": "6105:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12567,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "maxConversionFee",
"nodeType": "MemberAccess",
"referencedDeclaration": 13243,
"src": "6105:30:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$",
"typeString": "function () view external returns (uint32)"
}
},
"id": 12568,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6105:32:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6079:58:12"
},
{
"assignments": [
12571
],
"declarations": [
{
"constant": false,
"id": 12571,
"mutability": "mutable",
"name": "reserveTokenCount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6148:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12570,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "6148:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12575,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12572,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12553,
"src": "6175:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12573,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokenCount",
"nodeType": "MemberAccess",
"referencedDeclaration": 13339,
"src": "6175:33:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$",
"typeString": "function () view external returns (uint16)"
}
},
"id": 12574,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6175:35:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6148:62:12"
},
{
"assignments": [
12577
],
"declarations": [
{
"constant": false,
"id": 12577,
"mutability": "mutable",
"name": "newType",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6264:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12576,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "6264:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12579,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 12578,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6281:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "6264:18:12"
},
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12581,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12553,
"src": "6387:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12580,
"name": "isV28OrHigherConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13008,
"src": "6364:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$",
"typeString": "function (contract IConverter) view returns (bool)"
}
},
"id": 12582,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6364:37:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"id": 12591,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12589,
"name": "reserveTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12571,
"src": "6592:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 12590,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6612:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "6592:21:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 12596,
"nodeType": "IfStatement",
"src": "6588:51:12",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 12594,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12592,
"name": "newType",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12577,
"src": "6628:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "31",
"id": 12593,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6638:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "6628:11:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 12595,
"nodeType": "ExpressionStatement",
"src": "6628:11:12"
}
},
"id": 12597,
"nodeType": "IfStatement",
"src": "6360:279:12",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 12587,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12583,
"name": "newType",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12577,
"src": "6416:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12584,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12553,
"src": "6426:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12585,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "converterType",
"nodeType": "MemberAccess",
"referencedDeclaration": 13190,
"src": "6426:27:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$",
"typeString": "function () pure external returns (uint16)"
}
},
"id": 12586,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6426:29:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "6416:39:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 12588,
"nodeType": "ExpressionStatement",
"src": "6416:39:12"
}
},
{
"assignments": [
12599
],
"declarations": [
{
"constant": false,
"id": 12599,
"mutability": "mutable",
"name": "converterFactory",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6652:34:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterFactory_$13389",
"typeString": "contract IConverterFactory"
},
"typeName": {
"contractScope": null,
"id": 12598,
"name": "IConverterFactory",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13389,
"src": "6652:17:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterFactory_$13389",
"typeString": "contract IConverterFactory"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12605,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12602,
"name": "CONVERTER_FACTORY",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21536,
"src": "6717:17:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 12601,
"name": "addressOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21718,
"src": "6707:9:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view returns (address)"
}
},
"id": 12603,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6707:28:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12600,
"name": "IConverterFactory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13389,
"src": "6689:17:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IConverterFactory_$13389_$",
"typeString": "type(contract IConverterFactory)"
}
},
"id": 12604,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6689:47:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterFactory_$13389",
"typeString": "contract IConverterFactory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6652:84:12"
},
{
"assignments": [
12607
],
"declarations": [
{
"constant": false,
"id": 12607,
"mutability": "mutable",
"name": "converter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6747:20:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12606,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "6747:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12615,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12610,
"name": "newType",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12577,
"src": "6803:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
{
"argumentTypes": null,
"id": 12611,
"name": "anchor",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12559,
"src": "6812:6:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
{
"argumentTypes": null,
"id": 12612,
"name": "registry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21562,
"src": "6820:8:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
"typeString": "contract IContractRegistry"
}
},
{
"argumentTypes": null,
"id": 12613,
"name": "maxConversionFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12565,
"src": "6830:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
{
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
},
{
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
"typeString": "contract IContractRegistry"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"expression": {
"argumentTypes": null,
"id": 12608,
"name": "converterFactory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12599,
"src": "6770:16:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterFactory_$13389",
"typeString": "contract IConverterFactory"
}
},
"id": 12609,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "createConverter",
"nodeType": "MemberAccess",
"referencedDeclaration": 13381,
"src": "6770:32:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IContractRegistry_$22831_$_t_uint32_$returns$_t_contract$_IConverter_$13340_$",
"typeString": "function (uint16,contract IConverterAnchor,contract IContractRegistry,uint32) external returns (contract IConverter)"
}
},
"id": 12614,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6770:77:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6747:100:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12616,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12607,
"src": "6860:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12618,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "acceptOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 22846,
"src": "6860:25:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
"typeString": "function () external"
}
},
"id": 12619,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6860:27:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12620,
"nodeType": "ExpressionStatement",
"src": "6860:27:12"
},
{
"expression": {
"argumentTypes": null,
"id": 12621,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12607,
"src": "6905:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"functionReturnParameters": 12557,
"id": 12622,
"nodeType": "Return",
"src": "6898:16:12"
}
]
},
"documentation": {
"id": 12551,
"nodeType": "StructuredDocumentation",
"src": "5602:322:12",
"text": " @dev creates a new converter with same basic data as the original old converter\n the newly created converter will have no reserves at this step.\n @param _oldConverter old converter contract address\n @return the new converter new converter contract address"
},
"id": 12624,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "createConverter",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12554,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12553,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12624,
"src": "5955:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12552,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "5955:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5954:26:12"
},
"returnParameters": {
"id": 12557,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12556,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12624,
"src": "5998:10:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12555,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "5998:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5997:12:12"
},
"scope": 13009,
"src": "5930:992:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 12696,
"nodeType": "Block",
"src": "7349:801:12",
"statements": [
{
"assignments": [
12633
],
"declarations": [
{
"constant": false,
"id": 12633,
"mutability": "mutable",
"name": "reserveTokenCount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12696,
"src": "7360:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12632,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "7360:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12637,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12634,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12627,
"src": "7387:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12635,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokenCount",
"nodeType": "MemberAccess",
"referencedDeclaration": 13339,
"src": "7387:33:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$",
"typeString": "function () view external returns (uint16)"
}
},
"id": 12636,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7387:35:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7360:62:12"
},
{
"body": {
"id": 12694,
"nodeType": "Block",
"src": "7482:661:12",
"statements": [
{
"assignments": [
12649
],
"declarations": [
{
"constant": false,
"id": 12649,
"mutability": "mutable",
"name": "reserveAddress",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12694,
"src": "7497:26:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12648,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "7497:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12654,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12652,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12639,
"src": "7556:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
],
"expression": {
"argumentTypes": null,
"id": 12650,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12627,
"src": "7526:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12651,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 13334,
"src": "7526:29:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$",
"typeString": "function (uint256) view external returns (contract IERC20Token)"
}
},
"id": 12653,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7526:32:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7497:61:12"
},
{
"assignments": [
null,
12656,
null,
null,
null
],
"declarations": [
null,
{
"constant": false,
"id": 12656,
"mutability": "mutable",
"name": "weight",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12694,
"src": "7576:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 12655,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "7576:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
},
null,
null,
null
],
"id": 12661,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12659,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12649,
"src": "7624:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
],
"expression": {
"argumentTypes": null,
"id": 12657,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12627,
"src": "7599:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12658,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 13320,
"src": "7599:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$",
"typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)"
}
},
"id": 12660,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7599:40:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$",
"typeString": "tuple(uint256,uint32,bool,bool,bool)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7573:66:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"id": 12664,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12662,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12649,
"src": "7690:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 12663,
"name": "ETH_RESERVE_ADDRESS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12343,
"src": "7708:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"src": "7690:37:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"id": 12675,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12673,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12649,
"src": "7876:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 12674,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "7894:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"src": "7876:28:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 12691,
"nodeType": "Block",
"src": "8049:83:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12687,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12649,
"src": "8093:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 12688,
"name": "weight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12656,
"src": "8109:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"expression": {
"argumentTypes": null,
"id": 12684,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12629,
"src": "8068:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12686,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "addReserve",
"nodeType": "MemberAccess",
"referencedDeclaration": 13292,
"src": "8068:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$",
"typeString": "function (contract IERC20Token,uint32) external"
}
},
"id": 12689,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8068:48:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12690,
"nodeType": "ExpressionStatement",
"src": "8068:48:12"
}
]
},
"id": 12692,
"nodeType": "IfStatement",
"src": "7872:260:12",
"trueBody": {
"id": 12683,
"nodeType": "Block",
"src": "7906:88:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12679,
"name": "ETH_RESERVE_ADDRESS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12343,
"src": "7950:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 12680,
"name": "weight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12656,
"src": "7971:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"expression": {
"argumentTypes": null,
"id": 12676,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12629,
"src": "7925:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12678,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "addReserve",
"nodeType": "MemberAccess",
"referencedDeclaration": 13292,
"src": "7925:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$",
"typeString": "function (contract IERC20Token,uint32) external"
}
},
"id": 12681,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7925:53:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12682,
"nodeType": "ExpressionStatement",
"src": "7925:53:12"
}
]
}
},
"id": 12693,
"nodeType": "IfStatement",
"src": "7686:446:12",
"trueBody": {
"id": 12672,
"nodeType": "Block",
"src": "7729:88:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12668,
"name": "ETH_RESERVE_ADDRESS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12343,
"src": "7773:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 12669,
"name": "weight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12656,
"src": "7794:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"expression": {
"argumentTypes": null,
"id": 12665,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12629,
"src": "7748:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12667,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "addReserve",
"nodeType": "MemberAccess",
"referencedDeclaration": 13292,
"src": "7748:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$",
"typeString": "function (contract IERC20Token,uint32) external"
}
},
"id": 12670,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7748:53:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12671,
"nodeType": "ExpressionStatement",
"src": "7748:53:12"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"id": 12644,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12642,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12639,
"src": "7454:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 12643,
"name": "reserveTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12633,
"src": "7458:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "7454:21:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 12695,
"initializationExpression": {
"assignments": [
12639
],
"declarations": [
{
"constant": false,
"id": 12639,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12695,
"src": "7440:8:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12638,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "7440:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12641,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 12640,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7451:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "7440:12:12"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 12646,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "7477:3:12",
"subExpression": {
"argumentTypes": null,
"id": 12645,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12639,
"src": "7477:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 12647,
"nodeType": "ExpressionStatement",
"src": "7477:3:12"
},
"nodeType": "ForStatement",
"src": "7435:708:12"
}
]
},
"documentation": {
"id": 12625,
"nodeType": "StructuredDocumentation",
"src": "6930:331:12",
"text": " @dev copies the reserves from the old converter to the new one.\n note that this will not work for an unlimited number of reserves due to block gas limit constraints.\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address"
},
"id": 12697,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "copyReserves",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12630,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12627,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12697,
"src": "7289:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12626,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "7289:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12629,
"mutability": "mutable",
"name": "_newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12697,
"src": "7315:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12628,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "7315:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7288:52:12"
},
"returnParameters": {
"id": 12631,
"nodeType": "ParameterList",
"parameters": [],
"src": "7349:0:12"
},
"scope": 13009,
"src": "7267:883:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 12717,
"nodeType": "Block",
"src": "8477:127:12",
"statements": [
{
"assignments": [
12706
],
"declarations": [
{
"constant": false,
"id": 12706,
"mutability": "mutable",
"name": "conversionFee",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12717,
"src": "8488:20:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 12705,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "8488:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12710,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12707,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12700,
"src": "8511:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12708,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "conversionFee",
"nodeType": "MemberAccess",
"referencedDeclaration": 13238,
"src": "8511:27:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$",
"typeString": "function () view external returns (uint32)"
}
},
"id": 12709,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8511:29:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "8488:52:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12714,
"name": "conversionFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12706,
"src": "8582:13:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"expression": {
"argumentTypes": null,
"id": 12711,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12702,
"src": "8551:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12713,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setConversionFee",
"nodeType": "MemberAccess",
"referencedDeclaration": 13266,
"src": "8551:30:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint32_$returns$__$",
"typeString": "function (uint32) external"
}
},
"id": 12715,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8551:45:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12716,
"nodeType": "ExpressionStatement",
"src": "8551:45:12"
}
]
},
"documentation": {
"id": 12698,
"nodeType": "StructuredDocumentation",
"src": "8158:226:12",
"text": " @dev copies the conversion fee from the old converter to the new one\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address"
},
"id": 12718,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "copyConversionFee",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12703,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12700,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12718,
"src": "8417:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12699,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "8417:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12702,
"mutability": "mutable",
"name": "_newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12718,
"src": "8443:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12701,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "8443:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8416:52:12"
},
"returnParameters": {
"id": 12704,
"nodeType": "ParameterList",
"parameters": [],
"src": "8477:0:12"
},
"scope": 13009,
"src": "8390:214:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 12830,
"nodeType": "Block",
"src": "9154:1092:12",
"statements": [
{
"assignments": [
12727
],
"declarations": [
{
"constant": false,
"id": 12727,
"mutability": "mutable",
"name": "reserveBalance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12830,
"src": "9165:22:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12726,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9165:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12728,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "9165:22:12"
},
{
"assignments": [
12730
],
"declarations": [
{
"constant": false,
"id": 12730,
"mutability": "mutable",
"name": "reserveTokenCount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12830,
"src": "9198:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12729,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "9198:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12734,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12731,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "9225:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12732,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokenCount",
"nodeType": "MemberAccess",
"referencedDeclaration": 13339,
"src": "9225:33:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$",
"typeString": "function () view external returns (uint16)"
}
},
"id": 12733,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9225:35:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9198:62:12"
},
{
"body": {
"id": 12828,
"nodeType": "Block",
"src": "9320:919:12",
"statements": [
{
"assignments": [
12746
],
"declarations": [
{
"constant": false,
"id": 12746,
"mutability": "mutable",
"name": "reserveAddress",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12828,
"src": "9335:26:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12745,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "9335:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12751,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12749,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12736,
"src": "9394:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
],
"expression": {
"argumentTypes": null,
"id": 12747,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "9364:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12748,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 13334,
"src": "9364:29:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$",
"typeString": "function (uint256) view external returns (contract IERC20Token)"
}
},
"id": 12750,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9364:32:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9335:61:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"id": 12754,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12752,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12746,
"src": "9445:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 12753,
"name": "ETH_RESERVE_ADDRESS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12343,
"src": "9463:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"src": "9445:37:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"id": 12767,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12765,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12746,
"src": "9627:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 12766,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "9645:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"src": "9627:28:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 12825,
"nodeType": "Block",
"src": "9978:250:12",
"statements": [
{
"assignments": [
12801
],
"declarations": [
{
"constant": false,
"id": 12801,
"mutability": "mutable",
"name": "connector",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12825,
"src": "9997:21:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12800,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "9997:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12803,
"initialValue": {
"argumentTypes": null,
"id": 12802,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12746,
"src": "10021:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9997:38:12"
},
{
"expression": {
"argumentTypes": null,
"id": 12812,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12804,
"name": "reserveBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12727,
"src": "10054:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12809,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "10099:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12808,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10091:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12807,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "10091:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12810,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10091:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"id": 12805,
"name": "connector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12801,
"src": "10071:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"id": 12806,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 21088,
"src": "10071:19:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 12811,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10071:43:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10054:60:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12813,
"nodeType": "ExpressionStatement",
"src": "10054:60:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12817,
"name": "connector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12801,
"src": "10162:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12820,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12723,
"src": "10181:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12819,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10173:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12818,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "10173:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12821,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10173:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 12822,
"name": "reserveBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12727,
"src": "10197:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12814,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "10133:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12816,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "withdrawTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 13280,
"src": "10133:28:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (contract IERC20Token,address,uint256) external"
}
},
"id": 12823,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10133:79:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12824,
"nodeType": "ExpressionStatement",
"src": "10133:79:12"
}
]
},
"id": 12826,
"nodeType": "IfStatement",
"src": "9623:605:12",
"trueBody": {
"id": 12799,
"nodeType": "Block",
"src": "9657:266:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 12776,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12768,
"name": "reserveBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12727,
"src": "9676:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12773,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "9722:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12772,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9714:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12771,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9714:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9714:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"id": 12769,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "9693:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"id": 12770,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 21088,
"src": "9693:20:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 12775,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9693:44:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9676:61:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12777,
"nodeType": "ExpressionStatement",
"src": "9676:61:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12781,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "9785:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12784,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "9805:4:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ConverterUpgrader_$13009",
"typeString": "contract ConverterUpgrader"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ConverterUpgrader_$13009",
"typeString": "contract ConverterUpgrader"
}
],
"id": 12783,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9797:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12782,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9797:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12785,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9797:13:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 12786,
"name": "reserveBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12727,
"src": "9812:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12778,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "9756:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12780,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "withdrawTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 13280,
"src": "9756:28:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (contract IERC20Token,address,uint256) external"
}
},
"id": 12787,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9756:71:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12788,
"nodeType": "ExpressionStatement",
"src": "9756:71:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12794,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12723,
"src": "9876:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12793,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9868:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12792,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9868:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12795,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9868:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 12796,
"name": "reserveBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12727,
"src": "9892:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12789,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "9846:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"id": 12791,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "withdrawTo",
"nodeType": "MemberAccess",
"referencedDeclaration": 21152,
"src": "9846:21:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$_t_uint256_$returns$__$",
"typeString": "function (address payable,uint256) external"
}
},
"id": 12797,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9846:61:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12798,
"nodeType": "ExpressionStatement",
"src": "9846:61:12"
}
]
}
},
"id": 12827,
"nodeType": "IfStatement",
"src": "9441:787:12",
"trueBody": {
"id": 12764,
"nodeType": "Block",
"src": "9484:84:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12760,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12723,
"src": "9537:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12759,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9529:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12758,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9529:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12761,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9529:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"id": 12755,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "9503:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12757,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "withdrawETH",
"nodeType": "MemberAccess",
"referencedDeclaration": 13285,
"src": "9503:25:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$returns$__$",
"typeString": "function (address payable) external"
}
},
"id": 12762,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9503:49:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12763,
"nodeType": "ExpressionStatement",
"src": "9503:49:12"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"id": 12741,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12739,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12736,
"src": "9292:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 12740,
"name": "reserveTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12730,
"src": "9296:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "9292:21:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 12829,
"initializationExpression": {
"assignments": [
12736
],
"declarations": [
{
"constant": false,
"id": 12736,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12829,
"src": "9278:8:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12735,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "9278:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12738,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 12737,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9289:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "9278:12:12"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 12743,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "9315:3:12",
"subExpression": {
"argumentTypes": null,
"id": 12742,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12736,
"src": "9315:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 12744,
"nodeType": "ExpressionStatement",
"src": "9315:3:12"
},
"nodeType": "ForStatement",
"src": "9273:966:12"
}
]
},
"documentation": {
"id": 12719,
"nodeType": "StructuredDocumentation",
"src": "8612:443:12",
"text": " @dev transfers the balance of each reserve in the old converter to the new one.\n note that the function assumes that the new converter already has the exact same number of\n also, this will not work for an unlimited number of reserves due to block gas limit constraints.\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address"
},
"id": 12831,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "transferReserveBalances",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12724,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12721,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12831,
"src": "9094:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12720,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "9094:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12723,
"mutability": "mutable",
"name": "_newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12831,
"src": "9120:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12722,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "9120:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "9093:52:12"
},
"returnParameters": {
"id": 12725,
"nodeType": "ParameterList",
"parameters": [],
"src": "9154:0:12"
},
"scope": 13009,
"src": "9061:1185:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 12952,
"nodeType": "Block",
"src": "10674:1454:12",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 12844,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "10689:38:12",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12842,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12834,
"src": "10713:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12841,
"name": "isV28OrHigherConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13008,
"src": "10690:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$",
"typeString": "function (contract IConverter) view returns (bool)"
}
},
"id": 12843,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10690:37:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 12846,
"nodeType": "IfStatement",
"src": "10685:64:12",
"trueBody": {
"expression": null,
"functionReturnParameters": 12840,
"id": 12845,
"nodeType": "Return",
"src": "10742:7:12"
}
},
{
"assignments": [
12848
],
"declarations": [
{
"constant": false,
"id": 12848,
"mutability": "mutable",
"name": "converterType",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12952,
"src": "10761:20:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12847,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "10761:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12852,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12849,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12834,
"src": "10784:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12850,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "converterType",
"nodeType": "MemberAccess",
"referencedDeclaration": 13190,
"src": "10784:27:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$",
"typeString": "function () pure external returns (uint16)"
}
},
"id": 12851,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10784:29:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10761:52:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"id": 12855,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12853,
"name": "converterType",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12848,
"src": "10828:13:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 12854,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10845:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "10828:18:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 12951,
"nodeType": "IfStatement",
"src": "10824:1297:12",
"trueBody": {
"id": 12950,
"nodeType": "Block",
"src": "10848:1273:12",
"statements": [
{
"assignments": [
12857
],
"declarations": [
{
"constant": false,
"id": 12857,
"mutability": "mutable",
"name": "oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "10863:38:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
},
"typeName": {
"contractScope": null,
"id": 12856,
"name": "ILiquidityPoolV2Converter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 18765,
"src": "10863:25:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12864,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12861,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12834,
"src": "10938:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12860,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10930:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12859,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "10930:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12862,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10930:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12858,
"name": "ILiquidityPoolV2Converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18765,
"src": "10904:25:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ILiquidityPoolV2Converter_$18765_$",
"typeString": "type(contract ILiquidityPoolV2Converter)"
}
},
"id": 12863,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10904:49:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10863:90:12"
},
{
"assignments": [
12866
],
"declarations": [
{
"constant": false,
"id": 12866,
"mutability": "mutable",
"name": "newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "10968:38:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
},
"typeName": {
"contractScope": null,
"id": 12865,
"name": "ILiquidityPoolV2Converter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 18765,
"src": "10968:25:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12873,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12870,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12836,
"src": "11043:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12869,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "11035:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12868,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "11035:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12871,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11035:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12867,
"name": "ILiquidityPoolV2Converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18765,
"src": "11009:25:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ILiquidityPoolV2Converter_$18765_$",
"typeString": "type(contract ILiquidityPoolV2Converter)"
}
},
"id": 12872,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11009:49:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10968:90:12"
},
{
"assignments": [
12875
],
"declarations": [
{
"constant": false,
"id": 12875,
"mutability": "mutable",
"name": "reserveTokenCount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "11075:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12874,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "11075:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12879,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12876,
"name": "oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12857,
"src": "11102:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12877,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokenCount",
"nodeType": "MemberAccess",
"referencedDeclaration": 13339,
"src": "11102:32:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$",
"typeString": "function () view external returns (uint16)"
}
},
"id": 12878,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11102:34:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11075:61:12"
},
{
"body": {
"id": 12911,
"nodeType": "Block",
"src": "11198:324:12",
"statements": [
{
"assignments": [
12891
],
"declarations": [
{
"constant": false,
"id": 12891,
"mutability": "mutable",
"name": "reserveTokenAddress",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12911,
"src": "11265:31:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12890,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "11265:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12896,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12894,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12881,
"src": "11328:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
],
"expression": {
"argumentTypes": null,
"id": 12892,
"name": "oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12857,
"src": "11299:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12893,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 13334,
"src": "11299:28:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$",
"typeString": "function (uint256) view external returns (contract IERC20Token)"
}
},
"id": 12895,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11299:31:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11265:65:12"
},
{
"assignments": [
12898
],
"declarations": [
{
"constant": false,
"id": 12898,
"mutability": "mutable",
"name": "balance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12911,
"src": "11349:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12897,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11349:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12903,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12901,
"name": "reserveTokenAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12891,
"src": "11401:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
],
"expression": {
"argumentTypes": null,
"id": 12899,
"name": "oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12857,
"src": "11367:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12900,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "reserveStakedBalance",
"nodeType": "MemberAccess",
"referencedDeclaration": 18738,
"src": "11367:33:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$",
"typeString": "function (contract IERC20Token) view external returns (uint256)"
}
},
"id": 12902,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11367:54:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11349:72:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12907,
"name": "reserveTokenAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12891,
"src": "11477:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 12908,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12898,
"src": "11498:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12904,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12866,
"src": "11440:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12906,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setReserveStakedBalance",
"nodeType": "MemberAccess",
"referencedDeclaration": 18745,
"src": "11440:36:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$__$",
"typeString": "function (contract IERC20Token,uint256) external"
}
},
"id": 12909,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11440:66:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12910,
"nodeType": "ExpressionStatement",
"src": "11440:66:12"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"id": 12886,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12884,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12881,
"src": "11170:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 12885,
"name": "reserveTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12875,
"src": "11174:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "11170:21:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 12912,
"initializationExpression": {
"assignments": [
12881
],
"declarations": [
{
"constant": false,
"id": 12881,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12912,
"src": "11156:8:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12880,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "11156:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12883,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 12882,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11167:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "11156:12:12"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 12888,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "11193:3:12",
"subExpression": {
"argumentTypes": null,
"id": 12887,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12881,
"src": "11193:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 12889,
"nodeType": "ExpressionStatement",
"src": "11193:3:12"
},
"nodeType": "ForStatement",
"src": "11151:371:12"
},
{
"condition": {
"argumentTypes": null,
"id": 12914,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "11542:10:12",
"subExpression": {
"argumentTypes": null,
"id": 12913,
"name": "_activate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12838,
"src": "11543:9:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 12917,
"nodeType": "IfStatement",
"src": "11538:57:12",
"trueBody": {
"id": 12916,
"nodeType": "Block",
"src": "11554:41:12",
"statements": [
{
"expression": null,
"functionReturnParameters": 12840,
"id": 12915,
"nodeType": "Return",
"src": "11573:7:12"
}
]
}
},
{
"assignments": [
12919
],
"declarations": [
{
"constant": false,
"id": 12919,
"mutability": "mutable",
"name": "primaryReserveToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "11657:31:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12918,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "11657:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12923,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12920,
"name": "oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12857,
"src": "11691:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12921,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "primaryReserveToken",
"nodeType": "MemberAccess",
"referencedDeclaration": 18750,
"src": "11691:32:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IERC20Token_$21127_$",
"typeString": "function () view external returns (contract IERC20Token)"
}
},
"id": 12922,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11691:34:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11657:68:12"
},
{
"assignments": [
12925
],
"declarations": [
{
"constant": false,
"id": 12925,
"mutability": "mutable",
"name": "priceOracle",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "11790:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IPriceOracle_$22891",
"typeString": "contract IPriceOracle"
},
"typeName": {
"contractScope": null,
"id": 12924,
"name": "IPriceOracle",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22891,
"src": "11790:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IPriceOracle_$22891",
"typeString": "contract IPriceOracle"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12929,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12926,
"name": "oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12857,
"src": "11817:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12927,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "priceOracle",
"nodeType": "MemberAccess",
"referencedDeclaration": 18755,
"src": "11817:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IPriceOracle_$22891_$",
"typeString": "function () view external returns (contract IPriceOracle)"
}
},
"id": 12928,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11817:26:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IPriceOracle_$22891",
"typeString": "contract IPriceOracle"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11790:53:12"
},
{
"assignments": [
12931
],
"declarations": [
{
"constant": false,
"id": 12931,
"mutability": "mutable",
"name": "oracleA",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "11858:29:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
},
"typeName": {
"contractScope": null,
"id": 12930,
"name": "IChainlinkPriceOracle",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22821,
"src": "11858:21:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12935,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12932,
"name": "priceOracle",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12925,
"src": "11890:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IPriceOracle_$22891",
"typeString": "contract IPriceOracle"
}
},
"id": 12933,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "tokenAOracle",
"nodeType": "MemberAccess",
"referencedDeclaration": 22856,
"src": "11890:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IChainlinkPriceOracle_$22821_$",
"typeString": "function () view external returns (contract IChainlinkPriceOracle)"
}
},
"id": 12934,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11890:26:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11858:58:12"
},
{
"assignments": [
12937
],
"declarations": [
{
"constant": false,
"id": 12937,
"mutability": "mutable",
"name": "oracleB",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "11931:29:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
},
"typeName": {
"contractScope": null,
"id": 12936,
"name": "IChainlinkPriceOracle",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22821,
"src": "11931:21:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12941,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12938,
"name": "priceOracle",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12925,
"src": "11963:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IPriceOracle_$22891",
"typeString": "contract IPriceOracle"
}
},
"id": 12939,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "tokenBOracle",
"nodeType": "MemberAccess",
"referencedDeclaration": 22861,
"src": "11963:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IChainlinkPriceOracle_$22821_$",
"typeString": "function () view external returns (contract IChainlinkPriceOracle)"
}
},
"id": 12940,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11963:26:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11931:58:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12945,
"name": "primaryReserveToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12919,
"src": "12071:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 12946,
"name": "oracleA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12931,
"src": "12092:7:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
},
{
"argumentTypes": null,
"id": 12947,
"name": "oracleB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12937,
"src": "12101:7:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
},
{
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
],
"expression": {
"argumentTypes": null,
"id": 12942,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12866,
"src": "12049:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12944,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "activate",
"nodeType": "MemberAccess",
"referencedDeclaration": 18764,
"src": "12049:21:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$_t_contract$_IChainlinkPriceOracle_$22821_$returns$__$",
"typeString": "function (contract IERC20Token,contract IChainlinkPriceOracle,contract IChainlinkPriceOracle) external"
}
},
"id": 12948,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12049:60:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12949,
"nodeType": "ExpressionStatement",
"src": "12049:60:12"
}
]
}
}
]
},
"documentation": {
"id": 12832,
"nodeType": "StructuredDocumentation",
"src": "10254:306:12",
"text": " @dev handles upgrading custom (type specific) data from the old converter to the new one\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address\n @param _activate activate the new converter"
},
"id": 12953,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "handleTypeSpecificData",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12839,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12834,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12953,
"src": "10598:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12833,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "10598:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12836,
"mutability": "mutable",
"name": "_newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12953,
"src": "10624:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12835,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "10624:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12838,
"mutability": "mutable",
"name": "_activate",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12953,
"src": "10650:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 12837,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "10650:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "10597:68:12"
},
"returnParameters": {
"id": 12840,
"nodeType": "ParameterList",
"parameters": [],
"src": "10674:0:12"
},
"scope": 13009,
"src": "10566:1562:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"constant": true,
"id": 12961,
"mutability": "constant",
"name": "IS_V28_OR_HIGHER_FUNC_SELECTOR",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13009,
"src": "12136:93:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 12954,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "12136:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "69735632384f724869676865722829",
"id": 12958,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12210:17:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd",
"typeString": "literal_string \"isV28OrHigher()\""
},
"value": "isV28OrHigher()"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd",
"typeString": "literal_string \"isV28OrHigher()\""
}
],
"id": 12957,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "12200:9:12",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 12959,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12200:28:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 12956,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12193:6:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes4_$",
"typeString": "type(bytes4)"
},
"typeName": {
"id": 12955,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "12193:6:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12960,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12193:36:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "private"
},
{
"body": {
"id": 13007,
"nodeType": "Block",
"src": "12486:336:12",
"statements": [
{
"assignments": [
12969
],
"declarations": [
{
"constant": false,
"id": 12969,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13007,
"src": "12497:17:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 12968,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "12497:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12974,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12972,
"name": "IS_V28_OR_HIGHER_FUNC_SELECTOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12961,
"src": "12540:30:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"expression": {
"argumentTypes": null,
"id": 12970,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
"src": "12517:3:12",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 12971,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodeWithSelector",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "12517:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (bytes4) pure returns (bytes memory)"
}
},
"id": 12973,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12517:54:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12497:74:12"
},
{
"assignments": [
12976,
12978
],
"declarations": [
{
"constant": false,
"id": 12976,
"mutability": "mutable",
"name": "success",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13007,
"src": "12583:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 12975,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "12583:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12978,
"mutability": "mutable",
"name": "returnData",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13007,
"src": "12597:23:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 12977,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "12597:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12988,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12986,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12969,
"src": "12668:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12981,
"name": "_converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12963,
"src": "12632:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12980,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12624:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12979,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "12624:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12982,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12624:19:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"id": 12983,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "staticcall",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "12624:30:12",
"typeDescriptions": {
"typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory) view returns (bool,bytes memory)"
}
},
"id": 12985,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"names": [
"gas"
],
"nodeType": "FunctionCallOptions",
"options": [
{
"argumentTypes": null,
"hexValue": "34303030",
"id": 12984,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12661:4:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_4000_by_1",
"typeString": "int_const 4000"
},
"value": "4000"
}
],
"src": "12624:43:12",
"typeDescriptions": {
"typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$gas",
"typeString": "function (bytes memory) view returns (bool,bytes memory)"
}
},
"id": 12987,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12624:49:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12582:91:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 12994,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12989,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12976,
"src": "12690:7:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 12993,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 12990,
"name": "returnData",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12978,
"src": "12701:10:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 12991,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "12701:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3332",
"id": 12992,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12722:2:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "12701:23:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "12690:34:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 13004,
"nodeType": "IfStatement",
"src": "12686:104:12",
"trueBody": {
"id": 13003,
"nodeType": "Block",
"src": "12726:64:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12997,
"name": "returnData",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12978,
"src": "12759:10:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"id": 12999,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12772:4:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
},
"typeName": {
"id": 12998,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "12772:4:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
}
],
"id": 13000,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "12771:6:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
}
],
"expression": {
"argumentTypes": null,
"id": 12995,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
"src": "12748:3:12",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 12996,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "decode",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "12748:10:12",
"typeDescriptions": {
"typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 13001,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12748:30:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 12967,
"id": 13002,
"nodeType": "Return",
"src": "12741:37:12"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 13005,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12809:5:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 12967,
"id": 13006,
"nodeType": "Return",
"src": "12802:12:12"
}
]
},
"documentation": null,
"id": 13008,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isV28OrHigherConverter",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12964,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12963,
"mutability": "mutable",
"name": "_converter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13008,
"src": "12434:21:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12962,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "12434:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "12433:23:12"
},
"returnParameters": {
"id": 12967,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12966,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13008,
"src": "12480:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 12965,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "12480:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "12479:6:12"
},
"scope": 13009,
"src": "12402:420:12",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
}
],
"scope": 13010,
"src": "1251:11574:12"
}
],
"src": "52:12775:12"
},
"legacyAST": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterUpgrader.sol",
"exportedSymbols": {
"ConverterUpgrader": [
13009
]
},
"id": 13010,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 12326,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:12"
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol",
"file": "./interfaces/IConverter.sol",
"id": 12327,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 13341,
"src": "77:37:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol",
"file": "./interfaces/IConverterUpgrader.sol",
"id": 12328,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 13661,
"src": "116:45:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol",
"file": "./interfaces/IConverterFactory.sol",
"id": 12329,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 13390,
"src": "163:44:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol",
"file": "../utility/ContractRegistryClient.sol",
"id": 12330,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 21720,
"src": "209:47:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol",
"file": "../utility/interfaces/IWhitelist.sol",
"id": 12331,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 22918,
"src": "258:46:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol",
"file": "../token/interfaces/IEtherToken.sol",
"id": 12332,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 21154,
"src": "306:45:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol",
"file": "./types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol",
"id": 12333,
"nodeType": "ImportDirective",
"scope": 13010,
"sourceUnit": 18766,
"src": "353:76:12",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 12335,
"name": "IConverterUpgrader",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13660,
"src": "1281:18:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterUpgrader_$13660",
"typeString": "contract IConverterUpgrader"
}
},
"id": 12336,
"nodeType": "InheritanceSpecifier",
"src": "1281:18:12"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 12337,
"name": "ContractRegistryClient",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21719,
"src": "1301:22:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ContractRegistryClient_$21719",
"typeString": "contract ContractRegistryClient"
}
},
"id": 12338,
"nodeType": "InheritanceSpecifier",
"src": "1301:22:12"
}
],
"contractDependencies": [
13660,
21719,
21818,
22661,
22847
],
"contractKind": "contract",
"documentation": {
"id": 12334,
"nodeType": "StructuredDocumentation",
"src": "433:816:12",
"text": " @dev Converter Upgrader\n The converter upgrader contract allows upgrading an older converter contract (0.4 and up)\n to the latest version.\n To begin the upgrade process, simply execute the 'upgrade' function.\n At the end of the process, the ownership of the newly upgraded converter will be transferred\n back to the original owner and the original owner will need to execute the 'acceptOwnership' function.\n The address of the new converter is available in the ConverterUpgrade event.\n Note that for older converters that don't yet have the 'upgrade' function, ownership should first\n be transferred manually to the ConverterUpgrader contract using the 'transferOwnership' function\n and then the upgrader 'upgrade' function should be executed directly."
},
"fullyImplemented": true,
"id": 13009,
"linearizedBaseContracts": [
13009,
21719,
22661,
21818,
22847,
13660
],
"name": "ConverterUpgrader",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 12343,
"mutability": "constant",
"name": "ETH_RESERVE_ADDRESS",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13009,
"src": "1331:106:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12339,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "1331:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545",
"id": 12341,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1394:42:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12340,
"name": "IERC20Token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21127,
"src": "1382:11:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$",
"typeString": "type(contract IERC20Token)"
}
},
"id": 12342,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1382:55:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"visibility": "private"
},
{
"constant": false,
"functionSelector": "b8066bcb",
"id": 12345,
"mutability": "mutable",
"name": "etherToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13009,
"src": "1444:29:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
},
"typeName": {
"contractScope": null,
"id": 12344,
"name": "IEtherToken",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21153,
"src": "1444:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"value": null,
"visibility": "public"
},
{
"anonymous": false,
"documentation": {
"id": 12346,
"nodeType": "StructuredDocumentation",
"src": "1482:202:12",
"text": " @dev triggered when the contract accept a converter ownership\n @param _converter converter address\n @param _owner new owner - local upgrader address"
},
"id": 12352,
"name": "ConverterOwned",
"nodeType": "EventDefinition",
"parameters": {
"id": 12351,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12348,
"indexed": true,
"mutability": "mutable",
"name": "_converter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12352,
"src": "1711:29:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12347,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "1711:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12350,
"indexed": true,
"mutability": "mutable",
"name": "_owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12352,
"src": "1742:22:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12349,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1742:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1710:55:12"
},
"src": "1690:76:12"
},
{
"anonymous": false,
"documentation": {
"id": 12353,
"nodeType": "StructuredDocumentation",
"src": "1774:189:12",
"text": " @dev triggered when the upgrading process is done\n @param _oldConverter old converter address\n @param _newConverter new converter address"
},
"id": 12359,
"name": "ConverterUpgrade",
"nodeType": "EventDefinition",
"parameters": {
"id": 12358,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12355,
"indexed": true,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12359,
"src": "1992:29:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12354,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1992:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12357,
"indexed": true,
"mutability": "mutable",
"name": "_newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12359,
"src": "2023:29:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12356,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2023:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1991:62:12"
},
"src": "1969:85:12"
},
{
"body": {
"id": 12374,
"nodeType": "Block",
"src": "2323:43:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 12372,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12370,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "2334:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 12371,
"name": "_etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12364,
"src": "2347:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"src": "2334:24:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"id": 12373,
"nodeType": "ExpressionStatement",
"src": "2334:24:12"
}
]
},
"documentation": {
"id": 12360,
"nodeType": "StructuredDocumentation",
"src": "2062:148:12",
"text": " @dev initializes a new ConverterUpgrader instance\n @param _registry address of a contract registry contract"
},
"id": 12375,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 12367,
"name": "_registry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12362,
"src": "2305:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
"typeString": "contract IContractRegistry"
}
}
],
"id": 12368,
"modifierName": {
"argumentTypes": null,
"id": 12366,
"name": "ContractRegistryClient",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21719,
"src": "2282:22:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$",
"typeString": "type(contract ContractRegistryClient)"
}
},
"nodeType": "ModifierInvocation",
"src": "2282:33:12"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12365,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12362,
"mutability": "mutable",
"name": "_registry",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12375,
"src": "2228:27:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
"typeString": "contract IContractRegistry"
},
"typeName": {
"contractScope": null,
"id": 12361,
"name": "IContractRegistry",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22831,
"src": "2228:17:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
"typeString": "contract IContractRegistry"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12364,
"mutability": "mutable",
"name": "_etherToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12375,
"src": "2257:23:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
},
"typeName": {
"contractScope": null,
"id": 12363,
"name": "IEtherToken",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21153,
"src": "2257:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2227:54:12"
},
"returnParameters": {
"id": 12369,
"nodeType": "ParameterList",
"parameters": [],
"src": "2323:0:12"
},
"scope": 13009,
"src": "2216:150:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
13654
],
"body": {
"id": 12390,
"nodeType": "Block",
"src": "2845:63:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 12384,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "2878:3:12",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 12385,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2878:10:12",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12383,
"name": "IConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13340,
"src": "2867:10:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$",
"typeString": "type(contract IConverter)"
}
},
"id": 12386,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2867:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12387,
"name": "_version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12378,
"src": "2891:8:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 12382,
"name": "upgradeOld",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12530,
"src": "2856:10:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_bytes32_$returns$__$",
"typeString": "function (contract IConverter,bytes32)"
}
},
"id": 12388,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2856:44:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12389,
"nodeType": "ExpressionStatement",
"src": "2856:44:12"
}
]
},
"documentation": {
"id": 12376,
"nodeType": "StructuredDocumentation",
"src": "2374:414:12",
"text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n can only be called by a converter\n @param _version old converter version"
},
"functionSelector": "bc444e13",
"id": 12391,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 12380,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "2836:8:12"
},
"parameters": {
"id": 12379,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12378,
"mutability": "mutable",
"name": "_version",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12391,
"src": "2811:16:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 12377,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2811:7:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2810:18:12"
},
"returnParameters": {
"id": 12381,
"nodeType": "ParameterList",
"parameters": [],
"src": "2845:0:12"
},
"scope": 13009,
"src": "2794:114:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions": [
13659
],
"body": {
"id": 12412,
"nodeType": "Block",
"src": "3386:81:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 12400,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "3419:3:12",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 12401,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3419:10:12",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12399,
"name": "IConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13340,
"src": "3408:10:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$",
"typeString": "type(contract IConverter)"
}
},
"id": 12402,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3408:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12407,
"name": "_version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12394,
"src": "3448:8:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
],
"id": 12406,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3440:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 12405,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3440:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12408,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3440:17:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 12404,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3432:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes32_$",
"typeString": "type(bytes32)"
},
"typeName": {
"id": 12403,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "3432:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12409,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3432:26:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 12398,
"name": "upgradeOld",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12530,
"src": "3397:10:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_bytes32_$returns$__$",
"typeString": "function (contract IConverter,bytes32)"
}
},
"id": 12410,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3397:62:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12411,
"nodeType": "ExpressionStatement",
"src": "3397:62:12"
}
]
},
"documentation": {
"id": 12392,
"nodeType": "StructuredDocumentation",
"src": "2916:414:12",
"text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n can only be called by a converter\n @param _version old converter version"
},
"functionSelector": "90f58c96",
"id": 12413,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 12396,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "3377:8:12"
},
"parameters": {
"id": 12395,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12394,
"mutability": "mutable",
"name": "_version",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12413,
"src": "3353:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12393,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "3353:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3352:17:12"
},
"returnParameters": {
"id": 12397,
"nodeType": "ParameterList",
"parameters": [],
"src": "3386:0:12"
},
"scope": 13009,
"src": "3336:131:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 12529,
"nodeType": "Block",
"src": "3984:1045:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 12421,
"name": "_version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12418,
"src": "3995:8:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 12422,
"nodeType": "ExpressionStatement",
"src": "3995:8:12"
},
{
"assignments": [
12424
],
"declarations": [
{
"constant": false,
"id": 12424,
"mutability": "mutable",
"name": "converter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12529,
"src": "4014:20:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12423,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "4014:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12428,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12426,
"name": "_converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12416,
"src": "4048:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12425,
"name": "IConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13340,
"src": "4037:10:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$",
"typeString": "type(contract IConverter)"
}
},
"id": 12427,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4037:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4014:45:12"
},
{
"assignments": [
12430
],
"declarations": [
{
"constant": false,
"id": 12430,
"mutability": "mutable",
"name": "prevOwner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12529,
"src": "4070:17:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 12429,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4070:7:12",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12434,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12431,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4090:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12432,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "owner",
"nodeType": "MemberAccess",
"referencedDeclaration": 22838,
"src": "4090:15:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
"typeString": "function () view external returns (address)"
}
},
"id": 12433,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4090:17:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4070:37:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12436,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4143:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12435,
"name": "acceptConverterOwnership",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12550,
"src": "4118:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$__$",
"typeString": "function (contract IConverter)"
}
},
"id": 12437,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4118:35:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12438,
"nodeType": "ExpressionStatement",
"src": "4118:35:12"
},
{
"assignments": [
12440
],
"declarations": [
{
"constant": false,
"id": 12440,
"mutability": "mutable",
"name": "newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12529,
"src": "4164:23:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12439,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "4164:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12444,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12442,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4206:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12441,
"name": "createConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12624,
"src": "4190:15:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$_t_contract$_IConverter_$13340_$",
"typeString": "function (contract IConverter) returns (contract IConverter)"
}
},
"id": 12443,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4190:26:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4164:52:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12446,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4240:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12447,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4251:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12445,
"name": "copyReserves",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12697,
"src": "4227:12:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$",
"typeString": "function (contract IConverter,contract IConverter)"
}
},
"id": 12448,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4227:37:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12449,
"nodeType": "ExpressionStatement",
"src": "4227:37:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12451,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4293:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12452,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4304:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12450,
"name": "copyConversionFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12718,
"src": "4275:17:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$",
"typeString": "function (contract IConverter,contract IConverter)"
}
},
"id": 12453,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4275:42:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12454,
"nodeType": "ExpressionStatement",
"src": "4275:42:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12456,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4352:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12457,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4363:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12455,
"name": "transferReserveBalances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12831,
"src": "4328:23:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$",
"typeString": "function (contract IConverter,contract IConverter)"
}
},
"id": 12458,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4328:48:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12459,
"nodeType": "ExpressionStatement",
"src": "4328:48:12"
},
{
"assignments": [
12461
],
"declarations": [
{
"constant": false,
"id": 12461,
"mutability": "mutable",
"name": "anchor",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12529,
"src": "4387:23:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
},
"typeName": {
"contractScope": null,
"id": 12460,
"name": "IConverterAnchor",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13349,
"src": "4387:16:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12465,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12462,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4413:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12463,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "token",
"nodeType": "MemberAccess",
"referencedDeclaration": 13297,
"src": "4413:15:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$",
"typeString": "function () view external returns (contract IConverterAnchor)"
}
},
"id": 12464,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4413:17:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4387:43:12"
},
{
"assignments": [
12467
],
"declarations": [
{
"constant": false,
"id": 12467,
"mutability": "mutable",
"name": "activate",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12529,
"src": "4511:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 12466,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4511:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12475,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 12474,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12469,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4550:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12468,
"name": "isV28OrHigherConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13008,
"src": "4527:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$",
"typeString": "function (contract IConverter) view returns (bool)"
}
},
"id": 12470,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4527:33:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12471,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4564:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12472,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "isActive",
"nodeType": "MemberAccess",
"referencedDeclaration": 13200,
"src": "4564:18:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_bool_$",
"typeString": "function () view external returns (bool)"
}
},
"id": 12473,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4564:20:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4527:57:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4511:73:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 12483,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12476,
"name": "anchor",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12461,
"src": "4601:6:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
"id": 12477,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "owner",
"nodeType": "MemberAccess",
"referencedDeclaration": 22838,
"src": "4601:12:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
"typeString": "function () view external returns (address)"
}
},
"id": 12478,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4601:14:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12481,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4627:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12480,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4619:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12479,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4619:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12482,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4619:18:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "4601:36:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 12499,
"nodeType": "IfStatement",
"src": "4597:175:12",
"trueBody": {
"id": 12498,
"nodeType": "Block",
"src": "4639:133:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12489,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4695:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12488,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4687:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12487,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4687:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12490,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4687:21:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"id": 12484,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4654:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12486,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transferTokenOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 13302,
"src": "4654:32:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$",
"typeString": "function (address) external"
}
},
"id": 12491,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4654:55:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12492,
"nodeType": "ExpressionStatement",
"src": "4654:55:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12493,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4724:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12495,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "acceptAnchorOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 13261,
"src": "4724:34:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
"typeString": "function () external"
}
},
"id": 12496,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4724:36:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12497,
"nodeType": "ExpressionStatement",
"src": "4724:36:12"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12501,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4807:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12502,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4818:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"id": 12503,
"name": "activate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12467,
"src": "4832:8:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 12500,
"name": "handleTypeSpecificData",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12953,
"src": "4784:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$_t_bool_$returns$__$",
"typeString": "function (contract IConverter,contract IConverter,bool)"
}
},
"id": 12504,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4784:57:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12505,
"nodeType": "ExpressionStatement",
"src": "4784:57:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12509,
"name": "prevOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12430,
"src": "4882:9:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 12506,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4854:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12508,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transferOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 22843,
"src": "4854:27:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$",
"typeString": "function (address) external"
}
},
"id": 12510,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4854:38:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12511,
"nodeType": "ExpressionStatement",
"src": "4854:38:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12515,
"name": "prevOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12430,
"src": "4934:9:12",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 12512,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "4903:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12514,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transferOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 22843,
"src": "4903:30:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$",
"typeString": "function (address) external"
}
},
"id": 12516,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4903:41:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12517,
"nodeType": "ExpressionStatement",
"src": "4903:41:12"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12521,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12424,
"src": "4987:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12520,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4979:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12519,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4979:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4979:18:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12525,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12440,
"src": "5007:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12524,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4999:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12523,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4999:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12526,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4999:21:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12518,
"name": "ConverterUpgrade",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12359,
"src": "4962:16:12",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 12527,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4962:59:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12528,
"nodeType": "EmitStatement",
"src": "4957:64:12"
}
]
},
"documentation": {
"id": 12414,
"nodeType": "StructuredDocumentation",
"src": "3475:435:12",
"text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n @param _converter old converter contract address\n @param _version old converter version"
},
"functionSelector": "f2cfed87",
"id": 12530,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "upgradeOld",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12419,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12416,
"mutability": "mutable",
"name": "_converter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12530,
"src": "3936:21:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12415,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "3936:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12418,
"mutability": "mutable",
"name": "_version",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12530,
"src": "3959:16:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 12417,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "3959:7:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3935:41:12"
},
"returnParameters": {
"id": 12420,
"nodeType": "ParameterList",
"parameters": [],
"src": "3984:0:12"
},
"scope": 13009,
"src": "3916:1113:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 12549,
"nodeType": "Block",
"src": "5484:110:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12536,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12533,
"src": "5495:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12538,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "acceptOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 22846,
"src": "5495:29:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
"typeString": "function () external"
}
},
"id": 12539,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5495:31:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12540,
"nodeType": "ExpressionStatement",
"src": "5495:31:12"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12542,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12533,
"src": "5557:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12545,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "5580:4:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ConverterUpgrader_$13009",
"typeString": "contract ConverterUpgrader"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ConverterUpgrader_$13009",
"typeString": "contract ConverterUpgrader"
}
],
"id": 12544,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "5572:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12543,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5572:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5572:13:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12541,
"name": "ConverterOwned",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12352,
"src": "5542:14:12",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverter_$13340_$_t_address_$returns$__$",
"typeString": "function (contract IConverter,address)"
}
},
"id": 12547,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5542:44:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12548,
"nodeType": "EmitStatement",
"src": "5537:49:12"
}
]
},
"documentation": {
"id": 12531,
"nodeType": "StructuredDocumentation",
"src": "5037:373:12",
"text": " @dev the first step when upgrading a converter is to transfer the ownership to the local contract.\n the upgrader contract then needs to accept the ownership transfer before initiating\n the upgrade process.\n fires the ConverterOwned event upon success\n @param _oldConverter converter to accept ownership of"
},
"id": 12550,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "acceptConverterOwnership",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12534,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12533,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12550,
"src": "5450:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12532,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "5450:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5449:26:12"
},
"returnParameters": {
"id": 12535,
"nodeType": "ParameterList",
"parameters": [],
"src": "5484:0:12"
},
"scope": 13009,
"src": "5416:178:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 12623,
"nodeType": "Block",
"src": "6010:912:12",
"statements": [
{
"assignments": [
12559
],
"declarations": [
{
"constant": false,
"id": 12559,
"mutability": "mutable",
"name": "anchor",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6021:23:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
},
"typeName": {
"contractScope": null,
"id": 12558,
"name": "IConverterAnchor",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13349,
"src": "6021:16:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12563,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12560,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12553,
"src": "6047:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12561,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "token",
"nodeType": "MemberAccess",
"referencedDeclaration": 13297,
"src": "6047:19:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$",
"typeString": "function () view external returns (contract IConverterAnchor)"
}
},
"id": 12562,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6047:21:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6021:47:12"
},
{
"assignments": [
12565
],
"declarations": [
{
"constant": false,
"id": 12565,
"mutability": "mutable",
"name": "maxConversionFee",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6079:23:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 12564,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "6079:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12569,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12566,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12553,
"src": "6105:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12567,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "maxConversionFee",
"nodeType": "MemberAccess",
"referencedDeclaration": 13243,
"src": "6105:30:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$",
"typeString": "function () view external returns (uint32)"
}
},
"id": 12568,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6105:32:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6079:58:12"
},
{
"assignments": [
12571
],
"declarations": [
{
"constant": false,
"id": 12571,
"mutability": "mutable",
"name": "reserveTokenCount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6148:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12570,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "6148:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12575,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12572,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12553,
"src": "6175:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12573,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokenCount",
"nodeType": "MemberAccess",
"referencedDeclaration": 13339,
"src": "6175:33:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$",
"typeString": "function () view external returns (uint16)"
}
},
"id": 12574,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6175:35:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6148:62:12"
},
{
"assignments": [
12577
],
"declarations": [
{
"constant": false,
"id": 12577,
"mutability": "mutable",
"name": "newType",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6264:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12576,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "6264:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12579,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 12578,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6281:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "6264:18:12"
},
{
"condition": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12581,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12553,
"src": "6387:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12580,
"name": "isV28OrHigherConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13008,
"src": "6364:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$",
"typeString": "function (contract IConverter) view returns (bool)"
}
},
"id": 12582,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6364:37:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"id": 12591,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12589,
"name": "reserveTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12571,
"src": "6592:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 12590,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6612:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "6592:21:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 12596,
"nodeType": "IfStatement",
"src": "6588:51:12",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 12594,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12592,
"name": "newType",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12577,
"src": "6628:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "31",
"id": 12593,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6638:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "6628:11:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 12595,
"nodeType": "ExpressionStatement",
"src": "6628:11:12"
}
},
"id": 12597,
"nodeType": "IfStatement",
"src": "6360:279:12",
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 12587,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12583,
"name": "newType",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12577,
"src": "6416:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12584,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12553,
"src": "6426:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12585,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "converterType",
"nodeType": "MemberAccess",
"referencedDeclaration": 13190,
"src": "6426:27:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$",
"typeString": "function () pure external returns (uint16)"
}
},
"id": 12586,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6426:29:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "6416:39:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 12588,
"nodeType": "ExpressionStatement",
"src": "6416:39:12"
}
},
{
"assignments": [
12599
],
"declarations": [
{
"constant": false,
"id": 12599,
"mutability": "mutable",
"name": "converterFactory",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6652:34:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterFactory_$13389",
"typeString": "contract IConverterFactory"
},
"typeName": {
"contractScope": null,
"id": 12598,
"name": "IConverterFactory",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13389,
"src": "6652:17:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterFactory_$13389",
"typeString": "contract IConverterFactory"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12605,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12602,
"name": "CONVERTER_FACTORY",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21536,
"src": "6717:17:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 12601,
"name": "addressOf",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21718,
"src": "6707:9:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32) view returns (address)"
}
},
"id": 12603,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6707:28:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 12600,
"name": "IConverterFactory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13389,
"src": "6689:17:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IConverterFactory_$13389_$",
"typeString": "type(contract IConverterFactory)"
}
},
"id": 12604,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6689:47:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterFactory_$13389",
"typeString": "contract IConverterFactory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6652:84:12"
},
{
"assignments": [
12607
],
"declarations": [
{
"constant": false,
"id": 12607,
"mutability": "mutable",
"name": "converter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12623,
"src": "6747:20:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12606,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "6747:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12615,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12610,
"name": "newType",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12577,
"src": "6803:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
{
"argumentTypes": null,
"id": 12611,
"name": "anchor",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12559,
"src": "6812:6:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
}
},
{
"argumentTypes": null,
"id": 12612,
"name": "registry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 21562,
"src": "6820:8:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
"typeString": "contract IContractRegistry"
}
},
{
"argumentTypes": null,
"id": 12613,
"name": "maxConversionFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12565,
"src": "6830:16:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
{
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
"typeString": "contract IConverterAnchor"
},
{
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
"typeString": "contract IContractRegistry"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"expression": {
"argumentTypes": null,
"id": 12608,
"name": "converterFactory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12599,
"src": "6770:16:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverterFactory_$13389",
"typeString": "contract IConverterFactory"
}
},
"id": 12609,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "createConverter",
"nodeType": "MemberAccess",
"referencedDeclaration": 13381,
"src": "6770:32:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IContractRegistry_$22831_$_t_uint32_$returns$_t_contract$_IConverter_$13340_$",
"typeString": "function (uint16,contract IConverterAnchor,contract IContractRegistry,uint32) external returns (contract IConverter)"
}
},
"id": 12614,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6770:77:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6747:100:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12616,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12607,
"src": "6860:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12618,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "acceptOwnership",
"nodeType": "MemberAccess",
"referencedDeclaration": 22846,
"src": "6860:25:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$__$returns$__$",
"typeString": "function () external"
}
},
"id": 12619,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6860:27:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12620,
"nodeType": "ExpressionStatement",
"src": "6860:27:12"
},
{
"expression": {
"argumentTypes": null,
"id": 12621,
"name": "converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12607,
"src": "6905:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"functionReturnParameters": 12557,
"id": 12622,
"nodeType": "Return",
"src": "6898:16:12"
}
]
},
"documentation": {
"id": 12551,
"nodeType": "StructuredDocumentation",
"src": "5602:322:12",
"text": " @dev creates a new converter with same basic data as the original old converter\n the newly created converter will have no reserves at this step.\n @param _oldConverter old converter contract address\n @return the new converter new converter contract address"
},
"id": 12624,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "createConverter",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12554,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12553,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12624,
"src": "5955:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12552,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "5955:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5954:26:12"
},
"returnParameters": {
"id": 12557,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12556,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12624,
"src": "5998:10:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12555,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "5998:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5997:12:12"
},
"scope": 13009,
"src": "5930:992:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 12696,
"nodeType": "Block",
"src": "7349:801:12",
"statements": [
{
"assignments": [
12633
],
"declarations": [
{
"constant": false,
"id": 12633,
"mutability": "mutable",
"name": "reserveTokenCount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12696,
"src": "7360:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12632,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "7360:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12637,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12634,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12627,
"src": "7387:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12635,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokenCount",
"nodeType": "MemberAccess",
"referencedDeclaration": 13339,
"src": "7387:33:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$",
"typeString": "function () view external returns (uint16)"
}
},
"id": 12636,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7387:35:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7360:62:12"
},
{
"body": {
"id": 12694,
"nodeType": "Block",
"src": "7482:661:12",
"statements": [
{
"assignments": [
12649
],
"declarations": [
{
"constant": false,
"id": 12649,
"mutability": "mutable",
"name": "reserveAddress",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12694,
"src": "7497:26:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12648,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "7497:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12654,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12652,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12639,
"src": "7556:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
],
"expression": {
"argumentTypes": null,
"id": 12650,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12627,
"src": "7526:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12651,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 13334,
"src": "7526:29:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$",
"typeString": "function (uint256) view external returns (contract IERC20Token)"
}
},
"id": 12653,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7526:32:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7497:61:12"
},
{
"assignments": [
null,
12656,
null,
null,
null
],
"declarations": [
null,
{
"constant": false,
"id": 12656,
"mutability": "mutable",
"name": "weight",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12694,
"src": "7576:13:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 12655,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "7576:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
},
null,
null,
null
],
"id": 12661,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12659,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12649,
"src": "7624:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
],
"expression": {
"argumentTypes": null,
"id": 12657,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12627,
"src": "7599:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12658,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectors",
"nodeType": "MemberAccess",
"referencedDeclaration": 13320,
"src": "7599:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$",
"typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)"
}
},
"id": 12660,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7599:40:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$",
"typeString": "tuple(uint256,uint32,bool,bool,bool)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7573:66:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"id": 12664,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12662,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12649,
"src": "7690:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 12663,
"name": "ETH_RESERVE_ADDRESS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12343,
"src": "7708:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"src": "7690:37:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"id": 12675,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12673,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12649,
"src": "7876:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 12674,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "7894:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"src": "7876:28:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 12691,
"nodeType": "Block",
"src": "8049:83:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12687,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12649,
"src": "8093:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 12688,
"name": "weight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12656,
"src": "8109:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"expression": {
"argumentTypes": null,
"id": 12684,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12629,
"src": "8068:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12686,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "addReserve",
"nodeType": "MemberAccess",
"referencedDeclaration": 13292,
"src": "8068:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$",
"typeString": "function (contract IERC20Token,uint32) external"
}
},
"id": 12689,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8068:48:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12690,
"nodeType": "ExpressionStatement",
"src": "8068:48:12"
}
]
},
"id": 12692,
"nodeType": "IfStatement",
"src": "7872:260:12",
"trueBody": {
"id": 12683,
"nodeType": "Block",
"src": "7906:88:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12679,
"name": "ETH_RESERVE_ADDRESS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12343,
"src": "7950:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 12680,
"name": "weight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12656,
"src": "7971:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"expression": {
"argumentTypes": null,
"id": 12676,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12629,
"src": "7925:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12678,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "addReserve",
"nodeType": "MemberAccess",
"referencedDeclaration": 13292,
"src": "7925:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$",
"typeString": "function (contract IERC20Token,uint32) external"
}
},
"id": 12681,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7925:53:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12682,
"nodeType": "ExpressionStatement",
"src": "7925:53:12"
}
]
}
},
"id": 12693,
"nodeType": "IfStatement",
"src": "7686:446:12",
"trueBody": {
"id": 12672,
"nodeType": "Block",
"src": "7729:88:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12668,
"name": "ETH_RESERVE_ADDRESS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12343,
"src": "7773:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 12669,
"name": "weight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12656,
"src": "7794:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"expression": {
"argumentTypes": null,
"id": 12665,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12629,
"src": "7748:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12667,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "addReserve",
"nodeType": "MemberAccess",
"referencedDeclaration": 13292,
"src": "7748:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$",
"typeString": "function (contract IERC20Token,uint32) external"
}
},
"id": 12670,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7748:53:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12671,
"nodeType": "ExpressionStatement",
"src": "7748:53:12"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"id": 12644,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12642,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12639,
"src": "7454:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 12643,
"name": "reserveTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12633,
"src": "7458:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "7454:21:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 12695,
"initializationExpression": {
"assignments": [
12639
],
"declarations": [
{
"constant": false,
"id": 12639,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12695,
"src": "7440:8:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12638,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "7440:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12641,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 12640,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7451:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "7440:12:12"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 12646,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "7477:3:12",
"subExpression": {
"argumentTypes": null,
"id": 12645,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12639,
"src": "7477:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 12647,
"nodeType": "ExpressionStatement",
"src": "7477:3:12"
},
"nodeType": "ForStatement",
"src": "7435:708:12"
}
]
},
"documentation": {
"id": 12625,
"nodeType": "StructuredDocumentation",
"src": "6930:331:12",
"text": " @dev copies the reserves from the old converter to the new one.\n note that this will not work for an unlimited number of reserves due to block gas limit constraints.\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address"
},
"id": 12697,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "copyReserves",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12630,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12627,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12697,
"src": "7289:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12626,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "7289:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12629,
"mutability": "mutable",
"name": "_newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12697,
"src": "7315:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12628,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "7315:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7288:52:12"
},
"returnParameters": {
"id": 12631,
"nodeType": "ParameterList",
"parameters": [],
"src": "7349:0:12"
},
"scope": 13009,
"src": "7267:883:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 12717,
"nodeType": "Block",
"src": "8477:127:12",
"statements": [
{
"assignments": [
12706
],
"declarations": [
{
"constant": false,
"id": 12706,
"mutability": "mutable",
"name": "conversionFee",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12717,
"src": "8488:20:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 12705,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "8488:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12710,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12707,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12700,
"src": "8511:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12708,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "conversionFee",
"nodeType": "MemberAccess",
"referencedDeclaration": 13238,
"src": "8511:27:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$",
"typeString": "function () view external returns (uint32)"
}
},
"id": 12709,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8511:29:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "8488:52:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12714,
"name": "conversionFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12706,
"src": "8582:13:12",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
],
"expression": {
"argumentTypes": null,
"id": 12711,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12702,
"src": "8551:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12713,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setConversionFee",
"nodeType": "MemberAccess",
"referencedDeclaration": 13266,
"src": "8551:30:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_uint32_$returns$__$",
"typeString": "function (uint32) external"
}
},
"id": 12715,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8551:45:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12716,
"nodeType": "ExpressionStatement",
"src": "8551:45:12"
}
]
},
"documentation": {
"id": 12698,
"nodeType": "StructuredDocumentation",
"src": "8158:226:12",
"text": " @dev copies the conversion fee from the old converter to the new one\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address"
},
"id": 12718,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "copyConversionFee",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12703,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12700,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12718,
"src": "8417:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12699,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "8417:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12702,
"mutability": "mutable",
"name": "_newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12718,
"src": "8443:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12701,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "8443:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8416:52:12"
},
"returnParameters": {
"id": 12704,
"nodeType": "ParameterList",
"parameters": [],
"src": "8477:0:12"
},
"scope": 13009,
"src": "8390:214:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 12830,
"nodeType": "Block",
"src": "9154:1092:12",
"statements": [
{
"assignments": [
12727
],
"declarations": [
{
"constant": false,
"id": 12727,
"mutability": "mutable",
"name": "reserveBalance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12830,
"src": "9165:22:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12726,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9165:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12728,
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "9165:22:12"
},
{
"assignments": [
12730
],
"declarations": [
{
"constant": false,
"id": 12730,
"mutability": "mutable",
"name": "reserveTokenCount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12830,
"src": "9198:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12729,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "9198:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12734,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12731,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "9225:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12732,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokenCount",
"nodeType": "MemberAccess",
"referencedDeclaration": 13339,
"src": "9225:33:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$",
"typeString": "function () view external returns (uint16)"
}
},
"id": 12733,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9225:35:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9198:62:12"
},
{
"body": {
"id": 12828,
"nodeType": "Block",
"src": "9320:919:12",
"statements": [
{
"assignments": [
12746
],
"declarations": [
{
"constant": false,
"id": 12746,
"mutability": "mutable",
"name": "reserveAddress",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12828,
"src": "9335:26:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12745,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "9335:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12751,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12749,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12736,
"src": "9394:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
],
"expression": {
"argumentTypes": null,
"id": 12747,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "9364:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12748,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 13334,
"src": "9364:29:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$",
"typeString": "function (uint256) view external returns (contract IERC20Token)"
}
},
"id": 12750,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9364:32:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9335:61:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"id": 12754,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12752,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12746,
"src": "9445:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 12753,
"name": "ETH_RESERVE_ADDRESS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12343,
"src": "9463:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"src": "9445:37:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"id": 12767,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12765,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12746,
"src": "9627:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 12766,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "9645:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"src": "9627:28:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 12825,
"nodeType": "Block",
"src": "9978:250:12",
"statements": [
{
"assignments": [
12801
],
"declarations": [
{
"constant": false,
"id": 12801,
"mutability": "mutable",
"name": "connector",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12825,
"src": "9997:21:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12800,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "9997:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12803,
"initialValue": {
"argumentTypes": null,
"id": 12802,
"name": "reserveAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12746,
"src": "10021:14:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "9997:38:12"
},
{
"expression": {
"argumentTypes": null,
"id": 12812,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12804,
"name": "reserveBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12727,
"src": "10054:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12809,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "10099:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12808,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10091:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12807,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "10091:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12810,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10091:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"id": 12805,
"name": "connector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12801,
"src": "10071:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"id": 12806,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 21088,
"src": "10071:19:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 12811,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10071:43:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10054:60:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12813,
"nodeType": "ExpressionStatement",
"src": "10054:60:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12817,
"name": "connector",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12801,
"src": "10162:9:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12820,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12723,
"src": "10181:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12819,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10173:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12818,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "10173:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12821,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10173:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 12822,
"name": "reserveBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12727,
"src": "10197:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12814,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "10133:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12816,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "withdrawTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 13280,
"src": "10133:28:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (contract IERC20Token,address,uint256) external"
}
},
"id": 12823,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10133:79:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12824,
"nodeType": "ExpressionStatement",
"src": "10133:79:12"
}
]
},
"id": 12826,
"nodeType": "IfStatement",
"src": "9623:605:12",
"trueBody": {
"id": 12799,
"nodeType": "Block",
"src": "9657:266:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 12776,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 12768,
"name": "reserveBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12727,
"src": "9676:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12773,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "9722:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12772,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9714:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12771,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9714:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9714:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"id": 12769,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "9693:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"id": 12770,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 21088,
"src": "9693:20:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 12775,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9693:44:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9676:61:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 12777,
"nodeType": "ExpressionStatement",
"src": "9676:61:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12781,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "9785:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12784,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "9805:4:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ConverterUpgrader_$13009",
"typeString": "contract ConverterUpgrader"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ConverterUpgrader_$13009",
"typeString": "contract ConverterUpgrader"
}
],
"id": 12783,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9797:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12782,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9797:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12785,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9797:13:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 12786,
"name": "reserveBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12727,
"src": "9812:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12778,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "9756:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12780,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "withdrawTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 13280,
"src": "9756:28:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (contract IERC20Token,address,uint256) external"
}
},
"id": 12787,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9756:71:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12788,
"nodeType": "ExpressionStatement",
"src": "9756:71:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12794,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12723,
"src": "9876:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12793,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9868:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12792,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9868:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12795,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9868:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 12796,
"name": "reserveBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12727,
"src": "9892:14:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12789,
"name": "etherToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12345,
"src": "9846:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IEtherToken_$21153",
"typeString": "contract IEtherToken"
}
},
"id": 12791,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "withdrawTo",
"nodeType": "MemberAccess",
"referencedDeclaration": 21152,
"src": "9846:21:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$_t_uint256_$returns$__$",
"typeString": "function (address payable,uint256) external"
}
},
"id": 12797,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9846:61:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12798,
"nodeType": "ExpressionStatement",
"src": "9846:61:12"
}
]
}
},
"id": 12827,
"nodeType": "IfStatement",
"src": "9441:787:12",
"trueBody": {
"id": 12764,
"nodeType": "Block",
"src": "9484:84:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12760,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12723,
"src": "9537:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12759,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "9529:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12758,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9529:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12761,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9529:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"expression": {
"argumentTypes": null,
"id": 12755,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12721,
"src": "9503:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12757,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "withdrawETH",
"nodeType": "MemberAccess",
"referencedDeclaration": 13285,
"src": "9503:25:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$returns$__$",
"typeString": "function (address payable) external"
}
},
"id": 12762,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9503:49:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12763,
"nodeType": "ExpressionStatement",
"src": "9503:49:12"
}
]
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"id": 12741,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12739,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12736,
"src": "9292:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 12740,
"name": "reserveTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12730,
"src": "9296:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "9292:21:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 12829,
"initializationExpression": {
"assignments": [
12736
],
"declarations": [
{
"constant": false,
"id": 12736,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12829,
"src": "9278:8:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12735,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "9278:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12738,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 12737,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9289:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "9278:12:12"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 12743,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "9315:3:12",
"subExpression": {
"argumentTypes": null,
"id": 12742,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12736,
"src": "9315:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 12744,
"nodeType": "ExpressionStatement",
"src": "9315:3:12"
},
"nodeType": "ForStatement",
"src": "9273:966:12"
}
]
},
"documentation": {
"id": 12719,
"nodeType": "StructuredDocumentation",
"src": "8612:443:12",
"text": " @dev transfers the balance of each reserve in the old converter to the new one.\n note that the function assumes that the new converter already has the exact same number of\n also, this will not work for an unlimited number of reserves due to block gas limit constraints.\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address"
},
"id": 12831,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "transferReserveBalances",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12724,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12721,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12831,
"src": "9094:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12720,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "9094:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12723,
"mutability": "mutable",
"name": "_newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12831,
"src": "9120:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12722,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "9120:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "9093:52:12"
},
"returnParameters": {
"id": 12725,
"nodeType": "ParameterList",
"parameters": [],
"src": "9154:0:12"
},
"scope": 13009,
"src": "9061:1185:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"body": {
"id": 12952,
"nodeType": "Block",
"src": "10674:1454:12",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 12844,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "10689:38:12",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12842,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12834,
"src": "10713:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12841,
"name": "isV28OrHigherConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13008,
"src": "10690:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$",
"typeString": "function (contract IConverter) view returns (bool)"
}
},
"id": 12843,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10690:37:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 12846,
"nodeType": "IfStatement",
"src": "10685:64:12",
"trueBody": {
"expression": null,
"functionReturnParameters": 12840,
"id": 12845,
"nodeType": "Return",
"src": "10742:7:12"
}
},
{
"assignments": [
12848
],
"declarations": [
{
"constant": false,
"id": 12848,
"mutability": "mutable",
"name": "converterType",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12952,
"src": "10761:20:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12847,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "10761:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12852,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12849,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12834,
"src": "10784:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"id": 12850,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "converterType",
"nodeType": "MemberAccess",
"referencedDeclaration": 13190,
"src": "10784:27:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$",
"typeString": "function () pure external returns (uint16)"
}
},
"id": 12851,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10784:29:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10761:52:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"id": 12855,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12853,
"name": "converterType",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12848,
"src": "10828:13:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 12854,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10845:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "10828:18:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 12951,
"nodeType": "IfStatement",
"src": "10824:1297:12",
"trueBody": {
"id": 12950,
"nodeType": "Block",
"src": "10848:1273:12",
"statements": [
{
"assignments": [
12857
],
"declarations": [
{
"constant": false,
"id": 12857,
"mutability": "mutable",
"name": "oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "10863:38:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
},
"typeName": {
"contractScope": null,
"id": 12856,
"name": "ILiquidityPoolV2Converter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 18765,
"src": "10863:25:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12864,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12861,
"name": "_oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12834,
"src": "10938:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12860,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "10930:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12859,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "10930:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12862,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10930:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12858,
"name": "ILiquidityPoolV2Converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18765,
"src": "10904:25:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ILiquidityPoolV2Converter_$18765_$",
"typeString": "type(contract ILiquidityPoolV2Converter)"
}
},
"id": 12863,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10904:49:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10863:90:12"
},
{
"assignments": [
12866
],
"declarations": [
{
"constant": false,
"id": 12866,
"mutability": "mutable",
"name": "newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "10968:38:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
},
"typeName": {
"contractScope": null,
"id": 12865,
"name": "ILiquidityPoolV2Converter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 18765,
"src": "10968:25:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12873,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12870,
"name": "_newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12836,
"src": "11043:13:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12869,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "11035:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12868,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "11035:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12871,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11035:22:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
],
"id": 12867,
"name": "ILiquidityPoolV2Converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18765,
"src": "11009:25:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ILiquidityPoolV2Converter_$18765_$",
"typeString": "type(contract ILiquidityPoolV2Converter)"
}
},
"id": 12872,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11009:49:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10968:90:12"
},
{
"assignments": [
12875
],
"declarations": [
{
"constant": false,
"id": 12875,
"mutability": "mutable",
"name": "reserveTokenCount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "11075:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12874,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "11075:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12879,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12876,
"name": "oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12857,
"src": "11102:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12877,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokenCount",
"nodeType": "MemberAccess",
"referencedDeclaration": 13339,
"src": "11102:32:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$",
"typeString": "function () view external returns (uint16)"
}
},
"id": 12878,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11102:34:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11075:61:12"
},
{
"body": {
"id": 12911,
"nodeType": "Block",
"src": "11198:324:12",
"statements": [
{
"assignments": [
12891
],
"declarations": [
{
"constant": false,
"id": 12891,
"mutability": "mutable",
"name": "reserveTokenAddress",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12911,
"src": "11265:31:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12890,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "11265:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12896,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12894,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12881,
"src": "11328:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
],
"expression": {
"argumentTypes": null,
"id": 12892,
"name": "oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12857,
"src": "11299:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12893,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "connectorTokens",
"nodeType": "MemberAccess",
"referencedDeclaration": 13334,
"src": "11299:28:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$",
"typeString": "function (uint256) view external returns (contract IERC20Token)"
}
},
"id": 12895,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11299:31:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11265:65:12"
},
{
"assignments": [
12898
],
"declarations": [
{
"constant": false,
"id": 12898,
"mutability": "mutable",
"name": "balance",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12911,
"src": "11349:15:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12897,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11349:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12903,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12901,
"name": "reserveTokenAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12891,
"src": "11401:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
],
"expression": {
"argumentTypes": null,
"id": 12899,
"name": "oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12857,
"src": "11367:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12900,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "reserveStakedBalance",
"nodeType": "MemberAccess",
"referencedDeclaration": 18738,
"src": "11367:33:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$",
"typeString": "function (contract IERC20Token) view external returns (uint256)"
}
},
"id": 12902,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11367:54:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11349:72:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12907,
"name": "reserveTokenAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12891,
"src": "11477:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 12908,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12898,
"src": "11498:7:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 12904,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12866,
"src": "11440:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12906,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "setReserveStakedBalance",
"nodeType": "MemberAccess",
"referencedDeclaration": 18745,
"src": "11440:36:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$__$",
"typeString": "function (contract IERC20Token,uint256) external"
}
},
"id": 12909,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11440:66:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12910,
"nodeType": "ExpressionStatement",
"src": "11440:66:12"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"id": 12886,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12884,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12881,
"src": "11170:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 12885,
"name": "reserveTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12875,
"src": "11174:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "11170:21:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 12912,
"initializationExpression": {
"assignments": [
12881
],
"declarations": [
{
"constant": false,
"id": 12881,
"mutability": "mutable",
"name": "i",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12912,
"src": "11156:8:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
},
"typeName": {
"id": 12880,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "11156:6:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12883,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 12882,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11167:1:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "11156:12:12"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 12888,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "11193:3:12",
"subExpression": {
"argumentTypes": null,
"id": 12887,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12881,
"src": "11193:1:12",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"id": 12889,
"nodeType": "ExpressionStatement",
"src": "11193:3:12"
},
"nodeType": "ForStatement",
"src": "11151:371:12"
},
{
"condition": {
"argumentTypes": null,
"id": 12914,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "11542:10:12",
"subExpression": {
"argumentTypes": null,
"id": 12913,
"name": "_activate",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12838,
"src": "11543:9:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 12917,
"nodeType": "IfStatement",
"src": "11538:57:12",
"trueBody": {
"id": 12916,
"nodeType": "Block",
"src": "11554:41:12",
"statements": [
{
"expression": null,
"functionReturnParameters": 12840,
"id": 12915,
"nodeType": "Return",
"src": "11573:7:12"
}
]
}
},
{
"assignments": [
12919
],
"declarations": [
{
"constant": false,
"id": 12919,
"mutability": "mutable",
"name": "primaryReserveToken",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "11657:31:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
"typeName": {
"contractScope": null,
"id": 12918,
"name": "IERC20Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21127,
"src": "11657:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12923,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12920,
"name": "oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12857,
"src": "11691:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12921,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "primaryReserveToken",
"nodeType": "MemberAccess",
"referencedDeclaration": 18750,
"src": "11691:32:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IERC20Token_$21127_$",
"typeString": "function () view external returns (contract IERC20Token)"
}
},
"id": 12922,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11691:34:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11657:68:12"
},
{
"assignments": [
12925
],
"declarations": [
{
"constant": false,
"id": 12925,
"mutability": "mutable",
"name": "priceOracle",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "11790:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IPriceOracle_$22891",
"typeString": "contract IPriceOracle"
},
"typeName": {
"contractScope": null,
"id": 12924,
"name": "IPriceOracle",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22891,
"src": "11790:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IPriceOracle_$22891",
"typeString": "contract IPriceOracle"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12929,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12926,
"name": "oldConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12857,
"src": "11817:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12927,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "priceOracle",
"nodeType": "MemberAccess",
"referencedDeclaration": 18755,
"src": "11817:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IPriceOracle_$22891_$",
"typeString": "function () view external returns (contract IPriceOracle)"
}
},
"id": 12928,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11817:26:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IPriceOracle_$22891",
"typeString": "contract IPriceOracle"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11790:53:12"
},
{
"assignments": [
12931
],
"declarations": [
{
"constant": false,
"id": 12931,
"mutability": "mutable",
"name": "oracleA",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "11858:29:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
},
"typeName": {
"contractScope": null,
"id": 12930,
"name": "IChainlinkPriceOracle",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22821,
"src": "11858:21:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12935,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12932,
"name": "priceOracle",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12925,
"src": "11890:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IPriceOracle_$22891",
"typeString": "contract IPriceOracle"
}
},
"id": 12933,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "tokenAOracle",
"nodeType": "MemberAccess",
"referencedDeclaration": 22856,
"src": "11890:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IChainlinkPriceOracle_$22821_$",
"typeString": "function () view external returns (contract IChainlinkPriceOracle)"
}
},
"id": 12934,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11890:26:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11858:58:12"
},
{
"assignments": [
12937
],
"declarations": [
{
"constant": false,
"id": 12937,
"mutability": "mutable",
"name": "oracleB",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12950,
"src": "11931:29:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
},
"typeName": {
"contractScope": null,
"id": 12936,
"name": "IChainlinkPriceOracle",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 22821,
"src": "11931:21:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12941,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 12938,
"name": "priceOracle",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12925,
"src": "11963:11:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IPriceOracle_$22891",
"typeString": "contract IPriceOracle"
}
},
"id": 12939,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "tokenBOracle",
"nodeType": "MemberAccess",
"referencedDeclaration": 22861,
"src": "11963:24:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IChainlinkPriceOracle_$22821_$",
"typeString": "function () view external returns (contract IChainlinkPriceOracle)"
}
},
"id": 12940,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11963:26:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11931:58:12"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12945,
"name": "primaryReserveToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12919,
"src": "12071:19:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
}
},
{
"argumentTypes": null,
"id": 12946,
"name": "oracleA",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12931,
"src": "12092:7:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
},
{
"argumentTypes": null,
"id": 12947,
"name": "oracleB",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12937,
"src": "12101:7:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IERC20Token_$21127",
"typeString": "contract IERC20Token"
},
{
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
},
{
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
"typeString": "contract IChainlinkPriceOracle"
}
],
"expression": {
"argumentTypes": null,
"id": 12942,
"name": "newConverter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12866,
"src": "12049:12:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765",
"typeString": "contract ILiquidityPoolV2Converter"
}
},
"id": 12944,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "activate",
"nodeType": "MemberAccess",
"referencedDeclaration": 18764,
"src": "12049:21:12",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$_t_contract$_IChainlinkPriceOracle_$22821_$returns$__$",
"typeString": "function (contract IERC20Token,contract IChainlinkPriceOracle,contract IChainlinkPriceOracle) external"
}
},
"id": 12948,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12049:60:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 12949,
"nodeType": "ExpressionStatement",
"src": "12049:60:12"
}
]
}
}
]
},
"documentation": {
"id": 12832,
"nodeType": "StructuredDocumentation",
"src": "10254:306:12",
"text": " @dev handles upgrading custom (type specific) data from the old converter to the new one\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address\n @param _activate activate the new converter"
},
"id": 12953,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "handleTypeSpecificData",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12839,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12834,
"mutability": "mutable",
"name": "_oldConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12953,
"src": "10598:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12833,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "10598:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12836,
"mutability": "mutable",
"name": "_newConverter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12953,
"src": "10624:24:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12835,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "10624:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12838,
"mutability": "mutable",
"name": "_activate",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 12953,
"src": "10650:14:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 12837,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "10650:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "10597:68:12"
},
"returnParameters": {
"id": 12840,
"nodeType": "ParameterList",
"parameters": [],
"src": "10674:0:12"
},
"scope": 13009,
"src": "10566:1562:12",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "private"
},
{
"constant": true,
"id": 12961,
"mutability": "constant",
"name": "IS_V28_OR_HIGHER_FUNC_SELECTOR",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13009,
"src": "12136:93:12",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 12954,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "12136:6:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "69735632384f724869676865722829",
"id": 12958,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12210:17:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd",
"typeString": "literal_string \"isV28OrHigher()\""
},
"value": "isV28OrHigher()"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd",
"typeString": "literal_string \"isV28OrHigher()\""
}
],
"id": 12957,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "12200:9:12",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 12959,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12200:28:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 12956,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12193:6:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes4_$",
"typeString": "type(bytes4)"
},
"typeName": {
"id": 12955,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "12193:6:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12960,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12193:36:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "private"
},
{
"body": {
"id": 13007,
"nodeType": "Block",
"src": "12486:336:12",
"statements": [
{
"assignments": [
12969
],
"declarations": [
{
"constant": false,
"id": 12969,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13007,
"src": "12497:17:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 12968,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "12497:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12974,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12972,
"name": "IS_V28_OR_HIGHER_FUNC_SELECTOR",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12961,
"src": "12540:30:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"expression": {
"argumentTypes": null,
"id": 12970,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
"src": "12517:3:12",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 12971,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodeWithSelector",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "12517:22:12",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (bytes4) pure returns (bytes memory)"
}
},
"id": 12973,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12517:54:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12497:74:12"
},
{
"assignments": [
12976,
12978
],
"declarations": [
{
"constant": false,
"id": 12976,
"mutability": "mutable",
"name": "success",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13007,
"src": "12583:12:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 12975,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "12583:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 12978,
"mutability": "mutable",
"name": "returnData",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13007,
"src": "12597:23:12",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 12977,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "12597:5:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 12988,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12986,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12969,
"src": "12668:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12981,
"name": "_converter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12963,
"src": "12632:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
],
"id": 12980,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12624:7:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 12979,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "12624:7:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
},
"id": 12982,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12624:19:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"id": 12983,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "staticcall",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "12624:30:12",
"typeDescriptions": {
"typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory) view returns (bool,bytes memory)"
}
},
"id": 12985,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"names": [
"gas"
],
"nodeType": "FunctionCallOptions",
"options": [
{
"argumentTypes": null,
"hexValue": "34303030",
"id": 12984,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12661:4:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_4000_by_1",
"typeString": "int_const 4000"
},
"value": "4000"
}
],
"src": "12624:43:12",
"typeDescriptions": {
"typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$gas",
"typeString": "function (bytes memory) view returns (bool,bytes memory)"
}
},
"id": 12987,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12624:49:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12582:91:12"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 12994,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 12989,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12976,
"src": "12690:7:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 12993,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 12990,
"name": "returnData",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12978,
"src": "12701:10:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 12991,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "12701:17:12",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "3332",
"id": 12992,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12722:2:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "12701:23:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "12690:34:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 13004,
"nodeType": "IfStatement",
"src": "12686:104:12",
"trueBody": {
"id": 13003,
"nodeType": "Block",
"src": "12726:64:12",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 12997,
"name": "returnData",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12978,
"src": "12759:10:12",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"id": 12999,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12772:4:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
},
"typeName": {
"id": 12998,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "12772:4:12",
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
}
}
}
],
"id": 13000,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "12771:6:12",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
}
],
"expression": {
"argumentTypes": null,
"id": 12995,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -1,
"src": "12748:3:12",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 12996,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "decode",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "12748:10:12",
"typeDescriptions": {
"typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 13001,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12748:30:12",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 12967,
"id": 13002,
"nodeType": "Return",
"src": "12741:37:12"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 13005,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12809:5:12",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 12967,
"id": 13006,
"nodeType": "Return",
"src": "12802:12:12"
}
]
},
"documentation": null,
"id": 13008,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isV28OrHigherConverter",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12964,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12963,
"mutability": "mutable",
"name": "_converter",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13008,
"src": "12434:21:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
},
"typeName": {
"contractScope": null,
"id": 12962,
"name": "IConverter",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13340,
"src": "12434:10:12",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IConverter_$13340",
"typeString": "contract IConverter"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "12433:23:12"
},
"returnParameters": {
"id": 12967,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 12966,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 13008,
"src": "12480:4:12",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 12965,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "12480:4:12",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "12479:6:12"
},
"scope": 13009,
"src": "12402:420:12",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
}
],
"scope": 13010,
"src": "1251:11574:12"
}
],
"src": "52:12775:12"
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.2.3",
"updatedAt": "2020-10-20T08:24:47.737Z",
"devdoc": {
"details": "Converter Upgrader The converter upgrader contract allows upgrading an older converter contract (0.4 and up) to the latest version. To begin the upgrade process, simply execute the 'upgrade' function. At the end of the process, the ownership of the newly upgraded converter will be transferred back to the original owner and the original owner will need to execute the 'acceptOwnership' function. The address of the new converter is available in the ConverterUpgrade event. Note that for older converters that don't yet have the 'upgrade' function, ownership should first be transferred manually to the ConverterUpgrader contract using the 'transferOwnership' function and then the upgrader 'upgrade' function should be executed directly.",
"events": {
"ConverterOwned(address,address)": {
"details": "triggered when the contract accept a converter ownership",
"params": {
"_converter": "converter address",
"_owner": "new owner - local upgrader address"
}
},
"ConverterUpgrade(address,address)": {
"details": "triggered when the upgrading process is done",
"params": {
"_newConverter": "new converter address",
"_oldConverter": "old converter address"
}
}
},
"kind": "dev",
"methods": {
"acceptOwnership()": {
"details": "used by a new owner to accept an ownership transfer"
},
"constructor": {
"details": "initializes a new ConverterUpgrader instance",
"params": {
"_registry": "address of a contract registry contract"
}
},
"restoreRegistry()": {
"details": "restores the previous contract-registry"
},
"restrictRegistryUpdate(bool)": {
"details": "restricts the permission to update the contract-registry",
"params": {
"_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only"
}
},
"transferOwnership(address)": {
"details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner",
"params": {
"_newOwner": "new contract owner"
}
},
"updateRegistry()": {
"details": "updates to the new contract-registry"
},
"upgrade(bytes32)": {
"details": "upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success. can only be called by a converter",
"params": {
"_version": "old converter version"
}
},
"upgrade(uint16)": {
"details": "upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success. can only be called by a converter",
"params": {
"_version": "old converter version"
}
},
"upgradeOld(address,bytes32)": {
"details": "upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success.",
"params": {
"_converter": "old converter contract address",
"_version": "old converter version"
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}