18 lines
521 B
Go
18 lines
521 B
Go
|
package simulation
|
||
|
|
||
|
import (
|
||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||
|
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
|
||
|
)
|
||
|
|
||
|
// FindAccount find a specific address from an account list
|
||
|
func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) {
|
||
|
creator, err := sdk.AccAddressFromBech32(address)
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
return simtypes.FindAccount(accs, creator)
|
||
|
}
|
||
|
|
||
|
// New version of Ignite auto-generated helpers.go, which seems to be
|
||
|
// a duplicate of this. Back it up for now.
|