{
  "fileName": "ConditionalEscrow.sol",
  "contractName": "ConditionalEscrow",
  "source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"./Escrow.sol\";\n\n/**\n * @title ConditionalEscrow\n * @dev Base abstract escrow to only allow withdrawal if a condition is met.\n * @dev Intended usage: See {Escrow}. Same usage guidelines apply here.\n */\nabstract contract ConditionalEscrow is Escrow {\n    /**\n     * @dev Returns whether an address is allowed to withdraw their funds. To be\n     * implemented by derived contracts.\n     * @param payee The destination address of the funds.\n     */\n    function withdrawalAllowed(address payee) public view virtual returns (bool);\n\n    function withdraw(address payable payee) public virtual override {\n        require(withdrawalAllowed(payee), \"ConditionalEscrow: payee is not allowed to withdraw\");\n        super.withdraw(payee);\n    }\n}\n",
  "sourcePath": "contracts/payment/escrow/ConditionalEscrow.sol",
  "sourceMap": "",
  "deployedSourceMap": "",
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "payee",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "weiAmount",
          "type": "uint256"
        }
      ],
      "name": "Deposited",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "payee",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "weiAmount",
          "type": "uint256"
        }
      ],
      "name": "Withdrawn",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "payee",
          "type": "address"
        }
      ],
      "name": "deposit",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "payee",
          "type": "address"
        }
      ],
      "name": "depositsOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address payable",
          "name": "payee",
          "type": "address"
        }
      ],
      "name": "withdraw",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "payee",
          "type": "address"
        }
      ],
      "name": "withdrawalAllowed",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "ast": {
    "absolutePath": "contracts/payment/escrow/ConditionalEscrow.sol",
    "exportedSymbols": {
      "ConditionalEscrow": [
        6548
      ]
    },
    "id": 6549,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 6515,
        "literals": [
          "solidity",
          "^",
          "0.7",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "33:23:70"
      },
      {
        "absolutePath": "contracts/payment/escrow/Escrow.sol",
        "file": "./Escrow.sol",
        "id": 6516,
        "nodeType": "ImportDirective",
        "scope": 6549,
        "sourceUnit": 6654,
        "src": "58:22:70",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": true,
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 6518,
              "name": "Escrow",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 6653,
              "src": "306:6:70",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Escrow_$6653",
                "typeString": "contract Escrow"
              }
            },
            "id": 6519,
            "nodeType": "InheritanceSpecifier",
            "src": "306:6:70"
          }
        ],
        "contractDependencies": [
          22,
          1576,
          6653
        ],
        "contractKind": "contract",
        "documentation": {
          "id": 6517,
          "nodeType": "StructuredDocumentation",
          "src": "82:184:70",
          "text": " @title ConditionalEscrow\n @dev Base abstract escrow to only allow withdrawal if a condition is met.\n @dev Intended usage: See {Escrow}. Same usage guidelines apply here."
        },
        "fullyImplemented": false,
        "id": 6548,
        "linearizedBaseContracts": [
          6548,
          6653,
          1576,
          22
        ],
        "name": "ConditionalEscrow",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": null,
            "documentation": {
              "id": 6520,
              "nodeType": "StructuredDocumentation",
              "src": "319:191:70",
              "text": " @dev Returns whether an address is allowed to withdraw their funds. To be\n implemented by derived contracts.\n @param payee The destination address of the funds."
            },
            "functionSelector": "685ca194",
            "id": 6527,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "withdrawalAllowed",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 6523,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6522,
                  "mutability": "mutable",
                  "name": "payee",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6527,
                  "src": "542:13:70",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6521,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "542:7:70",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "541:15:70"
            },
            "returnParameters": {
              "id": 6526,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6525,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6527,
                  "src": "586:4:70",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6524,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "586:4:70",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "585:6:70"
            },
            "scope": 6548,
            "src": "515:77:70",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "public"
          },
          {
            "baseFunctions": [
              6652
            ],
            "body": {
              "id": 6546,
              "nodeType": "Block",
              "src": "663:136:70",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 6535,
                            "name": "payee",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6529,
                            "src": "699:5:70",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          ],
                          "id": 6534,
                          "name": "withdrawalAllowed",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6527,
                          "src": "681:17:70",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
                            "typeString": "function (address) view returns (bool)"
                          }
                        },
                        "id": 6536,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "681:24:70",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "436f6e646974696f6e616c457363726f773a207061796565206973206e6f7420616c6c6f77656420746f207769746864726177",
                        "id": 6537,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "707:53:70",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_8ab85541a5cdc1a44c30d5b8b58432efbc37ed9be825439a16d2e39ce610814a",
                          "typeString": "literal_string \"ConditionalEscrow: payee is not allowed to withdraw\""
                        },
                        "value": "ConditionalEscrow: payee is not allowed to withdraw"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_8ab85541a5cdc1a44c30d5b8b58432efbc37ed9be825439a16d2e39ce610814a",
                          "typeString": "literal_string \"ConditionalEscrow: payee is not allowed to withdraw\""
                        }
                      ],
                      "id": 6533,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "673:7:70",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6538,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "673:88:70",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6539,
                  "nodeType": "ExpressionStatement",
                  "src": "673:88:70"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 6543,
                        "name": "payee",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6529,
                        "src": "786:5:70",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 6540,
                        "name": "super",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": -25,
                        "src": "771:5:70",
                        "typeDescriptions": {
                          "typeIdentifier": "t_super$_ConditionalEscrow_$6548",
                          "typeString": "contract super ConditionalEscrow"
                        }
                      },
                      "id": 6542,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "withdraw",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 6652,
                      "src": "771:14:70",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$returns$__$",
                        "typeString": "function (address payable)"
                      }
                    },
                    "id": 6544,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "771:21:70",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6545,
                  "nodeType": "ExpressionStatement",
                  "src": "771:21:70"
                }
              ]
            },
            "documentation": null,
            "functionSelector": "51cff8d9",
            "id": 6547,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "withdraw",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 6531,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "654:8:70"
            },
            "parameters": {
              "id": 6530,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6529,
                  "mutability": "mutable",
                  "name": "payee",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6547,
                  "src": "616:21:70",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address_payable",
                    "typeString": "address payable"
                  },
                  "typeName": {
                    "id": 6528,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "616:15:70",
                    "stateMutability": "payable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address_payable",
                      "typeString": "address payable"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "615:23:70"
            },
            "returnParameters": {
              "id": 6532,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "663:0:70"
            },
            "scope": 6548,
            "src": "598:201:70",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "public"
          }
        ],
        "scope": 6549,
        "src": "267:534:70"
      }
    ],
    "src": "33:769:70"
  },
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "compiler": {
    "name": "solc",
    "version": "0.7.0+commit.9e61f92b.Emscripten.clang",
    "optimizer": {
      "enabled": false,
      "runs": 200
    },
    "evmVersion": "petersburg"
  }
}
