Documentation ¶
Index ¶
- func InstantiateContract(t *testing.T, chain *ibctesting.TestChain, codeID uint64, initMsg []byte, ...) sdk.AccAddress
- func NewIBCCoordinator(t *testing.T, opts ...[]wasmkeeper.Option) *ibctesting.Coordinator
- func Querier(t *testing.T, chain *ibctesting.TestChain) func(contract string, query Query) (QueryResponse, error)
- type ActiveBtcDelegation
- type BTCHeadersMsg
- type BabylonExecuteMsg
- type BtcHeader
- type BtcStaking
- type BtcUndelegationInfo
- type ConsumerContract
- type ConsumerFpsResponse
- type CovenantAdaptorSignatures
- type ExecuteMessage
- type FinalityProviderDescription
- type NewFinalityProvider
- type ProofOfPossessionBtc
- type Query
- type QueryResponse
- type SignatureInfo
- type SingleConsumerFpResponse
- type SlashedBtcDelegation
- type TestConsumerClient
- func (p *TestConsumerClient) BootstrapContracts() (*ConsumerContract, error)
- func (p *TestConsumerClient) Exec(contract sdk.AccAddress, payload []byte, funds ...sdk.Coin) (*abci.ExecTxResult, error)
- func (p *TestConsumerClient) GetSender() sdk.AccAddress
- func (p *TestConsumerClient) MustExecGovProposal(msg *bbntypes.MsgUpdateParams)
- func (p *TestConsumerClient) Query(contractAddr sdk.AccAddress, query Query) (QueryResponse, error)
- type TestProviderClient
- type UnbondedBtcDelegation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstantiateContract ¶
func InstantiateContract(t *testing.T, chain *ibctesting.TestChain, codeID uint64, initMsg []byte, funds ...sdk.Coin) sdk.AccAddress
func NewIBCCoordinator ¶
func NewIBCCoordinator(t *testing.T, opts ...[]wasmkeeper.Option) *ibctesting.Coordinator
NewIBCCoordinator initializes Coordinator with N bcd TestChain instances
func Querier ¶
func Querier(t *testing.T, chain *ibctesting.TestChain) func(contract string, query Query) (QueryResponse, error)
Types ¶
type ActiveBtcDelegation ¶
type ActiveBtcDelegation struct { StakerAddr string `json:"staker_addr"` BTCPkHex string `json:"btc_pk_hex"` FpBtcPkList []string `json:"fp_btc_pk_list"` StartHeight uint32 `json:"start_height"` EndHeight uint32 `json:"end_height"` TotalSat uint64 `json:"total_sat"` StakingTx string `json:"staking_tx"` SlashingTx string `json:"slashing_tx"` DelegatorSlashingSig string `json:"delegator_slashing_sig"` CovenantSigs []CovenantAdaptorSignatures `json:"covenant_sigs"` StakingOutputIdx uint32 `json:"staking_output_idx"` UnbondingTime uint32 `json:"unbonding_time"` UndelegationInfo BtcUndelegationInfo `json:"undelegation_info"` ParamsVersion uint32 `json:"params_version"` }
type BTCHeadersMsg ¶
type BTCHeadersMsg struct {
Headers []BtcHeader `json:"headers"`
}
type BabylonExecuteMsg ¶
type BabylonExecuteMsg struct {
BtcHeaders BTCHeadersMsg `json:"btc_headers"`
}
func GenBTCHeadersMsg ¶
func GenBTCHeadersMsg() BabylonExecuteMsg
type BtcStaking ¶
type BtcStaking struct { NewFP []NewFinalityProvider `json:"new_fp"` ActiveDel []ActiveBtcDelegation `json:"active_del"` SlashedDel []SlashedBtcDelegation `json:"slashed_del"` UnbondedDel []UnbondedBtcDelegation `json:"unbonded_del"` }
type BtcUndelegationInfo ¶
type BtcUndelegationInfo struct { UnbondingTx string `json:"unbonding_tx"` DelegatorUnbondingSig string `json:"delegator_unbonding_sig"` CovenantUnbondingSigs []SignatureInfo `json:"covenant_unbonding_sig_list"` SlashingTx string `json:"slashing_tx"` DelegatorSlashingSig string `json:"delegator_slashing_sig"` CovenantSlashingSigs []CovenantAdaptorSignatures `json:"covenant_slashing_sigs"` }
type ConsumerContract ¶
type ConsumerContract struct { Babylon sdk.AccAddress BTCStaking sdk.AccAddress BTCFinality sdk.AccAddress }
type ConsumerFpsResponse ¶
type ConsumerFpsResponse struct {
ConsumerFps []SingleConsumerFpResponse `json:"fps"`
}
type ExecuteMessage ¶
type ExecuteMessage struct {
BtcStaking BtcStaking `json:"btc_staking"`
}
func GenExecMessage ¶
func GenExecMessage() ExecuteMessage
type NewFinalityProvider ¶
type NewFinalityProvider struct { Description *FinalityProviderDescription `json:"description,omitempty"` Commission string `json:"commission"` Addr string `json:"addr,omitempty"` BTCPKHex string `json:"btc_pk_hex"` Pop *ProofOfPossessionBtc `json:"pop,omitempty"` ConsumerID string `json:"consumer_id"` }
type ProofOfPossessionBtc ¶
type QueryResponse ¶
QueryResponse is a response type used in tests only
func (QueryResponse) Array ¶
func (q QueryResponse) Array(key string) []QueryResponse
func (QueryResponse) To ¶
func (q QueryResponse) To(path ...string) QueryResponse
To can be used to navigate through the map structure
type SignatureInfo ¶
type SingleConsumerFpResponse ¶
type SingleConsumerFpResponse struct { BtcPkHex string `json:"btc_pk_hex"` SlashedBabylonHeight uint64 `json:"slashed_babylon_height"` SlashedBtcHeight uint64 `json:"slashed_btc_height"` ChainID string `json:"chain_id"` }
SingleConsumerFpResponse represents the finality provider data returned by the contract query. For more details, refer to the following links: https://github.com/babylonlabs-io/babylon-contract/blob/v0.5.3/packages/apis/src/btc_staking_api.rs https://github.com/babylonlabs-io/babylon-contract/blob/v0.5.3/contracts/btc-staking/src/msg.rs https://github.com/babylonlabs-io/babylon-contract/blob/v0.5.3/contracts/btc-staking/schema/btc-staking.json
type SlashedBtcDelegation ¶
type SlashedBtcDelegation struct { }
type TestConsumerClient ¶
type TestConsumerClient struct { Chain *ibctesting.TestChain Contracts ConsumerContract App *app.ConsumerApp // contains filtered or unexported fields }
func NewConsumerClient ¶
func NewConsumerClient(t *testing.T, chain *ibctesting.TestChain) *TestConsumerClient
func (*TestConsumerClient) BootstrapContracts ¶
func (p *TestConsumerClient) BootstrapContracts() (*ConsumerContract, error)
TODO(babylon): deploy Babylon contracts
func (*TestConsumerClient) Exec ¶
func (p *TestConsumerClient) Exec(contract sdk.AccAddress, payload []byte, funds ...sdk.Coin) (*abci.ExecTxResult, error)
func (*TestConsumerClient) GetSender ¶
func (p *TestConsumerClient) GetSender() sdk.AccAddress
func (*TestConsumerClient) MustExecGovProposal ¶
func (p *TestConsumerClient) MustExecGovProposal(msg *bbntypes.MsgUpdateParams)
MustExecGovProposal submit and vote yes on proposal
func (*TestConsumerClient) Query ¶
func (p *TestConsumerClient) Query(contractAddr sdk.AccAddress, query Query) (QueryResponse, error)
type TestProviderClient ¶
type TestProviderClient struct { Chain *ibctesting.TestChain // contains filtered or unexported fields }
func NewProviderClient ¶
func NewProviderClient(t *testing.T, chain *ibctesting.TestChain) *TestProviderClient
func (*TestProviderClient) Exec ¶
func (p *TestProviderClient) Exec(contract sdk.AccAddress, payload []byte, funds ...sdk.Coin) (*abci.ExecTxResult, error)
type UnbondedBtcDelegation ¶
type UnbondedBtcDelegation struct { }