Skip to main content

Sale Ask

Create or modify the outright sale offer for an existing Ecosystem namespace. Enables / disables the sale listing and sets the fixed sell price. Only the Ecosystem owner is permitted to execute this instruction.

open-token ecosystem sale-ask --help

Synopsis

open-token ecosystem sale-ask <Name> <Enabled> <Sell Price>

Arguments

ArgumentTypeRequiredDescription
<Name>StringYesTarget Ecosystem namespace name. No dot characters. Must be an existing active on‑chain ecosystem account.
<Enabled>u8YesToggle sale offer status. 0 = false(disable offer), 1 = true(enable offer). When disabled, incoming sale‑bid purchase requests will be rejected.
<Sell Price>u64YesOutright purchase price in base token units. Takes effect only when <Enabled> is set to 1. This is the total amount a buyer pays to acquire full ownership.

Behaviour

  • Transaction signer must match stored Ecosystem owner public key; returns OwnerMismatch on authorization failure.
  • Validates target ecosystem exists and is not expired (NameExpired).
  • Persists sale‑offer configuration on‑chain: toggle status + sell price.
  • Setting <Enabled>=0 closes the sale listing; rejects new sale‑bid. Does not abort any active rental usership lease that is currently in progress. Existing renter keeps usership until rent expiry.
  • Setting <Enabled>=1 opens the sale listing; allows external users to call sale‑bid to acquire full ownership of the ecosystem.
  • Does not modify ecosystem ownership, meta, body, ownership expiry or existing rent state.
  • This operation only configures the listing; it does not perform ownership transfer. Ownership transfer occurs upon successful sale‑bid.
  • After successful sale, the buyer becomes the new ecosystem owner; any ongoing usership lease remains valid and continues running under new ownership.

Constraints & Validation Rules

  1. OwnerMismatch: Transaction signer is not the Ecosystem owner.
  2. NameExpired: Ecosystem ownership registration expired; cannot configure sale offer.
  3. NameTooLong / NameEmpty: Invalid ecosystem name input.
  4. Invalid <Enabled> value: any value other than 0 or 1 triggers program validation failure.
  5. Zero‑price is permitted unless treasury configuration enforces a minimum sale price.

Usage Example

Enable sale offer for ecosystem open with sell price 50000 base token units:

open-token ecosystem sale-ask open 1 50000

Disable sale offer for ecosystem open (active rent lease continues unaffected):

open-token ecosystem sale-ask open 0 50000