Documentation
¶
Index ¶
- func AddSidecarToNode(node *cosmos.ChainNode, conf ibc.SidecarConfig)
- func CCVChainConstructor(t *testing.T, spec *interchaintest.ChainSpec) []*cosmos.CosmosChain
- func CreateTx(t *testing.T, chain *cosmos.CosmosChain, user cosmos.User, GasPrice int64, ...) []byte
- func DefaultChainConstructor(t *testing.T, spec *interchaintest.ChainSpec) []*cosmos.CosmosChain
- func DefaultMarketMap() mmtypes.MarketMap
- func DefaultOracleConfig(url string) oracleconfig.OracleConfig
- func DefaultOracleSidecar(image ibc.DockerImage) ibc.SidecarConfig
- func ExpectVoteExtensions(chain *cosmos.CosmosChain, timeout time.Duration, ...) (uint64, error)
- func GetChainGRPC(chain *cosmos.CosmosChain) (cc *grpc.ClientConn, close func(), err error)
- func GetOracleSideCar(node *cosmos.ChainNode) *cosmos.SidecarProcess
- func PassProposal(chain *cosmos.CosmosChain, propId string, timeout time.Duration) error
- func QueryCurrencyPair(chain *cosmos.CosmosChain, cp slinkytypes.CurrencyPair, height uint64) (*oracletypes.QuotePrice, int64, error)
- func QueryCurrencyPairMappings(chain *cosmos.CosmosChain) (*oracletypes.GetCurrencyPairMappingResponse, error)
- func QueryCurrencyPairs(chain *cosmos.CosmosChain) (*oracletypes.GetAllCurrencyPairsResponse, error)
- func QueryMarket(chain *cosmos.CosmosChain, cp slinkytypes.CurrencyPair) (mmtypes.Market, error)
- func QueryMarketMap(chain *cosmos.CosmosChain) (*mmtypes.MarketMapResponse, error)
- func QueryMarkets(chain *cosmos.CosmosChain) (*mmtypes.MarketsResponse, error)
- func QueryProposal(chain *cosmos.CosmosChain, propID string) (*govtypesv1.QueryProposalResponse, error)
- 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 SubmitProposal(chain *cosmos.CosmosChain, deposit sdk.Coin, submitter string, msgs ...sdk.Msg) (string, error)
- func WaitForHeight(chain *cosmos.CosmosChain, height uint64, timeout time.Duration) error
- func WaitForProposalStatus(chain *cosmos.CosmosChain, propID string, timeout time.Duration, ...) error
- type CCVInterchain
- type ChainConstructor
- type Interchain
- type InterchainConstructor
- type Option
- type PrivValFile
- type SlinkyCCVSuite
- type SlinkyIntegrationSuite
- func (s *SlinkyIntegrationSuite) AddCurrencyPairs(chain *cosmos.CosmosChain, user cosmos.User, price float64, ...) error
- func (s *SlinkyIntegrationSuite) RemoveMarket(chain *cosmos.CosmosChain, markets []slinkytypes.CurrencyPair) error
- func (s *SlinkyIntegrationSuite) SetupSuite()
- func (s *SlinkyIntegrationSuite) SetupTest()
- func (s *SlinkyIntegrationSuite) TearDownSuite()
- func (s *SlinkyIntegrationSuite) Teardown()
- func (s *SlinkyIntegrationSuite) TestMultiplePriceFeeds()
- func (s *SlinkyIntegrationSuite) UpdateCurrencyPair(chain *cosmos.CosmosChain, markets []mmtypes.Market) error
- type SlinkyOracleIntegrationSuite
- type SlinkyOracleValidatorIntegrationSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSidecarToNode ¶
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 ¶
func CCVChainConstructor(t *testing.T, spec *interchaintest.ChainSpec) []*cosmos.CosmosChain
CCVChainConstructor is a constructor for the CCV chain
func CreateTx ¶
func CreateTx(t *testing.T, chain *cosmos.CosmosChain, user cosmos.User, GasPrice int64, msgs ...sdk.Msg) []byte
CreateTx creates a new transaction to be signed by the given user, including a provided set of messages
func DefaultChainConstructor ¶
func DefaultChainConstructor(t *testing.T, spec *interchaintest.ChainSpec) []*cosmos.CosmosChain
DefaultChainConstructor is the default construct of a chan that will be used in the slinky integration tests. There is only a single chain that is created.
func DefaultMarketMap ¶
func DefaultOracleConfig ¶
func DefaultOracleConfig(url string) oracleconfig.OracleConfig
func DefaultOracleSidecar ¶
func DefaultOracleSidecar(image ibc.DockerImage) ibc.SidecarConfig
func ExpectVoteExtensions ¶
func ExpectVoteExtensions(chain *cosmos.CosmosChain, timeout time.Duration, ves []slinkyabci.OracleVoteExtension) (uint64, error)
ExpectVoteExtensions waits for empty oracle update waits for a pre-determined number of blocks for an extended commit with the given oracle-vote extensions provided per validator. This method returns the height at which the condition was satisfied.
Notice: the height returned is safe for querying, i.e the prices will have been written to state if a quorum reported
func GetChainGRPC ¶
func GetChainGRPC(chain *cosmos.CosmosChain) (cc *grpc.ClientConn, close func(), err error)
GetChainGRPC gets a GRPC client of the given chain
NOTICE: this client must be closed after use
func GetOracleSideCar ¶
func GetOracleSideCar(node *cosmos.ChainNode) *cosmos.SidecarProcess
func PassProposal ¶
PassProposal given a proposal id, vote for the proposal and wait for it to pass
func QueryCurrencyPair ¶
func QueryCurrencyPair(chain *cosmos.CosmosChain, cp slinkytypes.CurrencyPair, height uint64) (*oracletypes.QuotePrice, int64, error)
QueryCurrencyPair queries the price for the given currency-pair given a desired height to query from
func QueryCurrencyPairMappings ¶
func QueryCurrencyPairMappings(chain *cosmos.CosmosChain) (*oracletypes.GetCurrencyPairMappingResponse, error)
QueryCurrencyPairMappings queries the chain for the given currency pair mappings
func QueryCurrencyPairs ¶
func QueryCurrencyPairs(chain *cosmos.CosmosChain) (*oracletypes.GetAllCurrencyPairsResponse, error)
QueryCurrencyPairs queries the chain for the given CurrencyPair, this method returns the grpc response from the module
func QueryMarket ¶
func QueryMarket(chain *cosmos.CosmosChain, cp slinkytypes.CurrencyPair) (mmtypes.Market, error)
QueryMarket queries a market from the market map.
func QueryMarketMap ¶
func QueryMarketMap(chain *cosmos.CosmosChain) (*mmtypes.MarketMapResponse, error)
QueryMarketMap queries the market map. This query util provides an additional query to the list endpoint and ensures that the response data in both queries is equal.
func QueryMarkets ¶
func QueryMarkets(chain *cosmos.CosmosChain) (*mmtypes.MarketsResponse, error)
QueryMarkets queries all markets .
func QueryProposal ¶
func QueryProposal(chain *cosmos.CosmosChain, propID string) (*govtypesv1.QueryProposalResponse, error)
QueryProposal queries the chain for a given proposal
func RestartOracle ¶
RestartOracle restarts the oracle sidecar for a given node
func SetOracleConfigsOnApp ¶
SetOracleConfigsOnApp writes the oracle configuration to the given node's application config.
func SetOracleConfigsOnOracle ¶
func SetOracleConfigsOnOracle( oracle *cosmos.SidecarProcess, oracleCfg oracleconfig.OracleConfig, )
SetOracleConfigsOnOracle writes the oracle and metrics configs to the given node's oracle sidecar.
func StartOracle ¶
StartOracle starts the oracle sidecar for a given node
func StopOracle ¶
StopOracle stops the oracle sidecar for a given node
func SubmitProposal ¶
func SubmitProposal(chain *cosmos.CosmosChain, deposit sdk.Coin, submitter string, msgs ...sdk.Msg) (string, error)
SubmitProposal creates and submits a proposal to the chain
func WaitForHeight ¶
WaitForHeight waits for the giuve height to be reached
func WaitForProposalStatus ¶
func WaitForProposalStatus(chain *cosmos.CosmosChain, propID string, timeout time.Duration, status govtypesv1.ProposalStatus) error
WaitForProposalStatus waits for the deposit period for the proposal to end
Types ¶
type CCVInterchain ¶
type CCVInterchain struct {
// contains filtered or unexported fields
}
func (*CCVInterchain) IBCPath ¶
func (c *CCVInterchain) IBCPath() string
func (*CCVInterchain) Relayer ¶
func (c *CCVInterchain) Relayer() ibc.Relayer
func (*CCVInterchain) Reporter ¶
func (c *CCVInterchain) Reporter() *testreporter.RelayerExecReporter
type ChainConstructor ¶
type ChainConstructor func(t *testing.T, spec *interchaintest.ChainSpec) []*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 ¶
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 slinky.
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 slinky integration tests. The chains used in the interchain constructor should be the chains constructed via the ChainConstructor
type Option ¶
type Option func(*SlinkyIntegrationSuite)
Option is a function that modifies the SlinkyIntegrationSuite
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 WithInterchainConstructor ¶
func WithInterchainConstructor(ic InterchainConstructor) Option
WithInterchainConstructor sets the interchain constructor
type PrivValFile ¶
type PrivValFile struct {
Address string `json:"address"`
}
type SlinkyCCVSuite ¶
type SlinkyCCVSuite struct {
*SlinkyIntegrationSuite
}
SlinkyCCVSuite is a testing-suite for testing slinky's integration with ics consumer chains
func NewSlinkyCCVIntegrationSuite ¶
func NewSlinkyCCVIntegrationSuite( spec *interchaintest.ChainSpec, oracleImage ibc.DockerImage, opts ...Option, ) *SlinkyCCVSuite
func (*SlinkyCCVSuite) TestCCVAggregation ¶
func (s *SlinkyCCVSuite) TestCCVAggregation()
type SlinkyIntegrationSuite ¶
func NewSlinkyIntegrationSuite ¶
func NewSlinkyIntegrationSuite(spec *interchaintest.ChainSpec, oracleImage ibc.DockerImage, opts ...Option) *SlinkyIntegrationSuite
func (*SlinkyIntegrationSuite) AddCurrencyPairs ¶
func (s *SlinkyIntegrationSuite) AddCurrencyPairs(chain *cosmos.CosmosChain, user cosmos.User, price float64, tickers ...mmtypes.Ticker, ) error
AddCurrencyPairs creates + submits the proposal to add the given currency-pairs to state, votes for the prop w/ all nodes, and waits for the proposal to pass.
func (*SlinkyIntegrationSuite) RemoveMarket ¶
func (s *SlinkyIntegrationSuite) RemoveMarket( chain *cosmos.CosmosChain, markets []slinkytypes.CurrencyPair, ) error
func (*SlinkyIntegrationSuite) SetupSuite ¶
func (s *SlinkyIntegrationSuite) SetupSuite()
func (*SlinkyIntegrationSuite) SetupTest ¶
func (s *SlinkyIntegrationSuite) SetupTest()
func (*SlinkyIntegrationSuite) TearDownSuite ¶
func (s *SlinkyIntegrationSuite) TearDownSuite()
func (*SlinkyIntegrationSuite) Teardown ¶
func (s *SlinkyIntegrationSuite) Teardown()
func (*SlinkyIntegrationSuite) TestMultiplePriceFeeds ¶
func (s *SlinkyIntegrationSuite) TestMultiplePriceFeeds()
func (*SlinkyIntegrationSuite) UpdateCurrencyPair ¶
func (s *SlinkyIntegrationSuite) UpdateCurrencyPair(chain *cosmos.CosmosChain, markets []mmtypes.Market) error
type SlinkyOracleIntegrationSuite ¶
type SlinkyOracleIntegrationSuite struct {
*SlinkyIntegrationSuite
}
func NewSlinkyOracleIntegrationSuite ¶
func NewSlinkyOracleIntegrationSuite(suite *SlinkyIntegrationSuite) *SlinkyOracleIntegrationSuite
func (*SlinkyOracleIntegrationSuite) TestNodeFailures ¶
func (s *SlinkyOracleIntegrationSuite) TestNodeFailures()
func (*SlinkyOracleIntegrationSuite) TestOracleModule ¶
func (s *SlinkyOracleIntegrationSuite) TestOracleModule()
type SlinkyOracleValidatorIntegrationSuite ¶
type SlinkyOracleValidatorIntegrationSuite struct {
*SlinkyIntegrationSuite
}
func NewSlinkyOracleValidatorIntegrationSuite ¶
func NewSlinkyOracleValidatorIntegrationSuite(suite *SlinkyIntegrationSuite) *SlinkyOracleValidatorIntegrationSuite
func (*SlinkyOracleValidatorIntegrationSuite) TestUnbonding ¶
func (s *SlinkyOracleValidatorIntegrationSuite) TestUnbonding()