Versions in this module Expand all Collapse all v7 v7.0.1 Sep 8, 2023 v7.0.0 Aug 15, 2023 Changes in this version + const ProposalStatusDepositPeriod + const ProposalStatusFailed + const ProposalStatusPassed + const ProposalStatusRejected + const ProposalStatusUnspecified + const ProposalStatusVotingPeriod + const ProposalVoteAbstain + const ProposalVoteNo + const ProposalVoteNoWithVeto + const ProposalVoteYes + func BroadcastTx(ctx context.Context, broadcaster *Broadcaster, broadcastingUser User, ...) (sdk.TxResponse, error) + func CondenseMoniker(m string) string + func DefaultEncoding() testutil.TestEncodingConfig + func ModifyGenesis(genesisKV []GenesisKV) func(ibc.ChainConfig, []byte) ([]byte, error) + func NewCosmosHeighlinerChainConfig(name string, binary string, bech32Prefix string, denom string, ...) ibc.ChainConfig + func NewWallet(keyname string, address []byte, mnemonic string, chainCfg ibc.ChainConfig) ibc.Wallet + func OsmosisCreatePool(c *CosmosChain, ctx context.Context, keyName string, params OsmosisPoolParams) (string, error) + func OsmosisSwapExactAmountIn(c *CosmosChain, ctx context.Context, keyName string, coinIn string, ...) (string, error) + func PollForBalance(ctx context.Context, chain *CosmosChain, deltaBlocks uint64, ...) error + func PollForMessage(ctx context.Context, chain *CosmosChain, registry codectypes.InterfaceRegistry, ...) (T, error) + type Broadcaster struct + func NewBroadcaster(t *testing.T, chain *CosmosChain) *Broadcaster + func (b *Broadcaster) ConfigureClientContextOptions(opts ...ClientContextOpt) + func (b *Broadcaster) ConfigureFactoryOptions(opts ...FactoryOpt) + func (b *Broadcaster) GetClientContext(ctx context.Context, user User) (client.Context, error) + func (b *Broadcaster) GetFactory(ctx context.Context, user User) (tx.Factory, error) + func (b *Broadcaster) GetTxResponseBytes(ctx context.Context, user User) ([]byte, error) + func (b *Broadcaster) UnmarshalTxResponseBytes(ctx context.Context, bytes []byte) (sdk.TxResponse, error) + type ChainNode struct + Chain ibc.Chain + Client rpcclient.Client + DockerClient *dockerclient.Client + Image ibc.DockerImage + Index int + NetworkID string + Sidecars SidecarProcesses + TestName string + Validator bool + VolumeName string + func NewChainNode(log *zap.Logger, validator bool, chain *CosmosChain, ...) *ChainNode + func (tn *ChainNode) AccountKeyBech32(ctx context.Context, name string) (string, error) + func (tn *ChainNode) AddGenesisAccount(ctx context.Context, address string, genesisAmount []types.Coin) error + func (tn *ChainNode) BinCommand(command ...string) []string + func (tn *ChainNode) Bind() []string + func (tn *ChainNode) CliContext() client.Context + func (tn *ChainNode) CollectGentxs(ctx context.Context) error + func (tn *ChainNode) ContainerID() string + func (tn *ChainNode) CopyFile(ctx context.Context, srcPath, dstPath string) error + func (tn *ChainNode) CreateKey(ctx context.Context, name string) error + func (tn *ChainNode) CreateNodeContainer(ctx context.Context) error + func (tn *ChainNode) DumpContractState(ctx context.Context, contractAddress string, height int64) (*DumpContractStateResponse, error) + func (tn *ChainNode) Exec(ctx context.Context, cmd []string, env []string) ([]byte, []byte, error) + func (tn *ChainNode) ExecBin(ctx context.Context, command ...string) ([]byte, []byte, error) + func (tn *ChainNode) ExecQuery(ctx context.Context, command ...string) ([]byte, []byte, error) + func (tn *ChainNode) ExecTx(ctx context.Context, keyName string, command ...string) (string, error) + func (tn *ChainNode) ExecuteContract(ctx context.Context, keyName string, contractAddress string, message string) (txHash string, err error) + func (tn *ChainNode) ExportState(ctx context.Context, height int64) (string, error) + func (tn *ChainNode) FindTxs(ctx context.Context, height uint64) ([]blockdb.Tx, error) + func (tn *ChainNode) GenesisFileContent(ctx context.Context) ([]byte, error) + func (tn *ChainNode) Gentx(ctx context.Context, name string, genesisSelfDelegation types.Coin) error + func (tn *ChainNode) Height(ctx context.Context) (uint64, error) + func (tn *ChainNode) HomeDir() string + func (tn *ChainNode) HostName() string + func (tn *ChainNode) InitFullNodeFiles(ctx context.Context) error + func (tn *ChainNode) InitHomeFolder(ctx context.Context) error + func (tn *ChainNode) InitValidatorGenTx(ctx context.Context, chainType *ibc.ChainConfig, genesisAmounts []types.Coin, ...) error + func (tn *ChainNode) InstantiateContract(ctx context.Context, keyName string, codeID string, initMessage string, ...) (string, error) + func (tn *ChainNode) KeyBech32(ctx context.Context, name string, bech string) (string, error) + func (tn *ChainNode) Name() string + func (tn *ChainNode) NewClient(addr string) error + func (tn *ChainNode) NewSidecarProcess(ctx context.Context, preStart bool, processName string, ...) error + func (tn *ChainNode) NodeCommand(command ...string) []string + func (tn *ChainNode) NodeID(ctx context.Context) (string, error) + func (tn *ChainNode) OverwriteGenesisFile(ctx context.Context, content []byte) error + func (tn *ChainNode) ParamChangeProposal(ctx context.Context, keyName string, prop *paramsutils.ParamChangeProposalJSON) (string, error) + func (tn *ChainNode) QueryClientContractCode(ctx context.Context, codeHash string, response any) error + func (tn *ChainNode) QueryCommand(command ...string) []string + func (tn *ChainNode) QueryContract(ctx context.Context, contractAddress string, queryMsg any, response any) error + func (tn *ChainNode) QueryICA(ctx context.Context, connectionID, address string) (string, error) + func (tn *ChainNode) QueryParam(ctx context.Context, subspace, key string) (*ParamChange, error) + func (tn *ChainNode) QueryProposal(ctx context.Context, proposalID string) (*ProposalResponse, error) + func (tn *ChainNode) ReadFile(ctx context.Context, relPath string) ([]byte, error) + func (tn *ChainNode) RecoverKey(ctx context.Context, keyName, mnemonic string) error + func (tn *ChainNode) RegisterICA(ctx context.Context, keyName, connectionID string) (string, error) + func (tn *ChainNode) RemoveContainer(ctx context.Context) error + func (tn *ChainNode) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error + func (tn *ChainNode) SendIBCTransfer(ctx context.Context, channelID string, keyName string, amount ibc.WalletAmount, ...) (string, error) + func (tn *ChainNode) SendICABankTransfer(ctx context.Context, connectionID, fromAddr string, amount ibc.WalletAmount) error + func (tn *ChainNode) SetPeers(ctx context.Context, peers string) error + func (tn *ChainNode) SetTestConfig(ctx context.Context) error + func (tn *ChainNode) StartContainer(ctx context.Context) error + func (tn *ChainNode) StopContainer(ctx context.Context) error + func (tn *ChainNode) StoreClientContract(ctx context.Context, keyName string, fileName string) (string, error) + func (tn *ChainNode) StoreContract(ctx context.Context, keyName string, fileName string) (string, error) + func (tn *ChainNode) SubmitProposal(ctx context.Context, keyName string, prop TxProposalv1) (string, error) + func (tn *ChainNode) TextProposal(ctx context.Context, keyName string, prop TextProposal) (string, error) + func (tn *ChainNode) TxCommand(keyName string, command ...string) []string + func (tn *ChainNode) UnsafeResetAll(ctx context.Context) error + func (tn *ChainNode) UpgradeProposal(ctx context.Context, keyName string, prop SoftwareUpgradeProposal) (string, error) + func (tn *ChainNode) VoteOnProposal(ctx context.Context, keyName string, proposalID string, vote string) error + func (tn *ChainNode) WithPrestartNode(f func(n *ChainNode)) + func (tn *ChainNode) WriteFile(ctx context.Context, content []byte, relPath string) error + type ChainNodes []*ChainNode + func (nodes ChainNodes) LogGenesisHashes(ctx context.Context) error + func (nodes ChainNodes) PeerString(ctx context.Context) string + type ClientContextOpt func(clientContext client.Context) client.Context + type CodeInfo struct + CodeID string + type CodeInfosResponse struct + CodeInfos []CodeInfo + type ContractStateModels struct + Key string + Value string + type CosmosChain struct + FullNodes ChainNodes + Sidecars SidecarProcesses + Validators ChainNodes + func NewCosmosChain(testName string, chainConfig ibc.ChainConfig, numValidators int, ...) *CosmosChain + func (c *CosmosChain) Acknowledgements(ctx context.Context, height uint64) ([]ibc.PacketAcknowledgement, error) + func (c *CosmosChain) AddFullNodes(ctx context.Context, configFileOverrides map[string]any, inc int) error + func (c *CosmosChain) AllBalances(ctx context.Context, address string) (types.Coins, error) + func (c *CosmosChain) BuildProposal(messages []cosmosproto.Message, title, summary, metadata, depositStr string) (TxProposalv1, error) + func (c *CosmosChain) BuildRelayerWallet(ctx context.Context, keyName string) (ibc.Wallet, error) + func (c *CosmosChain) BuildWallet(ctx context.Context, keyName string, mnemonic string) (ibc.Wallet, error) + func (c *CosmosChain) Config() ibc.ChainConfig + func (c *CosmosChain) CreateKey(ctx context.Context, keyName string) error + func (c *CosmosChain) DumpContractState(ctx context.Context, contractAddress string, height int64) (*DumpContractStateResponse, error) + func (c *CosmosChain) Exec(ctx context.Context, cmd []string, env []string) (stdout, stderr []byte, err error) + func (c *CosmosChain) ExecuteContract(ctx context.Context, keyName string, contractAddress string, message string) (txHash string, err error) + func (c *CosmosChain) ExportState(ctx context.Context, height int64) (string, error) + func (c *CosmosChain) FindTxs(ctx context.Context, height uint64) ([]blockdb.Tx, error) + func (c *CosmosChain) GetAddress(ctx context.Context, keyName string) ([]byte, error) + func (c *CosmosChain) GetBalance(ctx context.Context, address string, denom string) (math.Int, error) + func (c *CosmosChain) GetGRPCAddress() string + func (c *CosmosChain) GetGasFeesInNativeDenom(gasPaid int64) int64 + func (c *CosmosChain) GetHostGRPCAddress() string + func (c *CosmosChain) GetHostRPCAddress() string + func (c *CosmosChain) GetRPCAddress() string + func (c *CosmosChain) Height(ctx context.Context) (uint64, error) + func (c *CosmosChain) HomeDir() string + func (c *CosmosChain) Initialize(ctx context.Context, testName string, cli *client.Client, networkID string) error + func (c *CosmosChain) InstantiateContract(ctx context.Context, keyName string, codeID string, initMessage string, ...) (string, error) + func (c *CosmosChain) NewChainNode(ctx context.Context, testName string, cli *client.Client, networkID string, ...) (*ChainNode, error) + func (c *CosmosChain) NewSidecarProcess(ctx context.Context, preStart bool, processName string, testName string, ...) error + func (c *CosmosChain) Nodes() ChainNodes + func (c *CosmosChain) ParamChangeProposal(ctx context.Context, keyName string, prop *paramsutils.ParamChangeProposalJSON) (tx TxProposal, _ error) + func (c *CosmosChain) PushNewWasmClientProposal(ctx context.Context, keyName string, fileName string, prop TxProposalv1) (TxProposal, string, error) + func (c *CosmosChain) QueryClientContractCode(ctx context.Context, codeHash string, response any) error + func (c *CosmosChain) QueryContract(ctx context.Context, contractAddress string, query any, response any) error + func (c *CosmosChain) QueryParam(ctx context.Context, subspace, key string) (*ParamChange, error) + func (c *CosmosChain) QueryProposal(ctx context.Context, proposalID string) (*ProposalResponse, error) + func (c *CosmosChain) RecoverKey(ctx context.Context, keyName, mnemonic string) error + func (c *CosmosChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error + func (c *CosmosChain) SendIBCTransfer(ctx context.Context, channelID string, keyName string, amount ibc.WalletAmount, ...) (tx ibc.Tx, _ error) + func (c *CosmosChain) Start(testName string, ctx context.Context, ...) error + func (c *CosmosChain) StartAllNodes(ctx context.Context) error + func (c *CosmosChain) StartAllSidecars(ctx context.Context) error + func (c *CosmosChain) StartAllValSidecars(ctx context.Context) error + func (c *CosmosChain) StopAllNodes(ctx context.Context) error + func (c *CosmosChain) StopAllSidecars(ctx context.Context) error + func (c *CosmosChain) StoreClientContract(ctx context.Context, keyName string, fileName string) (string, error) + func (c *CosmosChain) StoreContract(ctx context.Context, keyName string, fileName string) (string, error) + func (c *CosmosChain) SubmitProposal(ctx context.Context, keyName string, prop TxProposalv1) (tx TxProposal, _ error) + func (c *CosmosChain) TextProposal(ctx context.Context, keyName string, prop TextProposal) (tx TxProposal, _ error) + func (c *CosmosChain) Timeouts(ctx context.Context, height uint64) ([]ibc.PacketTimeout, error) + func (c *CosmosChain) UpgradeProposal(ctx context.Context, keyName string, prop SoftwareUpgradeProposal) (tx TxProposal, _ error) + func (c *CosmosChain) UpgradeVersion(ctx context.Context, cli *client.Client, containerRepo, version string) + func (c *CosmosChain) VoteOnProposalAllValidators(ctx context.Context, proposalID string, vote string) error + func (c *CosmosChain) WithPrestartNodes(f func(c *CosmosChain)) + type CosmosTx struct + Code int + RawLog string + TxHash string + type CosmosWallet struct + func (w *CosmosWallet) Address() []byte + func (w *CosmosWallet) FormattedAddress() string + func (w *CosmosWallet) FormattedAddressWithPrefix(prefix string) string + func (w *CosmosWallet) KeyName() string + func (w *CosmosWallet) Mnemonic() string + type DumpContractStateResponse struct + Models []ContractStateModels + type FactoryOpt func(factory tx.Factory) tx.Factory + type GenesisFile struct + Validators []GenesisValidators + type GenesisKV struct + Key string + Value interface{} + type GenesisValidatorPubKey struct + Type string + Value string + type GenesisValidators struct + Address string + Name string + Power string + PubKey GenesisValidatorPubKey + type InstantiateContractAttribute struct + Value string + type InstantiateContractEvent struct + Attributes []InstantiateContractAttribute + type InstantiateContractLog struct + Events []InstantiateContractEvent + type InstantiateContractResponse struct + Logs []InstantiateContractLog + type OsmosisPoolParams struct + ExitFee string + FutureGovernor string + InitialDeposit string + SwapFee string + Weights string + type ParamChange struct + Key string + Subspace string + Value any + type PrivValidatorKey struct + Type string + Value string + type PrivValidatorKeyFile struct + Address string + PrivKey PrivValidatorKey + PubKey PrivValidatorKey + type ProposalContent struct + Description string + Title string + Type string + type ProposalDeposit struct + Amount string + Denom string + type ProposalFinalTallyResult struct + Abstain string + No string + NoWithVeto string + Yes string + type ProposalResponse struct + Content ProposalContent + DepositEndTime string + FinalTallyResult ProposalFinalTallyResult + ProposalID string + Status string + SubmitTime string + TotalDeposit []ProposalDeposit + VotingEndTime string + VotingStartTime string + func PollForProposalStatus(ctx context.Context, chain *CosmosChain, startHeight, maxHeight uint64, ...) (ProposalResponse, error) + type QueryContractResponse struct + Contracts []string + type SidecarProcess struct + Chain ibc.Chain + DockerClient *dockerclient.Client + Image ibc.DockerImage + Index int + NetworkID string + ProcessName string + TestName string + VolumeName string + func NewSidecar(log *zap.Logger, validatorProcess bool, preStart bool, chain ibc.Chain, ...) *SidecarProcess + func (s *SidecarProcess) Bind() []string + func (s *SidecarProcess) CopyFile(ctx context.Context, srcPath, dstPath string) error + func (s *SidecarProcess) CreateContainer(ctx context.Context) error + func (s *SidecarProcess) Exec(ctx context.Context, cmd []string, env []string) ([]byte, []byte, error) + func (s *SidecarProcess) GetHostPorts(ctx context.Context, portIDs ...string) ([]string, error) + func (s *SidecarProcess) HomeDir() string + func (s *SidecarProcess) HostName() string + func (s *SidecarProcess) Name() string + func (s *SidecarProcess) ReadFile(ctx context.Context, relPath string) ([]byte, error) + func (s *SidecarProcess) RemoveContainer(ctx context.Context) error + func (s *SidecarProcess) StartContainer(ctx context.Context) error + func (s *SidecarProcess) StopContainer(ctx context.Context) error + func (s *SidecarProcess) WriteFile(ctx context.Context, content []byte, relPath string) error + type SidecarProcesses []*SidecarProcess + type SoftwareUpgradeProposal struct + Deposit string + Description string + Height uint64 + Info string + Name string + Title string + type TextProposal struct + Deposit string + Description string + Expedited bool + Title string + type TxProposal struct + DepositAmount string + GasSpent int64 + Height uint64 + ProposalID string + ProposalType string + TxHash string + type TxProposalv1 struct + Deposit string + Messages []json.RawMessage + Metadata string + Summary string + Title string + type User interface + FormattedAddress func() string + KeyName func() string + type ValidatorWithIntPower struct + Address string + Power int64 + PubKeyBase64 string