{
  "contractName": "VendingMachineAuthority",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_vendingMachine",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "constructor"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vendingMachine\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"details\":\"Secured by setting the VendingMachine address and using the         onlyVendingMachine modifier on functions requiring restriction.\",\"methods\":{},\"title\":\"Vending Machine Authority.\"},\"userdoc\":{\"methods\":{},\"notice\":\"Contract to secure function calls to the Vending Machine.\"}},\"settings\":{\"compilationTarget\":{\"/home/runner/work/tbtc/tbtc/solidity/contracts/system/VendingMachineAuthority.sol\":\"VendingMachineAuthority\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/runner/work/tbtc/tbtc/solidity/contracts/system/VendingMachineAuthority.sol\":{\"keccak256\":\"0x7ad8a2cee5e6bbc187d04b147dc0d2bc2ae12bb8c3680870be9013dd5543bfd6\",\"urls\":[\"bzz-raw://733f2370c788437b0034c40a8df07f4714009769ed8134a9c656e2a103996687\",\"dweb:/ipfs/Qma9LAGQDzyUvsbhLx3FUKRCx3FmnoZuMxG4SUdjLr8bRm\"]}},\"version\":1}",
  "bytecode": "0x6080604052348015600f57600080fd5b50604051609d380380609d83398181016040526020811015602f57600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055603e80605f6000396000f3fe6080604052600080fdfea265627a7a723158206197e60cc4fe17e671b99a01b7c723a7a8e9983df5dbdd5f32ecae54b925a94b64736f6c63430005110032",
  "deployedBytecode": "0x6080604052600080fdfea265627a7a723158206197e60cc4fe17e671b99a01b7c723a7a8e9983df5dbdd5f32ecae54b925a94b64736f6c63430005110032",
  "sourceMap": "282:444:29:-;;;359:93;8:9:-1;5:2;;;30:1;27;20:12;5:2;359:93:29;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;359:93:29;413:14;:32;;-1:-1:-1;;;;;413:32:29;;;-1:-1:-1;;;;;;413:32:29;;;;;;;;;282:444;;;;;;",
  "deployedSourceMap": "282:444:29:-;;;;;",
  "source": "pragma solidity 0.5.17;\n\n/// @title  Vending Machine Authority.\n/// @notice Contract to secure function calls to the Vending Machine.\n/// @dev    Secured by setting the VendingMachine address and using the\n///         onlyVendingMachine modifier on functions requiring restriction.\ncontract VendingMachineAuthority {\n    address internal VendingMachine;\n\n    constructor(address _vendingMachine) public {\n        VendingMachine = _vendingMachine;\n    }\n\n    /// @notice Function modifier ensures modified function caller address is the vending machine.\n    modifier onlyVendingMachine() {\n        require(\n            msg.sender == VendingMachine,\n            \"caller must be the vending machine\"\n        );\n        _;\n    }\n}\n",
  "sourcePath": "/home/runner/work/tbtc/tbtc/solidity/contracts/system/VendingMachineAuthority.sol",
  "ast": {
    "absolutePath": "/home/runner/work/tbtc/tbtc/solidity/contracts/system/VendingMachineAuthority.sol",
    "exportedSymbols": {
      "VendingMachineAuthority": [
        9150
      ]
    },
    "id": 9151,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 9125,
        "literals": [
          "solidity",
          "0.5",
          ".17"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:29"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": "@title  Vending Machine Authority.\n @notice Contract to secure function calls to the Vending Machine.\n @dev    Secured by setting the VendingMachine address and using the\n         onlyVendingMachine modifier on functions requiring restriction.",
        "fullyImplemented": true,
        "id": 9150,
        "linearizedBaseContracts": [
          9150
        ],
        "name": "VendingMachineAuthority",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "id": 9127,
            "name": "VendingMachine",
            "nodeType": "VariableDeclaration",
            "scope": 9150,
            "src": "321:31:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_address",
              "typeString": "address"
            },
            "typeName": {
              "id": 9126,
              "name": "address",
              "nodeType": "ElementaryTypeName",
              "src": "321:7:29",
              "stateMutability": "nonpayable",
              "typeDescriptions": {
                "typeIdentifier": "t_address",
                "typeString": "address"
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 9136,
              "nodeType": "Block",
              "src": "403:49:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9134,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9132,
                      "name": "VendingMachine",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9127,
                      "src": "413:14:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 9133,
                      "name": "_vendingMachine",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9129,
                      "src": "430:15:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "413:32:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 9135,
                  "nodeType": "ExpressionStatement",
                  "src": "413:32:29"
                }
              ]
            },
            "documentation": null,
            "id": 9137,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9130,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9129,
                  "name": "_vendingMachine",
                  "nodeType": "VariableDeclaration",
                  "scope": 9137,
                  "src": "371:23:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9128,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "371:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "370:25:29"
            },
            "returnParameters": {
              "id": 9131,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "403:0:29"
            },
            "scope": 9150,
            "src": "359:93:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9148,
              "nodeType": "Block",
              "src": "587:137:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 9143,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9140,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18360,
                            "src": "618:3:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 9141,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "618:10:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 9142,
                          "name": "VendingMachine",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9127,
                          "src": "632:14:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "618:28:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "63616c6c6572206d757374206265207468652076656e64696e67206d616368696e65",
                        "id": 9144,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "660:36:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_01e8e107888cab55d1a6d38683b8ae2a686fc7be8c07f265e1a04274c0c05b35",
                          "typeString": "literal_string \"caller must be the vending machine\""
                        },
                        "value": "caller must be the vending machine"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_01e8e107888cab55d1a6d38683b8ae2a686fc7be8c07f265e1a04274c0c05b35",
                          "typeString": "literal_string \"caller must be the vending machine\""
                        }
                      ],
                      "id": 9139,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "597:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9145,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "597:109:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9146,
                  "nodeType": "ExpressionStatement",
                  "src": "597:109:29"
                },
                {
                  "id": 9147,
                  "nodeType": "PlaceholderStatement",
                  "src": "716:1:29"
                }
              ]
            },
            "documentation": "@notice Function modifier ensures modified function caller address is the vending machine.",
            "id": 9149,
            "name": "onlyVendingMachine",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 9138,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "584:2:29"
            },
            "src": "557:167:29",
            "visibility": "internal"
          }
        ],
        "scope": 9151,
        "src": "282:444:29"
      }
    ],
    "src": "0:727:29"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "/home/runner/work/tbtc/tbtc/solidity/contracts/system/VendingMachineAuthority.sol",
      "exportedSymbols": {
        "VendingMachineAuthority": [
          9150
        ]
      }
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "0.5",
            ".17"
          ]
        },
        "id": 9125,
        "name": "PragmaDirective",
        "src": "0:23:29"
      },
      {
        "attributes": {
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "contract",
          "documentation": "@title  Vending Machine Authority.\n @notice Contract to secure function calls to the Vending Machine.\n @dev    Secured by setting the VendingMachine address and using the\n         onlyVendingMachine modifier on functions requiring restriction.",
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            9150
          ],
          "name": "VendingMachineAuthority",
          "scope": 9151
        },
        "children": [
          {
            "attributes": {
              "constant": false,
              "name": "VendingMachine",
              "scope": 9150,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "address",
              "value": null,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "name": "address",
                  "stateMutability": "nonpayable",
                  "type": "address"
                },
                "id": 9126,
                "name": "ElementaryTypeName",
                "src": "321:7:29"
              }
            ],
            "id": 9127,
            "name": "VariableDeclaration",
            "src": "321:31:29"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": true,
              "kind": "constructor",
              "modifiers": [
                null
              ],
              "name": "",
              "scope": 9150,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_vendingMachine",
                      "scope": 9137,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 9128,
                        "name": "ElementaryTypeName",
                        "src": "371:7:29"
                      }
                    ],
                    "id": 9129,
                    "name": "VariableDeclaration",
                    "src": "371:23:29"
                  }
                ],
                "id": 9130,
                "name": "ParameterList",
                "src": "370:25:29"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 9131,
                "name": "ParameterList",
                "src": "403:0:29"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "address"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 9127,
                              "type": "address",
                              "value": "VendingMachine"
                            },
                            "id": 9132,
                            "name": "Identifier",
                            "src": "413:14:29"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 9129,
                              "type": "address",
                              "value": "_vendingMachine"
                            },
                            "id": 9133,
                            "name": "Identifier",
                            "src": "430:15:29"
                          }
                        ],
                        "id": 9134,
                        "name": "Assignment",
                        "src": "413:32:29"
                      }
                    ],
                    "id": 9135,
                    "name": "ExpressionStatement",
                    "src": "413:32:29"
                  }
                ],
                "id": 9136,
                "name": "Block",
                "src": "403:49:29"
              }
            ],
            "id": 9137,
            "name": "FunctionDefinition",
            "src": "359:93:29"
          },
          {
            "attributes": {
              "documentation": "@notice Function modifier ensures modified function caller address is the vending machine.",
              "name": "onlyVendingMachine",
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 9138,
                "name": "ParameterList",
                "src": "584:2:29"
              },
              {
                "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_01e8e107888cab55d1a6d38683b8ae2a686fc7be8c07f265e1a04274c0c05b35",
                                  "typeString": "literal_string \"caller must be the vending machine\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 9139,
                            "name": "Identifier",
                            "src": "597:7:29"
                          },
                          {
                            "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": 9140,
                                    "name": "Identifier",
                                    "src": "618:3:29"
                                  }
                                ],
                                "id": 9141,
                                "name": "MemberAccess",
                                "src": "618:10:29"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 9127,
                                  "type": "address",
                                  "value": "VendingMachine"
                                },
                                "id": 9142,
                                "name": "Identifier",
                                "src": "632:14:29"
                              }
                            ],
                            "id": 9143,
                            "name": "BinaryOperation",
                            "src": "618:28:29"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "63616c6c6572206d757374206265207468652076656e64696e67206d616368696e65",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"caller must be the vending machine\"",
                              "value": "caller must be the vending machine"
                            },
                            "id": 9144,
                            "name": "Literal",
                            "src": "660:36:29"
                          }
                        ],
                        "id": 9145,
                        "name": "FunctionCall",
                        "src": "597:109:29"
                      }
                    ],
                    "id": 9146,
                    "name": "ExpressionStatement",
                    "src": "597:109:29"
                  },
                  {
                    "id": 9147,
                    "name": "PlaceholderStatement",
                    "src": "716:1:29"
                  }
                ],
                "id": 9148,
                "name": "Block",
                "src": "587:137:29"
              }
            ],
            "id": 9149,
            "name": "ModifierDefinition",
            "src": "557:167:29"
          }
        ],
        "id": 9150,
        "name": "ContractDefinition",
        "src": "282:444:29"
      }
    ],
    "id": 9151,
    "name": "SourceUnit",
    "src": "0:727:29"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.17+commit.d19bba13.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.3.4",
  "updatedAt": "2021-11-23T11:52:09.333Z",
  "devdoc": {
    "details": "Secured by setting the VendingMachine address and using the         onlyVendingMachine modifier on functions requiring restriction.",
    "methods": {},
    "title": "Vending Machine Authority."
  },
  "userdoc": {
    "methods": {},
    "notice": "Contract to secure function calls to the Vending Machine."
  }
}