Skip to content

Commit

Permalink
feat: Add GetNode() helper (#789)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups authored Sep 20, 2023
1 parent 414730d commit 23178ec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions chain/cosmos/cosmos_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ func (c *CosmosChain) getFullNode() *ChainNode {
return c.Validators[0]
}

func (c *CosmosChain) GetNode() *ChainNode {
return c.Validators[0]
}

// Exec implements ibc.Chain.
func (c *CosmosChain) Exec(ctx context.Context, cmd []string, env []string) (stdout, stderr []byte, err error) {
return c.getFullNode().Exec(ctx, cmd, env)
Expand Down Expand Up @@ -390,8 +394,8 @@ func (c *CosmosChain) PushNewWasmClientProposal(ctx context.Context, keyName str
return tx, "", err
}
message := wasmtypes.MsgStoreCode{
Signer: types.MustBech32ifyAddressBytes(c.cfg.Bech32Prefix, authtypes.NewModuleAddress(govtypes.ModuleName)),
WasmByteCode: content,
Signer: types.MustBech32ifyAddressBytes(c.cfg.Bech32Prefix, authtypes.NewModuleAddress(govtypes.ModuleName)),
WasmByteCode: content,
}
msg, err := c.cfg.EncodingConfig.Codec.MarshalInterfaceJSON(&message)
if err != nil {
Expand Down

0 comments on commit 23178ec

Please sign in to comment.