Skip to main content
Version: v4 (next)

Archive or Unarchive an Ecosystem

MOD-ES-MSG-3

Archive or unarchive an Ecosystem by toggling its archived flag.

Prerequisites

This is a delegable transaction executed on behalf of a Corporation. Before running it you need:

  1. A Corporation (policy_address) that controls the ecosystem — see Create a Corporation.
  2. The policy funded with uvna for fees.
  3. An operator granted authorization for /verana.ec.v1.MsgArchiveEcosystem via Grant Operator Authorization.

Sign with --from <operator> and pass the corporation's policy_address as the [corporation] argument.

Message Parameters

NameDescriptionMandatory
corporationpolicy_address of the Corporation that controls the ecosystemyes
idID of the ecosystem to archive or unarchiveyes
archivetrue to archive, false to unarchiveyes
info

The message aborts if the ecosystem is already in the requested state (MOD-ES-MSG-3-2-1): archiving an already-archived ecosystem, or unarchiving one that is not archived, both fail.

Post the Message

Usage

veranad tx ec archive-ecosystem [corporation] [id] [archive] \
--from <operator> --chain-id <chain-id> --keyring-backend test --fees <amount> --gas auto --node $NODE_RPC

Archive an ecosystem

veranad tx ec archive-ecosystem $CORPORATION 1 true \
--from $OPERATOR --chain-id $CHAIN_ID --keyring-backend test --fees 750000uvna --gas auto --node $NODE_RPC

Example response:

code: 0
events:
- type: message
attributes:
- key: action
value: /verana.ec.v1.MsgArchiveEcosystem
- key: module
value: ec
- type: archive_ecosystem
attributes:
- key: ecosystem_id
value: "1"
- key: corporation_id
value: "2"
- key: archive_status
value: archived
gas_used: "62706"
txhash: 009559CF9A84F2FF1E103F79A1659110301A2E169FB9DC1CFC2AF4FD8AD71435

Unarchive an ecosystem

veranad tx ec archive-ecosystem $CORPORATION 1 false \
--from $OPERATOR --chain-id $CHAIN_ID --keyring-backend test --fees 750000uvna --gas auto --node $NODE_RPC

The archive_ecosystem event then reports archive_status: unarchived.

Attempting to re-apply the current state is rejected:

ecosystem 1 archived=true: ecosystem already in target archive state