types

package
v16.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminResponse

type AdminResponse struct {
	Admin string `json:"admin"`
}

type BurnTokens

type BurnTokens struct {
	Denom           string   `json:"denom"`
	Amount          math.Int `json:"amount"`
	BurnFromAddress string   `json:"burn_from_address"`
}

type ChangeAdmin

type ChangeAdmin struct {
	Denom           string `json:"denom"`
	NewAdminAddress string `json:"new_admin_address"`
}

ChangeAdmin changes the admin for a factory denom. If the NewAdminAddress is empty, the denom has no admin.

type CreateDenom

type CreateDenom struct {
	Subdenom string    `json:"subdenom"`
	Metadata *Metadata `json:"metadata,omitempty"`
}

CreateDenom creates a new factory denom, of denomination: factory/{creating contract address}/{Subdenom} Subdenom can be of length at most 44 characters, in [0-9a-zA-Z./] The (creating contract address, subdenom) pair must be unique. The created denom's admin is the creating contract address, but this admin can be changed using the ChangeAdmin binding.

type DenomAdmin

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

type DenomUnit

type DenomUnit struct {
	// Denom represents the string name of the given denom unit (e.g uatom).
	Denom string `json:"denom"`
	// Exponent represents power of 10 exponent that one must
	// raise the base_denom to in order to equal the given DenomUnit's denom
	// 1 denom = 1^exponent base_denom
	// (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
	// exponent = 6, thus: 1 atom = 10^6 uatom).
	Exponent uint32 `json:"exponent"`
	// Aliases is a list of string aliases for the given denom
	Aliases []string `json:"aliases"`
}

type DenomsByCreator

type DenomsByCreator struct {
	Creator string `json:"creator"`
}

type DenomsByCreatorResponse

type DenomsByCreatorResponse struct {
	Denoms []string `json:"denoms"`
}

type ForceTransfer

type ForceTransfer struct {
	Denom       string   `json:"denom"`
	Amount      math.Int `json:"amount"`
	FromAddress string   `json:"from_address"`
	ToAddress   string   `json:"to_address"`
}

type FullDenom

type FullDenom struct {
	CreatorAddr string `json:"creator_addr"`
	Subdenom    string `json:"subdenom"`
}

type FullDenomResponse

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

type GetMetadata

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

type GetParams

type GetParams struct{}

type Metadata

type Metadata struct {
	Description string `json:"description"`
	// DenomUnits represents the list of DenomUnit's for a given coin
	DenomUnits []DenomUnit `json:"denom_units"`
	// Base represents the base denom (should be the DenomUnit with exponent = 0).
	Base string `json:"base"`
	// Display indicates the suggested denom that should be displayed in clients.
	Display string `json:"display"`
	// Name defines the name of the token (eg: Cosmos Atom)
	Name string `json:"name"`
	// Symbol is the token symbol usually shown on exchanges (eg: ATOM).
	// This can be the same as the display.
	Symbol string `json:"symbol"`
}

type MetadataResponse

type MetadataResponse struct {
	Metadata *Metadata `json:"metadata,omitempty"`
}

type MintTokens

type MintTokens struct {
	Denom         string   `json:"denom"`
	Amount        math.Int `json:"amount"`
	MintToAddress string   `json:"mint_to_address"`
}

type Params

type Params struct {
	DenomCreationFee []wasmvmtypes.Coin `json:"denom_creation_fee"`
}

type ParamsResponse

type ParamsResponse struct {
	Params Params `json:"params"`
}

type SetMetadata

type SetMetadata struct {
	Denom    string   `json:"denom"`
	Metadata Metadata `json:"metadata"`
}

type TokenFactoryMsg

type TokenFactoryMsg struct {
	Token *TokenMsg `json:"token,omitempty"`
}

type TokenFactoryQuery

type TokenFactoryQuery struct {
	Token *TokenQuery `json:"token,omitempty"`
}

type TokenMsg

type TokenMsg struct {
	/// Contracts can create denoms, namespaced under the contract's address.
	/// A contract may create any number of independent sub-denoms.
	CreateDenom *CreateDenom `json:"create_denom,omitempty"`
	/// Contracts can change the admin of a denom that they are the admin of.
	ChangeAdmin *ChangeAdmin `json:"change_admin,omitempty"`
	/// Contracts can mint native tokens for an existing factory denom
	/// that they are the admin of.
	MintTokens *MintTokens `json:"mint_tokens,omitempty"`
	/// Contracts can burn native tokens for an existing factory denom
	/// that they are the admin of.
	/// Currently, the burn from address must be the admin contract.
	BurnTokens *BurnTokens `json:"burn_tokens,omitempty"`
	/// Sets the metadata on a denom which the contract controls
	SetMetadata *SetMetadata `json:"set_metadata,omitempty"`
	/// Forces a transfer of tokens from one address to another.
	ForceTransfer *ForceTransfer `json:"force_transfer,omitempty"`
}

type TokenQuery

type TokenQuery struct {
	/// Given a subdenom minted by a contract via `OsmosisMsg::MintTokens`,
	/// returns the full denom as used by `BankMsg::Send`.
	FullDenom       *FullDenom       `json:"full_denom,omitempty"`
	Admin           *DenomAdmin      `json:"admin,omitempty"`
	Metadata        *GetMetadata     `json:"metadata,omitempty"`
	DenomsByCreator *DenomsByCreator `json:"denoms_by_creator,omitempty"`
	Params          *GetParams       `json:"params,omitempty"`
}

See https://github.com/CosmWasm/token-bindings/blob/main/packages/bindings/src/query.rs

Jump to

Keyboard shortcuts

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