Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AccountDecimals = migrations.Migration{ Contract: accounts.Contract, Apply: func(state kv.KVStore, log *logger.Logger) error { migrateBaseTokens := func(accKey []byte) { key := accounts.BaseTokensKey(kv.Key(accKey)) amountBytes := state.Get(key) if amountBytes == nil { return } amount := codec.MustDecodeUint64(amountBytes) amountMigrated := util.BaseTokensDecimalsToEthereumDecimals(amount, 6) state.Set(key, codec.EncodeBigIntAbs(amountMigrated)) } allAccountsMap := accounts.AllAccountsMapR(state) allAccountsMap.IterateKeys(func(accountKey []byte) bool { migrateBaseTokens(accountKey) return true }) migrateBaseTokens([]byte(accounts.L2TotalsAccount)) return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.