Skip to main content

Rent Bid

Submit a bid to take usership lease on an Ecosystem namespace. Creates an active rental lease if the owner’s usership offer is enabled. Any user may invoke this command, provided the rental listing is open.

open-token ecosystem rent-bid --help

Synopsis

open-token ecosystem rent-bid <Name> <Days>

Arguments

ArgumentTypeRequiredDescription
<Name>StringYesTarget Ecosystem namespace name. No dot characters. Must be an existing, non‑expired on‑chain ecosystem. Owner must have an enabled usership offer.
<Days>u32YesRequested lease duration in calendar days. Subject to program‑enforced minimum and maximum rent duration limits. Total rent cost = rent_per_day × days, charged in base token units.

Behaviour

  • Validates that the target ecosystem’s usership offer is enabled (Enabled = 1). Fails if offer is disabled.
  • Validates the ecosystem account exists and is not expired (NameExpired).
  • Rejects if there is already an active ongoing usership lease (AlreadyRented); one lease per‑ecosystem at a time.
  • Total rent amount is calculated from the on‑chain rent_per_day multiplied by input <Days>. Tokens are transferred from bidder to ecosystem owner (and treasury fees if applicable).
  • Creates new active usership lease record; transaction signer becomes the new renter (tenant).
  • Lease expiry timestamp = current block clock unix timestamp + Days × 86400 seconds.
  • Does not change ecosystem ownership, meta, body content, or ownership expiry timestamp.
  • After lease expiry, usership privileges are revoked automatically. Owner regains full usage rights, and new rent‑bid becomes possible again.

Constraints & Validation Rules

  1. OfferDisabled: Ecosystem owner has not enabled the usership offer (rent‑ask Enabled=0).
  2. AlreadyRented: An active usership lease is already in effect for this ecosystem.
  3. DaysTooSmall: Requested lease days below program‑defined minimum rent duration.
  4. RentTooLong: Requested lease days exceed program‑defined maximum rent duration.
  5. NameExpired: Underlying ecosystem ownership registration is expired; rent‑bid prohibited.
  6. NameTooLong / NameEmpty: Invalid ecosystem name input.
  7. InsufficientBalance: Bidder does not hold enough tokens to cover total rent payment.

Usage Example

Bid to acquire usership on ecosystem open for 60 days:

open-token ecosystem rent-bid open 60