Sale Ask
Create or modify the outright sale offer for an existing Entity resource. Enables / disables the sale listing and sets the fixed sell price. Only the Entity owner is permitted to execute this instruction.
open-token entity sale-ask --help
Synopsis
open-token entity sale-ask <Name> <Enabled> <Sell Price>
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
<Name> | String | Yes | Target entity resource name (e.g. open://google.com, open://app.google.com). Must be an existing active on‑chain entity account, may contain dot separators for multi‑level hierarchy. Corresponding human‑readable URI: open://google.com, open://app.google.com. |
<Enabled> | u8 | Yes | Toggle sale offer status. 0 = false(disable offer), 1 = true(enable offer). When disabled, incoming sale‑bid purchase requests will be rejected. |
<Sell Price> | u64 | Yes | Outright 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 entity ownership. |
Behaviour
- Transaction signer must match stored Entity owner public key; returns
OwnerMismatchon authorization failure. - Validates target entity exists and is not expired (
NameExpired). - Validates parent Ecosystem namespace exists on‑chain (
ParentNotCreated). - Persists sale‑offer configuration on‑chain: toggle status + sell price.
- Setting
<Enabled>=0closes the sale listing; rejects newsale‑bid. Does not abort any active rental usership lease that is currently in progress. Existing renter keeps usership until rent expiry. - Setting
<Enabled>=1opens the sale listing; allows external users to callsale‑bidto acquire full ownership of the entity. - Does not modify entity 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 entity owner; any ongoing usership lease remains valid and continues running under new ownership.
- Logical resolution note: Even if entity sale offer is active, the entity is unresolvable via
open://scheme if its parent Ecosystem has expired.
Constraints & Validation Rules
OwnerMismatch: Transaction signer is not the Entity owner.NameExpired: Entity ownership registration expired; cannot configure sale offer.ParentNotCreated: Parent Ecosystem namespace does not exist on‑chain.MaxEntityLevelIsFour: Entity name hierarchy depth exceeds program‑defined maximum level.NameTooLong/NameEmpty: Invalid entity name input.- Invalid
<Enabled>value: any value other than0or1triggers program validation failure. - Zero‑price is permitted unless treasury configuration enforces a minimum sale price.
Usage Example
Enable sale offer for entity open://google.com with sell price 30000 base token units:
open-token entity sale-ask open://google.com 1 30000
Disable sale offer for entity open://app.google.com, active rent lease remains unaffected:
open-token entity sale-ask open://app.google.com 0 30000