{
  "contractName": "TBTCSystemAuthority",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_tbtcSystemAddress",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "constructor"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tbtcSystemAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"details\":\"The `TBTCSystem` contract address is passed as a constructor parameter.\",\"methods\":{},\"title\":\"TBTC System Authority.\"},\"userdoc\":{\"methods\":{\"constructor\":\"Set the address of the System contract on contract initialization.\"},\"notice\":\"Contract to secure function calls to the TBTC System contract.\"}},\"settings\":{\"compilationTarget\":{\"/home/runner/work/tbtc/tbtc/solidity/contracts/system/TBTCSystemAuthority.sol\":\"TBTCSystemAuthority\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/runner/work/tbtc/tbtc/solidity/contracts/system/TBTCSystemAuthority.sol\":{\"keccak256\":\"0xc072c71402f122e3ae148000b95559169cb39b8752977817f4f88b372e7d77dd\",\"urls\":[\"bzz-raw://9c91b71602bf36f66d6ab24156777a2ef18c027f09055232011f9012387e6c70\",\"dweb:/ipfs/QmYAEZ8ithnhVcdCt76mqeJg6P8ZY3VejsV7pQNvMMFqc2\"]}},\"version\":1}",
  "bytecode": "0x6080604052348015600f57600080fd5b50604051609d380380609d83398181016040526020811015602f57600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055603e80605f6000396000f3fe6080604052600080fdfea265627a7a7231582066687c29f434ad7abf881cf3f55f5fb775384b5bf8c9e8f2e6e35d3636820b8b64736f6c63430005110032",
  "deployedBytecode": "0x6080604052600080fdfea265627a7a7231582066687c29f434ad7abf881cf3f55f5fb775384b5bf8c9e8f2e6e35d3636820b8b64736f6c63430005110032",
  "sourceMap": "219:525:25:-;;;378:102;8:9:-1;5:2;;;30:1;27;20:12;5:2;378:102:25;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;378:102:25;435:17;:38;;-1:-1:-1;;;;;435:38:25;;;-1:-1:-1;;;;;;435:38:25;;;;;;;;;219:525;;;;;;",
  "deployedSourceMap": "219:525:25:-;;;;;",
  "source": "pragma solidity 0.5.17;\n\n/// @title  TBTC System Authority.\n/// @notice Contract to secure function calls to the TBTC System contract.\n/// @dev    The `TBTCSystem` contract address is passed as a constructor parameter.\ncontract TBTCSystemAuthority {\n    address internal tbtcSystemAddress;\n\n    /// @notice Set the address of the System contract on contract initialization.\n    constructor(address _tbtcSystemAddress) public {\n        tbtcSystemAddress = _tbtcSystemAddress;\n    }\n\n    /// @notice Function modifier ensures modified function is only called by TBTCSystem.\n    modifier onlyTbtcSystem() {\n        require(\n            msg.sender == tbtcSystemAddress,\n            \"Caller must be tbtcSystem contract\"\n        );\n        _;\n    }\n}\n",
  "sourcePath": "/home/runner/work/tbtc/tbtc/solidity/contracts/system/TBTCSystemAuthority.sol",
  "ast": {
    "absolutePath": "/home/runner/work/tbtc/tbtc/solidity/contracts/system/TBTCSystemAuthority.sol",
    "exportedSymbols": {
      "TBTCSystemAuthority": [
        8399
      ]
    },
    "id": 8400,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 8374,
        "literals": [
          "solidity",
          "0.5",
          ".17"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:25"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": "@title  TBTC System Authority.\n @notice Contract to secure function calls to the TBTC System contract.\n @dev    The `TBTCSystem` contract address is passed as a constructor parameter.",
        "fullyImplemented": true,
        "id": 8399,
        "linearizedBaseContracts": [
          8399
        ],
        "name": "TBTCSystemAuthority",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "id": 8376,
            "name": "tbtcSystemAddress",
            "nodeType": "VariableDeclaration",
            "scope": 8399,
            "src": "254:34:25",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_address",
              "typeString": "address"
            },
            "typeName": {
              "id": 8375,
              "name": "address",
              "nodeType": "ElementaryTypeName",
              "src": "254:7:25",
              "stateMutability": "nonpayable",
              "typeDescriptions": {
                "typeIdentifier": "t_address",
                "typeString": "address"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 8385,
              "nodeType": "Block",
              "src": "425:55:25",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 8383,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 8381,
                      "name": "tbtcSystemAddress",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8376,
                      "src": "435:17:25",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 8382,
                      "name": "_tbtcSystemAddress",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8378,
                      "src": "455:18:25",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "435:38:25",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 8384,
                  "nodeType": "ExpressionStatement",
                  "src": "435:38:25"
                }
              ]
            },
            "documentation": "@notice Set the address of the System contract on contract initialization.",
            "id": 8386,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8379,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8378,
                  "name": "_tbtcSystemAddress",
                  "nodeType": "VariableDeclaration",
                  "scope": 8386,
                  "src": "390:26:25",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 8377,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "390:7:25",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "389:28:25"
            },
            "returnParameters": {
              "id": 8380,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "425:0:25"
            },
            "scope": 8399,
            "src": "378:102:25",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 8397,
              "nodeType": "Block",
              "src": "602:140:25",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 8392,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 8389,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18360,
                            "src": "633:3:25",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 8390,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "633:10:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 8391,
                          "name": "tbtcSystemAddress",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8376,
                          "src": "647:17:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "633:31:25",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "43616c6c6572206d757374206265207462746353797374656d20636f6e7472616374",
                        "id": 8393,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "678:36:25",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_34f16208e81741f0daa2d2dee420727a4d4a14dfbdc86819fa3495cd846a7336",
                          "typeString": "literal_string \"Caller must be tbtcSystem contract\""
                        },
                        "value": "Caller must be tbtcSystem contract"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_34f16208e81741f0daa2d2dee420727a4d4a14dfbdc86819fa3495cd846a7336",
                          "typeString": "literal_string \"Caller must be tbtcSystem contract\""
                        }
                      ],
                      "id": 8388,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "612:7:25",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 8394,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "612:112:25",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8395,
                  "nodeType": "ExpressionStatement",
                  "src": "612:112:25"
                },
                {
                  "id": 8396,
                  "nodeType": "PlaceholderStatement",
                  "src": "734:1:25"
                }
              ]
            },
            "documentation": "@notice Function modifier ensures modified function is only called by TBTCSystem.",
            "id": 8398,
            "name": "onlyTbtcSystem",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 8387,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "599:2:25"
            },
            "src": "576:166:25",
            "visibility": "internal"
          }
        ],
        "scope": 8400,
        "src": "219:525:25"
      }
    ],
    "src": "0:745:25"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "/home/runner/work/tbtc/tbtc/solidity/contracts/system/TBTCSystemAuthority.sol",
      "exportedSymbols": {
        "TBTCSystemAuthority": [
          8399
        ]
      }
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "0.5",
            ".17"
          ]
        },
        "id": 8374,
        "name": "PragmaDirective",
        "src": "0:23:25"
      },
      {
        "attributes": {
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "contract",
          "documentation": "@title  TBTC System Authority.\n @notice Contract to secure function calls to the TBTC System contract.\n @dev    The `TBTCSystem` contract address is passed as a constructor parameter.",
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            8399
          ],
          "name": "TBTCSystemAuthority",
          "scope": 8400
        },
        "children": [
          {
            "attributes": {
              "constant": false,
              "name": "tbtcSystemAddress",
              "scope": 8399,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "address",
              "value": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "name": "address",
                  "stateMutability": "nonpayable",
                  "type": "address"
                },
                "id": 8375,
                "name": "ElementaryTypeName",
                "src": "254:7:25"
              }
            ],
            "id": 8376,
            "name": "VariableDeclaration",
            "src": "254:34:25"
          },
          {
            "attributes": {
              "documentation": "@notice Set the address of the System contract on contract initialization.",
              "implemented": true,
              "isConstructor": true,
              "kind": "constructor",
              "modifiers": [
                null
              ],
              "name": "",
              "scope": 8399,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_tbtcSystemAddress",
                      "scope": 8386,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 8377,
                        "name": "ElementaryTypeName",
                        "src": "390:7:25"
                      }
                    ],
                    "id": 8378,
                    "name": "VariableDeclaration",
                    "src": "390:26:25"
                  }
                ],
                "id": 8379,
                "name": "ParameterList",
                "src": "389:28:25"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 8380,
                "name": "ParameterList",
                "src": "425:0:25"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "address"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 8376,
                              "type": "address",
                              "value": "tbtcSystemAddress"
                            },
                            "id": 8381,
                            "name": "Identifier",
                            "src": "435:17:25"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 8378,
                              "type": "address",
                              "value": "_tbtcSystemAddress"
                            },
                            "id": 8382,
                            "name": "Identifier",
                            "src": "455:18:25"
                          }
                        ],
                        "id": 8383,
                        "name": "Assignment",
                        "src": "435:38:25"
                      }
                    ],
                    "id": 8384,
                    "name": "ExpressionStatement",
                    "src": "435:38:25"
                  }
                ],
                "id": 8385,
                "name": "Block",
                "src": "425:55:25"
              }
            ],
            "id": 8386,
            "name": "FunctionDefinition",
            "src": "378:102:25"
          },
          {
            "attributes": {
              "documentation": "@notice Function modifier ensures modified function is only called by TBTCSystem.",
              "name": "onlyTbtcSystem",
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 8387,
                "name": "ParameterList",
                "src": "599:2:25"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_34f16208e81741f0daa2d2dee420727a4d4a14dfbdc86819fa3495cd846a7336",
                                  "typeString": "literal_string \"Caller must be tbtcSystem contract\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 8388,
                            "name": "Identifier",
                            "src": "612:7:25"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "sender",
                                  "referencedDeclaration": null,
                                  "type": "address payable"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 18360,
                                      "type": "msg",
                                      "value": "msg"
                                    },
                                    "id": 8389,
                                    "name": "Identifier",
                                    "src": "633:3:25"
                                  }
                                ],
                                "id": 8390,
                                "name": "MemberAccess",
                                "src": "633:10:25"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 8376,
                                  "type": "address",
                                  "value": "tbtcSystemAddress"
                                },
                                "id": 8391,
                                "name": "Identifier",
                                "src": "647:17:25"
                              }
                            ],
                            "id": 8392,
                            "name": "BinaryOperation",
                            "src": "633:31:25"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "43616c6c6572206d757374206265207462746353797374656d20636f6e7472616374",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Caller must be tbtcSystem contract\"",
                              "value": "Caller must be tbtcSystem contract"
                            },
                            "id": 8393,
                            "name": "Literal",
                            "src": "678:36:25"
                          }
                        ],
                        "id": 8394,
                        "name": "FunctionCall",
                        "src": "612:112:25"
                      }
                    ],
                    "id": 8395,
                    "name": "ExpressionStatement",
                    "src": "612:112:25"
                  },
                  {
                    "id": 8396,
                    "name": "PlaceholderStatement",
                    "src": "734:1:25"
                  }
                ],
                "id": 8397,
                "name": "Block",
                "src": "602:140:25"
              }
            ],
            "id": 8398,
            "name": "ModifierDefinition",
            "src": "576:166:25"
          }
        ],
        "id": 8399,
        "name": "ContractDefinition",
        "src": "219:525:25"
      }
    ],
    "id": 8400,
    "name": "SourceUnit",
    "src": "0:745:25"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.17+commit.d19bba13.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.3.4",
  "updatedAt": "2021-11-23T11:52:09.321Z",
  "devdoc": {
    "details": "The `TBTCSystem` contract address is passed as a constructor parameter.",
    "methods": {},
    "title": "TBTC System Authority."
  },
  "userdoc": {
    "methods": {
      "constructor": "Set the address of the System contract on contract initialization."
    },
    "notice": "Contract to secure function calls to the TBTC System contract."
  }
}