helpers

package
v0.0.0-...-f6714a7 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteMsgWithAmount

func ExecuteMsgWithAmount(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, contractAddr, amount, message string)

func ExecuteMsgWithFee

func ExecuteMsgWithFee(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, contractAddr, amount, feeCoin, message string)

func ExecuteMsgWithFeeReturn

func ExecuteMsgWithFeeReturn(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, contractAddr, amount, feeCoin, message string) (*sdk.TxResponse, error)

func MigrateContract

func MigrateContract(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, keyname string, contractAddr string, fileLoc string, message string) (codeId, contract string)

func SetupContract

func SetupContract(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, keyname string, fileLoc string, message string, extraFlags ...string) (codeId, contract string)

func SmartQueryString

func SmartQueryString(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, contractAddr, queryMsg string, res interface{}) error

func StoreContract

func StoreContract(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, keyname string, fileLoc string) (codeId string)

Types

type CW721TokensResp

type CW721TokensResp struct {
	Data struct {
		Tokens []string `json:"tokens"`
	} `json:"data"`
}

type ClockContractObj

type ClockContractObj struct {
	Val uint32 `json:"val"`
}

type ClockContractResponse

type ClockContractResponse struct {
	Data *ClockContractObj `json:"data"`
}

type GetAllBalancesQuery

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

type GetAllBalancesResponse

type GetAllBalancesResponse struct {
	// or is it wasm Coin type?
	Data []sdk.Coin `json:"data"`
}

type GetBalanceQuery

type GetBalanceQuery struct {
	// {"get_balance":{"address":"juno1...","denom":"factory/juno1.../RcqfWz"}}
	Address string `json:"address"`
	Denom   string `json:"denom"`
}

type GetBalanceResponse

type GetBalanceResponse struct {
	// or is it wasm Coin type?
	Data sdk.Coin `json:"data"`
}

type GetCountObj

type GetCountObj struct {
	Count int64 `json:"count"`
}

type GetCountQuery

type GetCountQuery struct {
	// {"get_total_funds":{"addr":"juno1..."}}
	Addr string `json:"addr"`
}

type GetCountResponse

type GetCountResponse struct {
	// {"data":{"count":0}}
	Data *GetCountObj `json:"data"`
}

type GetCwHooksDelegationResponse

type GetCwHooksDelegationResponse struct {
	// {"data":{"validator_address":"%s","delegator_address":"%s","shares":"%s"}}
	Data *GetDelegationObj `json:"data"`
}

type GetDelegationObj

type GetDelegationObj struct {
	ValidatorAddress string `json:"validator_address"`
	DelegatorAddress string `json:"delegator_address"`
	Shares           string `json:"shares"`
}

type GetTotalFundsObj

type GetTotalFundsObj struct {
	TotalFunds []WasmCoin `json:"total_funds"`
}

type GetTotalFundsQuery

type GetTotalFundsQuery struct {
	// {"get_total_funds":{"addr":"juno1..."}}
	Addr string `json:"addr"`
}

type GetTotalFundsResponse

type GetTotalFundsResponse struct {
	// {"data":{"total_funds":[{"denom":"ibc/04F5F501207C3626A2C14BFEF654D51C2E0B8F7CA578AB8ED272A66FE4E48097","amount":"1"}]}}
	Data *GetTotalFundsObj `json:"data"`
}

type QueryMsg

type QueryMsg struct {
	// Tokenfactory Core
	GetConfig      *struct{}            `json:"get_config,omitempty"`
	GetBalance     *GetBalanceQuery     `json:"get_balance,omitempty"`
	GetAllBalances *GetAllBalancesQuery `json:"get_all_balances,omitempty"`

	// Unity Contract
	GetWithdrawalReadyTime *struct{} `json:"get_withdrawal_ready_time,omitempty"`

	// IBCHooks
	GetCount      *GetCountQuery      `json:"get_count,omitempty"`
	GetTotalFunds *GetTotalFundsQuery `json:"get_total_funds,omitempty"`
}

EntryPoint

type WasmCoin

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

type WithdrawalTimestampObj

type WithdrawalTimestampObj struct {
	WithdrawalReadyTimestamp string `json:"withdrawal_ready_timestamp"`
}

type WithdrawalTimestampResponse

type WithdrawalTimestampResponse struct {
	// {"data":{"withdrawal_ready_timestamp":"1686146048614053435"}}
	Data *WithdrawalTimestampObj `json:"data"`
}

Jump to

Keyboard shortcuts

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