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 (hex -> SS58) |
Code Examples
import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";
const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });
// Subscribe to Upgraded events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("Balances") &&
event.method === "Upgraded"
)
.forEach(({ event }) => {
console.log("Upgraded:", event.data.toHuman());
});
});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
- v393