Skip to content

Commit cd5a3be

Browse files
authored
docs: add InitEvmCoinInfo code example to migration guide (cosmos#793)
1 parent 1fd8ef3 commit cd5a3be

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/migrations/v0.4.0_to_v0.5.0.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,16 @@ In your UpgradeHandler:
352352

353353
- **If your chain does not have DenomMetadata set for the EVM Denom, you must include it.**
354354
- **If your chain's EVM denom is *not* 18 decimals, you must add ExtendedDenomOptions to your `x/vm` params.**
355+
- **After setting metadata, initialize EVM coin info:**
355356

356-
Please refer to the [upgrade example](https://github.com/cosmos/evm/blob/0995962c2fd77a7a23e93001d5a531abbb1b61e5/evmd/upgrades.go) for more information.
357+
```go
358+
// After setting denom metadata
359+
if err := app.EVMKeeper.InitEvmCoinInfo(ctx); err != nil {
360+
return nil, err
361+
}
362+
```
363+
364+
Please refer to the [upgrade example](https://github.com/cosmos/evm/blob/main/evmd/upgrades.go) for the complete implementation.
357365

358366
---
359367

0 commit comments

Comments
 (0)