Accept deal

triangle-exclamation

UI Step: Both the buyer and the seller can accept the deal by clicking "Accept".

Technical Behavior:

  • Function: acceptDeal(uint256 dealId)

  • Only the buyer or seller of the deal can call this function.

  • Both must accept within 30 days of deal creation.

  • Once both accept, the deal is resolved automatically:

    • Funds are transferred to the seller.

    • Deal is marked as resolved.

    • The DealAccepted event is emitted.

Validation:

  • If the deal has expired (timestamp + 30 days), it cannot be accepted.


circle-exclamation

blockchain explorer logs

accept deal widget

Last updated