Documentation
¶
Index ¶
- Constants
- func ExecuteBinaryCmd(bin *Binary, args BinaryCmdArgs) (string, error)
- func GetCodec() (*codec.ProtoCodec, bool)
- func GetCurrentHeight(bin *Binary) (int, error)
- func GetEventsFromTxResponse(cdc *codec.ProtoCodec, out string) ([]sdk.StringEvent, error)
- func GetTxEvents(bin *Binary, out string) ([]sdk.StringEvent, error)
- func GetTxHashFromTxResponse(cdc *codec.ProtoCodec, out string) (string, error)
- func ParseDelegationsFromResponse(cdc *codec.ProtoCodec, out string) ([]stakingtypes.Delegation, error)
- func Wait(seconds int)
- type Account
- type Binary
- type BinaryCmdArgs
Constants ¶
const (
// DeltaHeight is the amount of blocks in the future that the upgrade will be scheduled.
DeltaHeight = 10
)
Variables ¶
This section is empty.
Functions ¶
func ExecuteBinaryCmd ¶
func ExecuteBinaryCmd(bin *Binary, args BinaryCmdArgs) (string, error)
ExecuteBinaryCmd executes a shell command and returns the output and error.
func GetCodec ¶
func GetCodec() (*codec.ProtoCodec, bool)
GetCodec returns the codec to be used for the client.
func GetCurrentHeight ¶
GetCurrentHeight returns the current block height of the node.
func GetEventsFromTxResponse ¶
func GetEventsFromTxResponse(cdc *codec.ProtoCodec, out string) ([]sdk.StringEvent, error)
GetEventsFromTxResponse unpacks the transaction response into the corresponding SDK type and returns the events.
func GetTxEvents ¶
func GetTxEvents(bin *Binary, out string) ([]sdk.StringEvent, error)
GetTxEvents returns the transaction events associated with the transaction, whose hash is contained in the given output from a transaction command.
It tries to get the transaction hash from the output and then waits for the transaction to be included in a block. It then returns the transaction events.
func GetTxHashFromTxResponse ¶
func GetTxHashFromTxResponse(cdc *codec.ProtoCodec, out string) (string, error)
GetTxHashFromTxResponse parses the transaction hash from the given response.
func ParseDelegationsFromResponse ¶
func ParseDelegationsFromResponse(cdc *codec.ProtoCodec, out string) ([]stakingtypes.Delegation, error)
ParseDelegationsFromResponse parses the delegations from the given response.
Types ¶
type Account ¶
type Account struct { Name string `json:"name"` Type string `json:"type"` Address string `json:"address"` PubKey string `json:"pubkey"` Delegations []stakingtypes.Delegation `json:"delegations"` }
Account is the type for a single account.
func FilterAccountsWithDelegations ¶
FilterAccountsWithDelegations filters the given list of accounts for those, which are used for staking.
func ParseAccountsFromOut ¶
ParseAccountsFromOut parses the keys from the given output from the keys list command.
type Binary ¶
type Binary struct { // Cdc is the codec to be used for the client. Cdc *codec.ProtoCodec // Home is the home directory of the binary. Home string // Appd is the name of the binary to be executed, e.g. "evmosd". Appd string // Accounts are the accounts stored in the local keyring. Accounts []Account // Logger is a logger to be used within all commands. Logger zerolog.Logger }
Binary is a struct to hold the necessary information to execute commands using a Cosmos SDK-based binary.
func NewEvmosTestingBinary ¶
NewEvmosTestingBinary returns a new Binary instance with the default home and appd setup for the Evmos local node testing setup.
func (*Binary) GetAccounts ¶
GetAccounts is a method to retrieve the binaries keys from the configured keyring backend and stores it in the Binary struct.