Smart Contracts
ABIs
Frontend ABI definitions used by Wagmi and Viem.- dealRoomAbi includes errors, read functions, write functions, and deal events.
- Use these ABI definitions with writeContractAsync and publicClient.readContract.
[
{
"type": "error",
"name": "FounderCannotCounter",
"inputs": []
},
{
"type": "error",
"name": "InvalidDealState",
"inputs": [
{
"name": "current",
"type": "uint8"
}
]
},
{
"type": "error",
"name": "NoxValidateInputProofFailed",
"inputs": [
{
"name": "data",
"type": "bytes"
}
]
},
{
"type": "error",
"name": "NoxAddViewerFailed",
"inputs": [
{
"name": "step",
"type": "string"
},
{
"name": "data",
"type": "bytes"
}
]
},
{
"type": "function",
"name": "dealCount",
"stateMutability": "view",
"inputs": [],
"outputs": [
{
"type": "uint256"
}
]
},
{
"type": "function",
"name": "deals",
"stateMutability": "view",
"inputs": [
{
"name": "dealId",
"type": "uint256"
}
],
"outputs": [
{
"name": "founder",
"type": "address"
},
{
"name": "investor",
"type": "address"
},
{
"name": "encryptedValuation",
"type": "bytes32"
},
{
"name": "encryptedEquityPct",
"type": "bytes32"
},
{
"name": "encryptedRiskScore",
"type": "bytes32"
},
{
"name": "encryptedFundAmount",
"type": "bytes32"
},
{
"name": "status",
"type": "uint8"
},
{
"name": "createdAt",
"type": "uint256"
}
]
},
{
"type": "function",
"name": "createDeal",
"stateMutability": "nonpayable",
"inputs": [
{
"name": "valuationHandle",
"type": "bytes32"
},
{
"name": "valuationProof",
"type": "bytes"
},
{
"name": "equityHandle",
"type": "bytes32"
},
{
"name": "equityProof",
"type": "bytes"
}
],
"outputs": [
{
"name": "dealId",
"type": "uint256"
}
]
},
{
"type": "function",
"name": "submitScore",
"stateMutability": "nonpayable",
"inputs": [
{
"name": "dealId",
"type": "uint256"
},
{
"name": "scoreHandle",
"type": "bytes32"
},
{
"name": "scoreProof",
"type": "bytes"
}
],
"outputs": []
},
{
"type": "function",
"name": "counterDeal",
"stateMutability": "nonpayable",
"inputs": [
{
"name": "dealId",
"type": "uint256"
},
{
"name": "fundAmountHandle",
"type": "bytes32"
},
{
"name": "fundAmountProof",
"type": "bytes"
}
],
"outputs": []
},
{
"type": "function",
"name": "acceptDeal",
"stateMutability": "nonpayable",
"inputs": [
{
"name": "dealId",
"type": "uint256"
}
],
"outputs": []
},
{
"type": "function",
"name": "closeDeal",
"stateMutability": "nonpayable",
"inputs": [
{
"name": "dealId",
"type": "uint256"
}
],
"outputs": []
},
{
"type": "function",
"name": "rejectDeal",
"stateMutability": "nonpayable",
"inputs": [
{
"name": "dealId",
"type": "uint256"
}
],
"outputs": []
},
{
"type": "event",
"name": "DealCreated",
"inputs": [
{
"indexed": true,
"name": "dealId",
"type": "uint256"
},
{
"indexed": true,
"name": "founder",
"type": "address"
},
{
"indexed": false,
"name": "valuationHandle",
"type": "bytes32"
},
{
"indexed": false,
"name": "equityHandle",
"type": "bytes32"
}
]
},
{
"type": "event",
"name": "ScoreSubmitted",
"inputs": [
{
"indexed": true,
"name": "dealId",
"type": "uint256"
},
{
"indexed": false,
"name": "scoreHandle",
"type": "bytes32"
}
]
},
{
"type": "event",
"name": "DealCountered",
"inputs": [
{
"indexed": true,
"name": "dealId",
"type": "uint256"
},
{
"indexed": true,
"name": "investor",
"type": "address"
},
{
"indexed": false,
"name": "fundAmountHandle",
"type": "bytes32"
}
]
}
]