[
  {
    "inputs": [],
    "name": "BadCounterparty",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "BadDays",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "BadScore",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "BadSplit",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "CannotRate",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "DirectTransfer",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NoMatchingProposal",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NoSuchDeal",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NoValue",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NotA",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "enum PinchDealsBase.Status",
        "name": "effective",
        "type": "uint8"
      }
    ],
    "name": "NotActive",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "enum PinchDealsBase.Status",
        "name": "effective",
        "type": "uint8"
      }
    ],
    "name": "NotOpen",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NotParty",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NothingToClaim",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NothingToWithdraw",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OwnProposal",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "Reentrancy",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "TransferFailed",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "a",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "b",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint64",
        "name": "deadline",
        "type": "uint64"
      }
    ],
    "name": "Opened",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "bool",
        "name": "pendingWithdrawal",
        "type": "bool"
      }
    ],
    "name": "Paid",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "rater",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "ratee",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint8",
        "name": "score",
        "type": "uint8"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "weight",
        "type": "uint256"
      }
    ],
    "name": "Rated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      }
    ],
    "name": "Refunded",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "bool",
        "name": "automatic",
        "type": "bool"
      }
    ],
    "name": "Released",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "by",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "toA",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "toB",
        "type": "uint256"
      }
    ],
    "name": "SettleProposed",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "toA",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "toB",
        "type": "uint256"
      }
    ],
    "name": "Settled",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint64",
        "name": "unlockAt",
        "type": "uint64"
      }
    ],
    "name": "Stopped",
    "type": "event"
  },
  {
    "stateMutability": "payable",
    "type": "fallback"
  },
  {
    "inputs": [],
    "name": "DAY",
    "outputs": [
      {
        "internalType": "uint64",
        "name": "",
        "type": "uint64"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "DISPUTE_DAYS",
    "outputs": [
      {
        "internalType": "uint32",
        "name": "",
        "type": "uint32"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "MAX_DAYS",
    "outputs": [
      {
        "internalType": "uint32",
        "name": "",
        "type": "uint32"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "MIN_DAYS",
    "outputs": [
      {
        "internalType": "uint32",
        "name": "",
        "type": "uint32"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "PARTNER_CAP",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "PARTNER_MIN_PAID",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "SCORE_MAX",
    "outputs": [
      {
        "internalType": "uint8",
        "name": "",
        "type": "uint8"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "SCORE_MIN",
    "outputs": [
      {
        "internalType": "uint8",
        "name": "",
        "type": "uint8"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "toA",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "toB",
        "type": "uint256"
      }
    ],
    "name": "acceptSettle",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "internalType": "address",
        "name": "who",
        "type": "address"
      }
    ],
    "name": "canRate",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      }
    ],
    "name": "claim",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "dealCount",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "who",
        "type": "address"
      }
    ],
    "name": "dealsOf",
    "outputs": [
      {
        "internalType": "uint256[]",
        "name": "",
        "type": "uint256[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      }
    ],
    "name": "effectiveStatus",
    "outputs": [
      {
        "internalType": "enum PinchDealsBase.Status",
        "name": "",
        "type": "uint8"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      }
    ],
    "name": "getDeal",
    "outputs": [
      {
        "components": [
          {
            "internalType": "address",
            "name": "a",
            "type": "address"
          },
          {
            "internalType": "address",
            "name": "b",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "amount",
            "type": "uint256"
          },
          {
            "internalType": "uint64",
            "name": "openedAt",
            "type": "uint64"
          },
          {
            "internalType": "uint64",
            "name": "deadline",
            "type": "uint64"
          },
          {
            "internalType": "uint64",
            "name": "unlockAt",
            "type": "uint64"
          },
          {
            "internalType": "enum PinchDealsBase.Status",
            "name": "status",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "ratingByA",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "ratingByB",
            "type": "uint8"
          },
          {
            "internalType": "uint256",
            "name": "toA",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "toB",
            "type": "uint256"
          },
          {
            "internalType": "address",
            "name": "proposer",
            "type": "address"
          },
          {
            "internalType": "uint256",
            "name": "propToA",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "propToB",
            "type": "uint256"
          }
        ],
        "internalType": "struct PinchDealsBase.Deal",
        "name": "",
        "type": "tuple"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "b",
        "type": "address"
      },
      {
        "internalType": "uint32",
        "name": "days_",
        "type": "uint32"
      }
    ],
    "name": "open",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      }
    ],
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "name": "pending",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "who",
        "type": "address"
      }
    ],
    "name": "profile",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint64",
            "name": "dealsAsA",
            "type": "uint64"
          },
          {
            "internalType": "uint64",
            "name": "dealsAsB",
            "type": "uint64"
          },
          {
            "internalType": "uint64",
            "name": "completed",
            "type": "uint64"
          },
          {
            "internalType": "uint64",
            "name": "partners",
            "type": "uint64"
          },
          {
            "internalType": "uint64",
            "name": "disputesOpened",
            "type": "uint64"
          },
          {
            "internalType": "uint64",
            "name": "disputesReceived",
            "type": "uint64"
          },
          {
            "internalType": "uint64",
            "name": "ratingsCount",
            "type": "uint64"
          },
          {
            "internalType": "uint256",
            "name": "volumePaid",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "volumeReceived",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "locked",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "ratingRawX100",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "ratingX100",
            "type": "uint256"
          }
        ],
        "internalType": "struct PinchDealsBase.Profile",
        "name": "p",
        "type": "tuple"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "toA",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "toB",
        "type": "uint256"
      }
    ],
    "name": "proposeSettle",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "internalType": "uint8",
        "name": "score",
        "type": "uint8"
      }
    ],
    "name": "rate",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      }
    ],
    "name": "release",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      }
    ],
    "name": "stop",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "withdraw",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address payable",
        "name": "to",
        "type": "address"
      }
    ],
    "name": "withdrawTo",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "stateMutability": "payable",
    "type": "receive"
  }
]