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:
- A Corporation (
policy_address) that controls the ecosystem — see Create a Corporation. - The policy funded with
uvnafor fees. - An operator granted authorization for
/verana.ec.v1.MsgArchiveEcosystemvia Grant Operator Authorization.
Sign with --from <operator> and pass the corporation's policy_address as the [corporation] argument.
Message Parameters
| Name | Description | Mandatory |
|---|---|---|
corporation | policy_address of the Corporation that controls the ecosystem | yes |
id | ID of the ecosystem to archive or unarchive | yes |
archive | true to archive, false to unarchive | yes |
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
- CLI
- Frontend
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
tip
TODO: describe here