Skip to main content

Rent Ask

Create or modify the usership rental offer for an existing Entity resource. Enables / disables the rental listing and sets the daily rent price. Only the Entity owner is permitted to execute this instruction.

open-token entity rent-ask --help

Synopsis

open-token entity rent-ask <Name> <Enabled> <Rent Per Day>

Arguments

ArgumentTypeRequiredDescription
<Name>StringYesTarget entity resource name (e.g. open://google.com, open://app.google.com). Must be an existing on‑chain entity account, may contain dot separators for multi‑level hierarchy. Corresponding human‑readable URI: open://google.com, open://app.google.com.
<Enabled>u8YesToggle usership offer status. 0 = false(disable offer), 1 = true(enable offer). When disabled, new rent‑bid requests will be rejected.
<Rent Per Day>u64YesDaily rent amount in base token units. Defines how much a renter pays per calendar‑day of usership. Value takes effect only when <Enabled> is set to 1.

Behaviour

  • Transaction signer must match stored Entity owner public key; returns OwnerMismatch on authorization failure.
  • Validates target entity exists and is not expired (NameExpired).
  • Validates parent Ecosystem namespace exists on‑chain (ParentNotCreated).
  • Persists the rental offer configuration on‑chain: toggle status + per‑day rent price.
  • Setting <Enabled>=0 closes the offer; prevents new rent bids, does NOT terminate an already‑active ongoing usership lease. Existing renter retains usership until lease expiry.
  • Setting <Enabled>=1 opens the offer; allows external users to call rent‑bid to acquire usership.
  • Does not modify entity ownership, meta, body, or ownership expiry timestamp.
  • This only configures the listing; it does not create a rental lease. Actual lease creation happens via rent‑bid.
  • Logical resolution note: Even if entity rent offer is active, the entity is unresolvable via open:// scheme if its parent Ecosystem has expired.

Constraints & Validation Rules

  1. OwnerMismatch: Transaction signer is not the Entity owner.
  2. NameExpired: Entity ownership registration is expired; cannot configure rent offer.
  3. ParentNotCreated: Parent Ecosystem namespace does not exist on‑chain.
  4. MaxEntityLevelIsFour: Entity name hierarchy depth exceeds program‑defined maximum level.
  5. NameTooLong / NameEmpty: Invalid entity name input.
  6. Invalid <Enabled> value: any value other than 0 or 1 will cause program validation failure.
  7. Zero‑price is allowed by program logic unless treasury enforces a minimum rent price.

Usage Example

Enable usership offer for entity open://google.com, set daily rent price to 2000 base units:

open-token entity rent-ask open://google.com 1 2000

Disable the usership offer for entity open://app.google.com, existing active lease remains valid:

open-token entity rent-ask open://app.google.com 0 2000