{
  "contractName": "SchemeGuard",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "contract Avatar",
          "name": "_avatar",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "isOwner",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "contract Avatar",
          "name": "_avatar",
          "type": "address"
        }
      ],
      "name": "setAvatar",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "isRegistered",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "address",
          "name": "scheme",
          "type": "address"
        }
      ],
      "name": "isRegistered",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract Avatar\",\"name\":\"_avatar\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"scheme\",\"type\":\"address\"}],\"name\":\"isRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract Avatar\",\"name\":\"_avatar\",\"type\":\"address\"}],\"name\":\"setAvatar\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"constructor\":{\"details\":\"Constructor. only sets controller if given avatar is not null.\",\"params\":{\"_avatar\":\"The avatar of the DAO.\"}},\"isOwner()\":{\"return\":\"true if `msg.sender` is the owner of the contract.\"},\"isRegistered()\":{\"details\":\"function to see if an avatar has been set and if this scheme is registered\",\"return\":\"true if scheme is registered\"},\"isRegistered(address)\":{\"details\":\"function to see if an avatar has been set and if this scheme is registered\",\"return\":\"true if scheme is registered\"},\"owner()\":{\"return\":\"the address of the owner.\"},\"renounceOwnership()\":{\"details\":\"Allows the current owner to relinquish control of the contract.\"},\"setAvatar(address)\":{\"details\":\"Function to set a new avatar and controller for scheme can only be done by owner of scheme\"},\"transferOwnership(address)\":{\"details\":\"Allows the current owner to transfer control of the contract to a newOwner.\",\"params\":{\"newOwner\":\"The address to transfer ownership to.\"}}}},\"userdoc\":{\"methods\":{\"renounceOwnership()\":{\"notice\":\"Renouncing to ownership will leave the contract without an owner. It will not be possible to call the functions with the `onlyOwner` modifier anymore.\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/SchemeGuard.sol\":\"SchemeGuard\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/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": "0x6080604052600280546001600160a01b031916905534801561002057600080fd5b506040516105983803806105988339818101604052602081101561004357600080fd5b5051600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3600180546001600160a01b0319166001600160a01b038381169190911791829055161561014f57600160009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561010357600080fd5b505afa158015610117573d6000803e3d6000fd5b505050506040513d602081101561012d57600080fd5b5051600280546001600160a01b0319166001600160a01b039092169190911790555b506104398061015f6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146100ce5780638f32d59b146100f2578063c3c5a547146100fa578063f2fde38b146101205761007d565b8063086cfca81461008257806322366844146100aa578063715018a6146100c6575b600080fd5b6100a86004803603602081101561009857600080fd5b50356001600160a01b0316610146565b005b6100b2610201565b604080519115158252519081900360200190f35b6100a8610211565b6100d661026c565b604080516001600160a01b039092168252519081900360200190f35b6100b261027b565b6100b26004803603602081101561011057600080fd5b50356001600160a01b031661028c565b6100a86004803603602081101561013657600080fd5b50356001600160a01b0316610379565b61014e61027b565b61015757600080fd5b600180546001600160a01b0319166001600160a01b03838116919091179182905560408051638da5cb5b60e01b815290519290911691638da5cb5b91600480820192602092909190829003018186803b1580156101b357600080fd5b505afa1580156101c7573d6000803e3d6000fd5b505050506040513d60208110156101dd57600080fd5b5051600280546001600160a01b0319166001600160a01b0390921691909117905550565b600061020c3061028c565b905090565b61021961027b565b61022257600080fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6001546000906001600160a01b03166102e0576040805162461bcd60e51b8152602060048201526011602482015270105d985d185c881a5cc81b9bdd081cd95d607a1b604482015290519081900360640190fd5b60025460015460408051639be2faed60e01b81526001600160a01b038681166004830152928316602482015290519190921691639be2faed916044808301926020929190829003018186803b15801561033857600080fd5b505afa15801561034c573d6000803e3d6000fd5b505050506040513d602081101561036257600080fd5b505161037057506000610374565b5060015b919050565b61038161027b565b61038a57600080fd5b61039381610396565b50565b6001600160a01b0381166103a957600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fea265627a7a723158209713603c1e29ac94f25dbd135e0efce20882c01cfa0bb8d28d1f2cac26bcad6e64736f6c63430005100032",
  "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146100ce5780638f32d59b146100f2578063c3c5a547146100fa578063f2fde38b146101205761007d565b8063086cfca81461008257806322366844146100aa578063715018a6146100c6575b600080fd5b6100a86004803603602081101561009857600080fd5b50356001600160a01b0316610146565b005b6100b2610201565b604080519115158252519081900360200190f35b6100a8610211565b6100d661026c565b604080516001600160a01b039092168252519081900360200190f35b6100b261027b565b6100b26004803603602081101561011057600080fd5b50356001600160a01b031661028c565b6100a86004803603602081101561013657600080fd5b50356001600160a01b0316610379565b61014e61027b565b61015757600080fd5b600180546001600160a01b0319166001600160a01b03838116919091179182905560408051638da5cb5b60e01b815290519290911691638da5cb5b91600480820192602092909190829003018186803b1580156101b357600080fd5b505afa1580156101c7573d6000803e3d6000fd5b505050506040513d60208110156101dd57600080fd5b5051600280546001600160a01b0319166001600160a01b0390921691909117905550565b600061020c3061028c565b905090565b61021961027b565b61022257600080fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6001546000906001600160a01b03166102e0576040805162461bcd60e51b8152602060048201526011602482015270105d985d185c881a5cc81b9bdd081cd95d607a1b604482015290519081900360640190fd5b60025460015460408051639be2faed60e01b81526001600160a01b038681166004830152928316602482015290519190921691639be2faed916044808301926020929190829003018186803b15801561033857600080fd5b505afa15801561034c573d6000803e3d6000fd5b505050506040513d602081101561036257600080fd5b505161037057506000610374565b5060015b919050565b61038161027b565b61038a57600080fd5b61039381610396565b50565b6001600160a01b0381166103a957600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fea265627a7a723158209713603c1e29ac94f25dbd135e0efce20882c01cfa0bb8d28d1f2cac26bcad6e64736f6c63430005100032",
  "sourceMap": "386:2113:7:-;;;443:64;;;-1:-1:-1;;;;;;443:64:7;;;643:176;5:2:-1;;;;30:1;27;20:12;5:2;643:176:7;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;643:176:7;515:6:77;:19;;-1:-1:-1;;;;;;515:19:77;524:10;515:19;;;;549:40;;-1:-1:-1;;;;;582:6:77;;;;;515;549:40;;515:6;;549:40;688:6:7;:16;;-1:-1:-1;;;;;;688:16:7;-1:-1:-1;;;;;688:16:7;;;;;;;;;;;719:6;:19;715:98;;787:6;;;;;;;;;-1:-1:-1;;;;;787:6:7;-1:-1:-1;;;;;787:12:7;;:14;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;787:14:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;787:14:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;787:14:7;754:10;:48;;-1:-1:-1;;;;;;754:48:7;-1:-1:-1;;;;;754:48:7;;;;;;;;;715:98;643:176;386:2113;;;;;;",
  "deployedSourceMap": "386:2113:7:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;386:2113:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1698:143;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1698:143:7;-1:-1:-1;;;;;1698:143:7;;:::i;:::-;;1987:102;;;:::i;:::-;;;;;;;;;;;;;;;;;;1347:137:77;;;:::i;659:77::-;;;:::i;:::-;;;;-1:-1:-1;;;;;659:77:77;;;;;;;;;;;;;;979:90;;;:::i;2235:262:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2235:262:7;-1:-1:-1;;;;;2235:262:7;;:::i;1655:107:77:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1655:107:77;-1:-1:-1;;;;;1655:107:77;;:::i;1698:143:7:-;863:9:77;:7;:9::i;:::-;855:18;;;;;;1760:6:7;:16;;-1:-1:-1;;;;;;1760:16:7;-1:-1:-1;;;;;1760:16:7;;;;;;;;;;;1819:14;;;-1:-1:-1;;;1819:14:7;;;;:6;;;;;:12;;:14;;;;;;;;;;;;;;;:6;:14;;;5:2:-1;;;;30:1;27;20:12;5:2;1819:14:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1819:14:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1819:14:7;1786:10;:48;;-1:-1:-1;;;;;;1786:48:7;-1:-1:-1;;;;;1786:48:7;;;;;;;;;-1:-1:-1;1698:143:7:o;1987:102::-;2032:4;2055:27;2076:4;2055:12;:27::i;:::-;2048:34;;1987:102;:::o;1347:137:77:-;863:9;:7;:9::i;:::-;855:18;;;;;;1445:1;1429:6;;1408:40;;-1:-1:-1;;;;;1429:6:77;;;;1408:40;;1445:1;;1408:40;1475:1;1458:19;;-1:-1:-1;;;;;;1458:19:77;;;1347:137::o;659:77::-;697:7;723:6;-1:-1:-1;;;;;723:6:77;659:77;:::o;979:90::-;1019:4;1056:6;-1:-1:-1;;;;;1056:6:77;1042:10;:20;;979:90::o;2235:262:7:-;2318:6;;2294:4;;-1:-1:-1;;;;;2318:6:7;2310:49;;;;;-1:-1:-1;;;2310:49:7;;;;;;;;;;;;-1:-1:-1;;;2310:49:7;;;;;;;;;;;;;;;2376:10;;;2422:6;2376:54;;;-1:-1:-1;;;2376:54:7;;-1:-1:-1;;;;;2376:54:7;;;;;;;2422:6;;;2376:54;;;;;;:10;;;;;:29;;:54;;;;;;;;;;;;;;:10;:54;;;5:2:-1;;;;30:1;27;20:12;5:2;2376:54:7;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2376:54:7;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2376:54:7;2370:100;;-1:-1:-1;2454:5:7;2447:12;;2370:100;-1:-1:-1;2486:4:7;2235:262;;;;:::o;1655:107:77:-;863:9;:7;:9::i;:::-;855:18;;;;;;1727:28;1746:8;1727:18;:28::i;:::-;1655:107;:::o;1906:183::-;-1:-1:-1;;;;;1979:22:77;;1971:31;;;;;;2038:6;;;2017:38;;-1:-1:-1;;;;;2017:38:77;;;;2038:6;;;2017:38;;;2065:6;:17;;-1:-1:-1;;;;;;2065:17:77;-1:-1:-1;;;;;2065:17:77;;;;;;;;;;1906:183::o",
  "source": "pragma solidity >0.5.4;\n\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\nimport \"@daostack/arc/contracts/controller/Avatar.sol\";\nimport \"@daostack/arc/contracts/controller/ControllerInterface.sol\";\n\n/* @dev abstract contract for ensuring that schemes have been registered properly\n * Allows setting zero Avatar in situations where the Avatar hasn't been created yet\n */\ncontract SchemeGuard is Ownable {\n    Avatar avatar;\n    ControllerInterface internal controller = ControllerInterface(0);\n\n    /** @dev Constructor. only sets controller if given avatar is not null.\n     * @param _avatar The avatar of the DAO.\n     */\n    constructor(Avatar _avatar) public {\n        avatar = _avatar;\n\n        if (avatar != Avatar(0)) {\n            controller = ControllerInterface(avatar.owner());\n        }\n    }\n\n    /** @dev modifier to check if caller is avatar\n     */\n    modifier onlyAvatar() {\n        require(address(avatar) == msg.sender, \"only Avatar can call this method\");\n        _;\n    }\n\n    /** @dev modifier to check if scheme is registered\n     */\n    modifier onlyRegistered() {\n        require(isRegistered(), \"Scheme is not registered\");\n        _;\n    }\n\n    /** @dev modifier to check if scheme is not registered\n     */\n    modifier onlyNotRegistered() {\n        require(!isRegistered(), \"Scheme is registered\");\n        _;\n    }\n\n    /** @dev modifier to check if call is a scheme that is registered\n     */\n    modifier onlyRegisteredCaller() {\n        require(isRegistered(msg.sender), \"Calling scheme is not registered\");\n        _;\n    }\n\n    /** @dev Function to set a new avatar and controller for scheme\n     * can only be done by owner of scheme\n     */\n    function setAvatar(Avatar _avatar) public onlyOwner {\n        avatar = _avatar;\n        controller = ControllerInterface(avatar.owner());\n    }\n\n    /** @dev function to see if an avatar has been set and if this scheme is registered\n     * @return true if scheme is registered\n     */\n    function isRegistered() public view returns (bool) {\n        return isRegistered(address(this));\n    }\n\n    /** @dev function to see if an avatar has been set and if this scheme is registered\n     * @return true if scheme is registered\n     */\n    function isRegistered(address scheme) public view returns (bool) {\n        require(avatar != Avatar(0), \"Avatar is not set\");\n\n        if (!(controller.isSchemeRegistered(scheme, address(avatar)))) {\n            return false;\n        }\n        return true;\n    }\n}\n",
  "sourcePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/SchemeGuard.sol",
  "ast": {
    "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/SchemeGuard.sol",
    "exportedSymbols": {
      "SchemeGuard": [
        1423
      ]
    },
    "id": 1424,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1274,
        "literals": [
          "solidity",
          ">",
          "0.5",
          ".4"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:7"
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "id": 1275,
        "nodeType": "ImportDirective",
        "scope": 1424,
        "sourceUnit": 21418,
        "src": "25:63:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@daostack/arc/contracts/controller/Avatar.sol",
        "file": "@daostack/arc/contracts/controller/Avatar.sol",
        "id": 1276,
        "nodeType": "ImportDirective",
        "scope": 1424,
        "sourceUnit": 12706,
        "src": "89:55:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@daostack/arc/contracts/controller/ControllerInterface.sol",
        "file": "@daostack/arc/contracts/controller/ControllerInterface.sol",
        "id": 1277,
        "nodeType": "ImportDirective",
        "scope": 1424,
        "sourceUnit": 14395,
        "src": "145:68:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 1278,
              "name": "Ownable",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 21417,
              "src": "410:7:7",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Ownable_$21417",
                "typeString": "contract Ownable"
              }
            },
            "id": 1279,
            "nodeType": "InheritanceSpecifier",
            "src": "410:7:7"
          }
        ],
        "contractDependencies": [
          21417
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 1423,
        "linearizedBaseContracts": [
          1423,
          21417
        ],
        "name": "SchemeGuard",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "id": 1281,
            "name": "avatar",
            "nodeType": "VariableDeclaration",
            "scope": 1423,
            "src": "424:13:7",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_Avatar_$12705",
              "typeString": "contract Avatar"
            },
            "typeName": {
              "contractScope": null,
              "id": 1280,
              "name": "Avatar",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 12705,
              "src": "424:6:7",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Avatar_$12705",
                "typeString": "contract Avatar"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 1286,
            "name": "controller",
            "nodeType": "VariableDeclaration",
            "scope": 1423,
            "src": "443:64:7",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_ControllerInterface_$14394",
              "typeString": "contract ControllerInterface"
            },
            "typeName": {
              "contractScope": null,
              "id": 1282,
              "name": "ControllerInterface",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 14394,
              "src": "443:19:7",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                "typeString": "contract ControllerInterface"
              }
            },
            "value": {
              "argumentTypes": null,
              "arguments": [
                {
                  "argumentTypes": null,
                  "hexValue": "30",
                  "id": 1284,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "kind": "number",
                  "lValueRequested": false,
                  "nodeType": "Literal",
                  "src": "505:1:7",
                  "subdenomination": null,
                  "typeDescriptions": {
                    "typeIdentifier": "t_rational_0_by_1",
                    "typeString": "int_const 0"
                  },
                  "value": "0"
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_rational_0_by_1",
                    "typeString": "int_const 0"
                  }
                ],
                "id": 1283,
                "name": "ControllerInterface",
                "nodeType": "Identifier",
                "overloadedDeclarations": [],
                "referencedDeclaration": 14394,
                "src": "485:19:7",
                "typeDescriptions": {
                  "typeIdentifier": "t_type$_t_contract$_ControllerInterface_$14394_$",
                  "typeString": "type(contract ControllerInterface)"
                }
              },
              "id": 1285,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "typeConversion",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "485:22:7",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                "typeString": "contract ControllerInterface"
              }
            },
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1310,
              "nodeType": "Block",
              "src": "678:141:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1293,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 1291,
                      "name": "avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1281,
                      "src": "688:6:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 1292,
                      "name": "_avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1288,
                      "src": "697:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "src": "688:16:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  },
                  "id": 1294,
                  "nodeType": "ExpressionStatement",
                  "src": "688:16:7"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    },
                    "id": 1299,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 1295,
                      "name": "avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1281,
                      "src": "719:6:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 1297,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "736:1:7",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          }
                        ],
                        "id": 1296,
                        "name": "Avatar",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 12705,
                        "src": "729:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_Avatar_$12705_$",
                          "typeString": "type(contract Avatar)"
                        }
                      },
                      "id": 1298,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "729:9:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "src": "719:19:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 1309,
                  "nodeType": "IfStatement",
                  "src": "715:98:7",
                  "trueBody": {
                    "id": 1308,
                    "nodeType": "Block",
                    "src": "740:73:7",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 1306,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 1300,
                            "name": "controller",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1286,
                            "src": "754:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                              "typeString": "contract ControllerInterface"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 1302,
                                    "name": "avatar",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1281,
                                    "src": "787:6:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_Avatar_$12705",
                                      "typeString": "contract Avatar"
                                    }
                                  },
                                  "id": 1303,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "owner",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 21342,
                                  "src": "787:12:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                                    "typeString": "function () view external returns (address)"
                                  }
                                },
                                "id": 1304,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "787:14:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "id": 1301,
                              "name": "ControllerInterface",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14394,
                              "src": "767:19:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_ControllerInterface_$14394_$",
                                "typeString": "type(contract ControllerInterface)"
                              }
                            },
                            "id": 1305,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "767:35:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                              "typeString": "contract ControllerInterface"
                            }
                          },
                          "src": "754:48:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                            "typeString": "contract ControllerInterface"
                          }
                        },
                        "id": 1307,
                        "nodeType": "ExpressionStatement",
                        "src": "754:48:7"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@dev Constructor. only sets controller if given avatar is not null.\n@param _avatar The avatar of the DAO.",
            "id": 1311,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1289,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1288,
                  "name": "_avatar",
                  "nodeType": "VariableDeclaration",
                  "scope": 1311,
                  "src": "655:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Avatar_$12705",
                    "typeString": "contract Avatar"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1287,
                    "name": "Avatar",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 12705,
                    "src": "655:6:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "654:16:7"
            },
            "returnParameters": {
              "id": 1290,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "678:0:7"
            },
            "scope": 1423,
            "src": "643:176:7",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1324,
              "nodeType": "Block",
              "src": "906:102:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        "id": 1319,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 1315,
                              "name": "avatar",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1281,
                              "src": "932:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Avatar_$12705",
                                "typeString": "contract Avatar"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_Avatar_$12705",
                                "typeString": "contract Avatar"
                              }
                            ],
                            "id": 1314,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "924:7:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 1316,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "924:15:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1317,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22171,
                            "src": "943:3:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 1318,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "943:10:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "src": "924:29:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "6f6e6c79204176617461722063616e2063616c6c2074686973206d6574686f64",
                        "id": 1320,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "955:34:7",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_ee04e2bb38b35a6a340a8c366b091fffa78170bc841c55c17c0389da4e8fb71a",
                          "typeString": "literal_string \"only Avatar can call this method\""
                        },
                        "value": "only Avatar can call this method"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_ee04e2bb38b35a6a340a8c366b091fffa78170bc841c55c17c0389da4e8fb71a",
                          "typeString": "literal_string \"only Avatar can call this method\""
                        }
                      ],
                      "id": 1313,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "916:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1321,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "916:74:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1322,
                  "nodeType": "ExpressionStatement",
                  "src": "916:74:7"
                },
                {
                  "id": 1323,
                  "nodeType": "PlaceholderStatement",
                  "src": "1000:1:7"
                }
              ]
            },
            "documentation": "@dev modifier to check if caller is avatar",
            "id": 1325,
            "name": "onlyAvatar",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 1312,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "903:2:7"
            },
            "src": "884:124:7",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1334,
              "nodeType": "Block",
              "src": "1103:79:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1328,
                          "name": "isRegistered",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            1390,
                            1422
                          ],
                          "referencedDeclaration": 1390,
                          "src": "1121:12:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                            "typeString": "function () view returns (bool)"
                          }
                        },
                        "id": 1329,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1121:14:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "536368656d65206973206e6f742072656769737465726564",
                        "id": 1330,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1137:26:7",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_78d44ee216eb532bf10b77c8554a39e00dd2d1cc004b0e5aa48b9b6551ff1465",
                          "typeString": "literal_string \"Scheme is not registered\""
                        },
                        "value": "Scheme is not registered"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_78d44ee216eb532bf10b77c8554a39e00dd2d1cc004b0e5aa48b9b6551ff1465",
                          "typeString": "literal_string \"Scheme is not registered\""
                        }
                      ],
                      "id": 1327,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "1113:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1331,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1113:51:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1332,
                  "nodeType": "ExpressionStatement",
                  "src": "1113:51:7"
                },
                {
                  "id": 1333,
                  "nodeType": "PlaceholderStatement",
                  "src": "1174:1:7"
                }
              ]
            },
            "documentation": "@dev modifier to check if scheme is registered",
            "id": 1335,
            "name": "onlyRegistered",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 1326,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1100:2:7"
            },
            "src": "1077:105:7",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1345,
              "nodeType": "Block",
              "src": "1284:76:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1340,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "UnaryOperation",
                        "operator": "!",
                        "prefix": true,
                        "src": "1302:15:7",
                        "subExpression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 1338,
                            "name": "isRegistered",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              1390,
                              1422
                            ],
                            "referencedDeclaration": 1390,
                            "src": "1303:12:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                              "typeString": "function () view returns (bool)"
                            }
                          },
                          "id": 1339,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1303:14:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "536368656d652069732072656769737465726564",
                        "id": 1341,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1319:22:7",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_113606fe4c1f6c86dadbb899a9accec8c57adf61dd7eaabb35d534a18c4d45c8",
                          "typeString": "literal_string \"Scheme is registered\""
                        },
                        "value": "Scheme is registered"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_113606fe4c1f6c86dadbb899a9accec8c57adf61dd7eaabb35d534a18c4d45c8",
                          "typeString": "literal_string \"Scheme is registered\""
                        }
                      ],
                      "id": 1337,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "1294:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1342,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1294:48:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1343,
                  "nodeType": "ExpressionStatement",
                  "src": "1294:48:7"
                },
                {
                  "id": 1344,
                  "nodeType": "PlaceholderStatement",
                  "src": "1352:1:7"
                }
              ]
            },
            "documentation": "@dev modifier to check if scheme is not registered",
            "id": 1346,
            "name": "onlyNotRegistered",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 1336,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1281:2:7"
            },
            "src": "1255:105:7",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1357,
              "nodeType": "Block",
              "src": "1476:97:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 1350,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22171,
                              "src": "1507:3:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 1351,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "1507:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          ],
                          "id": 1349,
                          "name": "isRegistered",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            1390,
                            1422
                          ],
                          "referencedDeclaration": 1422,
                          "src": "1494:12:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
                            "typeString": "function (address) view returns (bool)"
                          }
                        },
                        "id": 1352,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1494:24:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "43616c6c696e6720736368656d65206973206e6f742072656769737465726564",
                        "id": 1353,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1520:34:7",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_37d1ff9ee43699c733a6d375d3fa5f90bd64db50e39fc9be87d31ddfbb6060b5",
                          "typeString": "literal_string \"Calling scheme is not registered\""
                        },
                        "value": "Calling scheme is not registered"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_37d1ff9ee43699c733a6d375d3fa5f90bd64db50e39fc9be87d31ddfbb6060b5",
                          "typeString": "literal_string \"Calling scheme is not registered\""
                        }
                      ],
                      "id": 1348,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "1486:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1354,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1486:69:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1355,
                  "nodeType": "ExpressionStatement",
                  "src": "1486:69:7"
                },
                {
                  "id": 1356,
                  "nodeType": "PlaceholderStatement",
                  "src": "1565:1:7"
                }
              ]
            },
            "documentation": "@dev modifier to check if call is a scheme that is registered",
            "id": 1358,
            "name": "onlyRegisteredCaller",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 1347,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1473:2:7"
            },
            "src": "1444:129:7",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1377,
              "nodeType": "Block",
              "src": "1750:91:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1367,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 1365,
                      "name": "avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1281,
                      "src": "1760:6:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 1366,
                      "name": "_avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1360,
                      "src": "1769:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "src": "1760:16:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  },
                  "id": 1368,
                  "nodeType": "ExpressionStatement",
                  "src": "1760:16:7"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1375,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 1369,
                      "name": "controller",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1286,
                      "src": "1786:10:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                        "typeString": "contract ControllerInterface"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 1371,
                              "name": "avatar",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1281,
                              "src": "1819:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Avatar_$12705",
                                "typeString": "contract Avatar"
                              }
                            },
                            "id": 1372,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "owner",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21342,
                            "src": "1819:12:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                              "typeString": "function () view external returns (address)"
                            }
                          },
                          "id": 1373,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1819:14:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 1370,
                        "name": "ControllerInterface",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 14394,
                        "src": "1799:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_ControllerInterface_$14394_$",
                          "typeString": "type(contract ControllerInterface)"
                        }
                      },
                      "id": 1374,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1799:35:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                        "typeString": "contract ControllerInterface"
                      }
                    },
                    "src": "1786:48:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                      "typeString": "contract ControllerInterface"
                    }
                  },
                  "id": 1376,
                  "nodeType": "ExpressionStatement",
                  "src": "1786:48:7"
                }
              ]
            },
            "documentation": "@dev Function to set a new avatar and controller for scheme\ncan only be done by owner of scheme",
            "id": 1378,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 1363,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 1362,
                  "name": "onlyOwner",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 21351,
                  "src": "1740:9:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1740:9:7"
              }
            ],
            "name": "setAvatar",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1361,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1360,
                  "name": "_avatar",
                  "nodeType": "VariableDeclaration",
                  "scope": 1378,
                  "src": "1717:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Avatar_$12705",
                    "typeString": "contract Avatar"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1359,
                    "name": "Avatar",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 12705,
                    "src": "1717:6:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1716:16:7"
            },
            "returnParameters": {
              "id": 1364,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1750:0:7"
            },
            "scope": 1423,
            "src": "1698:143:7",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1389,
              "nodeType": "Block",
              "src": "2038:51:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 1385,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22247,
                            "src": "2076:4:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_SchemeGuard_$1423",
                              "typeString": "contract SchemeGuard"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_SchemeGuard_$1423",
                              "typeString": "contract SchemeGuard"
                            }
                          ],
                          "id": 1384,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "2068:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 1386,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "2068:13:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 1383,
                      "name": "isRegistered",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1390,
                        1422
                      ],
                      "referencedDeclaration": 1422,
                      "src": "2055:12:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
                        "typeString": "function (address) view returns (bool)"
                      }
                    },
                    "id": 1387,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2055:27:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 1382,
                  "id": 1388,
                  "nodeType": "Return",
                  "src": "2048:34:7"
                }
              ]
            },
            "documentation": "@dev function to see if an avatar has been set and if this scheme is registered\n@return true if scheme is registered",
            "id": 1390,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isRegistered",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1379,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2008:2:7"
            },
            "returnParameters": {
              "id": 1382,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1381,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1390,
                  "src": "2032:4:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1380,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2032:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2031:6:7"
            },
            "scope": 1423,
            "src": "1987:102:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1421,
              "nodeType": "Block",
              "src": "2300:197:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_contract$_Avatar_$12705",
                          "typeString": "contract Avatar"
                        },
                        "id": 1402,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 1398,
                          "name": "avatar",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1281,
                          "src": "2318:6:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_Avatar_$12705",
                            "typeString": "contract Avatar"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 1400,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "2335:1:7",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 1399,
                            "name": "Avatar",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12705,
                            "src": "2328:6:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_Avatar_$12705_$",
                              "typeString": "type(contract Avatar)"
                            }
                          },
                          "id": 1401,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2328:9:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_Avatar_$12705",
                            "typeString": "contract Avatar"
                          }
                        },
                        "src": "2318:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "417661746172206973206e6f7420736574",
                        "id": 1403,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2339:19:7",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_2957c08abbb9a2b4de387234aae0654be99c044e0695c75391204051b4911f84",
                          "typeString": "literal_string \"Avatar is not set\""
                        },
                        "value": "Avatar is not set"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_2957c08abbb9a2b4de387234aae0654be99c044e0695c75391204051b4911f84",
                          "typeString": "literal_string \"Avatar is not set\""
                        }
                      ],
                      "id": 1397,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "2310:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1404,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2310:49:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1405,
                  "nodeType": "ExpressionStatement",
                  "src": "2310:49:7"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "id": 1414,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "2374:57:7",
                    "subExpression": {
                      "argumentTypes": null,
                      "components": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 1408,
                              "name": "scheme",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1392,
                              "src": "2406:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 1410,
                                  "name": "avatar",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1281,
                                  "src": "2422:6:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Avatar_$12705",
                                    "typeString": "contract Avatar"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Avatar_$12705",
                                    "typeString": "contract Avatar"
                                  }
                                ],
                                "id": 1409,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2414:7:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 1411,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2414:15:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 1406,
                              "name": "controller",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1286,
                              "src": "2376:10:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                                "typeString": "contract ControllerInterface"
                              }
                            },
                            "id": 1407,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "isSchemeRegistered",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 14348,
                            "src": "2376:29:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_bool_$",
                              "typeString": "function (address,address) view external returns (bool)"
                            }
                          },
                          "id": 1412,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2376:54:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "id": 1413,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "TupleExpression",
                      "src": "2375:56:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 1418,
                  "nodeType": "IfStatement",
                  "src": "2370:100:7",
                  "trueBody": {
                    "id": 1417,
                    "nodeType": "Block",
                    "src": "2433:37:7",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 1415,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2454:5:7",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 1396,
                        "id": 1416,
                        "nodeType": "Return",
                        "src": "2447:12:7"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "74727565",
                    "id": 1419,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2486:4:7",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 1396,
                  "id": 1420,
                  "nodeType": "Return",
                  "src": "2479:11:7"
                }
              ]
            },
            "documentation": "@dev function to see if an avatar has been set and if this scheme is registered\n@return true if scheme is registered",
            "id": 1422,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isRegistered",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1393,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1392,
                  "name": "scheme",
                  "nodeType": "VariableDeclaration",
                  "scope": 1422,
                  "src": "2257:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1391,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2257:7:7",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2256:16:7"
            },
            "returnParameters": {
              "id": 1396,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1395,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1422,
                  "src": "2294:4:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1394,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2294:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2293:6:7"
            },
            "scope": 1423,
            "src": "2235:262:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 1424,
        "src": "386:2113:7"
      }
    ],
    "src": "0:2500:7"
  },
  "legacyAST": {
    "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/SchemeGuard.sol",
    "exportedSymbols": {
      "SchemeGuard": [
        1423
      ]
    },
    "id": 1424,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1274,
        "literals": [
          "solidity",
          ">",
          "0.5",
          ".4"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:7"
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "id": 1275,
        "nodeType": "ImportDirective",
        "scope": 1424,
        "sourceUnit": 21418,
        "src": "25:63:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@daostack/arc/contracts/controller/Avatar.sol",
        "file": "@daostack/arc/contracts/controller/Avatar.sol",
        "id": 1276,
        "nodeType": "ImportDirective",
        "scope": 1424,
        "sourceUnit": 12706,
        "src": "89:55:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@daostack/arc/contracts/controller/ControllerInterface.sol",
        "file": "@daostack/arc/contracts/controller/ControllerInterface.sol",
        "id": 1277,
        "nodeType": "ImportDirective",
        "scope": 1424,
        "sourceUnit": 14395,
        "src": "145:68:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 1278,
              "name": "Ownable",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 21417,
              "src": "410:7:7",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Ownable_$21417",
                "typeString": "contract Ownable"
              }
            },
            "id": 1279,
            "nodeType": "InheritanceSpecifier",
            "src": "410:7:7"
          }
        ],
        "contractDependencies": [
          21417
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 1423,
        "linearizedBaseContracts": [
          1423,
          21417
        ],
        "name": "SchemeGuard",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "id": 1281,
            "name": "avatar",
            "nodeType": "VariableDeclaration",
            "scope": 1423,
            "src": "424:13:7",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_Avatar_$12705",
              "typeString": "contract Avatar"
            },
            "typeName": {
              "contractScope": null,
              "id": 1280,
              "name": "Avatar",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 12705,
              "src": "424:6:7",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Avatar_$12705",
                "typeString": "contract Avatar"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 1286,
            "name": "controller",
            "nodeType": "VariableDeclaration",
            "scope": 1423,
            "src": "443:64:7",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_ControllerInterface_$14394",
              "typeString": "contract ControllerInterface"
            },
            "typeName": {
              "contractScope": null,
              "id": 1282,
              "name": "ControllerInterface",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 14394,
              "src": "443:19:7",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                "typeString": "contract ControllerInterface"
              }
            },
            "value": {
              "argumentTypes": null,
              "arguments": [
                {
                  "argumentTypes": null,
                  "hexValue": "30",
                  "id": 1284,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "kind": "number",
                  "lValueRequested": false,
                  "nodeType": "Literal",
                  "src": "505:1:7",
                  "subdenomination": null,
                  "typeDescriptions": {
                    "typeIdentifier": "t_rational_0_by_1",
                    "typeString": "int_const 0"
                  },
                  "value": "0"
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_rational_0_by_1",
                    "typeString": "int_const 0"
                  }
                ],
                "id": 1283,
                "name": "ControllerInterface",
                "nodeType": "Identifier",
                "overloadedDeclarations": [],
                "referencedDeclaration": 14394,
                "src": "485:19:7",
                "typeDescriptions": {
                  "typeIdentifier": "t_type$_t_contract$_ControllerInterface_$14394_$",
                  "typeString": "type(contract ControllerInterface)"
                }
              },
              "id": 1285,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "typeConversion",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "485:22:7",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                "typeString": "contract ControllerInterface"
              }
            },
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1310,
              "nodeType": "Block",
              "src": "678:141:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1293,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 1291,
                      "name": "avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1281,
                      "src": "688:6:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 1292,
                      "name": "_avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1288,
                      "src": "697:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "src": "688:16:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  },
                  "id": 1294,
                  "nodeType": "ExpressionStatement",
                  "src": "688:16:7"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    },
                    "id": 1299,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 1295,
                      "name": "avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1281,
                      "src": "719:6:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 1297,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "736:1:7",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          }
                        ],
                        "id": 1296,
                        "name": "Avatar",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 12705,
                        "src": "729:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_Avatar_$12705_$",
                          "typeString": "type(contract Avatar)"
                        }
                      },
                      "id": 1298,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "729:9:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "src": "719:19:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 1309,
                  "nodeType": "IfStatement",
                  "src": "715:98:7",
                  "trueBody": {
                    "id": 1308,
                    "nodeType": "Block",
                    "src": "740:73:7",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 1306,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 1300,
                            "name": "controller",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1286,
                            "src": "754:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                              "typeString": "contract ControllerInterface"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 1302,
                                    "name": "avatar",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1281,
                                    "src": "787:6:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_Avatar_$12705",
                                      "typeString": "contract Avatar"
                                    }
                                  },
                                  "id": 1303,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "owner",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 21342,
                                  "src": "787:12:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                                    "typeString": "function () view external returns (address)"
                                  }
                                },
                                "id": 1304,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "787:14:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "id": 1301,
                              "name": "ControllerInterface",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14394,
                              "src": "767:19:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_ControllerInterface_$14394_$",
                                "typeString": "type(contract ControllerInterface)"
                              }
                            },
                            "id": 1305,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "767:35:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                              "typeString": "contract ControllerInterface"
                            }
                          },
                          "src": "754:48:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                            "typeString": "contract ControllerInterface"
                          }
                        },
                        "id": 1307,
                        "nodeType": "ExpressionStatement",
                        "src": "754:48:7"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@dev Constructor. only sets controller if given avatar is not null.\n@param _avatar The avatar of the DAO.",
            "id": 1311,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1289,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1288,
                  "name": "_avatar",
                  "nodeType": "VariableDeclaration",
                  "scope": 1311,
                  "src": "655:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Avatar_$12705",
                    "typeString": "contract Avatar"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1287,
                    "name": "Avatar",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 12705,
                    "src": "655:6:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "654:16:7"
            },
            "returnParameters": {
              "id": 1290,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "678:0:7"
            },
            "scope": 1423,
            "src": "643:176:7",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1324,
              "nodeType": "Block",
              "src": "906:102:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        "id": 1319,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 1315,
                              "name": "avatar",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1281,
                              "src": "932:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Avatar_$12705",
                                "typeString": "contract Avatar"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_Avatar_$12705",
                                "typeString": "contract Avatar"
                              }
                            ],
                            "id": 1314,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "924:7:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 1316,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "924:15:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1317,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22171,
                            "src": "943:3:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 1318,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "943:10:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "src": "924:29:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "6f6e6c79204176617461722063616e2063616c6c2074686973206d6574686f64",
                        "id": 1320,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "955:34:7",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_ee04e2bb38b35a6a340a8c366b091fffa78170bc841c55c17c0389da4e8fb71a",
                          "typeString": "literal_string \"only Avatar can call this method\""
                        },
                        "value": "only Avatar can call this method"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_ee04e2bb38b35a6a340a8c366b091fffa78170bc841c55c17c0389da4e8fb71a",
                          "typeString": "literal_string \"only Avatar can call this method\""
                        }
                      ],
                      "id": 1313,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "916:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1321,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "916:74:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1322,
                  "nodeType": "ExpressionStatement",
                  "src": "916:74:7"
                },
                {
                  "id": 1323,
                  "nodeType": "PlaceholderStatement",
                  "src": "1000:1:7"
                }
              ]
            },
            "documentation": "@dev modifier to check if caller is avatar",
            "id": 1325,
            "name": "onlyAvatar",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 1312,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "903:2:7"
            },
            "src": "884:124:7",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1334,
              "nodeType": "Block",
              "src": "1103:79:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1328,
                          "name": "isRegistered",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            1390,
                            1422
                          ],
                          "referencedDeclaration": 1390,
                          "src": "1121:12:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                            "typeString": "function () view returns (bool)"
                          }
                        },
                        "id": 1329,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1121:14:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "536368656d65206973206e6f742072656769737465726564",
                        "id": 1330,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1137:26:7",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_78d44ee216eb532bf10b77c8554a39e00dd2d1cc004b0e5aa48b9b6551ff1465",
                          "typeString": "literal_string \"Scheme is not registered\""
                        },
                        "value": "Scheme is not registered"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_78d44ee216eb532bf10b77c8554a39e00dd2d1cc004b0e5aa48b9b6551ff1465",
                          "typeString": "literal_string \"Scheme is not registered\""
                        }
                      ],
                      "id": 1327,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "1113:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1331,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1113:51:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1332,
                  "nodeType": "ExpressionStatement",
                  "src": "1113:51:7"
                },
                {
                  "id": 1333,
                  "nodeType": "PlaceholderStatement",
                  "src": "1174:1:7"
                }
              ]
            },
            "documentation": "@dev modifier to check if scheme is registered",
            "id": 1335,
            "name": "onlyRegistered",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 1326,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1100:2:7"
            },
            "src": "1077:105:7",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1345,
              "nodeType": "Block",
              "src": "1284:76:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1340,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "UnaryOperation",
                        "operator": "!",
                        "prefix": true,
                        "src": "1302:15:7",
                        "subExpression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 1338,
                            "name": "isRegistered",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              1390,
                              1422
                            ],
                            "referencedDeclaration": 1390,
                            "src": "1303:12:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                              "typeString": "function () view returns (bool)"
                            }
                          },
                          "id": 1339,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1303:14:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "536368656d652069732072656769737465726564",
                        "id": 1341,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1319:22:7",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_113606fe4c1f6c86dadbb899a9accec8c57adf61dd7eaabb35d534a18c4d45c8",
                          "typeString": "literal_string \"Scheme is registered\""
                        },
                        "value": "Scheme is registered"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_113606fe4c1f6c86dadbb899a9accec8c57adf61dd7eaabb35d534a18c4d45c8",
                          "typeString": "literal_string \"Scheme is registered\""
                        }
                      ],
                      "id": 1337,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "1294:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1342,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1294:48:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1343,
                  "nodeType": "ExpressionStatement",
                  "src": "1294:48:7"
                },
                {
                  "id": 1344,
                  "nodeType": "PlaceholderStatement",
                  "src": "1352:1:7"
                }
              ]
            },
            "documentation": "@dev modifier to check if scheme is not registered",
            "id": 1346,
            "name": "onlyNotRegistered",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 1336,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1281:2:7"
            },
            "src": "1255:105:7",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1357,
              "nodeType": "Block",
              "src": "1476:97:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 1350,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22171,
                              "src": "1507:3:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 1351,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "1507:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          ],
                          "id": 1349,
                          "name": "isRegistered",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            1390,
                            1422
                          ],
                          "referencedDeclaration": 1422,
                          "src": "1494:12:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
                            "typeString": "function (address) view returns (bool)"
                          }
                        },
                        "id": 1352,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1494:24:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "43616c6c696e6720736368656d65206973206e6f742072656769737465726564",
                        "id": 1353,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1520:34:7",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_37d1ff9ee43699c733a6d375d3fa5f90bd64db50e39fc9be87d31ddfbb6060b5",
                          "typeString": "literal_string \"Calling scheme is not registered\""
                        },
                        "value": "Calling scheme is not registered"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_37d1ff9ee43699c733a6d375d3fa5f90bd64db50e39fc9be87d31ddfbb6060b5",
                          "typeString": "literal_string \"Calling scheme is not registered\""
                        }
                      ],
                      "id": 1348,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "1486:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1354,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1486:69:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1355,
                  "nodeType": "ExpressionStatement",
                  "src": "1486:69:7"
                },
                {
                  "id": 1356,
                  "nodeType": "PlaceholderStatement",
                  "src": "1565:1:7"
                }
              ]
            },
            "documentation": "@dev modifier to check if call is a scheme that is registered",
            "id": 1358,
            "name": "onlyRegisteredCaller",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 1347,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1473:2:7"
            },
            "src": "1444:129:7",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1377,
              "nodeType": "Block",
              "src": "1750:91:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1367,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 1365,
                      "name": "avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1281,
                      "src": "1760:6:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 1366,
                      "name": "_avatar",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1360,
                      "src": "1769:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Avatar_$12705",
                        "typeString": "contract Avatar"
                      }
                    },
                    "src": "1760:16:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  },
                  "id": 1368,
                  "nodeType": "ExpressionStatement",
                  "src": "1760:16:7"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1375,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 1369,
                      "name": "controller",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1286,
                      "src": "1786:10:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                        "typeString": "contract ControllerInterface"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 1371,
                              "name": "avatar",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1281,
                              "src": "1819:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Avatar_$12705",
                                "typeString": "contract Avatar"
                              }
                            },
                            "id": 1372,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "owner",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21342,
                            "src": "1819:12:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                              "typeString": "function () view external returns (address)"
                            }
                          },
                          "id": 1373,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1819:14:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 1370,
                        "name": "ControllerInterface",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 14394,
                        "src": "1799:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_ControllerInterface_$14394_$",
                          "typeString": "type(contract ControllerInterface)"
                        }
                      },
                      "id": 1374,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1799:35:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                        "typeString": "contract ControllerInterface"
                      }
                    },
                    "src": "1786:48:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                      "typeString": "contract ControllerInterface"
                    }
                  },
                  "id": 1376,
                  "nodeType": "ExpressionStatement",
                  "src": "1786:48:7"
                }
              ]
            },
            "documentation": "@dev Function to set a new avatar and controller for scheme\ncan only be done by owner of scheme",
            "id": 1378,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 1363,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 1362,
                  "name": "onlyOwner",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 21351,
                  "src": "1740:9:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1740:9:7"
              }
            ],
            "name": "setAvatar",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1361,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1360,
                  "name": "_avatar",
                  "nodeType": "VariableDeclaration",
                  "scope": 1378,
                  "src": "1717:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Avatar_$12705",
                    "typeString": "contract Avatar"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1359,
                    "name": "Avatar",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 12705,
                    "src": "1717:6:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1716:16:7"
            },
            "returnParameters": {
              "id": 1364,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1750:0:7"
            },
            "scope": 1423,
            "src": "1698:143:7",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1389,
              "nodeType": "Block",
              "src": "2038:51:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 1385,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22247,
                            "src": "2076:4:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_SchemeGuard_$1423",
                              "typeString": "contract SchemeGuard"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_SchemeGuard_$1423",
                              "typeString": "contract SchemeGuard"
                            }
                          ],
                          "id": 1384,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "2068:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 1386,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "2068:13:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 1383,
                      "name": "isRegistered",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1390,
                        1422
                      ],
                      "referencedDeclaration": 1422,
                      "src": "2055:12:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
                        "typeString": "function (address) view returns (bool)"
                      }
                    },
                    "id": 1387,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2055:27:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 1382,
                  "id": 1388,
                  "nodeType": "Return",
                  "src": "2048:34:7"
                }
              ]
            },
            "documentation": "@dev function to see if an avatar has been set and if this scheme is registered\n@return true if scheme is registered",
            "id": 1390,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isRegistered",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1379,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2008:2:7"
            },
            "returnParameters": {
              "id": 1382,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1381,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1390,
                  "src": "2032:4:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1380,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2032:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2031:6:7"
            },
            "scope": 1423,
            "src": "1987:102:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1421,
              "nodeType": "Block",
              "src": "2300:197:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_contract$_Avatar_$12705",
                          "typeString": "contract Avatar"
                        },
                        "id": 1402,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 1398,
                          "name": "avatar",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1281,
                          "src": "2318:6:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_Avatar_$12705",
                            "typeString": "contract Avatar"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 1400,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "2335:1:7",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 1399,
                            "name": "Avatar",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12705,
                            "src": "2328:6:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_Avatar_$12705_$",
                              "typeString": "type(contract Avatar)"
                            }
                          },
                          "id": 1401,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2328:9:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_Avatar_$12705",
                            "typeString": "contract Avatar"
                          }
                        },
                        "src": "2318:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "417661746172206973206e6f7420736574",
                        "id": 1403,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2339:19:7",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_2957c08abbb9a2b4de387234aae0654be99c044e0695c75391204051b4911f84",
                          "typeString": "literal_string \"Avatar is not set\""
                        },
                        "value": "Avatar is not set"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_2957c08abbb9a2b4de387234aae0654be99c044e0695c75391204051b4911f84",
                          "typeString": "literal_string \"Avatar is not set\""
                        }
                      ],
                      "id": 1397,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "2310:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1404,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2310:49:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1405,
                  "nodeType": "ExpressionStatement",
                  "src": "2310:49:7"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "id": 1414,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "2374:57:7",
                    "subExpression": {
                      "argumentTypes": null,
                      "components": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 1408,
                              "name": "scheme",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1392,
                              "src": "2406:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 1410,
                                  "name": "avatar",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1281,
                                  "src": "2422:6:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Avatar_$12705",
                                    "typeString": "contract Avatar"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Avatar_$12705",
                                    "typeString": "contract Avatar"
                                  }
                                ],
                                "id": 1409,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2414:7:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 1411,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2414:15:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 1406,
                              "name": "controller",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1286,
                              "src": "2376:10:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ControllerInterface_$14394",
                                "typeString": "contract ControllerInterface"
                              }
                            },
                            "id": 1407,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "isSchemeRegistered",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 14348,
                            "src": "2376:29:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_bool_$",
                              "typeString": "function (address,address) view external returns (bool)"
                            }
                          },
                          "id": 1412,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2376:54:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "id": 1413,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "TupleExpression",
                      "src": "2375:56:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 1418,
                  "nodeType": "IfStatement",
                  "src": "2370:100:7",
                  "trueBody": {
                    "id": 1417,
                    "nodeType": "Block",
                    "src": "2433:37:7",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "66616c7365",
                          "id": 1415,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2454:5:7",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "functionReturnParameters": 1396,
                        "id": 1416,
                        "nodeType": "Return",
                        "src": "2447:12:7"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "74727565",
                    "id": 1419,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2486:4:7",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 1396,
                  "id": 1420,
                  "nodeType": "Return",
                  "src": "2479:11:7"
                }
              ]
            },
            "documentation": "@dev function to see if an avatar has been set and if this scheme is registered\n@return true if scheme is registered",
            "id": 1422,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isRegistered",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1393,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1392,
                  "name": "scheme",
                  "nodeType": "VariableDeclaration",
                  "scope": 1422,
                  "src": "2257:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1391,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2257:7:7",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2256:16:7"
            },
            "returnParameters": {
              "id": 1396,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1395,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1422,
                  "src": "2294:4:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1394,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2294:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2293:6:7"
            },
            "scope": 1423,
            "src": "2235:262:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 1424,
        "src": "386:2113:7"
      }
    ],
    "src": "0:2500:7"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.16+commit.9c3226ce.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.2.2",
  "updatedAt": "2021-08-23T07:33:52.166Z",
  "devdoc": {
    "methods": {
      "constructor": {
        "details": "Constructor. only sets controller if given avatar is not null.",
        "params": {
          "_avatar": "The avatar of the DAO."
        }
      },
      "isOwner()": {
        "return": "true if `msg.sender` is the owner of the contract."
      },
      "isRegistered()": {
        "details": "function to see if an avatar has been set and if this scheme is registered",
        "return": "true if scheme is registered"
      },
      "isRegistered(address)": {
        "details": "function to see if an avatar has been set and if this scheme is registered",
        "return": "true if scheme is registered"
      },
      "owner()": {
        "return": "the address of the owner."
      },
      "renounceOwnership()": {
        "details": "Allows the current owner to relinquish control of the contract."
      },
      "setAvatar(address)": {
        "details": "Function to set a new avatar and controller for scheme can only be done by owner of scheme"
      },
      "transferOwnership(address)": {
        "details": "Allows the current owner to transfer control of the contract to a newOwner.",
        "params": {
          "newOwner": "The address to transfer ownership to."
        }
      }
    }
  },
  "userdoc": {
    "methods": {
      "renounceOwnership()": {
        "notice": "Renouncing to ownership will leave the contract without an owner. It will not be possible to call the functions with the `onlyOwner` modifier anymore."
      }
    }
  }
}