Documentation
¶
Index ¶
- func AddSidecarToNode(node *cosmos.ChainNode, conf ibc.SidecarConfig)
- func CCVChainConstructor(t *testing.T, spec *interchaintest.ChainSpec, gasPrices string) []*cosmos.CosmosChain
- func DefaultChainConstructor(t *testing.T, spec *interchaintest.ChainSpec, _ string) []*cosmos.CosmosChain
- func DefaultMarketMap() mmtypes.MarketMap
- func DefaultOracleConfig(url string) oracleconfig.OracleConfig
- func DefaultOracleSidecar(image ibc.DockerImage) ibc.SidecarConfig
- func GetOracleSideCar(node *cosmos.ChainNode) *cosmos.SidecarProcess
- func RestartOracle(node *cosmos.ChainNode) error
- func SetOracleConfigsOnApp(node *cosmos.ChainNode)
- func SetOracleConfigsOnOracle(oracle *cosmos.SidecarProcess, oracleCfg oracleconfig.OracleConfig)
- func StartOracle(node *cosmos.ChainNode) error
- func StopOracle(node *cosmos.ChainNode) error
- func TxHash(tx []byte) string
- type CCVInterchain
- type ChainConstructor
- type Interchain
- type InterchainConstructor
- type KeyringOverride
- type Option
- type TestSuite
- func (s *TestSuite) Block(chain *cosmos.CosmosChain, height int64) *rpctypes.ResultBlock
- func (s *TestSuite) CreateTx(chain *cosmos.CosmosChain, user cosmos.User, fee string, gas int64, ...) []byte
- func (s *TestSuite) ExecTx(ctx context.Context, chain *cosmos.CosmosChain, keyName string, blocking bool, ...) (string, error)
- func (s *TestSuite) GetAndFundTestUserWithMnemonic(ctx context.Context, keyNamePrefix, mnemonic string, amount int64, ...) (ibc.Wallet, error)
- func (s *TestSuite) GetAndFundTestUsers(ctx context.Context, keyNamePrefix string, amount int64, chain ibc.Chain) ibc.Wallet
- func (s *TestSuite) QueryAccountBalance(chain ibc.Chain, address, denom string) int64
- func (s *TestSuite) QueryAccountSequence(chain *cosmos.CosmosChain, address string) uint64
- func (s *TestSuite) QueryDefaultGasPrice() sdk.DecCoin
- func (s *TestSuite) QueryParams() types.Params
- func (s *TestSuite) QueryState() types.State
- func (s *TestSuite) QueryValidators(chain *cosmos.CosmosChain) []sdk.ValAddress
- func (s *TestSuite) SendCoins(ctx context.Context, keyName, sender, receiver string, amt, fees sdk.Coins, ...) (string, error)
- func (s *TestSuite) SendCoinsMultiBroadcast(ctx context.Context, sender, receiver ibc.Wallet, amt, fees sdk.Coins, ...) (*coretypes.ResultBroadcastTxCommit, error)
- func (s *TestSuite) SetupSubTest()
- func (s *TestSuite) SetupSuite()
- func (s *TestSuite) SimulateTx(ctx context.Context, user cosmos.User, height uint64, expectFail bool, ...)
- func (s *TestSuite) TearDownSuite()
- func (s *TestSuite) Teardown()
- func (s *TestSuite) TestQueryGasPrice()
- func (s *TestSuite) TestQueryParams()
- func (s *TestSuite) TestQueryState()
- func (s *TestSuite) TestSendTxDecrease()
- func (s *TestSuite) TestSendTxIncrease()
- func (s *TestSuite) VerifyBlock(block *rpctypes.ResultBlock, offset int, bidTxHash string, txs [][]byte)
- func (s *TestSuite) VerifyBlockWithExpectedBlock(chain *cosmos.CosmosChain, height uint64, txs [][]byte)
- func (s *TestSuite) WaitForHeight(chain *cosmos.CosmosChain, height int64)
- func (s *TestSuite) WithKeyringOptions(cdc codec.Codec, opts keyring.Option)
- type TestTxConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSidecarToNode ¶ added in v1.2.0
func AddSidecarToNode(node *cosmos.ChainNode, conf ibc.SidecarConfig)
AddSidecarToNode adds the sidecar configured by the given config to the given node. These are configured so that the sidecar is started before the node is started.
func CCVChainConstructor ¶ added in v1.1.0
func CCVChainConstructor(t *testing.T, spec *interchaintest.ChainSpec, gasPrices string) []*cosmos.CosmosChain
CCVChainConstructor is a constructor for the CCV chain
func DefaultChainConstructor ¶
func DefaultChainConstructor(t *testing.T, spec *interchaintest.ChainSpec, _ string) []*cosmos.CosmosChain
DefaultChainConstructor is the default construct of a chan that will be used in the feemarket integration tests. There is only a single chain that is created.
func DefaultMarketMap ¶ added in v1.2.0
func DefaultOracleConfig ¶ added in v1.2.0
func DefaultOracleConfig(url string) oracleconfig.OracleConfig
func DefaultOracleSidecar ¶ added in v1.2.0
func DefaultOracleSidecar(image ibc.DockerImage) ibc.SidecarConfig
func GetOracleSideCar ¶ added in v1.2.0
func GetOracleSideCar(node *cosmos.ChainNode) *cosmos.SidecarProcess
func RestartOracle ¶ added in v1.2.0
RestartOracle restarts the oracle sidecar for a given node
func SetOracleConfigsOnApp ¶ added in v1.2.0
SetOracleConfigsOnApp writes the oracle configuration to the given node's application config.
func SetOracleConfigsOnOracle ¶ added in v1.2.0
func SetOracleConfigsOnOracle( oracle *cosmos.SidecarProcess, oracleCfg oracleconfig.OracleConfig, )
SetOracleConfigsOnOracle writes the oracle and metrics configs to the given node's oracle sidecar.
func StartOracle ¶ added in v1.2.0
StartOracle starts the oracle sidecar for a given node
func StopOracle ¶ added in v1.2.0
StopOracle stops the oracle sidecar for a given node
Types ¶
type CCVInterchain ¶ added in v1.1.0
type CCVInterchain struct {
// contains filtered or unexported fields
}
func (*CCVInterchain) IBCPath ¶ added in v1.1.0
func (c *CCVInterchain) IBCPath() string
func (*CCVInterchain) Relayer ¶ added in v1.1.0
func (c *CCVInterchain) Relayer() ibc.Relayer
func (*CCVInterchain) Reporter ¶ added in v1.1.0
func (c *CCVInterchain) Reporter() *testreporter.RelayerExecReporter
type ChainConstructor ¶
type ChainConstructor func(t *testing.T, spec *interchaintest.ChainSpec, gasPrices string) []*cosmos.CosmosChain
ChainConstructor returns the chain that will be using slinky, as well as any additional chains that are needed for the test. The first chain returned will be the chain that is used in the slinky integration tests.
type Interchain ¶
type Interchain interface { Relayer() ibc.Relayer Reporter() *testreporter.RelayerExecReporter IBCPath() string }
Interchain is an interface representing the set of chains that are used in the slinky e2e tests, as well as any additional relayer / ibc-path information
func CCVInterchainConstructor ¶ added in v1.1.0
func CCVInterchainConstructor(ctx context.Context, t *testing.T, chains []*cosmos.CosmosChain) Interchain
CCVInterchainConstructor is a constructor for the CCV interchain
func DefaultInterchainConstructor ¶
func DefaultInterchainConstructor(ctx context.Context, t *testing.T, chains []*cosmos.CosmosChain) Interchain
DefaultInterchainConstructor is the default constructor of an interchain that will be used in the feemarket integration tests.
type InterchainConstructor ¶
type InterchainConstructor func(ctx context.Context, t *testing.T, chains []*cosmos.CosmosChain) Interchain
InterchainConstructor returns an interchain that will be used in the feemarket integration tests. The chains used in the interchain constructor should be the chains constructed via the ChainConstructor
type KeyringOverride ¶
type KeyringOverride struct {
// contains filtered or unexported fields
}
type Option ¶
type Option func(*TestSuite)
Option is a function that modifies the TestSuite
func WithAuthority ¶
func WithAuthority(addr sdk.AccAddress) Option
WithAuthority sets the authority address
func WithChainConstructor ¶
func WithChainConstructor(cc ChainConstructor) Option
WithChainConstructor sets the chain constructor
func WithGasPrices ¶ added in v1.6.0
WithGasPrices sets gas prices.
func WithInterchainConstructor ¶
func WithInterchainConstructor(ic InterchainConstructor) Option
WithInterchainConstructor sets the interchain constructor
type TestSuite ¶
TestSuite runs the feemarket e2e test-suite against a given interchaintest specification
func NewIntegrationSuite ¶
func NewIntegrationSuite(spec *interchaintest.ChainSpec, oracleImage ibc.DockerImage, txCfg TestTxConfig, opts ...Option) *TestSuite
func (*TestSuite) Block ¶
func (s *TestSuite) Block(chain *cosmos.CosmosChain, height int64) *rpctypes.ResultBlock
Block returns the block at the given height
func (*TestSuite) CreateTx ¶
func (s *TestSuite) CreateTx(chain *cosmos.CosmosChain, user cosmos.User, fee string, gas int64, msgs ...sdk.Msg) []byte
CreateTx creates a new transaction to be signed by the given user, including a provided set of messages
func (*TestSuite) ExecTx ¶
func (s *TestSuite) ExecTx(ctx context.Context, chain *cosmos.CosmosChain, keyName string, blocking bool, command ...string) (string, error)
ExecTx executes a cli command on a node, waits a block and queries the Tx to verify it was included on chain.
func (*TestSuite) GetAndFundTestUserWithMnemonic ¶
func (s *TestSuite) GetAndFundTestUserWithMnemonic( ctx context.Context, keyNamePrefix, mnemonic string, amount int64, chain ibc.Chain, ) (ibc.Wallet, error)
GetAndFundTestUserWithMnemonic restores a user using the given mnemonic and funds it with the native chain denom. The caller should wait for some blocks to complete before the funds will be accessible.
func (*TestSuite) GetAndFundTestUsers ¶
func (s *TestSuite) GetAndFundTestUsers( ctx context.Context, keyNamePrefix string, amount int64, chain ibc.Chain, ) ibc.Wallet
GetAndFundTestUsers generates and funds chain users with the native chain denom. The caller should wait for some blocks to complete before the funds will be accessible.
func (*TestSuite) QueryAccountBalance ¶
QueryAccountBalance queries a given account's balance on the chain
func (*TestSuite) QueryAccountSequence ¶
func (s *TestSuite) QueryAccountSequence(chain *cosmos.CosmosChain, address string) uint64
func (*TestSuite) QueryDefaultGasPrice ¶
func (*TestSuite) QueryParams ¶
func (*TestSuite) QueryState ¶
func (*TestSuite) QueryValidators ¶
func (s *TestSuite) QueryValidators(chain *cosmos.CosmosChain) []sdk.ValAddress
QueryValidators queries for all the network's validators
func (*TestSuite) SendCoins ¶
func (s *TestSuite) SendCoins(ctx context.Context, keyName, sender, receiver string, amt, fees sdk.Coins, gas int64) (string, error)
SendCoins creates a executes a SendCoins message and broadcasts the transaction.
func (*TestSuite) SendCoinsMultiBroadcast ¶
func (*TestSuite) SetupSubTest ¶
func (s *TestSuite) SetupSubTest()
func (*TestSuite) SetupSuite ¶
func (s *TestSuite) SetupSuite()
func (*TestSuite) SimulateTx ¶
func (s *TestSuite) SimulateTx(ctx context.Context, user cosmos.User, height uint64, expectFail bool, msgs ...sdk.Msg)
SimulateTx simulates the provided messages, and checks whether the provided failure condition is met
func (*TestSuite) TearDownSuite ¶
func (s *TestSuite) TearDownSuite()
func (*TestSuite) TestQueryGasPrice ¶
func (s *TestSuite) TestQueryGasPrice()
func (*TestSuite) TestQueryParams ¶
func (s *TestSuite) TestQueryParams()
func (*TestSuite) TestQueryState ¶
func (s *TestSuite) TestQueryState()
func (*TestSuite) TestSendTxDecrease ¶
func (s *TestSuite) TestSendTxDecrease()
TestSendTxDecrease tests that the feemarket will decrease until it hits the min gas price when gas utilization is below the target block utilization.
func (*TestSuite) TestSendTxIncrease ¶
func (s *TestSuite) TestSendTxIncrease()
TestSendTxIncrease tests that the feemarket will increase when gas utilization is above the target block utilization.
func (*TestSuite) VerifyBlock ¶
func (s *TestSuite) VerifyBlock(block *rpctypes.ResultBlock, offset int, bidTxHash string, txs [][]byte)
VerifyBlock takes a Block and verifies that it contains the given bid at the 0-th index, and the bundled txs immediately after
func (*TestSuite) VerifyBlockWithExpectedBlock ¶
func (s *TestSuite) VerifyBlockWithExpectedBlock(chain *cosmos.CosmosChain, height uint64, txs [][]byte)
VerifyBlockWithExpectedBlock takes in a list of raw tx bytes and compares each tx hash to the tx hashes in the block. The expected block is the block that should be returned by the chain at the given height.
func (*TestSuite) WaitForHeight ¶
func (s *TestSuite) WaitForHeight(chain *cosmos.CosmosChain, height int64)
WaitForHeight waits for the chain to reach the given height
type TestTxConfig ¶ added in v1.6.0
type TestTxConfig struct { SmallSendsNum int LargeSendsNum int TargetIncreaseGasPrice math.LegacyDec }
func (*TestTxConfig) Validate ¶ added in v1.6.0
func (tx *TestTxConfig) Validate() error