Skip to content

Commit

Permalink
validate bech32 string in testutil
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMustermann2 committed Feb 19, 2025
1 parent 168555b commit fd559c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions testutil/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,14 +498,17 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) {
sdk.NewCoin(cfg.NativeDenom, cfg.AccountTokens),
)
gateWayAddressStr := "im18cggcpvwspnd5c6ny8wrqxpffj5zmhkl3agtrj"
gateWayAddr, _ := sdk.AccAddressFromBech32(gateWayAddressStr)
gateWayAddr, err := sdk.AccAddressFromBech32(gateWayAddressStr)
if err != nil {
return nil, err
}
genBalances = append(genBalances, banktypes.Balance{Address: gateWayAddressStr, Coins: balances.Sort()})
genAccounts = append(genAccounts, &evmostypes.EthAccount{
BaseAccount: authtypes.NewBaseAccount(gateWayAddr, nil, 0, 0),
CodeHash: common.BytesToHash(evmtypes.EmptyCodeHash).Hex(),
})

err := initGenFiles(cfg, genAccounts, genBalances, genFiles, network.Validators, commissionRate)
err = initGenFiles(cfg, genAccounts, genBalances, genFiles, network.Validators, commissionRate)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit fd559c7

Please sign in to comment.