Upgraded
Event v149 → current #14Emitted when an account is upgraded to a new balance format.
View events on chainUseful for: developersanalytics
The Big Picture
When the balance storage format changes in a runtime upgrade, existing accounts may need to be upgraded to the new format. This event signals that an account has been migrated. This is typically triggered lazily when an account is accessed after an upgrade.
Use Cases
- Track account migrations during runtime upgrades
- Monitor balance system upgrades
- Build upgrade tracking tools
From Chain Metadata
An account was upgraded.
Triggers
Emitted by
Preconditions
- Account exists
- Upgrade operation triggered
Effects
Storage Modified
Postconditions
- Account uses new balance storage format
Side Effects
- Account data structure updated
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | who | AccountId | who: Account address (32 bytes, SS58-encoded) (hex -> SS58) |
Code Examples
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443
const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);
// Subscribe to Upgraded events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Balances.Upgraded.get(block.hash);
for (const evt of events) {
console.log("Upgraded:", evt.payload);
}
});On-Chain Activity
Emission Frequency
●●●○○○ Active 100K–1M emissions
Regular feature-level activity
#37 most emitted event
As of block 7,429,232
Runtime Info
- Pallet Index
- 5
- Event Index
- 14
- First Version
- v149
- Current Version
- v411