drop

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCw721ReceiveMsg

func BuildCw721ReceiveMsg(sender, contractAddress, tokenID string) (*wasmdtypes.MsgExecuteContract, error)

BuildCw721ReceiveMsg constructs a Cw721ReceiveMsg payload and returns a MsgExecuteContract

func BuildSendNftMsg

func BuildSendNftMsg(sender, withdrawalManagerAddress, withdrawalVoucherAddress, tokenID string) (*wasmdtypes.MsgExecuteContract, error)

BuildSendNftMsg constructs a SendNft payload and returns a MsgExecuteContract

func CreateUnbondMsg

func CreateUnbondMsg(sender, contractAddress string, funds types.Coin) (*wasmdtypes.MsgExecuteContract, error)

CreateUnbondMsg constructs the unbond message with funds and returns a MsgExecuteContract

Types

type Cw721ReceiveMsg

type Cw721ReceiveMsg struct {
	Msg     string `json:"msg"`
	Sender  string `json:"sender"`
	TokenID string `json:"token_id"`
}

Cw721ReceiveMsg represents the receive message structure for a CW721 NFT

type Extension

type Extension struct {
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Attributes  []Trait `json:"attributes"`
	BatchID     string  `json:"batch_id"`
	Amount      string  `json:"amount"`
}

type NftInfoResponse

type NftInfoResponse struct {
	TokenURI  *string   `json:"token_uri"`
	Extension Extension `json:"extension"`
}

type QueryClient

type QueryClient interface {
	QueryTokens(ctx context.Context, contractAddress, owner string, opts ...grpc.CallOption) (*TokensResponse, error)
	QueryNftInfo(ctx context.Context, contractAddress, tokenID string, opts ...grpc.CallOption) (*NftInfoResponse, error)
	QueryUnbondBatch(ctx context.Context, contractAddress, bondID string, opts ...grpc.CallOption) (*UnbondBatchResponse, error)
	Close() error
}

DropQuerier defines the interface for querying the Drop contract.

func NewQueryClient

func NewQueryClient(conn *grpc.ClientConn) QueryClient

type StatusTimestamps

type StatusTimestamps struct {
	New                  int64  `json:"new"`
	UnbondRequested      *int64 `json:"unbond_requested"`
	UnbondFailed         *int64 `json:"unbond_failed"`
	Unbonding            *int64 `json:"unbonding"`
	Withdrawing          *int64 `json:"withdrawing"`
	Withdrawn            *int64 `json:"withdrawn"`
	WithdrawingEmergency *int64 `json:"withdrawing_emergency"`
	WithdrawnEmergency   *int64 `json:"withdrawn_emergency"`
}

StatusTimestamps represents the status timestamps for different states.

type TokensResponse

type TokensResponse struct {
	Tokens []string `json:"tokens"`
}

type Trait

type Trait struct {
	DisplayType *string `json:"display_type"`
	TraitType   string  `json:"trait_type"`
	Value       string  `json:"value"`
}

type UnbondBatchResponse

type UnbondBatchResponse struct {
	TotalDassetAmountToWithdraw string           `json:"total_dasset_amount_to_withdraw"`
	ExpectedNativeAssetAmount   string           `json:"expected_native_asset_amount"`
	ExpectedReleaseTime         int64            `json:"expected_release_time"`
	TotalUnbondItems            int              `json:"total_unbond_items"`
	Status                      string           `json:"status"`
	SlashingEffect              *string          `json:"slashing_effect"`
	UnbondedAmount              *string          `json:"unbonded_amount"`
	WithdrawnAmount             *string          `json:"withdrawn_amount"`
	StatusTimestamps            StatusTimestamps `json:"status_timestamps"`
}

Jump to

Keyboard shortcuts

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