ibc_test

package
v0.1.0-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

README

interchaintest setup

Prior to running the interchaintests, a modification of the stride image is needed. We are using the v9.2.1 tagged version image.

In there, we alter the utils/admins.go as follows to allow minting tokens from our address in the tests:

var Admins = map[string]bool{  
-       "stride1k8c2m5cn322akk5wy8lpt87dd2f4yh9azg7jlh": true, // F5
+       "stride1u20df3trc2c2zdhm8qvh2hdjx9ewh00sv6eyy8": true, // F5
        "stride10d07y265gmmuvt4z0w9aw880jnsr700jefnezl": true, // gov module
}

Then we use heighliner by strangelove to build a local docker image, as described in their documentation:

# in the stride directory
heighliner build -c stride --local

With stride image present in our local docker, we are ready to run the interchaintests. To do that, we navigate to the stride-covenant directory and run just simtest.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Add

type Add struct {
	NativeCoins []NativeCoin `json:"native_coins"`
}

type AddExecuteMsg

type AddExecuteMsg struct {
	Add Add `json:"add"`
}

type AllAccounts

type AllAccounts struct {
}

type AllAccountsResponse

type AllAccountsResponse struct {
	Data []string `json:"all_accounts_response"`
}

type AssetData

type AssetData struct {
	NativeAssetDenom string `json:"native_asset_denom"`
	LsAssetDenom     string `json:"ls_asset_denom"`
}

type AssetInfo

type AssetInfo struct {
	Token       *Token       `json:"token,omitempty"`
	NativeToken *NativeToken `json:"native_token,omitempty"`
}

type AstroportAsset

type AstroportAsset struct {
	Info   AssetInfo `json:"info"`
	Amount string    `json:"amount"`
}

type AtomReceiverQuery

type AtomReceiverQuery struct{}

type AtomWeightedReceiverQuery

type AtomWeightedReceiverQuery struct {
	AtomReceiver AtomReceiverQuery `json:"atom_receiver"`
}

type Balance

type Balance struct {
	Address string `json:"address"`
}

type BalanceResponse

type BalanceResponse struct {
	Balance string `json:"balance"`
}

type ClockAddress

type ClockAddress struct{}

type ClockAddressQuery

type ClockAddressQuery struct {
	ClockAddress ClockAddress `json:"clock_address"`
}

type ClockQueryResponse

type ClockQueryResponse struct {
	Data string `json:"data"`
}

type ContractState

type ContractState struct{}

type ContractStateQuery

type ContractStateQuery struct {
	ContractState ContractState `json:"contract_state"`
}

type ContractStateQueryResponse

type ContractStateQueryResponse struct {
	Data string `json:"data"`
}

type CovenantAddressQueryResponse

type CovenantAddressQueryResponse struct {
	Data string `json:"data"`
}

type CovenantClockAddressQuery

type CovenantClockAddressQuery struct {
	Addr string `json:"address"`
}

type CovenantHolderAddressQuery

type CovenantHolderAddressQuery struct {
	Addr string `json:"address"`
}

type CovenantInstantiateMsg

type CovenantInstantiateMsg struct {
	Label           string                `json:"label"`
	PresetClock     PresetClockFields     `json:"preset_clock_fields"`
	PresetLs        PresetLsFields        `json:"preset_ls_fields"`
	PresetDepositor PresetDepositorFields `json:"preset_depositor_fields"`
	PresetLp        PresetLpFields        `json:"preset_lp_fields"`
	PresetHolder    PresetHolderFields    `json:"preset_holder_fields"`
	PoolAddress     string                `json:"pool_address"`
	PresetIbcFee    PresetIbcFee          `json:"preset_ibc_fee"`
	Timeouts        Timeouts              `json:"timeouts"`
}

type CreatePair

type CreatePair struct {
	PairType   PairType    `json:"pair_type"`
	AssetInfos []AssetInfo `json:"asset_infos"`
	InitParams []byte      `json:"init_params"`
}

type CreatePairMsg

type CreatePairMsg struct {
	CreatePair CreatePair `json:"create_pair"`
}

type Cw20BalanceResponse

type Cw20BalanceResponse struct {
	Data BalanceResponse `json:"data"`
}

type Cw20Coin

type Cw20Coin struct {
	Address string `json:"address"`
	Amount  uint64 `json:"amount"`
}

type Cw20QueryMsg

type Cw20QueryMsg struct {
	Balance Balance `json:"balance"`
}

type CwCoin

type CwCoin struct {
	Denom  string `json:"denom"`
	Amount uint64 `json:"amount"`
}

type DepositorAddress

type DepositorAddress struct{}

type DepositorAddressQuery

type DepositorAddressQuery struct {
	DepositorAddress DepositorAddress `json:"depositor_address"`
}

type DepositorContractQuery

type DepositorContractQuery struct {
	ClockAddress ClockAddressQuery `json:"clock_address"`
}

type DepositorICAAddressQuery

type DepositorICAAddressQuery struct {
	DepositorInterchainAccountAddress DepositorInterchainAccountAddress `json:"depositor_interchain_account_address"`
}

Queries

type DepositorInterchainAccountAddress

type DepositorInterchainAccountAddress struct{}

type DepositorInterchainAccountAddressQueryResponse

type DepositorInterchainAccountAddressQueryResponse struct {
	DepositorInterchainAccountAddress string `json:"depositor_interchain_account_address"`
}

type FactoryInstantiateMsg

type FactoryInstantiateMsg struct {
	PairConfigs         []PairConfig `json:"pair_configs"`
	TokenCodeId         uint64       `json:"token_code_id"`
	FeeAddress          *string      `json:"fee_address"`
	GeneratorAddress    *string      `json:"generator_address"`
	Owner               string       `json:"owner"`
	WhitelistCodeId     uint64       `json:"whitelist_code_id"`
	CoinRegistryAddress string       `json:"coin_registry_address"`
}

astroport factory

type FactoryPairResponse

type FactoryPairResponse struct {
	Data PairInfo `json:"data"`
}

type HolderAddress

type HolderAddress struct{}

type HolderAddressQuery

type HolderAddressQuery struct {
	HolderAddress HolderAddress `json:"holder_address"`
}

type ICAQueryResponse

type ICAQueryResponse struct {
	Data DepositorInterchainAccountAddressQueryResponse `json:"data"`
}

type IcaExampleContractQuery

type IcaExampleContractQuery struct {
	InterchainAccountAddress InterchainAccountAddressQuery `json:"interchain_account_address,omitempty"`
}

A query against the Neutron example contract. Note the usage of `omitempty` on fields. This means that if that field has no value, it will not have a key in the serialized representaiton of the struct, thus mimicing the serialization of Rust enums.

type InstantiateMarketingInfo

type InstantiateMarketingInfo struct {
	Project     string `json:"project"`
	Description string `json:"description"`
	Marketing   string `json:"marketing"`
}

type InterchainAccountAddressQuery

type InterchainAccountAddressQuery struct {
	InterchainAccountId string `json:"interchain_account_id"`
	ConnectionId        string `json:"connection_id"`
}

type InterchainAccountAddressQueryResponse

type InterchainAccountAddressQueryResponse struct {
	InterchainAccountAddress string `json:"interchain_account_address"`
}

type LPContractQuery

type LPContractQuery struct {
	ClockAddress ClockAddressQuery `json:"clock_address"`
}

type LPPositionQuery

type LPPositionQuery struct {
	LpPosition LpPositionQuery `json:"lp_position"`
}
type Logo struct {
	Url string `json:"url"`
}

type LpAddress

type LpAddress struct{}

type LpAddressQuery

type LpAddressQuery struct {
	LpAddress LpAddress `json:"lp_address"`
}

type LpPositionQuery

type LpPositionQuery struct{}

type LpPositionQueryResponse

type LpPositionQueryResponse struct {
	Data string `json:"data"`
}

type LsAddress

type LsAddress struct{}

type LsAddressQuery

type LsAddressQuery struct {
	LsAddress LsAddress `json:"ls_address"`
}

type LsIcaQuery

type LsIcaQuery struct {
	StrideIca StrideIcaQuery `json:"stride_i_c_a"`
}

Queries

type MinterResponse

type MinterResponse struct {
	Minter string  `json:"minter"`
	Cap    *uint64 `json:"cap,omitempty"`
}

type NativeCoin

type NativeCoin struct {
	Name  string `json:"name"`
	Value uint8  `json:"value"`
}

type NativeCoinRegistryInstantiateMsg

type NativeCoinRegistryInstantiateMsg struct {
	Owner string `json:"owner"`
}

type NativeToken

type NativeToken struct {
	Denom string `json:"denom"`
}

type NativeTokenInstantiateMsg

type NativeTokenInstantiateMsg struct {
	Name            string                    `json:"name"`
	Symbol          string                    `json:"symbol"`
	Decimals        uint8                     `json:"decimals"`
	InitialBalances []Cw20Coin                `json:"initial_balances"`
	Mint            *MinterResponse           `json:"mint"`
	Marketing       *InstantiateMarketingInfo `json:"marketing"`
}

astroport native token

type Pair

type Pair struct {
	AssetInfos []AssetInfo `json:"asset_infos"`
}

type PairConfig

type PairConfig struct {
	CodeId              uint64   `json:"code_id"`
	PairType            PairType `json:"pair_type"`
	TotalFeeBps         uint64   `json:"total_fee_bps"`
	MakerFeeBps         uint64   `json:"maker_fee_bps"`
	IsDisabled          bool     `json:"is_disabled"`
	IsGeneratorDisabled bool     `json:"is_generator_disabled"`
}

type PairInfo

type PairInfo struct {
	LiquidityToken string      `json:"liquidity_token"`
	ContractAddr   string      `json:"contract_addr"`
	PairType       PairType    `json:"pair_type"`
	AssetInfos     []AssetInfo `json:"asset_infos"`
}

type PairQuery

type PairQuery struct {
	Pair Pair `json:"pair"`
}

type PairType

type PairType struct {
	// Xyk    struct{} `json:"xyk,omitempty"`
	Stable struct{} `json:"stable,omitempty"`
}

type PresetClockFields

type PresetClockFields struct {
	TickMaxGas string   `json:"tick_max_gas,omitempty"`
	ClockCode  uint64   `json:"clock_code"`
	Label      string   `json:"label"`
	Whitelist  []string `json:"whitelist"`
}

type PresetDepositorFields

type PresetDepositorFields struct {
	GaiaNeutronIBCTransferChannelId string                 `json:"gaia_neutron_ibc_transfer_channel_id"`
	NeutronGaiaConnectionId         string                 `json:"neutron_gaia_connection_id"`
	GaiaStrideIBCTransferChannelId  string                 `json:"gaia_stride_ibc_transfer_channel_id"`
	DepositorCode                   uint64                 `json:"depositor_code"`
	Label                           string                 `json:"label"`
	StAtomReceiverAmount            WeightedReceiverAmount `json:"st_atom_receiver_amount"`
	AtomReceiverAmount              WeightedReceiverAmount `json:"atom_receiver_amount"`
	AutopilotFormat                 string                 `json:"autopilot_format"`
	NeutronAtomIbcDenom             string                 `json:"neutron_atom_ibc_denom"`
}

type PresetHolderFields

type PresetHolderFields struct {
	Withdrawer string `json:"withdrawer,omitempty"`
	HolderCode uint64 `json:"holder_code"`
	Label      string `json:"label"`
}

type PresetIbcFee

type PresetIbcFee struct {
	AckFee     string `json:"ack_fee"`
	TimeoutFee string `json:"timeout_fee"`
}

type PresetLpFields

type PresetLpFields struct {
	SlippageTolerance         string             `json:"slippage_tolerance,omitempty"`
	Autostake                 bool               `json:"autostake,omitempty"`
	Assets                    AssetData          `json:"assets"`
	LpCode                    uint64             `json:"lp_code"`
	Label                     string             `json:"label"`
	SingleSideLpLimits        SingleSideLpLimits `json:"single_side_lp_limits"`
	ExpectedLsTokenAmount     string             `json:"expected_ls_token_amount"`
	AllowedReturnDelta        string             `json:"allowed_return_delta"`
	ExpectedNativeTokenAmount string             `json:"expected_native_token_amount"`
}

type PresetLsFields

type PresetLsFields struct {
	LsCode                            uint64 `json:"ls_code"`
	Label                             string `json:"label"`
	LsDenom                           string `json:"ls_denom"`
	StrideNeutronIBCTransferChannelId string `json:"stride_neutron_ibc_transfer_channel_id"`
	NeutronStrideIBCConnectionId      string `json:"neutron_stride_ibc_connection_id"`
}

type ProvideLiqudityMsg

type ProvideLiqudityMsg struct {
	ProvideLiquidity ProvideLiquidityStruct `json:"provide_liquidity"`
}

type ProvideLiquidityStruct

type ProvideLiquidityStruct struct {
	Assets            []AstroportAsset `json:"assets"`
	SlippageTolerance string           `json:"slippage_tolerance"`
	AutoStake         bool             `json:"auto_stake"`
	Receiver          string           `json:"receiver"`
}

type QueryResponse

type QueryResponse struct {
	Data InterchainAccountAddressQueryResponse `json:"data"`
}

type SingleSideLpLimits

type SingleSideLpLimits struct {
	NativeAssetLimit string `json:"native_asset_limit"`
	LsAssetLimit     string `json:"ls_asset_limit"`
}

type StAtomReceiverQuery

type StAtomReceiverQuery struct{}

type StAtomWeightedReceiverQuery

type StAtomWeightedReceiverQuery struct {
	StAtomReceiver StAtomReceiverQuery `json:"st_atom_receiver"`
}

type StablePoolParams

type StablePoolParams struct {
	Amp   uint64  `json:"amp"`
	Owner *string `json:"owner"`
}

type StableswapInstantiateMsg

type StableswapInstantiateMsg struct {
	TokenCodeId uint64      `json:"token_code_id"`
	FactoryAddr string      `json:"factory_addr"`
	AssetInfos  []AssetInfo `json:"asset_infos"`
	InitParams  []byte      `json:"init_params"`
}

astroport stableswap

type StrideIcaQuery

type StrideIcaQuery struct{}

type StrideIcaQueryResponse

type StrideIcaQueryResponse struct {
	Addr string `json:"data"`
}

type Timeouts

type Timeouts struct {
	IcaTimeout         string `json:"ica_timeout"`
	IbcTransferTimeout string `json:"ibc_transfer_timeout"`
}

type Token

type Token struct {
	ContractAddr string `json:"contract_addr"`
}

type TransferAmount

type TransferAmount struct {
	Amount uint64 `json:"amount,string"`
}

Rust type here is Uint128 which can't safely be serialized to json int. It needs to go as a string over the wire.

type TransferExecutionMsg

type TransferExecutionMsg struct {
	Transfer TransferAmount `json:"transfer"`
}

Execute

type WeightedReceiver

type WeightedReceiver struct {
	Amount  string `json:"amount"`
	Address string `json:"address"`
}

Instantiation

type WeightedReceiverAmount

type WeightedReceiverAmount struct {
	Amount string `json:"amount"`
}

type WeightedReceiverResponse

type WeightedReceiverResponse struct {
	Data WeightedReceiver `json:"data"`
}

type WhitelistInstantiateMsg

type WhitelistInstantiateMsg struct {
	Admins  []string `json:"admins"`
	Mutable bool     `json:"mutable"`
}

astroport whitelist

type Withdraw

type Withdraw struct {
	Quantity *[]CwCoin `json:"quantity"`
}

type WithdrawLiquidity

type WithdrawLiquidity struct{}

type WithdrawLiquidityMessage

type WithdrawLiquidityMessage struct {
	WithdrawLiquidity WithdrawLiquidity `json:"withdraw_liquidity"`
}

type WithdrawMessage

type WithdrawMessage struct {
	Withdraw Withdraw `json:"withdraw"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL