MigrateBatch
Ask AI
── Migration (game31 → game32) ──────────────────────────────────────────────
MigrateBatch(batchId, kind, rowsJson) imports one batch. rowsJson is a JSON array of string arrays. Kinds and row shapes:
Example
1balance [addr, coinId, amount] → balances (SET, not add)
2lifetime [addr, coinId, amount] → lifetimeMined (SET) + miners total
3tools [addr, "t1,t2,..."] → ownedTools (SET, unknown ids dropped)
4toollife [addr, toolId, life] → toolLife (SET, clamped to max)
5skill [addr, skillId, rank] → skillRanks (SET, clamped to max)
6medal [addr, achievementId] → achievements (allowlisted ids only)
7pass [addr, expiryUnix] → gnomePasses (SET)
8guild [guildId, name, leader, "m1,m2,..."] → guilds + members
9ban [addr, reason, expiryUnix] → blacklist (expiry 0 = permanent)
A batchId that was already applied is skipped, and every write is a SET, so re-running a whole migration is a no-op. FinalizeMigration locks it forever. Every unique player address in a batch is recorded in migrationAddrs so that MigrationStatus can report how many distinct players were migrated.
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/g138gdmwj6heduu3st796lw6qqdwylgaxf7ty5gz/game33" -func "MigrateBatch" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g138gdmwj6heduu3st796lw6qqdwylgaxf7ty5gz/game33" -func "MigrateBatch" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx