Documentation ¶
Index ¶
- Constants
- func EventDecoder(codeID contracts.CodeID, instanceID contracts.InstanceID) client.EventDecoder
- type AllowanceChangedEvent
- type Balance
- type BalanceResponse
- type BurnedEvent
- type Empty
- type Event
- type InitialBalance
- type Instantiate
- type InstantiatedEvent
- type MintedEvent
- type MintingInformation
- type Request
- type Response
- type Send
- type SentEvent
- type TokenInformation
- type TokenInformationResponse
- type Transfer
- type TransferredEvent
- type WithdrewEvent
Constants ¶
const ( // InstantiatedEventCode is the event code for the contract instantiated event. InstantiatedEventCode = 1 // TransferredEventCode is the event code for the transfer event. TransferredEventCode = 2 // SentEventCode is the event code for the sens event. SentEventCode = 3 // BurnedEventCode is the event code for the burn event. BurnedEventCode = 4 // AllowanceChangedEventCode is the event code for the allowance changed event. AllowanceChangedEventCode = 5 // WithdrewEventCode is the event code for the withdraw event. WithdrewEventCode = 6 // MintedEventCode is the event code for the minted event. MintedEventCode = 7 )
Variables ¶
This section is empty.
Functions ¶
func EventDecoder ¶
func EventDecoder(codeID contracts.CodeID, instanceID contracts.InstanceID) client.EventDecoder
Types ¶
type AllowanceChangedEvent ¶
type AllowanceChangedEvent struct { Owner types.Address `json:"owner"` Beneficiary types.Address `json:"beneficiary"` Allowance quantity.Quantity `json:"quantity"` Negative bool `json:"negative"` AmountChange quantity.Quantity `json:"amount_change"` }
AllowanceChangedEvent is the allowance change event.
type BalanceResponse ¶
BalanceResponse is the OAS20 balance response.
type BurnedEvent ¶
type BurnedEvent struct { From types.Address `json:"from"` Amount quantity.Quantity `json:"amount"` }
BurnedEvent is the burn event.
type Event ¶
type Event struct { Instantiated *InstantiatedEvent `json:"instantiated,omitempty"` Transferred *TransferredEvent `json:"transferred,omitempty"` Sent *SentEvent `json:"sent,omitempty"` Burned *BurnedEvent `json:"burned,omitempty"` AllowanceChanged *AllowanceChangedEvent `json:"allowance_changed,omitempty"` Withdrew *WithdrewEvent `json:"withdrew,omitempty"` Minted *MintedEvent `json:"minted,omitempty"` }
Event is an OAS20 event.
type InitialBalance ¶
type InitialBalance struct { Address types.Address `json:"address"` Amount quantity.Quantity `json:"amount"` }
InitialBalance is the OAS20 contract initial balance information.
type Instantiate ¶
type Instantiate struct { // Name is the name of the token. Name string `json:"name"` // Symbol is the token symbol. Symbol string `json:"symbol"` // Decimals is the number of token decimals. Decimals uint8 `json:"decimals"` // InitialBalances are the initial balances of the token. InitialBalances []InitialBalance `json:"initial_balances,omitempty"` // Minting is the information about minting in case the token supports minting. Mintting *MintingInformation `json:"minting,omitempty"` }
Instantiate is the OAS20 contract's initial state.
type InstantiatedEvent ¶
type InstantiatedEvent struct {
TokenInformation TokenInformationResponse `json:"token_information"`
}
InstantiatedEvent is the contract instantiated event.
type MintedEvent ¶
MintedEvent is the mint event.
type MintingInformation ¶
type MintingInformation struct { Minter types.Address `json:"minter"` Cap *quantity.Quantity `json:"cap,omitempty"` }
MintingInformation is the OAS20 contract minting information.
type Request ¶
type Request struct { Instantiate *Instantiate `json:"instantiate,omitempty"` Transfer *Transfer `json:"transfer,omitempty"` Send *Send `json:"send,omitempty"` TokenInformation *TokenInformation `json:"token_information,omitempty"` Balance *Balance `json:"balance,omitempty"` }
Request is an OAS20 contract request.
type Response ¶
type Response struct { TokenInformation *TokenInformationResponse `json:"token_information,omitempty"` Balance *BalanceResponse `json:"balance,omitempty"` Empty *Empty `json:"empty,omitempty"` }
Response is an OAS20 contract response.
type Send ¶
type Send struct { To contracts.InstanceID `json:"to"` Amount quantity.Quantity `json:"amount"` Data interface{} `json:"data"` }
Send is the OAS20 contract's send request.
type SentEvent ¶
type SentEvent struct { From types.Address `json:"from"` To contracts.InstanceID `json:"to"` Amount quantity.Quantity `json:"amount"` }
SentEvent is the send event.
type TokenInformation ¶
type TokenInformation struct{}
TokenInformation is the OAS20 contract's token information request.
type TokenInformationResponse ¶
type TokenInformationResponse struct { // Name is the name of the token. Name string `json:"name"` // Symbol is the token symbol. Symbol string `json:"symbol"` // Decimals is the number of token decimals. Decimals uint8 `json:"decimals"` // TotalSupply is the total supply of the token. TotalSupply quantity.Quantity `json:"total_supply"` // Minting is the information about minting in case the token supports minting. Minting *MintingInformation `json:"minting,omitempty"` }
TokenInformationResponse is the token information response.
func (*TokenInformationResponse) Equal ¶
func (t *TokenInformationResponse) Equal(t2 *TokenInformationResponse) bool
Equal compares token information response for equality.