Skip to main content

Update Body

Update the body field of an Ecosystem namespace. The body stores arbitrary JSON‑formatted metadata string, e.g. content metadata, external resource pointers, custom application payload. Only the current Ecosystem owner is permitted to execute this instruction.

open-token ecosystem update-body --help

Synopsis

open-token ecosystem update-body <Name> <Body>

Arguments

ArgumentTypeRequiredDescription
<Name>StringYesTarget Ecosystem namespace name. No dot characters. Must reference an existing non‑expired on‑chain ecosystem account.
<Body>JSON‑StringYesRaw JSON string payload. Must be valid JSON serialized string. Subject to on‑chain program maximum byte‑length limit. Program stores the string verbatim; it does not validate or interpret JSON semantics.

Behaviour

  • Transaction signer must match stored Ecosystem owner public key; returns OwnerMismatch on authorization failure.
  • Validates target ecosystem exists and is not expired (NameExpired).
  • Overwrites the on‑chain body field with the supplied raw JSON string.
  • Does not modify owner, renter, expiry timestamps, sale‑offer, rent‑offer configuration.
  • Active usership lease (if present) remains unaffected; renter’s usership rights stay intact.
  • The program only persists the JSON text; JSON schema and content validation are left to off‑chain client applications.

Constraints & Validation Rules

  1. OwnerMismatch: Transaction signer is not the Ecosystem owner.
  2. NameExpired: Ecosystem ownership registration expired; cannot update metadata.
  3. NameTooLong / NameEmpty: Invalid ecosystem name input.
  4. BodyTooLong: Supplied JSON string exceeds program‑defined maximum byte‑length limit.

Note: On‑chain program does not reject malformed JSON. JSON syntax correctness is the caller’s responsibility.

Usage Example

Set ecosystem open body with a JSON string (shell requires escaping double‑quotes):

open-token ecosystem update-body open "{\"uri\":\"ipfs://QmXYZ123456789abcdef\",\"description\":\"Ecosystem main metadata\"}"