Skip to content

requestRefund ​

solidity
function requestRefund(uint256 id) external

Only the client can call this function, and the escrow must remain Funded.

The deadline check is:

solidity
if (block.timestamp <= escrow.deadline) revert DeadlineNotPassed();

Therefore the call is valid only when:

text
block.timestamp > deadline

The full escrow amount is transferred directly back to the client, status becomes Refunded, and Refunded(id, amount) is emitted.

Reverts ​

  • NotClient()
  • InvalidStatus(current, Funded)
  • DeadlineNotPassed()
  • TransferFailed()

Documentation grounded in the current ERC-20 escrow implementation.