[
  {
    "type": "function",
    "name": "createPayout",
    "stateMutability": "nonpayable",
    "inputs": [
      { "name": "recipients", "type": "address[]" },
      { "name": "amounts", "type": "uint256[]" },
      { "name": "referrer", "type": "address" },
      { "name": "payoutReference", "type": "string" },
      { "name": "verificationRequired", "type": "bool" }
    ],
    "outputs": [{ "name": "payoutId", "type": "bytes32" }]
  },
  {
    "type": "function",
    "name": "pay",
    "stateMutability": "payable",
    "inputs": [
      { "name": "payoutId", "type": "bytes32" },
      { "name": "signatures", "type": "bytes[]" }
    ],
    "outputs": []
  },
  {
    "type": "function",
    "name": "cancel",
    "stateMutability": "nonpayable",
    "inputs": [{ "name": "payoutId", "type": "bytes32" }],
    "outputs": []
  },
  {
    "type": "function",
    "name": "quote",
    "stateMutability": "view",
    "inputs": [{ "name": "payoutId", "type": "bytes32" }],
    "outputs": [{ "name": "grandTotal", "type": "uint256" }]
  },
  {
    "type": "function",
    "name": "getPayout",
    "stateMutability": "view",
    "inputs": [{ "name": "payoutId", "type": "bytes32" }],
    "outputs": [
      { "name": "recipients", "type": "address[]" },
      { "name": "amounts", "type": "uint256[]" },
      { "name": "creator", "type": "address" },
      { "name": "referrer", "type": "address" },
      { "name": "paid", "type": "bool" },
      { "name": "cancelled", "type": "bool" },
      { "name": "verificationRequired", "type": "bool" },
      { "name": "payoutReference", "type": "string" }
    ]
  },
  {
    "type": "function",
    "name": "approvalDigest",
    "stateMutability": "view",
    "inputs": [
      { "name": "payoutId", "type": "bytes32" },
      { "name": "recipient", "type": "address" },
      { "name": "amount", "type": "uint256" }
    ],
    "outputs": [{ "name": "", "type": "bytes32" }]
  },
  {
    "type": "function",
    "name": "payouts",
    "stateMutability": "view",
    "inputs": [{ "name": "", "type": "bytes32" }],
    "outputs": [
      { "name": "creator", "type": "address" },
      { "name": "referrer", "type": "address" },
      { "name": "total", "type": "uint256" },
      { "name": "paid", "type": "bool" },
      { "name": "cancelled", "type": "bool" },
      { "name": "verificationRequired", "type": "bool" },
      { "name": "payoutReference", "type": "string" }
    ]
  },
  {
    "type": "event",
    "name": "PayoutCreated",
    "anonymous": false,
    "inputs": [
      { "name": "payoutId", "type": "bytes32", "indexed": true },
      { "name": "creator", "type": "address", "indexed": true },
      { "name": "referrer", "type": "address", "indexed": true },
      { "name": "total", "type": "uint256", "indexed": false },
      { "name": "grandTotal", "type": "uint256", "indexed": false },
      { "name": "verificationRequired", "type": "bool", "indexed": false }
    ]
  },
  {
    "type": "event",
    "name": "PayoutPaid",
    "anonymous": false,
    "inputs": [
      { "name": "payoutId", "type": "bytes32", "indexed": true },
      { "name": "payer", "type": "address", "indexed": true },
      { "name": "referrerAmount", "type": "uint256", "indexed": false },
      { "name": "bulbeaAmount", "type": "uint256", "indexed": false },
      { "name": "grandTotal", "type": "uint256", "indexed": false }
    ]
  },
  {
    "type": "event",
    "name": "PayoutCancelled",
    "anonymous": false,
    "inputs": [
      { "name": "payoutId", "type": "bytes32", "indexed": true },
      { "name": "creator", "type": "address", "indexed": true }
    ]
  },
  {
    "type": "error",
    "name": "TransferFailed",
    "inputs": [
      { "name": "slot", "type": "bytes32" },
      { "name": "recipient", "type": "address" },
      { "name": "amount", "type": "uint256" }
    ]
  }
]
