{ "contractName": "XTransferRerouter", "abi": [ { "inputs": [ { "internalType": "bool", "name": "_reroutingEnabled", "type": "bool" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "_prevOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "_newOwner", "type": "address" } ], "name": "OwnerUpdate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "_txId", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "_toBlockchain", "type": "bytes32" }, { "indexed": false, "internalType": "bytes32", "name": "_to", "type": "bytes32" } ], "name": "TxReroute", "type": "event" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "newOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "reroutingEnabled", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bool", "name": "_enable", "type": "bool" } ], "name": "enableRerouting", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_txId", "type": "uint256" }, { "internalType": "bytes32", "name": "_blockchain", "type": "bytes32" }, { "internalType": "bytes32", "name": "_to", "type": "bytes32" } ], "name": "rerouteTx", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_reroutingEnabled\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_txId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_toBlockchain\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_to\",\"type\":\"bytes32\"}],\"name\":\"TxReroute\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableRerouting\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_txId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_blockchain\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_to\",\"type\":\"bytes32\"}],\"name\":\"rerouteTx\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reroutingEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"constructor\":{\"details\":\"initializes a new XTransferRerouter instance\",\"params\":{\"_reroutingEnabled\":\"intializes transactions routing to enabled/disabled\"}},\"enableRerouting(bool)\":{\"details\":\"allows the owner to disable/enable rerouting\",\"params\":{\"_enable\":\"true to enable, false to disable\"}},\"rerouteTx(uint256,bytes32,bytes32)\":{\"details\":\"allows a user to reroute a transaction to a new blockchain/target address\",\"params\":{\"_blockchain\":\"the new blockchain name\",\"_to\":\"the new target address/account\",\"_txId\":\"the original transaction id\"}},\"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\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/XTransferRerouter.sol\":\"XTransferRerouter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/XTransferRerouter.sol\":{\"keccak256\":\"0xe1015787e35567d8a83b948882f8aec6d9f9644686697ddc140bd1884dcc7e8d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8628d252dab643cede8df32cbf28a9ae677a6f391f209098ae3f56b310f5141c\",\"dweb:/ipfs/QmdvQaVbhe77mWpFdi8XgA8uTempNNuWatBPASg1PgyfpC\"]},\"/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/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405161045c38038061045c8339818101604052602081101561003357600080fd5b5051600080546001600160a01b0319163317905560018054911515600160a01b0260ff60a01b199092169190911790556103ea806100726000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063d4ee1d901161005b578063d4ee1d90146100cf578063e3db16f7146100d7578063edd63c3514610100578063f2fde38b1461011c5761007d565b806379ba5097146100825780638da5cb5b1461008c578063a3ebe71c146100b0575b600080fd5b61008a610142565b005b6100946101f9565b604080516001600160a01b039092168252519081900360200190f35b61008a600480360360208110156100c657600080fd5b50351515610208565b61009461022e565b61008a600480360360608110156100ed57600080fd5b508035906020810135906040013561023d565b610108610284565b604080519115158252519081900360200190f35b61008a6004803603602081101561013257600080fd5b50356001600160a01b0316610294565b6001546001600160a01b03163314610195576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b610210610312565b60018054911515600160a01b0260ff60a01b19909216919091179055565b6001546001600160a01b031681565b610245610367565b6040805183815260208101839052815185927fb5c80f971fb729e469ffa874c60425659ce82cb4adcfba9731af35ef87b6e619928290030190a2505050565b600154600160a01b900460ff1681565b61029c610312565b6000546001600160a01b03828116911614156102f0576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610365576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b600154600160a01b900460ff16610365576040805162461bcd60e51b815260206004820152600c60248201526b11549497d11254d05093115160a21b604482015290519081900360640190fdfea2646970667358221220bafe2fbc8a50577c276042361df9106b17a0c85a7c9d3ed188a92800e53cd7cd64736f6c634300060c0033", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063d4ee1d901161005b578063d4ee1d90146100cf578063e3db16f7146100d7578063edd63c3514610100578063f2fde38b1461011c5761007d565b806379ba5097146100825780638da5cb5b1461008c578063a3ebe71c146100b0575b600080fd5b61008a610142565b005b6100946101f9565b604080516001600160a01b039092168252519081900360200190f35b61008a600480360360208110156100c657600080fd5b50351515610208565b61009461022e565b61008a600480360360608110156100ed57600080fd5b508035906020810135906040013561023d565b610108610284565b604080519115158252519081900360200190f35b61008a6004803603602081101561013257600080fd5b50356001600160a01b0316610294565b6001546001600160a01b03163314610195576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b610210610312565b60018054911515600160a01b0260ff60a01b19909216919091179055565b6001546001600160a01b031681565b610245610367565b6040805183815260208101839052815185927fb5c80f971fb729e469ffa874c60425659ce82cb4adcfba9731af35ef87b6e619928290030190a2505050565b600154600160a01b900460ff1681565b61029c610312565b6000546001600160a01b03828116911614156102f0576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610365576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b600154600160a01b900460ff16610365576040805162461bcd60e51b815260206004820152600c60248201526b11549497d11254d05093115160a21b604482015290519081900360640190fdfea2646970667358221220bafe2fbc8a50577c276042361df9106b17a0c85a7c9d3ed188a92800e53cd7cd64736f6c634300060c0033", "immutableReferences": {}, "sourceMap": "111:1513:4:-:0;;;528:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;528:98:4;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;;582:36:4;;;;;-1:-1:-1;;;582:36:4;-1:-1:-1;;;;582:36:4;;;;;;;;;111:1513;;;;;;", "deployedSourceMap": "111:1513:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1422:217:57;;;:::i;:::-;;219:29;;;:::i;:::-;;;;-1:-1:-1;;;;;219:29:57;;;;;;;;;;;;;;779:101:4;;;;;;;;;;;;;;;;-1:-1:-1;779:101:4;;;;:::i;255:23:57:-;;;:::i;1471:150:4:-;;;;;;;;;;;;;;;;-1:-1:-1;1471:150:4;;;;;;;;;;;;:::i;154:28::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;1164:167:57;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;1422:217::-;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;219:29::-;;;-1:-1:-1;;;;;219:29:57;;:::o;779:101:4:-;726:12:57;:10;:12::i;:::-;846:16:4::1;:26:::0;;;::::1;;-1:-1:-1::0;;;846:26:4::1;-1:-1:-1::0;;;;846:26:4;;::::1;::::0;;;::::1;::::0;;779:101::o;255:23:57:-;;;-1:-1:-1;;;;;255:23:57;;:::o;1471:150:4:-;978:19;:17;:19::i;:::-;1579:34:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;1589:5;;1579:34:::1;::::0;;;;;;::::1;1471:150:::0;;;:::o;154:28::-;;;-1:-1:-1;;;154:28:4;;;;;:::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;1072:103:4:-;1134:16;;-1:-1:-1;;;1134:16:4;;;;1126:41;;;;;-1:-1:-1;;;1126:41:4;;;;;;;;;;;;-1:-1:-1;;;1126:41:4;;;;;;;;;;;;;", "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"../utility/Owned.sol\";\r\n\r\ncontract XTransferRerouter is Owned {\r\n bool public reroutingEnabled;\r\n\r\n // triggered when a rerouteTx is called\r\n event TxReroute(\r\n uint256 indexed _txId,\r\n bytes32 _toBlockchain,\r\n bytes32 _to\r\n );\r\n\r\n /**\r\n * @dev initializes a new XTransferRerouter instance\r\n *\r\n * @param _reroutingEnabled intializes transactions routing to enabled/disabled\r\n */\r\n constructor(bool _reroutingEnabled) public {\r\n reroutingEnabled = _reroutingEnabled;\r\n }\r\n /**\r\n * @dev allows the owner to disable/enable rerouting\r\n *\r\n * @param _enable true to enable, false to disable\r\n */\r\n function enableRerouting(bool _enable) public ownerOnly {\r\n reroutingEnabled = _enable;\r\n }\r\n\r\n // allows execution only when rerouting enabled\r\n modifier reroutingAllowed {\r\n _reroutingAllowed();\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _reroutingAllowed() internal view {\r\n require(reroutingEnabled, \"ERR_DISABLED\");\r\n }\r\n\r\n /**\r\n * @dev allows a user to reroute a transaction to a new blockchain/target address\r\n *\r\n * @param _txId the original transaction id\r\n * @param _blockchain the new blockchain name\r\n * @param _to the new target address/account\r\n */\r\n function rerouteTx(uint256 _txId, bytes32 _blockchain, bytes32 _to) public reroutingAllowed {\r\n emit TxReroute(_txId, _blockchain, _to);\r\n }\r\n}\r\n", "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/XTransferRerouter.sol", "ast": { "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/XTransferRerouter.sol", "exportedSymbols": { "XTransferRerouter": [ 3522 ] }, "id": 3523, "license": "SEE LICENSE IN LICENSE", "nodeType": "SourceUnit", "nodes": [ { "id": 3449, "literals": [ "solidity", "0.6", ".12" ], "nodeType": "PragmaDirective", "src": "52:23:4" }, { "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", "file": "../utility/Owned.sol", "id": 3450, "nodeType": "ImportDirective", "scope": 3523, "sourceUnit": 21819, "src": "77:30:4", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 3451, "name": "Owned", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 21818, "src": "141:5:4", "typeDescriptions": { "typeIdentifier": "t_contract$_Owned_$21818", "typeString": "contract Owned" } }, "id": 3452, "nodeType": "InheritanceSpecifier", "src": "141:5:4" } ], "contractDependencies": [ 21818, 22847 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 3522, "linearizedBaseContracts": [ 3522, 21818, 22847 ], "name": "XTransferRerouter", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "edd63c35", "id": 3454, "mutability": "mutable", "name": "reroutingEnabled", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3522, "src": "154:28:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3453, "name": "bool", "nodeType": "ElementaryTypeName", "src": "154:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "public" }, { "anonymous": false, "documentation": null, "id": 3462, "name": "TxReroute", "nodeType": "EventDefinition", "parameters": { "id": 3461, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3456, "indexed": true, "mutability": "mutable", "name": "_txId", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3462, "src": "262:21:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3455, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "262:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3458, "indexed": false, "mutability": "mutable", "name": "_toBlockchain", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3462, "src": "294:21:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 3457, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "294:7:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3460, "indexed": false, "mutability": "mutable", "name": "_to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3462, "src": "326:11:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 3459, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "326:7:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "251:93:4" }, "src": "236:109:4" }, { "body": { "id": 3472, "nodeType": "Block", "src": "571:55:4", "statements": [ { "expression": { "argumentTypes": null, "id": 3470, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 3468, "name": "reroutingEnabled", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3454, "src": "582:16:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 3469, "name": "_reroutingEnabled", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3465, "src": "601:17:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "582:36:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3471, "nodeType": "ExpressionStatement", "src": "582:36:4" } ] }, "documentation": { "id": 3463, "nodeType": "StructuredDocumentation", "src": "353:169:4", "text": " @dev initializes a new XTransferRerouter instance\n @param _reroutingEnabled intializes transactions routing to enabled/disabled" }, "id": 3473, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3466, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3465, "mutability": "mutable", "name": "_reroutingEnabled", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3473, "src": "540:22:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3464, "name": "bool", "nodeType": "ElementaryTypeName", "src": "540:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "539:24:4" }, "returnParameters": { "id": 3467, "nodeType": "ParameterList", "parameters": [], "src": "571:0:4" }, "scope": 3522, "src": "528:98:4", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 3485, "nodeType": "Block", "src": "835:45:4", "statements": [ { "expression": { "argumentTypes": null, "id": 3483, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 3481, "name": "reroutingEnabled", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3454, "src": "846:16:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 3482, "name": "_enable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3476, "src": "865:7:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "846:26:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3484, "nodeType": "ExpressionStatement", "src": "846:26:4" } ] }, "documentation": { "id": 3474, "nodeType": "StructuredDocumentation", "src": "632:141:4", "text": " @dev allows the owner to disable/enable rerouting\n @param _enable true to enable, false to disable" }, "functionSelector": "a3ebe71c", "id": 3486, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 3479, "modifierName": { "argumentTypes": null, "id": 3478, "name": "ownerOnly", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21754, "src": "825:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "825:9:4" } ], "name": "enableRerouting", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3477, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3476, "mutability": "mutable", "name": "_enable", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3486, "src": "804:12:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3475, "name": "bool", "nodeType": "ElementaryTypeName", "src": "804:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "803:14:4" }, "returnParameters": { "id": 3480, "nodeType": "ParameterList", "parameters": [], "src": "835:0:4" }, "scope": 3522, "src": "779:101:4", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 3492, "nodeType": "Block", "src": "967:50:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 3488, "name": "_reroutingAllowed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3502, "src": "978:17:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$__$", "typeString": "function () view" } }, "id": 3489, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "978:19:4", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3490, "nodeType": "ExpressionStatement", "src": "978:19:4" }, { "id": 3491, "nodeType": "PlaceholderStatement", "src": "1008:1:4" } ] }, "documentation": null, "id": 3493, "name": "reroutingAllowed", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 3487, "nodeType": "ParameterList", "parameters": [], "src": "967:0:4" }, "src": "941:76:4", "virtual": false, "visibility": "internal" }, { "body": { "id": 3501, "nodeType": "Block", "src": "1115:60:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3497, "name": "reroutingEnabled", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3454, "src": "1134:16:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4552525f44495341424c4544", "id": 3498, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1152:14:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", "typeString": "literal_string \"ERR_DISABLED\"" }, "value": "ERR_DISABLED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", "typeString": "literal_string \"ERR_DISABLED\"" } ], "id": 3496, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1126:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 3499, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1126:41:4", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3500, "nodeType": "ExpressionStatement", "src": "1126:41:4" } ] }, "documentation": null, "id": 3502, "implemented": true, "kind": "function", "modifiers": [], "name": "_reroutingAllowed", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3494, "nodeType": "ParameterList", "parameters": [], "src": "1098:2:4" }, "returnParameters": { "id": 3495, "nodeType": "ParameterList", "parameters": [], "src": "1115:0:4" }, "scope": 3522, "src": "1072:103:4", "stateMutability": "view", "virtual": false, "visibility": "internal" }, { "body": { "id": 3520, "nodeType": "Block", "src": "1563:58:4", "statements": [ { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3515, "name": "_txId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3505, "src": "1589:5:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 3516, "name": "_blockchain", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3507, "src": "1596:11:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "argumentTypes": null, "id": 3517, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3509, "src": "1609:3:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 3514, "name": "TxReroute", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3462, "src": "1579:9:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$__$", "typeString": "function (uint256,bytes32,bytes32)" } }, "id": 3518, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1579:34:4", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3519, "nodeType": "EmitStatement", "src": "1574:39:4" } ] }, "documentation": { "id": 3503, "nodeType": "StructuredDocumentation", "src": "1183:282:4", "text": " @dev allows a user to reroute a transaction to a new blockchain/target address\n @param _txId the original transaction id\n @param _blockchain the new blockchain name\n @param _to the new target address/account" }, "functionSelector": "e3db16f7", "id": 3521, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 3512, "modifierName": { "argumentTypes": null, "id": 3511, "name": "reroutingAllowed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3493, "src": "1546:16:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1546:16:4" } ], "name": "rerouteTx", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3510, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3505, "mutability": "mutable", "name": "_txId", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3521, "src": "1490:13:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3504, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1490:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3507, "mutability": "mutable", "name": "_blockchain", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3521, "src": "1505:19:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 3506, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1505:7:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3509, "mutability": "mutable", "name": "_to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3521, "src": "1526:11:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 3508, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1526:7:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "1489:49:4" }, "returnParameters": { "id": 3513, "nodeType": "ParameterList", "parameters": [], "src": "1563:0:4" }, "scope": 3522, "src": "1471:150:4", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" } ], "scope": 3523, "src": "111:1513:4" } ], "src": "52:1574:4" }, "legacyAST": { "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/XTransferRerouter.sol", "exportedSymbols": { "XTransferRerouter": [ 3522 ] }, "id": 3523, "license": "SEE LICENSE IN LICENSE", "nodeType": "SourceUnit", "nodes": [ { "id": 3449, "literals": [ "solidity", "0.6", ".12" ], "nodeType": "PragmaDirective", "src": "52:23:4" }, { "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", "file": "../utility/Owned.sol", "id": 3450, "nodeType": "ImportDirective", "scope": 3523, "sourceUnit": 21819, "src": "77:30:4", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 3451, "name": "Owned", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 21818, "src": "141:5:4", "typeDescriptions": { "typeIdentifier": "t_contract$_Owned_$21818", "typeString": "contract Owned" } }, "id": 3452, "nodeType": "InheritanceSpecifier", "src": "141:5:4" } ], "contractDependencies": [ 21818, 22847 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 3522, "linearizedBaseContracts": [ 3522, 21818, 22847 ], "name": "XTransferRerouter", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "edd63c35", "id": 3454, "mutability": "mutable", "name": "reroutingEnabled", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3522, "src": "154:28:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3453, "name": "bool", "nodeType": "ElementaryTypeName", "src": "154:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "public" }, { "anonymous": false, "documentation": null, "id": 3462, "name": "TxReroute", "nodeType": "EventDefinition", "parameters": { "id": 3461, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3456, "indexed": true, "mutability": "mutable", "name": "_txId", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3462, "src": "262:21:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3455, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "262:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3458, "indexed": false, "mutability": "mutable", "name": "_toBlockchain", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3462, "src": "294:21:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 3457, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "294:7:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3460, "indexed": false, "mutability": "mutable", "name": "_to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3462, "src": "326:11:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 3459, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "326:7:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "251:93:4" }, "src": "236:109:4" }, { "body": { "id": 3472, "nodeType": "Block", "src": "571:55:4", "statements": [ { "expression": { "argumentTypes": null, "id": 3470, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 3468, "name": "reroutingEnabled", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3454, "src": "582:16:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 3469, "name": "_reroutingEnabled", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3465, "src": "601:17:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "582:36:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3471, "nodeType": "ExpressionStatement", "src": "582:36:4" } ] }, "documentation": { "id": 3463, "nodeType": "StructuredDocumentation", "src": "353:169:4", "text": " @dev initializes a new XTransferRerouter instance\n @param _reroutingEnabled intializes transactions routing to enabled/disabled" }, "id": 3473, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3466, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3465, "mutability": "mutable", "name": "_reroutingEnabled", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3473, "src": "540:22:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3464, "name": "bool", "nodeType": "ElementaryTypeName", "src": "540:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "539:24:4" }, "returnParameters": { "id": 3467, "nodeType": "ParameterList", "parameters": [], "src": "571:0:4" }, "scope": 3522, "src": "528:98:4", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 3485, "nodeType": "Block", "src": "835:45:4", "statements": [ { "expression": { "argumentTypes": null, "id": 3483, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 3481, "name": "reroutingEnabled", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3454, "src": "846:16:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 3482, "name": "_enable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3476, "src": "865:7:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "846:26:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3484, "nodeType": "ExpressionStatement", "src": "846:26:4" } ] }, "documentation": { "id": 3474, "nodeType": "StructuredDocumentation", "src": "632:141:4", "text": " @dev allows the owner to disable/enable rerouting\n @param _enable true to enable, false to disable" }, "functionSelector": "a3ebe71c", "id": 3486, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 3479, "modifierName": { "argumentTypes": null, "id": 3478, "name": "ownerOnly", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21754, "src": "825:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "825:9:4" } ], "name": "enableRerouting", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3477, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3476, "mutability": "mutable", "name": "_enable", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3486, "src": "804:12:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3475, "name": "bool", "nodeType": "ElementaryTypeName", "src": "804:4:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "803:14:4" }, "returnParameters": { "id": 3480, "nodeType": "ParameterList", "parameters": [], "src": "835:0:4" }, "scope": 3522, "src": "779:101:4", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 3492, "nodeType": "Block", "src": "967:50:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 3488, "name": "_reroutingAllowed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3502, "src": "978:17:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$__$", "typeString": "function () view" } }, "id": 3489, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "978:19:4", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3490, "nodeType": "ExpressionStatement", "src": "978:19:4" }, { "id": 3491, "nodeType": "PlaceholderStatement", "src": "1008:1:4" } ] }, "documentation": null, "id": 3493, "name": "reroutingAllowed", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 3487, "nodeType": "ParameterList", "parameters": [], "src": "967:0:4" }, "src": "941:76:4", "virtual": false, "visibility": "internal" }, { "body": { "id": 3501, "nodeType": "Block", "src": "1115:60:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3497, "name": "reroutingEnabled", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3454, "src": "1134:16:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4552525f44495341424c4544", "id": 3498, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1152:14:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", "typeString": "literal_string \"ERR_DISABLED\"" }, "value": "ERR_DISABLED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", "typeString": "literal_string \"ERR_DISABLED\"" } ], "id": 3496, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1126:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 3499, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1126:41:4", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3500, "nodeType": "ExpressionStatement", "src": "1126:41:4" } ] }, "documentation": null, "id": 3502, "implemented": true, "kind": "function", "modifiers": [], "name": "_reroutingAllowed", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3494, "nodeType": "ParameterList", "parameters": [], "src": "1098:2:4" }, "returnParameters": { "id": 3495, "nodeType": "ParameterList", "parameters": [], "src": "1115:0:4" }, "scope": 3522, "src": "1072:103:4", "stateMutability": "view", "virtual": false, "visibility": "internal" }, { "body": { "id": 3520, "nodeType": "Block", "src": "1563:58:4", "statements": [ { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 3515, "name": "_txId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3505, "src": "1589:5:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 3516, "name": "_blockchain", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3507, "src": "1596:11:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "argumentTypes": null, "id": 3517, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3509, "src": "1609:3:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 3514, "name": "TxReroute", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3462, "src": "1579:9:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$__$", "typeString": "function (uint256,bytes32,bytes32)" } }, "id": 3518, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1579:34:4", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3519, "nodeType": "EmitStatement", "src": "1574:39:4" } ] }, "documentation": { "id": 3503, "nodeType": "StructuredDocumentation", "src": "1183:282:4", "text": " @dev allows a user to reroute a transaction to a new blockchain/target address\n @param _txId the original transaction id\n @param _blockchain the new blockchain name\n @param _to the new target address/account" }, "functionSelector": "e3db16f7", "id": 3521, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 3512, "modifierName": { "argumentTypes": null, "id": 3511, "name": "reroutingAllowed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3493, "src": "1546:16:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1546:16:4" } ], "name": "rerouteTx", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 3510, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3505, "mutability": "mutable", "name": "_txId", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3521, "src": "1490:13:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3504, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1490:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3507, "mutability": "mutable", "name": "_blockchain", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3521, "src": "1505:19:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 3506, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1505:7:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3509, "mutability": "mutable", "name": "_to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 3521, "src": "1526:11:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 3508, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1526:7:4", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "1489:49:4" }, "returnParameters": { "id": 3513, "nodeType": "ParameterList", "parameters": [], "src": "1563:0:4" }, "scope": 3522, "src": "1471:150:4", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" } ], "scope": 3523, "src": "111:1513:4" } ], "src": "52:1574:4" }, "compiler": { "name": "solc", "version": "0.6.12+commit.27d51765.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.2.3", "updatedAt": "2020-10-20T08:24:47.669Z", "devdoc": { "kind": "dev", "methods": { "acceptOwnership()": { "details": "used by a new owner to accept an ownership transfer" }, "constructor": { "details": "initializes a new XTransferRerouter instance", "params": { "_reroutingEnabled": "intializes transactions routing to enabled/disabled" } }, "enableRerouting(bool)": { "details": "allows the owner to disable/enable rerouting", "params": { "_enable": "true to enable, false to disable" } }, "rerouteTx(uint256,bytes32,bytes32)": { "details": "allows a user to reroute a transaction to a new blockchain/target address", "params": { "_blockchain": "the new blockchain name", "_to": "the new target address/account", "_txId": "the original transaction id" } }, "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" } } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }