Documentation Index
Fetch the complete documentation index at: https://docs.rentr.live/llms.txt
Use this file to discover all available pages before exploring further.
State diagram
Released or Refunded are final, the contract reverts on double-spend attempts.
Step 1: createRental
Called by the renter from their wallet during checkout.
- Pulls
amount + feeUSDC frommsg.sender(the renter) - Stores the rental record with status
Held - Emits
RentalCreated(rentalId, renter, owner, amount, fee, endTime)
rentalIdalready exists (no duplicate creation)owner == address(0)orowner == msg.sender(no self-rentals or burn-to-zero)endTime <= block.timestamp(rental must be in the future)- USDC
transferFromfails (renter didn’t approve enough)
Step 2a: release (happy path)
Called by our backend operator at the rental’s ends_at.
- Sets rental status to
Released - Transfers
amountUSDC → owner’s wallet - Transfers
feeUSDC → treasury wallet - Emits
RentalReleased(rentalId, owner, amount, fee)
- Rental doesn’t exist or isn’t
Held - Caller isn’t authorized to release
Step 2b: refund (dispute path)
Called by the operator after a dispute is upheld.
- Sets rental status to
Refunded - Transfers
amount + feeUSDC → original renter’s wallet (full amount, fee included) - Emits
RentalRefunded(rentalId, renter, amount, fee)
- Rental doesn’t exist or isn’t
Held - Caller isn’t operator
Events
eth_getLogs. Useful for owner-side accounting or third-party analytics.
Reading state
Therentals(bytes32) mapping is public, so anyone can read a rental’s current state:

