Create a deal

UI Step: Buyer fills in seller address, amount, token, and agreement hash (terms), then clicks "Create Deal".

Technical Behavior:

  • Function: createDeal(address seller, uint256 amount, address tokenAddress, bytes32 termsHash)

  • The buyer must approve the token transfer beforehand.

  • The contract calculates a 3% fee, deducts it, and locks the remaining funds in escrow.

  • The deal is stored with a unique dealId.

  • The DealCreated event is emitted.

Notes:

  • Deal funds are stored in bankroll[address(this)][tokenAddress].

  • Terms are stored off-chain and referenced by their termsHash.


1

Enter the Seller's Address

Input the EVM address of the seller.

2

Select the Token

Choose the token to be used in the deal. You can either search by name or paste the token's contract address.

3

Input the termsHash

Write the terms of the deal. These terms must be clear, detailed, and precise, as they will serve as the basis for resolution in case of a dispute. Generate the termsHash from your text and download a copy of the terms for reference.

4

Approve Token transfer

Use your wallet to approve the token transfer to the escrow contract.

5

Create the Deal

After approval, click “Create Deal” to initialize the transaction on-chain.


dashboard view

Last updated