Skip to main content

Sale Bid

Make a purchase bid to acquire full ownership of an Entity resource. Completes acquisition only if the entity owner’s sale offer is enabled. Any user may invoke this command, provided the sale listing is active.

open-token entity sale-bid --help

Synopsis

open-token entity sale-bid <Name>

Arguments

ArgumentTypeRequiredDescription
<Name>StringYesTarget entity resource name (e.g. open://google.com, open://app.google.com). Must be an existing, non‑expired on‑chain entity account. Corresponding human‑readable URI: open://google.com, open://app.google.com. Entity owner must have an enabled sale offer (sale‑ask Enabled=1).

Behaviour

  • Validates the target entity’s sale offer is enabled. Fails with OfferDisabled if sale listing is turned off.
  • Validates entity account exists and is not expired (NameExpired).
  • Validates parent Ecosystem namespace exists on‑chain (ParentNotCreated).
  • Reads on‑chain sell_price from the sale‑ask configuration.
  • Tokens equal to sell_price are transferred from bidder to entity owner; treasury fees are deducted according to on‑chain configuration.
  • Full ownership of the entity is transferred to the transaction signer (bidder).
  • Active usership lease (if present) remains fully valid and unchanged after ownership transfer. The renter continues to hold usership until rent expiry.
  • Does not modify entity Meta, Body, ownership expiry timestamp, or existing rent state.
  • After successful purchase, the sale offer remains in its existing enabled/disabled state; the new owner may later run sale‑ask to update price or disable listing.
  • Logical resolution note: Even after successful purchase, the entity cannot be resolved via open:// scheme if its parent Ecosystem is expired.

Constraints & Validation Rules

  1. OfferDisabled: Entity owner has not enabled the sale offer.
  2. NameExpired: Underlying entity ownership registration is expired; purchase prohibited.
  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. InsufficientBalance: Bidder does not possess enough tokens to pay the configured sell price plus fees.

Usage Example

Bid to purchase full ownership of multi‑level entity open://app.google.com:

open-token entity sale-bid open://app.google.com