{
  "contractName": "DeployForeignBridge",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "contract Avatar",
          "name": "_avatar",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "_factory",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "_foreignBridge",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "_foreignValidators",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "_foreignToken",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "_blockNumber",
          "type": "uint256"
        }
      ],
      "name": "ForeignBridgeDeployed",
      "type": "event"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "factory",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [],
      "name": "setBridge",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract Avatar\",\"name\":\"_avatar\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_foreignBridge\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_foreignValidators\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_foreignToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"ForeignBridgeDeployed\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"setBridge\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/DeployForeignBridge.sol\":\"DeployForeignBridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/DeployForeignBridge.sol\":{\"keccak256\":\"0xa06394769149b3e2a84578db5ca9136783ac172548d586d00ba02771a8da0382\",\"urls\":[\"bzz-raw://017dc9f5b7e63108b9d43f0289c0d0389b7b484da6643f09789ad48e8d3bdf42\",\"dweb:/ipfs/QmRcMR6VvVkauSVcsmpjsUFF6ckMy5GaxSWoEF2k2Pfzbp\"]},\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/SchemeGuard.sol\":{\"keccak256\":\"0x32e1b2a172e2c22a6aa757bfcb0722cc67f64c5c2e48df3dec2737903516d565\",\"urls\":[\"bzz-raw://bee57a8eba08348e93a0c18f3ab534e67865c0fa27afe27f5cf234bd5f248915\",\"dweb:/ipfs/Qmd8aveHWcUkYWMyJrJRZPyVXj8MAMBfpBFo6g4Z2VJeo3\"]},\"@daostack/arc/contracts/controller/Avatar.sol\":{\"keccak256\":\"0x4e4fb9d3bc21f42fbfc6a01e9f8aa483a59e9f447b0d604f55b587a81ec09ef4\",\"urls\":[\"bzz-raw://9d3c1c7575cf6075ea1d89921f09b9b8e322b208dacaf0446cd4f64506c999f0\",\"dweb:/ipfs/QmVGDDHAR2ByuQpbgV7BBKXGEAcbaWvejpEZYzHgaagBFK\"]},\"@daostack/arc/contracts/controller/ControllerInterface.sol\":{\"keccak256\":\"0x933e92612c90f292c7b59908958b003f1a13d90b97bed0572b566353c20974dc\",\"urls\":[\"bzz-raw://ce1fcf85b744fcce2dbd4205e3943e9b4ec36a5f0330d4bbf61e65f1a3e0e470\",\"dweb:/ipfs/QmUWiLkBDdekhpy93nTzBtxDHL6yNh6sTUM9G8VbsHcBzy\"]},\"@daostack/arc/contracts/controller/DAOToken.sol\":{\"keccak256\":\"0x9b213e4e3ceeffcfc1c962a43b70b8d763d8091a2dd713fc1989b97bb68786e6\",\"urls\":[\"bzz-raw://51d1d6e85fd90f45395a16b7a3c703c4636e836041f2a13f806e4222ef2e59c1\",\"dweb:/ipfs/QmQjeCeFf7TJzsYjT5scyZUDDixBA8Yy8YppgBuxcKPDnP\"]},\"@daostack/arc/contracts/globalConstraints/GlobalConstraintInterface.sol\":{\"keccak256\":\"0xc006c4591ec10b845a56e13f6791db2c428610953034686d52b2a934b6c8f36f\",\"urls\":[\"bzz-raw://19495cd88280e54d7ddcd043ffeff75e6d3777a0c42debcd61cae448e9497ea0\",\"dweb:/ipfs/QmYxWz7CgFmmddrcVXJKfob5Ktwykc2imNVUwLSR5WR8bJ\"]},\"@daostack/arc/contracts/libs/SafeERC20.sol\":{\"keccak256\":\"0xf6727d432f67046145b078f40c1cc4f6be7b0d12a6678ecaf457edf7550d244c\",\"urls\":[\"bzz-raw://5dba7734c4fed446c084a707761cbc66ba22b8b93ef53c8d4a22a76b6e271690\",\"dweb:/ipfs/QmP2VpPKUqLh4ZZs6LaxHVpCN1zCmiorygL9bMub4mbYCw\"]},\"@daostack/infra/contracts/Reputation.sol\":{\"keccak256\":\"0x3d226dac0fe7d758f0287fb28bc25fcec1f69d19888ae3a550fa49856d61c482\",\"urls\":[\"bzz-raw://8856852c8fe0ba1c9aab326f0a9a6e7f31a238de2778fa5188e6fc399f7eb352\",\"dweb:/ipfs/QmVH4ppR9Dk7v8yxaSgeArdMv9gBBVoQxEf4E3UsqQ4rY2\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzz-raw://1eb493553b27efd46c231a836a83ce50d215639feb97b4aac9f301d0fd034ff5\",\"dweb:/ipfs/QmbMdvSXcqGKxeeYvzF3VrWpoHQyVzMXBhzhAokF2Gdymv\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0x980de387a1a020a498f53d00f89fecebb12c949a17e8f160093c0303ede2b786\",\"urls\":[\"bzz-raw://f07a2c393caa85f62f0aaa461e3edd50aa59371d4209778ba0558d7f8b4b856c\",\"dweb:/ipfs/QmeN3ZiYGSjCnQFeYaJNgoXjF9eDue1g3e9pqManRkeBtV\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xba431353cb4fe70777ac026231eb5468e41aa1e81240a2b8136917acc5fff4dc\",\"urls\":[\"bzz-raw://f40c91ca270bdc9b156f339081a0fc2bbcf73cf5f62b8c73ba555df753ff6619\",\"dweb:/ipfs/QmT8y2VVjGaFdGphpcXrgvdPi2EgF9LuCDgJiJ89LvpFRV\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0xa3e68fd7f987c8fbdaf4867d428a69a15f3cf2f69709a5b0a0fbef750b0e6fbc\",\"urls\":[\"bzz-raw://50b1ff986d3b2793850a66c8429d9886fdfb134b1509b3e98714e3e2a71e24f5\",\"dweb:/ipfs/QmSQBYPeY9tbR3ciGRNQqvcWKnNiuxtVMq2MsPWpLwuGGm\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzz-raw://ee762ff5b7746e41d27dcbcea00c7a3034b58adb1b45ddadddb5b721aff450df\",\"dweb:/ipfs/QmdxqtgEFZjHCoiYyz6pUAQ5iBm7As25jcyEbZoTaAgyDa\"]},\"openzeppelin-solidity/contracts/utils/Address.sol\":{\"keccak256\":\"0x5c731061b804fa256fc8c05150eafe5d20b6bb94541a8f187912bf84f7033f34\",\"urls\":[\"bzz-raw://a3c2d9f046beebab7fb41b1b124a6a124a36f510f7c67365861402ac831bdc71\",\"dweb:/ipfs/QmUtASRgitregbKH83anopLtF9vFQe3BKeAjhUa6F7t9YV\"]}},\"version\":1}",
  "bytecode": "0x608060405234801561001057600080fd5b5060405161050e38038061050e8339818101604052604081101561003357600080fd5b5080516020909101516001600160a01b038116610097576040805162461bcd60e51b815260206004820152601860248201527f466163746f7279206d757374206e6f74206265206e756c6c0000000000000000604482015290519081900360640190fd5b600080546001600160a01b038084166001600160a01b031992831617909255600180548584169216919091179081905560408051638da5cb5b60e01b815290519190921691638da5cb5b916004808301926020929190829003018186803b15801561010157600080fd5b505afa158015610115573d6000803e3d6000fd5b505050506040513d602081101561012b57600080fd5b5051600280546001600160a01b0319166001600160a01b03909216919091179055506103b090508061015e6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063b886b2b01461003b578063c45a015514610045575b600080fd5b610043610069565b005b61004d610332565b604080516001600160a01b039092168252519081900360200190f35b6002546000805460015460408051631c2eb17b60e31b8152905193946001600160a01b039081169463d1b7089a948216939091169163e1758bd8916004808301926020929190829003018186803b1580156100c357600080fd5b505afa1580156100d7573d6000803e3d6000fd5b505050506040513d60208110156100ed57600080fd5b5051604080516001600160a01b03928316602480830191909152825180830382018152604492830184526020810180516001600160e01b0316631b606b2360e31b178152600154945160e089901b6001600160e01b03191681528787166004820190815295909616938601849052600060648701819052608093870193845282516084880152825192969495909490939260a49091019190808383885b838110156101a257818101518382015260200161018a565b50505050905090810190601f1680156101cf5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156101f157600080fd5b505af1158015610205573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561022e57600080fd5b81516020830180516040519294929383019291908464010000000082111561025557600080fd5b90830190602082018581111561026a57600080fd5b825164010000000081118282018810171561028457600080fd5b82525081516020918201929091019080838360005b838110156102b1578181015183820152602001610299565b50505050905090810190601f1680156102de5780820380516001836020036101000a031916815260200191505b50604052505050509050806103245760405162461bcd60e51b815260040180806020018281038252603a815260200180610342603a913960400191505060405180910390fd5b6001546001600160a01b0316ff5b6000546001600160a01b03168156fe43616c6c696e67206465706c6f79466f726569676e42726964676520696e20466f726569676e427269646765466163746f7279206661696c6564a265627a7a7231582063a51883306ba99cb3b226c55af4364efc1623d2336776ee797753181377f21b64736f6c63430005100032",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063b886b2b01461003b578063c45a015514610045575b600080fd5b610043610069565b005b61004d610332565b604080516001600160a01b039092168252519081900360200190f35b6002546000805460015460408051631c2eb17b60e31b8152905193946001600160a01b039081169463d1b7089a948216939091169163e1758bd8916004808301926020929190829003018186803b1580156100c357600080fd5b505afa1580156100d7573d6000803e3d6000fd5b505050506040513d60208110156100ed57600080fd5b5051604080516001600160a01b03928316602480830191909152825180830382018152604492830184526020810180516001600160e01b0316631b606b2360e31b178152600154945160e089901b6001600160e01b03191681528787166004820190815295909616938601849052600060648701819052608093870193845282516084880152825192969495909490939260a49091019190808383885b838110156101a257818101518382015260200161018a565b50505050905090810190601f1680156101cf5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156101f157600080fd5b505af1158015610205573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561022e57600080fd5b81516020830180516040519294929383019291908464010000000082111561025557600080fd5b90830190602082018581111561026a57600080fd5b825164010000000081118282018810171561028457600080fd5b82525081516020918201929091019080838360005b838110156102b1578181015183820152602001610299565b50505050905090810190601f1680156102de5780820380516001836020036101000a031916815260200191505b50604052505050509050806103245760405162461bcd60e51b815260040180806020018281038252603a815260200180610342603a913960400191505060405180910390fd5b6001546001600160a01b0316ff5b6000546001600160a01b03168156fe43616c6c696e67206465706c6f79466f726569676e42726964676520696e20466f726569676e427269646765466163746f7279206661696c6564a265627a7a7231582063a51883306ba99cb3b226c55af4364efc1623d2336776ee797753181377f21b64736f6c63430005100032",
  "sourceMap": "328:1423:9:-;;;899:241;8:9:-1;5:2;;;30:1;27;20:12;5:2;899:241:9;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;899:241:9;;;;;;;-1:-1:-1;;;;;970:22:9;;962:59;;;;;-1:-1:-1;;;962:59:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;1031:7;:18;;-1:-1:-1;;;;;1031:18:9;;;-1:-1:-1;;;;;;1031:18:9;;;;;;;;1059:16;;;;;;;;;;;;;;;1118:14;;;-1:-1:-1;;;1118:14:9;;;;:6;;;;;:12;;:14;;;;;;;;;;;;;;:6;:14;;;5:2:-1;;;;30:1;27;20:12;5:2;1118:14:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1118:14:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1118:14:9;1085:10;:48;;-1:-1:-1;;;;;;1085:48:9;-1:-1:-1;;;;;1085:48:9;;;;;;;;;-1:-1:-1;328:1423:9;;-1:-1:-1;328:1423:9;;-1:-1:-1;328:1423:9;;",
  "deployedSourceMap": "328:1423:9:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;328:1423:9;;;;;;;;;;;;;;;;;;;;;;;;1334:415;;;:::i;:::-;;666:22;;;:::i;:::-;;;;-1:-1:-1;;;;;666:22:9;;;;;;;;;;;;;;1334:415;1386:10;;1373:7;1422;;1386:10;1540:6;:20;;;-1:-1:-1;;;1540:20:9;;;;1373:7;;-1:-1:-1;;;;;1386:10:9;;;;:22;;1422:7;;;1540:6;;;;:18;;:20;;;;;;;;;;;;;;:6;:20;;;5:2:-1;;;;30:1;27;20:12;5:2;1540:20:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1540:20:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1540:20:9;1443:132;;;-1:-1:-1;;;;;1443:132:9;;;;;;;;;;;;;26:21:-1;;;22:32;;6:49;;1443:132:9;;;;;;1540:20;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;1589:6:9;;1386:234;;;;;;-1:-1:-1;;;;;;1386:234:9;;;;;;;;;;;;1589:6;;;;1386:234;;;;;;-1:-1:-1;1386:234:9;;;;;;;;;;;;;;;;;;;;;1443:132;;1589:6;;-1:-1:-1;;1386:234:9;;;;;;;;25:18:-1;1386:234:9;;25:18:-1;-1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1386:234:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1386:234:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1386:234:9;;;;;;39:16:-1;36:1;17:17;2:54;101:4;1386:234:9;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;;;5:11;;2:2;;;29:1;26;19:12;2:2;1386:234:9;;;;;;;;;;;;;;;;;;;19:11:-1;11:20;;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;1386:234:9;;420:4:-1;411:14;;;;1386:234:9;;;;;411:14:-1;1386:234:9;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1386:234:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1372:248;;;1638:2;1630:73;;;;-1:-1:-1;;;1630:73:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1734:6;;-1:-1:-1;;;;;1734:6:9;1713:29;666:22;;;-1:-1:-1;;;;;666:22:9;;:::o",
  "source": "pragma solidity >0.5.4;\n\nimport \"@daostack/arc/contracts/controller/Avatar.sol\";\nimport \"@daostack/arc/contracts/controller/ControllerInterface.sol\";\nimport \"./SchemeGuard.sol\";\n\n/* @title Scheme for deploying a token bridge on a foreign network using the fuseio bridge factory.\n * For more information see https://fuse.io/\n */\ncontract DeployForeignBridge {\n    /* Taken from fuse foreign bridge factory contract.\n     * Must be changed if changed on factory contract\n     */\n    event ForeignBridgeDeployed(\n        address indexed _foreignBridge,\n        address indexed _foreignValidators,\n        address _foreignToken,\n        uint256 _blockNumber\n    );\n\n    address public factory;\n    Avatar avatar;\n    ControllerInterface controller;\n\n    /* @dev constructor. Sets the factory address. Reverts if given address is null\n     * @param _factory The address of the bridge factory\n     */\n    constructor(Avatar _avatar, address _factory) public {\n        require(_factory != address(0), \"Factory must not be null\");\n        factory = _factory;\n        avatar = _avatar;\n        controller = ControllerInterface(avatar.owner());\n    }\n\n    /* @dev Deploys the foreign bridge on current network and then self-destructs, transferring any\n     * ether on the contract to the avatar. Reverts if scheme is not registered\n     */\n    function setBridge() public {\n        (bool ok, ) = controller.genericCall(\n            factory,\n            abi.encodeWithSignature(\n                \"deployForeignBridge(address)\",\n                address(avatar.nativeToken())\n            ),\n            avatar,\n            0\n        );\n        require(ok, \"Calling deployForeignBridge in ForeignBridgeFactory failed\");\n        selfdestruct(address(avatar));\n    }\n}\n",
  "sourcePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/DeployForeignBridge.sol",
  "ast": {
    "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/DeployForeignBridge.sol",
    "exportedSymbols": {
      "DeployForeignBridge": [
        2445
      ]
    },
    "id": 2446,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 2359,
        "literals": [
          "solidity",
          ">",
          "0.5",
          ".4"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:9"
      },
      {
        "absolutePath": "@daostack/arc/contracts/controller/Avatar.sol",
        "file": "@daostack/arc/contracts/controller/Avatar.sol",
        "id": 2360,
        "nodeType": "ImportDirective",
        "scope": 2446,
        "sourceUnit": 8542,
        "src": "25:55:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@daostack/arc/contracts/controller/ControllerInterface.sol",
        "file": "@daostack/arc/contracts/controller/ControllerInterface.sol",
        "id": 2361,
        "nodeType": "ImportDirective",
        "scope": 2446,
        "sourceUnit": 10231,
        "src": "81:68:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/SchemeGuard.sol",
        "file": "./SchemeGuard.sol",
        "id": 2362,
        "nodeType": "ImportDirective",
        "scope": 2446,
        "sourceUnit": 4183,
        "src": "150:27:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 2445,
        "linearizedBaseContracts": [
          2445
        ],
        "name": "DeployForeignBridge",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "anonymous": false,
            "documentation": null,
            "id": 2372,
            "name": "ForeignBridgeDeployed",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 2371,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2364,
                  "indexed": true,
                  "name": "_foreignBridge",
                  "nodeType": "VariableDeclaration",
                  "scope": 2372,
                  "src": "518:30:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2363,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "518:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2366,
                  "indexed": true,
                  "name": "_foreignValidators",
                  "nodeType": "VariableDeclaration",
                  "scope": 2372,
                  "src": "558:34:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2365,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "558:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2368,
                  "indexed": false,
                  "name": "_foreignToken",
                  "nodeType": "VariableDeclaration",
                  "scope": 2372,
                  "src": "602:21:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2367,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "602:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2370,
                  "indexed": false,
                  "name": "_blockNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 2372,
                  "src": "633:20:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2369,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "633:7:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "508:151:9"
            },
            "src": "481:179:9"
          },
          {
            "constant": false,
            "id": 2374,
            "name": "factory",
            "nodeType": "VariableDeclaration",
            "scope": 2445,
            "src": "666:22:9",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_address",
              "typeString": "address"
            },
            "typeName": {
              "id": 2373,
              "name": "address",
              "nodeType": "ElementaryTypeName",
              "src": "666:7:9",
              "stateMutability": "nonpayable",
              "typeDescriptions": {
                "typeIdentifier": "t_address",
                "typeString": "address"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 2376,
            "name": "avatar",
            "nodeType": "VariableDeclaration",
            "scope": 2445,
            "src": "694:13:9",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_Avatar_$8541",
              "typeString": "contract Avatar"
            },
            "typeName": {
              "contractScope": null,
              "id": 2375,
              "name": "Avatar",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 8541,
              "src": "694:6:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Avatar_$8541",
                "typeString": "contract Avatar"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 2378,
            "name": "controller",
            "nodeType": "VariableDeclaration",
            "scope": 2445,
            "src": "713:30:9",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_ControllerInterface_$10230",
              "typeString": "contract ControllerInterface"
            },
            "typeName": {
              "contractScope": null,
              "id": 2377,
              "name": "ControllerInterface",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 10230,
              "src": "713:19:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ControllerInterface_$10230",
                "typeString": "contract ControllerInterface"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2410,
              "nodeType": "Block",
              "src": "952:188:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 2390,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 2386,
                          "name": "_factory",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2382,
                          "src": "970:8:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 2388,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "990:1:9",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 2387,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "982:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 2389,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "982:10:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "src": "970:22:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "466163746f7279206d757374206e6f74206265206e756c6c",
                        "id": 2391,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "994:26:9",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_dd66b900ac570a0000d18bfb0b967614b578f0c4430d71a4383331d6ce7106ca",
                          "typeString": "literal_string \"Factory must not be null\""
                        },
                        "value": "Factory must not be null"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_dd66b900ac570a0000d18bfb0b967614b578f0c4430d71a4383331d6ce7106ca",
                          "typeString": "literal_string \"Factory must not be null\""
                        }
                      ],
                      "id": 2385,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18010,
                        18011
                      ],
                      "referencedDeclaration": 18011,
                      "src": "962:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 2392,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "962:59:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2393,
                  "nodeType": "ExpressionStatement",
                  "src": "962:59:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2396,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2394,
                      "name": "factory",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2374,
                      "src": "1031:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2395,
                      "name": "_factory",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2382,
                      "src": "1041:8:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "1031:18:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 2397,
                  "nodeType": "ExpressionStatement",
                  "src": "1031:18:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2400,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2398,
                      "name": "avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2376,
                      "src": "1059:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$8541",
                        "typeString": "contract Avatar"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2399,
                      "name": "_avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2380,
                      "src": "1068:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$8541",
                        "typeString": "contract Avatar"
                      }
                    },
                    "src": "1059:16:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$8541",
                      "typeString": "contract Avatar"
                    }
                  },
                  "id": 2401,
                  "nodeType": "ExpressionStatement",
                  "src": "1059:16:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2408,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2402,
                      "name": "controller",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2378,
                      "src": "1085:10:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ControllerInterface_$10230",
                        "typeString": "contract ControllerInterface"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 2404,
                              "name": "avatar",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2376,
                              "src": "1118:6:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Avatar_$8541",
                                "typeString": "contract Avatar"
                              }
                            },
                            "id": 2405,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "owner",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 17178,
                            "src": "1118:12:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                              "typeString": "function () view external returns (address)"
                            }
                          },
                          "id": 2406,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1118:14:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 2403,
                        "name": "ControllerInterface",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10230,
                        "src": "1098:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_ControllerInterface_$10230_$",
                          "typeString": "type(contract ControllerInterface)"
                        }
                      },
                      "id": 2407,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1098:35:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ControllerInterface_$10230",
                        "typeString": "contract ControllerInterface"
                      }
                    },
                    "src": "1085:48:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ControllerInterface_$10230",
                      "typeString": "contract ControllerInterface"
                    }
                  },
                  "id": 2409,
                  "nodeType": "ExpressionStatement",
                  "src": "1085:48:9"
                }
              ]
            },
            "documentation": null,
            "id": 2411,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2383,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2380,
                  "name": "_avatar",
                  "nodeType": "VariableDeclaration",
                  "scope": 2411,
                  "src": "911:14:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Avatar_$8541",
                    "typeString": "contract Avatar"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2379,
                    "name": "Avatar",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 8541,
                    "src": "911:6:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$8541",
                      "typeString": "contract Avatar"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2382,
                  "name": "_factory",
                  "nodeType": "VariableDeclaration",
                  "scope": 2411,
                  "src": "927:16:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2381,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "927:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "910:34:9"
            },
            "returnParameters": {
              "id": 2384,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "952:0:9"
            },
            "scope": 2445,
            "src": "899:241:9",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2443,
              "nodeType": "Block",
              "src": "1362:387:9",
              "statements": [
                {
                  "assignments": [
                    2415,
                    null
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2415,
                      "name": "ok",
                      "nodeType": "VariableDeclaration",
                      "scope": 2443,
                      "src": "1373:7:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 2414,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "1373:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    null
                  ],
                  "id": 2431,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2418,
                        "name": "factory",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2374,
                        "src": "1422:7:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "6465706c6f79466f726569676e427269646765286164647265737329",
                            "id": 2421,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "string",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1484:30:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_stringliteral_db035918df46c3207cf95921b76a0ad0d648e8b58d5345a2bd54694f4531fa07",
                              "typeString": "literal_string \"deployForeignBridge(address)\""
                            },
                            "value": "deployForeignBridge(address)"
                          },
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 2423,
                                    "name": "avatar",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2376,
                                    "src": "1540:6:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_Avatar_$8541",
                                      "typeString": "contract Avatar"
                                    }
                                  },
                                  "id": 2424,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "nativeToken",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 8277,
                                  "src": "1540:18:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_DAOToken_$10306_$",
                                    "typeString": "function () view external returns (contract DAOToken)"
                                  }
                                },
                                "id": 2425,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1540:20:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_DAOToken_$10306",
                                  "typeString": "contract DAOToken"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_DAOToken_$10306",
                                  "typeString": "contract DAOToken"
                                }
                              ],
                              "id": 2422,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "1532:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": "address"
                            },
                            "id": 2426,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1532:29:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_stringliteral_db035918df46c3207cf95921b76a0ad0d648e8b58d5345a2bd54694f4531fa07",
                              "typeString": "literal_string \"deployForeignBridge(address)\""
                            },
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 2419,
                            "name": "abi",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17994,
                            "src": "1443:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_abi",
                              "typeString": "abi"
                            }
                          },
                          "id": 2420,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "encodeWithSignature",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "1443:23:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
                            "typeString": "function (string memory) pure returns (bytes memory)"
                          }
                        },
                        "id": 2427,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1443:132:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2428,
                        "name": "avatar",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2376,
                        "src": "1589:6:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Avatar_$8541",
                          "typeString": "contract Avatar"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "30",
                        "id": 2429,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1609:1:9",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_contract$_Avatar_$8541",
                          "typeString": "contract Avatar"
                        },
                        {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2416,
                        "name": "controller",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2378,
                        "src": "1386:10:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ControllerInterface_$10230",
                          "typeString": "contract ControllerInterface"
                        }
                      },
                      "id": 2417,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "genericCall",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 10107,
                      "src": "1386:22:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_contract$_Avatar_$8541_$_t_uint256_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                        "typeString": "function (address,bytes memory,contract Avatar,uint256) external returns (bool,bytes memory)"
                      }
                    },
                    "id": 2430,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1386:234:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                      "typeString": "tuple(bool,bytes memory)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1372:248:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2433,
                        "name": "ok",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2415,
                        "src": "1638:2:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "43616c6c696e67206465706c6f79466f726569676e42726964676520696e20466f726569676e427269646765466163746f7279206661696c6564",
                        "id": 2434,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1642:60:9",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_8a7540907cc61ed6ad57d464f14a1ca582734abe0bbb7f54f5ec6e66acfb56b6",
                          "typeString": "literal_string \"Calling deployForeignBridge in ForeignBridgeFactory failed\""
                        },
                        "value": "Calling deployForeignBridge in ForeignBridgeFactory failed"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_8a7540907cc61ed6ad57d464f14a1ca582734abe0bbb7f54f5ec6e66acfb56b6",
                          "typeString": "literal_string \"Calling deployForeignBridge in ForeignBridgeFactory failed\""
                        }
                      ],
                      "id": 2432,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18010,
                        18011
                      ],
                      "referencedDeclaration": 18011,
                      "src": "1630:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 2435,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1630:73:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2436,
                  "nodeType": "ExpressionStatement",
                  "src": "1630:73:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2439,
                            "name": "avatar",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2376,
                            "src": "1734:6:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Avatar_$8541",
                              "typeString": "contract Avatar"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_Avatar_$8541",
                              "typeString": "contract Avatar"
                            }
                          ],
                          "id": 2438,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "1726:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 2440,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1726:15:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      ],
                      "id": 2437,
                      "name": "selfdestruct",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 18015,
                      "src": "1713:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_payable_$returns$__$",
                        "typeString": "function (address payable)"
                      }
                    },
                    "id": 2441,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1713:29:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2442,
                  "nodeType": "ExpressionStatement",
                  "src": "1713:29:9"
                }
              ]
            },
            "documentation": null,
            "id": 2444,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "setBridge",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2412,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1352:2:9"
            },
            "returnParameters": {
              "id": 2413,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1362:0:9"
            },
            "scope": 2445,
            "src": "1334:415:9",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 2446,
        "src": "328:1423:9"
      }
    ],
    "src": "0:1752:9"
  },
  "legacyAST": {
    "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/DeployForeignBridge.sol",
    "exportedSymbols": {
      "DeployForeignBridge": [
        2445
      ]
    },
    "id": 2446,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 2359,
        "literals": [
          "solidity",
          ">",
          "0.5",
          ".4"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:9"
      },
      {
        "absolutePath": "@daostack/arc/contracts/controller/Avatar.sol",
        "file": "@daostack/arc/contracts/controller/Avatar.sol",
        "id": 2360,
        "nodeType": "ImportDirective",
        "scope": 2446,
        "sourceUnit": 8542,
        "src": "25:55:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@daostack/arc/contracts/controller/ControllerInterface.sol",
        "file": "@daostack/arc/contracts/controller/ControllerInterface.sol",
        "id": 2361,
        "nodeType": "ImportDirective",
        "scope": 2446,
        "sourceUnit": 10231,
        "src": "81:68:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/SchemeGuard.sol",
        "file": "./SchemeGuard.sol",
        "id": 2362,
        "nodeType": "ImportDirective",
        "scope": 2446,
        "sourceUnit": 4183,
        "src": "150:27:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 2445,
        "linearizedBaseContracts": [
          2445
        ],
        "name": "DeployForeignBridge",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "anonymous": false,
            "documentation": null,
            "id": 2372,
            "name": "ForeignBridgeDeployed",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 2371,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2364,
                  "indexed": true,
                  "name": "_foreignBridge",
                  "nodeType": "VariableDeclaration",
                  "scope": 2372,
                  "src": "518:30:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2363,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "518:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2366,
                  "indexed": true,
                  "name": "_foreignValidators",
                  "nodeType": "VariableDeclaration",
                  "scope": 2372,
                  "src": "558:34:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2365,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "558:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2368,
                  "indexed": false,
                  "name": "_foreignToken",
                  "nodeType": "VariableDeclaration",
                  "scope": 2372,
                  "src": "602:21:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2367,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "602:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2370,
                  "indexed": false,
                  "name": "_blockNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 2372,
                  "src": "633:20:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2369,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "633:7:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "508:151:9"
            },
            "src": "481:179:9"
          },
          {
            "constant": false,
            "id": 2374,
            "name": "factory",
            "nodeType": "VariableDeclaration",
            "scope": 2445,
            "src": "666:22:9",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_address",
              "typeString": "address"
            },
            "typeName": {
              "id": 2373,
              "name": "address",
              "nodeType": "ElementaryTypeName",
              "src": "666:7:9",
              "stateMutability": "nonpayable",
              "typeDescriptions": {
                "typeIdentifier": "t_address",
                "typeString": "address"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 2376,
            "name": "avatar",
            "nodeType": "VariableDeclaration",
            "scope": 2445,
            "src": "694:13:9",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_Avatar_$8541",
              "typeString": "contract Avatar"
            },
            "typeName": {
              "contractScope": null,
              "id": 2375,
              "name": "Avatar",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 8541,
              "src": "694:6:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Avatar_$8541",
                "typeString": "contract Avatar"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 2378,
            "name": "controller",
            "nodeType": "VariableDeclaration",
            "scope": 2445,
            "src": "713:30:9",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_ControllerInterface_$10230",
              "typeString": "contract ControllerInterface"
            },
            "typeName": {
              "contractScope": null,
              "id": 2377,
              "name": "ControllerInterface",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 10230,
              "src": "713:19:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ControllerInterface_$10230",
                "typeString": "contract ControllerInterface"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2410,
              "nodeType": "Block",
              "src": "952:188:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 2390,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 2386,
                          "name": "_factory",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2382,
                          "src": "970:8:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 2388,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "990:1:9",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 2387,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "982:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 2389,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "982:10:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "src": "970:22:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "466163746f7279206d757374206e6f74206265206e756c6c",
                        "id": 2391,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "994:26:9",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_dd66b900ac570a0000d18bfb0b967614b578f0c4430d71a4383331d6ce7106ca",
                          "typeString": "literal_string \"Factory must not be null\""
                        },
                        "value": "Factory must not be null"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_dd66b900ac570a0000d18bfb0b967614b578f0c4430d71a4383331d6ce7106ca",
                          "typeString": "literal_string \"Factory must not be null\""
                        }
                      ],
                      "id": 2385,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18010,
                        18011
                      ],
                      "referencedDeclaration": 18011,
                      "src": "962:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 2392,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "962:59:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2393,
                  "nodeType": "ExpressionStatement",
                  "src": "962:59:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2396,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2394,
                      "name": "factory",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2374,
                      "src": "1031:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2395,
                      "name": "_factory",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2382,
                      "src": "1041:8:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "1031:18:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 2397,
                  "nodeType": "ExpressionStatement",
                  "src": "1031:18:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2400,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2398,
                      "name": "avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2376,
                      "src": "1059:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$8541",
                        "typeString": "contract Avatar"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2399,
                      "name": "_avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2380,
                      "src": "1068:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$8541",
                        "typeString": "contract Avatar"
                      }
                    },
                    "src": "1059:16:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$8541",
                      "typeString": "contract Avatar"
                    }
                  },
                  "id": 2401,
                  "nodeType": "ExpressionStatement",
                  "src": "1059:16:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2408,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2402,
                      "name": "controller",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2378,
                      "src": "1085:10:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ControllerInterface_$10230",
                        "typeString": "contract ControllerInterface"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 2404,
                              "name": "avatar",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2376,
                              "src": "1118:6:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Avatar_$8541",
                                "typeString": "contract Avatar"
                              }
                            },
                            "id": 2405,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "owner",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 17178,
                            "src": "1118:12:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                              "typeString": "function () view external returns (address)"
                            }
                          },
                          "id": 2406,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1118:14:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 2403,
                        "name": "ControllerInterface",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10230,
                        "src": "1098:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_ControllerInterface_$10230_$",
                          "typeString": "type(contract ControllerInterface)"
                        }
                      },
                      "id": 2407,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1098:35:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ControllerInterface_$10230",
                        "typeString": "contract ControllerInterface"
                      }
                    },
                    "src": "1085:48:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ControllerInterface_$10230",
                      "typeString": "contract ControllerInterface"
                    }
                  },
                  "id": 2409,
                  "nodeType": "ExpressionStatement",
                  "src": "1085:48:9"
                }
              ]
            },
            "documentation": null,
            "id": 2411,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2383,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2380,
                  "name": "_avatar",
                  "nodeType": "VariableDeclaration",
                  "scope": 2411,
                  "src": "911:14:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Avatar_$8541",
                    "typeString": "contract Avatar"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2379,
                    "name": "Avatar",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 8541,
                    "src": "911:6:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$8541",
                      "typeString": "contract Avatar"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2382,
                  "name": "_factory",
                  "nodeType": "VariableDeclaration",
                  "scope": 2411,
                  "src": "927:16:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2381,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "927:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "910:34:9"
            },
            "returnParameters": {
              "id": 2384,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "952:0:9"
            },
            "scope": 2445,
            "src": "899:241:9",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2443,
              "nodeType": "Block",
              "src": "1362:387:9",
              "statements": [
                {
                  "assignments": [
                    2415,
                    null
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2415,
                      "name": "ok",
                      "nodeType": "VariableDeclaration",
                      "scope": 2443,
                      "src": "1373:7:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 2414,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "1373:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    null
                  ],
                  "id": 2431,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2418,
                        "name": "factory",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2374,
                        "src": "1422:7:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "6465706c6f79466f726569676e427269646765286164647265737329",
                            "id": 2421,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "string",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1484:30:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_stringliteral_db035918df46c3207cf95921b76a0ad0d648e8b58d5345a2bd54694f4531fa07",
                              "typeString": "literal_string \"deployForeignBridge(address)\""
                            },
                            "value": "deployForeignBridge(address)"
                          },
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 2423,
                                    "name": "avatar",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2376,
                                    "src": "1540:6:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_Avatar_$8541",
                                      "typeString": "contract Avatar"
                                    }
                                  },
                                  "id": 2424,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "nativeToken",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 8277,
                                  "src": "1540:18:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_DAOToken_$10306_$",
                                    "typeString": "function () view external returns (contract DAOToken)"
                                  }
                                },
                                "id": 2425,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1540:20:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_DAOToken_$10306",
                                  "typeString": "contract DAOToken"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_DAOToken_$10306",
                                  "typeString": "contract DAOToken"
                                }
                              ],
                              "id": 2422,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "1532:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": "address"
                            },
                            "id": 2426,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1532:29:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_stringliteral_db035918df46c3207cf95921b76a0ad0d648e8b58d5345a2bd54694f4531fa07",
                              "typeString": "literal_string \"deployForeignBridge(address)\""
                            },
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 2419,
                            "name": "abi",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17994,
                            "src": "1443:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_abi",
                              "typeString": "abi"
                            }
                          },
                          "id": 2420,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "encodeWithSignature",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "1443:23:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
                            "typeString": "function (string memory) pure returns (bytes memory)"
                          }
                        },
                        "id": 2427,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1443:132:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2428,
                        "name": "avatar",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2376,
                        "src": "1589:6:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Avatar_$8541",
                          "typeString": "contract Avatar"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "30",
                        "id": 2429,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1609:1:9",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_contract$_Avatar_$8541",
                          "typeString": "contract Avatar"
                        },
                        {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2416,
                        "name": "controller",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2378,
                        "src": "1386:10:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ControllerInterface_$10230",
                          "typeString": "contract ControllerInterface"
                        }
                      },
                      "id": 2417,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "genericCall",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 10107,
                      "src": "1386:22:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_contract$_Avatar_$8541_$_t_uint256_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                        "typeString": "function (address,bytes memory,contract Avatar,uint256) external returns (bool,bytes memory)"
                      }
                    },
                    "id": 2430,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1386:234:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                      "typeString": "tuple(bool,bytes memory)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1372:248:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2433,
                        "name": "ok",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2415,
                        "src": "1638:2:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "43616c6c696e67206465706c6f79466f726569676e42726964676520696e20466f726569676e427269646765466163746f7279206661696c6564",
                        "id": 2434,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1642:60:9",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_8a7540907cc61ed6ad57d464f14a1ca582734abe0bbb7f54f5ec6e66acfb56b6",
                          "typeString": "literal_string \"Calling deployForeignBridge in ForeignBridgeFactory failed\""
                        },
                        "value": "Calling deployForeignBridge in ForeignBridgeFactory failed"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_8a7540907cc61ed6ad57d464f14a1ca582734abe0bbb7f54f5ec6e66acfb56b6",
                          "typeString": "literal_string \"Calling deployForeignBridge in ForeignBridgeFactory failed\""
                        }
                      ],
                      "id": 2432,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18010,
                        18011
                      ],
                      "referencedDeclaration": 18011,
                      "src": "1630:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 2435,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1630:73:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2436,
                  "nodeType": "ExpressionStatement",
                  "src": "1630:73:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2439,
                            "name": "avatar",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2376,
                            "src": "1734:6:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Avatar_$8541",
                              "typeString": "contract Avatar"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_Avatar_$8541",
                              "typeString": "contract Avatar"
                            }
                          ],
                          "id": 2438,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "1726:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 2440,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1726:15:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      ],
                      "id": 2437,
                      "name": "selfdestruct",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 18015,
                      "src": "1713:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_payable_$returns$__$",
                        "typeString": "function (address payable)"
                      }
                    },
                    "id": 2441,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1713:29:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2442,
                  "nodeType": "ExpressionStatement",
                  "src": "1713:29:9"
                }
              ]
            },
            "documentation": null,
            "id": 2444,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "setBridge",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2412,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1352:2:9"
            },
            "returnParameters": {
              "id": 2413,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1362:0:9"
            },
            "scope": 2445,
            "src": "1334:415:9",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 2446,
        "src": "328:1423:9"
      }
    ],
    "src": "0:1752:9"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.16+commit.9c3226ce.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.2.3",
  "updatedAt": "2022-10-27T11:34:11.113Z",
  "devdoc": {
    "methods": {}
  },
  "userdoc": {
    "methods": {}
  }
}