Search Apps Documentation Source Content File Folder Download Copy Actions Download

rotate package

Overview

Package rotate is a single-use realm shipped at test-13 genesis whose sole purpose is to swap the gnoland1 sole T1 (`oldT1`) for the test-13 sole T1 (`newT1`) after historical replay completes.

The proposal-flow rotation pattern (manfred proposes self-withdraw → new-T1 votes + executes) is unworkable at genesis-mode replay because gov/dao exposes no API to discover the latest proposal ID across MsgRun txs — and the post-replay proposal counter depends on how many proposals manfred opened on gnoland1, which we can't determine statically without re-executing the replay. This realm sidesteps the problem entirely: a single genesis-mode MsgCall to Rotate does the transfer through direct memberstore writes, no proposals involved.

Phase-1 bootstrap (`transactions/base/bootstrap/govdao_prop1_test13.gno`) wires this package into `dao.UpdateImpl(...AllowedDAOs)` at lock time, so memberstore.Get() works from inside Rotate. Once Rotate runs it self-ejects from AllowedDAOs, leaving the membership-mutation surface back at `gno.land/r/gov/dao/v3/impl` alone.

Single-use is enforced by the `runtime.ChainHeight() != 0` gate. Migration txs run with BlockHeight=0 (forced by `gnogenesis fork generate`'s readMigrationTxs), so during genesis replay ChainHeight()==0 and Rotate proceeds; post-genesis any caller gets a panic.

Function

Rotate

func Rotate(cur realm)

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/test13/rotate" -func "Rotate" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "test-13" -remote "https://rpc.test13.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test13.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/test13/rotate" -func "Rotate" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test-13" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test13.testnets.gno.land" call.tx