msg

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AtomicSwapRoute = "atomicSwap"
	HTLT            = "HTLT"
	DepositHTLT     = "depositHTLT"
	ClaimHTLT       = "claimHTLT"
	RefundHTLT      = "refundHTLT"

	Int64Size               = 8
	RandomNumberHashLength  = 32
	RandomNumberLength      = 32
	MaxOtherChainAddrLength = 64
	SwapIDLength            = 32
	MaxExpectedIncomeLength = 64
	MinimumHeightSpan       = 360
	MaximumHeightSpan       = 518400
)
View Source
const (
	RouteBridge = "bridge"

	BindMsgType        = "crossBind"
	UnbindMsgType      = "crossUnbind"
	TransferOutMsgType = "crossTransferOut"
)
View Source
const (
	MsgRoute = "gov"

	MaxTitleLength           = 128
	MaxDescriptionLength int = 2048
	MaxVotingPeriod          = 2 * 7 * 24 * 60 * 60 * time.Second // 2 weeks
)

name to idetify transaction types

View Source
const (
	MiniRoute        = "miniTokensIssue"
	IssueMiniMsgType = "miniIssueMsg"
)
View Source
const (
	RouteOracle = "oracle"

	ClaimMsgType = "oracleClaim"

	OracleChannelId sdk.IbcChannelID = 0x00
)
View Source
const (
	CrossChainFeeLength = 32
	PackageTypeLength   = 1
	PackageHeaderLength = CrossChainFeeLength + PackageTypeLength
)
View Source
const (
	RouteNewOrder    = "orderNew"
	RouteCancelOrder = "orderCancel"
)

Order routes

View Source
const (
	AccountFlagsRoute      = "accountFlags"
	SetAccountFlagsMsgType = "setAccountFlags"
)
View Source
const (
	MsgTypeSideSubmitProposal = "side_submit_proposal"
	MsgTypeSideDeposit        = "side_deposit"
	MsgTypeSideVote           = "side_vote"

	// side chain params change
	ProposalTypeSCParamsChange ProposalKind = 0x81
	// cross side chain param change
	ProposalTypeCSCParamsChange ProposalKind = 0x82

	MaxSideChainIdLength = 20
)
View Source
const (
	TypeMsgSideChainUnjail = "side_chain_unjail"

	SideChainSlashMsgRoute = "slashing"
)
View Source
const (
	TypeCreateSideChainValidator = "side_create_validator"
	TypeEditSideChainValidator   = "side_edit_validator"
	TypeSideChainDelegate        = "side_delegate"
	TypeSideChainRedelegate      = "side_redelegate"
	TypeSideChainUndelegate      = "side_undelegate"

	SideChainStakeMsgRoute = "stake"
	SideChainAddrLen       = 20

	MinDelegationAmount = 1e7
)
View Source
const (
	MaxTimeLockDescriptionLength = 128
	MinLockTime                  = 60 * time.Second

	InitialRecordId = 1
)
View Source
const (
	TypeMsgUnjail = "unjail"
	SlashMsgRoute = "slashing"
)

name to identify transaction types

View Source
const (
	DotBSuffix                    = ".B"
	NativeToken                   = "BNB"
	NativeTokenDotBSuffixed       = "BNB" + DotBSuffix
	Decimals                int8  = 8
	MaxTotalSupply          int64 = 9000000000000000000 // 90 billions with 8 decimal digits

	TokenSymbolMaxLen          = 8
	TokenSymbolMinLen          = 2
	TokenSymbolTxHashSuffixLen = 3

	MiniTokenSymbolMaxLen          = 8
	MiniTokenSymbolMinLen          = 2
	MiniTokenSymbolSuffixLen       = 4
	MiniTokenSymbolMSuffix         = "M"
	MiniTokenSymbolTxHashSuffixLen = 3
	MaxMiniTokenNameLength         = 32
	MaxTokenURILength              = 2048
)

constants

View Source
const (
	IssueTinyMsgType = "tinyIssueMsg"
)
View Source
const (
	MaxSymbolLength = 32
)

Variables

View Source
var (
	// bnb prefix address:  bnb1wxeplyw7x8aahy93w96yhwm7xcq3ke4f8ge93u
	// tbnb prefix address: tbnb1wxeplyw7x8aahy93w96yhwm7xcq3ke4ffasp3d
	AtomicSwapCoinsAccAddr = types.AccAddress(crypto.AddressHash([]byte("BinanceChainAtomicSwapCoins")))
)
View Source
var MsgCdc = amino.NewCodec()
View Source
var OrderSide = struct {
	BUY  int8
	SELL int8
}{1, 2}

OrderSide /TimeInForce /OrderType are const, following FIX protocol convention Used as Enum

View Source
var OrderType = struct {
	LIMIT  int8
	MARKET int8
}{orderLimit, orderMarket}

OrderType is an enum of order type options supported by the matching engine

View Source
var StatusTextToString = [...]string{"pending", "success", "failed"}
View Source
var StringToStatusText = map[string]StatusText{
	"pending": PendingStatusText,
	"success": SuccessStatusText,
	"failed":  FailedStatusText,
}
View Source
var TimeInForce = struct {
	GTC int8
	IOC int8
}{tifGTC, tifIOC}

TimeInForce is an enum of TIF (Time in Force) options supported by the matching engine

View Source
var (
	TimeLockCoinsAccAddr = types.AccAddress(crypto.AddressHash([]byte("BinanceChainTimeLockCoins")))
)

Functions

func CalculateRandomHash added in v1.1.3

func CalculateRandomHash(randomNumber []byte, timestamp int64) []byte

func CalculateSwapID added in v1.1.3

func CalculateSwapID(randomNumberHash []byte, sender types.AccAddress, senderOtherChain string) []byte

func GenerateOrderID

func GenerateOrderID(sequence int64, from types.AccAddress) string

GenerateOrderID generates an order ID

func GetClaimId added in v1.2.4

func GetClaimId(chainId sdk.IbcChainID, channelId sdk.IbcChannelID, sequence int64) string

func Has0xPrefix added in v1.2.4

func Has0xPrefix(input string) bool

has0xPrefix validates str begins with '0x' or '0X'.

func HexAddress added in v1.2.4

func HexAddress(a []byte) string

func HexDecode added in v1.2.4

func HexDecode(input string) ([]byte, error)

Decode decodes a hex string with 0x prefix.

func HexEncode added in v1.2.4

func HexEncode(b []byte) string

func IToOrderType

func IToOrderType(tpe int8) string

IToOrderType conversion

func IToSide

func IToSide(side int8) string

IToSide conversion

func IToTimeInForce

func IToTimeInForce(tif int8) string

IToTimeInForce conversion

func IsValidMiniTokenSymbol added in v1.2.6

func IsValidMiniTokenSymbol(symbol string) bool

Validate and check if it's mini token

func IsValidOrderType

func IsValidOrderType(ot int8) bool

IsValidOrderType validates that an order type is valid and supported by the matching engine

func IsValidSide

func IsValidSide(side int8) bool

IsValidSide validates that a side is valid and supported by the matching engine

func IsValidTimeInForce

func IsValidTimeInForce(tif int8) bool

IsValidTimeInForce validates that a tif code is correct

func MustSortJSON

func MustSortJSON(toSortJSON []byte) []byte

MustSortJSON is like SortJSON but panic if an error occurs, e.g., if the passed JSON isn't valid.

func RegisterCodec

func RegisterCodec(cdc *amino.Codec)

func SideStringToSideCode

func SideStringToSideCode(side string) (int8, error)

SideStringToSideCode converts a string like "BUY" to its internal side code

func SortJSON

func SortJSON(toSortJSON []byte) ([]byte, error)

SortJSON takes any JSON and returns it sorted by keys. Also, all white-spaces are removed. This method can be used to canonicalize JSON to be returned by GetSignBytes, e.g. for the ledger integration. If the passed JSON isn't valid it will return an error.

func TifStringToTifCode

func TifStringToTifCode(tif string) (int8, error)

TifStringToTifCode converts a string like "GTC" to its internal tif code

func ValidateMiniTokenSymbol added in v1.2.3

func ValidateMiniTokenSymbol(symbol string) error

func ValidateSymbol

func ValidateSymbol(symbol string) error

ValidateSymbol utility

Types

type ApproveBindSynPackage added in v1.2.4

type ApproveBindSynPackage struct {
	Status          uint32
	Bep2TokenSymbol [32]byte
}

type BindMsg added in v1.2.4

type BindMsg struct {
	From             sdk.AccAddress    `json:"from"`
	Symbol           string            `json:"symbol"`
	Amount           int64             `json:"amount"`
	ContractAddress  SmartChainAddress `json:"contract_address"`
	ContractDecimals int8              `json:"contract_decimals"`
	ExpireTime       int64             `json:"expire_time"`
}

func NewBindMsg added in v1.2.4

func NewBindMsg(from sdk.AccAddress, symbol string, amount int64, contractAddress SmartChainAddress, contractDecimals int8, expireTime int64) BindMsg

func (BindMsg) GetInvolvedAddresses added in v1.2.4

func (msg BindMsg) GetInvolvedAddresses() []sdk.AccAddress

func (BindMsg) GetSignBytes added in v1.2.4

func (msg BindMsg) GetSignBytes() []byte

func (BindMsg) GetSigners added in v1.2.4

func (msg BindMsg) GetSigners() []sdk.AccAddress

func (BindMsg) Route added in v1.2.4

func (msg BindMsg) Route() string

func (BindMsg) String added in v1.2.4

func (msg BindMsg) String() string

func (BindMsg) Type added in v1.2.4

func (msg BindMsg) Type() string

func (BindMsg) ValidateBasic added in v1.2.4

func (msg BindMsg) ValidateBasic() error

type BindStatus added in v1.2.4

type BindStatus int8

type BindSynPackage added in v1.2.4

type BindSynPackage struct {
	PackageType     uint8
	Bep2TokenSymbol [32]byte
	ContractAddr    SmartChainAddress
	TotalSupply     *big.Int
	PeggyAmount     *big.Int
	Decimals        uint8
	ExpireTime      uint64
}

type CSCParamChange added in v1.2.4

type CSCParamChange struct {
	Key    string `json:"key"` // the name of the parameter
	Value  string `json:"value"`
	Target string `json:"target"`

	// Since byte slice is not friendly to show in proposal description, omit it.
	ValueBytes  []byte `json:"-"` // the value of the parameter
	TargetBytes []byte `json:"-"` // the address of the target contract
}

func (*CSCParamChange) Check added in v1.2.4

func (c *CSCParamChange) Check() error

type CancelOrderMsg

type CancelOrderMsg struct {
	Sender types.AccAddress `json:"sender"`
	Symbol string           `json:"symbol"`
	RefID  string           `json:"refid"`
}

CancelOrderMsg represents a message to cancel an open order

func NewCancelOrderMsg

func NewCancelOrderMsg(sender types.AccAddress, symbol, refID string) CancelOrderMsg

NewCancelOrderMsg constructs a new CancelOrderMsg

func (CancelOrderMsg) GetInvolvedAddresses

func (msg CancelOrderMsg) GetInvolvedAddresses() []types.AccAddress

GetInvolvedAddresses as part of Msg interface

func (CancelOrderMsg) GetSignBytes

func (msg CancelOrderMsg) GetSignBytes() []byte

GetSignBytes - Get the bytes for the message signer to sign on

func (CancelOrderMsg) GetSigners

func (msg CancelOrderMsg) GetSigners() []types.AccAddress

GetSigners is part of Msg interface

func (CancelOrderMsg) Route

func (msg CancelOrderMsg) Route() string

Route is part of Msg interface

func (CancelOrderMsg) String

func (msg CancelOrderMsg) String() string

String is part of Msg interface

func (CancelOrderMsg) Type

func (msg CancelOrderMsg) Type() string

Type is part of Msg interface

func (CancelOrderMsg) ValidateBasic

func (msg CancelOrderMsg) ValidateBasic() error

ValidateBasic is used to quickly disqualify obviously invalid messages quickly

type Claim added in v1.2.4

type Claim struct {
	ID               string         `json:"id"`
	ValidatorAddress sdk.ValAddress `json:"validator_address"`
	Content          string         `json:"content"`
}

Claim contains an arbitrary claim with arbitrary content made by a given validator

func NewClaim added in v1.2.4

func NewClaim(id string, validatorAddress sdk.ValAddress, content string) Claim

NewClaim returns a new Claim

type ClaimHTLTMsg added in v1.1.3

type ClaimHTLTMsg struct {
	From         types.AccAddress `json:"from"`
	SwapID       types.SwapBytes  `json:"swap_id"`
	RandomNumber types.SwapBytes  `json:"random_number"`
}

func NewClaimHTLTMsg added in v1.1.3

func NewClaimHTLTMsg(from types.AccAddress, swapID, randomNumber []byte) ClaimHTLTMsg

func (ClaimHTLTMsg) GetInvolvedAddresses added in v1.1.3

func (msg ClaimHTLTMsg) GetInvolvedAddresses() []types.AccAddress

func (ClaimHTLTMsg) GetSignBytes added in v1.1.3

func (msg ClaimHTLTMsg) GetSignBytes() []byte

func (ClaimHTLTMsg) GetSigners added in v1.1.3

func (msg ClaimHTLTMsg) GetSigners() []types.AccAddress

func (ClaimHTLTMsg) Route added in v1.1.3

func (msg ClaimHTLTMsg) Route() string

func (ClaimHTLTMsg) String added in v1.1.3

func (msg ClaimHTLTMsg) String() string

func (ClaimHTLTMsg) Type added in v1.1.3

func (msg ClaimHTLTMsg) Type() string

func (ClaimHTLTMsg) ValidateBasic added in v1.1.3

func (msg ClaimHTLTMsg) ValidateBasic() error

type ClaimMsg added in v1.2.4

type ClaimMsg struct {
	ChainId          sdk.IbcChainID `json:"chain_id"`
	Sequence         uint64         `json:"sequence"`
	Payload          []byte         `json:"payload"`
	ValidatorAddress sdk.AccAddress `json:"validator_address"`
}

func NewClaimMsg added in v1.2.4

func NewClaimMsg(ChainId sdk.IbcChainID, sequence uint64, payload []byte, validatorAddr sdk.AccAddress) ClaimMsg

func (ClaimMsg) GetInvolvedAddresses added in v1.2.4

func (msg ClaimMsg) GetInvolvedAddresses() []sdk.AccAddress

func (ClaimMsg) GetSignBytes added in v1.2.4

func (msg ClaimMsg) GetSignBytes() []byte

GetSignBytes - Get the bytes for the message signer to sign on

func (ClaimMsg) GetSigners added in v1.2.4

func (msg ClaimMsg) GetSigners() []sdk.AccAddress

func (ClaimMsg) Route added in v1.2.4

func (msg ClaimMsg) Route() string

nolint

func (ClaimMsg) String added in v1.2.4

func (msg ClaimMsg) String() string

func (ClaimMsg) Type added in v1.2.4

func (msg ClaimMsg) Type() string

func (ClaimMsg) ValidateBasic added in v1.2.4

func (msg ClaimMsg) ValidateBasic() error

ValidateBasic is used to quickly disqualify obviously invalid messages quickly

type CommonAckPackage added in v1.2.4

type CommonAckPackage struct {
	Code uint32
}

type CreateOrderMsg

type CreateOrderMsg struct {
	Sender      types.AccAddress `json:"sender"`
	ID          string           `json:"id"`
	Symbol      string           `json:"symbol"`
	OrderType   int8             `json:"ordertype"`
	Side        int8             `json:"side"`
	Price       int64            `json:"price"`
	Quantity    int64            `json:"quantity"`
	TimeInForce int8             `json:"timeinforce"`
}

CreateOrderMsg def

func NewCreateOrderMsg

func NewCreateOrderMsg(sender types.AccAddress, id string, side int8, symbol string, price int64, qty int64) CreateOrderMsg

NewCreateOrderMsg constructs a new CreateOrderMsg

func (CreateOrderMsg) GetInvolvedAddresses

func (msg CreateOrderMsg) GetInvolvedAddresses() []types.AccAddress

GetInvolvedAddresses as part of the Msg interface

func (CreateOrderMsg) GetSignBytes

func (msg CreateOrderMsg) GetSignBytes() []byte

GetSignBytes - Get the bytes for the message signer to sign on

func (CreateOrderMsg) GetSigners

func (msg CreateOrderMsg) GetSigners() []types.AccAddress

GetSigners is part of Msg interface

func (CreateOrderMsg) Route

func (msg CreateOrderMsg) Route() string

Route is part of Msg interface

func (CreateOrderMsg) String

func (msg CreateOrderMsg) String() string

String is part of Msg interface

func (CreateOrderMsg) Type

func (msg CreateOrderMsg) Type() string

Type is part of Msg interface

func (CreateOrderMsg) ValidateBasic

func (msg CreateOrderMsg) ValidateBasic() error

ValidateBasic is used to quickly disqualify obviously invalid messages quickly

type CreateSideChainValidatorMsg added in v1.2.4

type CreateSideChainValidatorMsg struct {
	Description   Description         `json:"description"`
	Commission    types.CommissionMsg `json:"commission"`
	DelegatorAddr types.AccAddress    `json:"delegator_address"`
	ValidatorAddr types.ValAddress    `json:"validator_address"`
	Delegation    types.Coin          `json:"delegation"`
	SideChainId   string              `json:"side_chain_id"`
	SideConsAddr  []byte              `json:"side_cons_addr"`
	SideFeeAddr   []byte              `json:"side_fee_addr"`
}

func NewCreateSideChainValidatorMsg added in v1.2.4

func NewCreateSideChainValidatorMsg(valAddr types.ValAddress, delegation types.Coin,
	description Description, commission types.CommissionMsg, sideChainId string, sideConsAddr []byte, sideFeeAddr []byte) CreateSideChainValidatorMsg

func NewMsgCreateSideChainValidatorOnBehalfOf added in v1.2.4

func NewMsgCreateSideChainValidatorOnBehalfOf(delegatorAddr types.AccAddress, valAddr types.ValAddress, delegation types.Coin,
	description Description, commission types.CommissionMsg, sideChainId string, sideConsAddr []byte, sideFeeAddr []byte) CreateSideChainValidatorMsg

func (CreateSideChainValidatorMsg) GetInvolvedAddresses added in v1.2.4

func (msg CreateSideChainValidatorMsg) GetInvolvedAddresses() []types.AccAddress

func (CreateSideChainValidatorMsg) GetSignBytes added in v1.2.4

func (msg CreateSideChainValidatorMsg) GetSignBytes() []byte

func (CreateSideChainValidatorMsg) GetSigners added in v1.2.4

func (msg CreateSideChainValidatorMsg) GetSigners() []types.AccAddress

func (CreateSideChainValidatorMsg) Route added in v1.2.4

func (msg CreateSideChainValidatorMsg) Route() string

func (CreateSideChainValidatorMsg) Type added in v1.2.4

func (CreateSideChainValidatorMsg) ValidateBasic added in v1.2.4

func (msg CreateSideChainValidatorMsg) ValidateBasic() error

type CrossChainPackage added in v1.2.4

type CrossChainPackage struct {
	PackageType CrossChainPackageType
	RelayFee    big.Int
	Content     interface{}
}

func ParseClaimPayload added in v1.2.4

func ParseClaimPayload(payload []byte) ([]CrossChainPackage, error)

type CrossChainPackageType added in v1.2.4

type CrossChainPackageType uint8
const (
	SynCrossChainPackageType     CrossChainPackageType = 0x00
	AckCrossChainPackageType     CrossChainPackageType = 0x01
	FailAckCrossChainPackageType CrossChainPackageType = 0x02
)

func DecodePackageHeader added in v1.2.4

func DecodePackageHeader(packageHeader []byte) (packageType CrossChainPackageType, relayFee big.Int, err error)

type CrossParamChange added in v1.2.4

type CrossParamChange struct {
	Key    string
	Value  []byte
	Target []byte
}

type CrossStakeRefundPackage added in v1.2.9

type CrossStakeRefundPackage struct {
	EventType uint8
	Recipient SmartChainAddress
	Amount    *big.Int
	ErrorCode uint32
}

type CrossStakeSynPackageFromBSC added in v1.2.9

type CrossStakeSynPackageFromBSC struct {
	EventType   uint8
	ParamsBytes []byte
}

type DBProphecy added in v1.2.4

type DBProphecy struct {
	ID              string `json:"id"`
	Status          Status `json:"status"`
	ValidatorClaims []byte `json:"validator_claims"`
}

DBProphecy is what the prophecy becomes when being saved to the database.

Tendermint/Amino does not support maps so we must serialize those variables into bytes.

func (DBProphecy) DeserializeFromDB added in v1.2.4

func (dbProphecy DBProphecy) DeserializeFromDB() (Prophecy, error)

DeserializeFromDB deserializes a DBProphecy into a prophecy

type DepositHTLTMsg added in v1.1.3

type DepositHTLTMsg struct {
	From   types.AccAddress `json:"from"`
	Amount types.Coins      `json:"amount"`
	SwapID types.SwapBytes  `json:"swap_id"`
}

func NewDepositHTLTMsg added in v1.1.3

func NewDepositHTLTMsg(from types.AccAddress, swapID []byte, amount types.Coins) DepositHTLTMsg

func (DepositHTLTMsg) GetInvolvedAddresses added in v1.1.3

func (msg DepositHTLTMsg) GetInvolvedAddresses() []types.AccAddress

func (DepositHTLTMsg) GetSignBytes added in v1.1.3

func (msg DepositHTLTMsg) GetSignBytes() []byte

func (DepositHTLTMsg) GetSigners added in v1.1.3

func (msg DepositHTLTMsg) GetSigners() []types.AccAddress

func (DepositHTLTMsg) Route added in v1.1.3

func (msg DepositHTLTMsg) Route() string

func (DepositHTLTMsg) String added in v1.1.3

func (msg DepositHTLTMsg) String() string

func (DepositHTLTMsg) Type added in v1.1.3

func (msg DepositHTLTMsg) Type() string

func (DepositHTLTMsg) ValidateBasic added in v1.1.3

func (msg DepositHTLTMsg) ValidateBasic() error

type DepositMsg

type DepositMsg struct {
	ProposalID int64            `json:"proposal_id"` // ID of the proposal
	Depositer  types.AccAddress `json:"depositer"`   // Address of the depositer
	Amount     types.Coins      `json:"amount"`      // Coins to add to the proposal's deposit
}

----------------------------------------------------------- DepositMsg

func NewDepositMsg

func NewDepositMsg(depositer types.AccAddress, proposalID int64, amount types.Coins) DepositMsg

func (DepositMsg) Get

func (msg DepositMsg) Get(key interface{}) (value interface{})

Implements Msg.

func (DepositMsg) GetInvolvedAddresses

func (msg DepositMsg) GetInvolvedAddresses() []types.AccAddress

func (DepositMsg) GetSignBytes

func (msg DepositMsg) GetSignBytes() []byte

Implements Msg.

func (DepositMsg) GetSigners

func (msg DepositMsg) GetSigners() []types.AccAddress

Implements Msg.

func (DepositMsg) Route

func (msg DepositMsg) Route() string

Implements Msg. nolint

func (DepositMsg) String

func (msg DepositMsg) String() string

func (DepositMsg) Type

func (msg DepositMsg) Type() string

func (DepositMsg) ValidateBasic

func (msg DepositMsg) ValidateBasic() error

Implements Msg.

type Description added in v1.0.5

type Description struct {
	Moniker  string `json:"moniker"`  // name
	Identity string `json:"identity"` // optional identity signature (ex. UPort or Keybase)
	Website  string `json:"website"`  // optional website link
	Details  string `json:"details"`  // optional details
}

Description - description fields for a validator

func (Description) EnsureLength added in v1.0.5

func (d Description) EnsureLength() (Description, error)

EnsureLength ensures the length of a validator's description.

type DexListMsg

type DexListMsg struct {
	From             types.AccAddress `json:"from"`
	ProposalId       int64            `json:"proposal_id"`
	BaseAssetSymbol  string           `json:"base_asset_symbol"`
	QuoteAssetSymbol string           `json:"quote_asset_symbol"`
	InitPrice        int64            `json:"init_price"`
}

DexListMsg def

func NewDexListMsg

func NewDexListMsg(from types.AccAddress, proposalId int64, baseAssetSymbol string, quoteAssetSymbol string, initPrice int64) DexListMsg

NewDexListMsg for instance creation

func (DexListMsg) GetInvolvedAddresses

func (msg DexListMsg) GetInvolvedAddresses() []types.AccAddress

GetInvolvedAddresses part of Msg interface

func (DexListMsg) GetSignBytes

func (msg DexListMsg) GetSignBytes() []byte

GetSignBytes part of Msg interface

func (DexListMsg) GetSigners

func (msg DexListMsg) GetSigners() []types.AccAddress

GetSigners part of Msg interface

func (DexListMsg) Route

func (msg DexListMsg) Route() string

Route part of Msg interface

func (DexListMsg) String

func (msg DexListMsg) String() string

String part of Msg interface

func (DexListMsg) Type

func (msg DexListMsg) Type() string

Type part of Msg interface

func (DexListMsg) ValidateBasic

func (msg DexListMsg) ValidateBasic() error

ValidateBasic part of Msg interface

type EditSideChainValidatorMsg added in v1.2.4

type EditSideChainValidatorMsg struct {
	Description   Description      `json:"description"`
	ValidatorAddr types.ValAddress `json:"address"`

	CommissionRate *types.Dec `json:"commission_rate"`

	SideChainId  string `json:"side_chain_id"`
	SideFeeAddr  []byte `json:"side_fee_addr"`
	SideConsAddr []byte `json:"side_cons_addr,omitempty"`
}

func NewEditSideChainValidatorMsg added in v1.2.4

func NewEditSideChainValidatorMsg(sideChainId string, validatorAddr types.ValAddress, description Description, commissionRate *types.Dec, sideFeeAddr, sideConsAddr []byte) EditSideChainValidatorMsg

func (EditSideChainValidatorMsg) GetInvolvedAddresses added in v1.2.4

func (msg EditSideChainValidatorMsg) GetInvolvedAddresses() []types.AccAddress

func (EditSideChainValidatorMsg) GetSignBytes added in v1.2.4

func (msg EditSideChainValidatorMsg) GetSignBytes() []byte

func (EditSideChainValidatorMsg) GetSigners added in v1.2.4

func (msg EditSideChainValidatorMsg) GetSigners() []types.AccAddress

func (EditSideChainValidatorMsg) Route added in v1.2.4

func (msg EditSideChainValidatorMsg) Route() string

func (EditSideChainValidatorMsg) Type added in v1.2.4

func (msg EditSideChainValidatorMsg) Type() string

func (EditSideChainValidatorMsg) ValidateBasic added in v1.2.4

func (msg EditSideChainValidatorMsg) ValidateBasic() error

type HTLTMsg added in v1.1.3

type HTLTMsg struct {
	From                types.AccAddress `json:"from"`
	To                  types.AccAddress `json:"to"`
	RecipientOtherChain string           `json:"recipient_other_chain"`
	SenderOtherChain    string           `json:"sender_other_chain"`
	RandomNumberHash    types.SwapBytes  `json:"random_number_hash"`
	Timestamp           int64            `json:"timestamp"`
	Amount              types.Coins      `json:"amount"`
	ExpectedIncome      string           `json:"expected_income"`
	HeightSpan          int64            `json:"height_span"`
	CrossChain          bool             `json:"cross_chain"`
}

func NewHTLTMsg added in v1.1.3

func NewHTLTMsg(from, to types.AccAddress, recipientOtherChain, senderOtherChain string, randomNumberHash types.SwapBytes, timestamp int64,
	amount types.Coins, expectedIncome string, heightSpan int64, crossChain bool) HTLTMsg

func (HTLTMsg) GetInvolvedAddresses added in v1.1.3

func (msg HTLTMsg) GetInvolvedAddresses() []types.AccAddress

func (HTLTMsg) GetSignBytes added in v1.1.3

func (msg HTLTMsg) GetSignBytes() []byte

func (HTLTMsg) GetSigners added in v1.1.3

func (msg HTLTMsg) GetSigners() []types.AccAddress

func (HTLTMsg) Route added in v1.1.3

func (msg HTLTMsg) Route() string

func (HTLTMsg) String added in v1.1.3

func (msg HTLTMsg) String() string

func (HTLTMsg) Type added in v1.1.3

func (msg HTLTMsg) Type() string

func (HTLTMsg) ValidateBasic added in v1.1.3

func (msg HTLTMsg) ValidateBasic() error

type IbcParams added in v1.2.4

type IbcParams struct {
	RelayerFee int64 `json:"relayer_fee"`
}

func (*IbcParams) GetParamAttribute added in v1.2.4

func (p *IbcParams) GetParamAttribute() (string, bool)

func (*IbcParams) UpdateCheck added in v1.2.4

func (p *IbcParams) UpdateCheck() error

type IbcValidator added in v1.2.4

type IbcValidator struct {
	ConsAddr []byte
	FeeAddr  []byte
	DistAddr []byte
	Power    uint64
}

type IbcValidatorSetPackage added in v1.2.4

type IbcValidatorSetPackage struct {
	Type         uint8
	ValidatorSet []IbcValidator
}

type Input

type Input struct {
	Address types.AccAddress `json:"address"`
	Coins   types.Coins      `json:"coins"`
}

Transaction Input

func NewInput

func NewInput(addr types.AccAddress, coins types.Coins) Input

NewInput - create a transaction input, used with SendMsg

func (Input) GetSignBytes

func (in Input) GetSignBytes() []byte

Return bytes to sign for Input

func (Input) ValidateBasic

func (in Input) ValidateBasic() error

ValidateBasic - validate transaction input

type ListMiniMsg added in v1.2.3

type ListMiniMsg struct {
	From             types.AccAddress `json:"from"`
	BaseAssetSymbol  string           `json:"base_asset_symbol"`
	QuoteAssetSymbol string           `json:"quote_asset_symbol"`
	InitPrice        int64            `json:"init_price"`
}

ListMiniMsg def

func NewListMiniMsg added in v1.2.3

func NewListMiniMsg(from types.AccAddress, baseAssetSymbol string, quoteAssetSymbol string, initPrice int64) ListMiniMsg

NewListMiniMsg for instance creation

func (ListMiniMsg) GetInvolvedAddresses added in v1.2.3

func (msg ListMiniMsg) GetInvolvedAddresses() []types.AccAddress

GetInvolvedAddresses part of Msg interface

func (ListMiniMsg) GetSignBytes added in v1.2.3

func (msg ListMiniMsg) GetSignBytes() []byte

GetSignBytes part of Msg interface

func (ListMiniMsg) GetSigners added in v1.2.3

func (msg ListMiniMsg) GetSigners() []types.AccAddress

GetSigners part of Msg interface

func (ListMiniMsg) Route added in v1.2.3

func (msg ListMiniMsg) Route() string

Route part of Msg interface

func (ListMiniMsg) String added in v1.2.3

func (msg ListMiniMsg) String() string

String part of Msg interface

func (ListMiniMsg) Type added in v1.2.3

func (msg ListMiniMsg) Type() string

Type part of Msg interface

func (ListMiniMsg) ValidateBasic added in v1.2.3

func (msg ListMiniMsg) ValidateBasic() error

ValidateBasic part of Msg interface

type ListTradingPairParams

type ListTradingPairParams struct {
	BaseAssetSymbol  string    `json:"base_asset_symbol"`  // base asset symbol
	QuoteAssetSymbol string    `json:"quote_asset_symbol"` // quote asset symbol
	InitPrice        int64     `json:"init_price"`         // init price
	Description      string    `json:"description"`        // description
	ExpireTime       time.Time `json:"expire_time"`        // expire time
}

-----------------------------------------------------------

type MiniTokenIssueMsg added in v1.2.3

type MiniTokenIssueMsg struct {
	From        types.AccAddress `json:"from"`
	Name        string           `json:"name"`
	Symbol      string           `json:"symbol"`
	TotalSupply int64            `json:"total_supply"`
	Mintable    bool             `json:"mintable"`
	TokenURI    string           `json:"token_uri"`
}

MiniTokenIssueMsg def

func NewMiniTokenIssueMsg added in v1.2.3

func NewMiniTokenIssueMsg(from types.AccAddress, name, symbol string, supply int64, mintable bool, tokenURI string) MiniTokenIssueMsg

NewMiniTokenIssueMsg for instance creation

func (MiniTokenIssueMsg) GetInvolvedAddresses added in v1.2.3

func (msg MiniTokenIssueMsg) GetInvolvedAddresses() []types.AccAddress

GetInvolvedAddresses part of Msg interface

func (MiniTokenIssueMsg) GetSignBytes added in v1.2.3

func (msg MiniTokenIssueMsg) GetSignBytes() []byte

GetSignBytes part of Msg interface

func (MiniTokenIssueMsg) GetSigners added in v1.2.3

func (msg MiniTokenIssueMsg) GetSigners() []types.AccAddress

GetSigners part of Msg interface

func (MiniTokenIssueMsg) Route added in v1.2.3

func (msg MiniTokenIssueMsg) Route() string

Route part of Msg interface

func (MiniTokenIssueMsg) String added in v1.2.3

func (msg MiniTokenIssueMsg) String() string

String part of Msg interface

func (MiniTokenIssueMsg) Type added in v1.2.3

func (msg MiniTokenIssueMsg) Type() string

Type part of Msg interface

func (MiniTokenIssueMsg) ValidateBasic added in v1.2.3

func (msg MiniTokenIssueMsg) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

type MintMsg

type MintMsg struct {
	From   types.AccAddress `json:"from"`
	Symbol string           `json:"symbol"`
	Amount int64            `json:"amount"`
}

func NewMintMsg

func NewMintMsg(from types.AccAddress, symbol string, amount int64) MintMsg

func (MintMsg) GetInvolvedAddresses

func (msg MintMsg) GetInvolvedAddresses() []types.AccAddress

func (MintMsg) GetSignBytes

func (msg MintMsg) GetSignBytes() []byte

func (MintMsg) GetSigners

func (msg MintMsg) GetSigners() []types.AccAddress

func (MintMsg) Route

func (msg MintMsg) Route() string

Implements MintMsg.

func (MintMsg) String

func (msg MintMsg) String() string

func (MintMsg) Type

func (msg MintMsg) Type() string

func (MintMsg) ValidateBasic

func (msg MintMsg) ValidateBasic() error

type MirrorSynPackage added in v1.2.9

type MirrorSynPackage struct {
	MirrorSender     SmartChainAddress
	ContractAddr     SmartChainAddress
	BEP20Name        [32]byte
	BEP20Symbol      [32]byte
	BEP20TotalSupply *big.Int
	BEP20Decimals    uint8
	MirrorFee        *big.Int
	ExpireTime       uint64
}

type MirrorSyncSynPackage added in v1.2.9

type MirrorSyncSynPackage struct {
	SyncSender       SmartChainAddress
	ContractAddr     SmartChainAddress
	BEP2Symbol       [32]byte
	BEP20TotalSupply *big.Int
	SyncFee          *big.Int
	ExpireTime       uint64
}

type Msg

type Msg interface {
	// Return the message type.
	// Must be alphanumeric or empty.
	Route() string

	// Returns a human-readable string for the message, intended for utilization
	// within tags
	Type() string

	// ValidateBasic does a simple validation check that
	// doesn't require access to any other information.
	ValidateBasic() error

	// Get the canonical byte representation of the Msg.
	GetSignBytes() []byte

	// Signers returns the addrs of signers that must sign.
	// CONTRACT: All signatures must be present to be valid.
	// CONTRACT: Returns addrs in some deterministic order.
	GetSigners() []types.AccAddress

	// Get involved addresses of this msg so that we can publish account balance change
	GetInvolvedAddresses() []types.AccAddress
}

Msg - Transactions messages must fulfill the Msg

type MsgCreateValidatorOpen added in v1.2.8

type MsgCreateValidatorOpen struct {
	Description   Description         `json:"description"`
	Commission    types.CommissionMsg `json:"commission"`
	DelegatorAddr types.AccAddress    `json:"delegator_address"`
	ValidatorAddr types.ValAddress    `json:"validator_address"`
	PubKey        string              `json:"pubkey"`
	Delegation    types.Coin          `json:"delegation"`
}

func (MsgCreateValidatorOpen) GetInvolvedAddresses added in v1.2.8

func (msg MsgCreateValidatorOpen) GetInvolvedAddresses() []types.AccAddress

func (MsgCreateValidatorOpen) GetSignBytes added in v1.2.8

func (msg MsgCreateValidatorOpen) GetSignBytes() []byte

get the bytes for the message signer to sign on

func (MsgCreateValidatorOpen) GetSigners added in v1.2.8

func (msg MsgCreateValidatorOpen) GetSigners() []types.AccAddress

Return address(es) that must sign over msg.GetSignBytes()

func (MsgCreateValidatorOpen) Route added in v1.2.8

func (msg MsgCreateValidatorOpen) Route() string

func (MsgCreateValidatorOpen) Type added in v1.2.8

func (msg MsgCreateValidatorOpen) Type() string

func (MsgCreateValidatorOpen) ValidateBasic added in v1.2.8

func (msg MsgCreateValidatorOpen) ValidateBasic() error

quick validity check

type MsgDelegate added in v1.2.8

type MsgDelegate struct {
	DelegatorAddr types.AccAddress `json:"delegator_addr"`
	ValidatorAddr types.ValAddress `json:"validator_addr"`
	Delegation    types.Coin       `json:"delegation"`
}

MsgDelegate - struct for bonding transactions

func (MsgDelegate) GetInvolvedAddresses added in v1.2.8

func (msg MsgDelegate) GetInvolvedAddresses() []types.AccAddress

func (MsgDelegate) GetSignBytes added in v1.2.8

func (msg MsgDelegate) GetSignBytes() []byte

get the bytes for the message signer to sign on

func (MsgDelegate) GetSigners added in v1.2.8

func (msg MsgDelegate) GetSigners() []types.AccAddress

func (MsgDelegate) Route added in v1.2.8

func (msg MsgDelegate) Route() string

nolint

func (MsgDelegate) Type added in v1.2.8

func (msg MsgDelegate) Type() string

func (MsgDelegate) ValidateBasic added in v1.2.8

func (msg MsgDelegate) ValidateBasic() error

quick validity check

type MsgEditValidator added in v1.2.8

type MsgEditValidator struct {
	Description   Description      `json:"description"`
	ValidatorAddr types.ValAddress `json:"address"`
	// We pass a reference to the new commission rate as it's not mandatory to
	// update. If not updated, the deserialized rate will be zero with no way to
	// distinguish if an update was intended.
	CommissionRate *types.Dec `json:"commission_rate"`
	PubKey         string     `json:"pubkey"`
}

MsgEditValidator - struct for editing a validator

func (MsgEditValidator) GetInvolvedAddresses added in v1.2.8

func (msg MsgEditValidator) GetInvolvedAddresses() []types.AccAddress

func (MsgEditValidator) GetSignBytes added in v1.2.8

func (msg MsgEditValidator) GetSignBytes() []byte

get the bytes for the message signer to sign on

func (MsgEditValidator) GetSigners added in v1.2.8

func (msg MsgEditValidator) GetSigners() []types.AccAddress

func (MsgEditValidator) Route added in v1.2.8

func (msg MsgEditValidator) Route() string

nolint

func (MsgEditValidator) Type added in v1.2.8

func (msg MsgEditValidator) Type() string

func (MsgEditValidator) ValidateBasic added in v1.2.8

func (msg MsgEditValidator) ValidateBasic() error

quick validity check

type MsgRedelegate added in v1.2.8

type MsgRedelegate struct {
	DelegatorAddr    types.AccAddress `json:"delegator_addr"`
	ValidatorSrcAddr types.ValAddress `json:"validator_src_addr"`
	ValidatorDstAddr types.ValAddress `json:"validator_dst_addr"`
	Amount           types.Coin       `json:"amount"`
}

MsgDelegate - struct for bonding transactions

func (MsgRedelegate) GetInvolvedAddresses added in v1.2.8

func (msg MsgRedelegate) GetInvolvedAddresses() []types.AccAddress

func (MsgRedelegate) GetSignBytes added in v1.2.8

func (msg MsgRedelegate) GetSignBytes() []byte

get the bytes for the message signer to sign on

func (MsgRedelegate) GetSigners added in v1.2.8

func (msg MsgRedelegate) GetSigners() []types.AccAddress

func (MsgRedelegate) Route added in v1.2.8

func (msg MsgRedelegate) Route() string

nolint

func (MsgRedelegate) Type added in v1.2.8

func (msg MsgRedelegate) Type() string

func (MsgRedelegate) ValidateBasic added in v1.2.8

func (msg MsgRedelegate) ValidateBasic() error

ValidateBasic is used to quickly disqualify obviously invalid messages quickly

type MsgRemoveValidator added in v1.0.5

type MsgRemoveValidator struct {
	LauncherAddr types.AccAddress  `json:"launcher_addr"`
	ValAddr      types.ValAddress  `json:"val_addr"`
	ValConsAddr  types.ConsAddress `json:"val_cons_addr"`
	ProposalId   int64             `json:"proposal_id"`
}

func NewMsgRemoveValidator added in v1.0.5

func NewMsgRemoveValidator(launcherAddr types.AccAddress, valAddr types.ValAddress,
	valConsAddr types.ConsAddress, proposalId int64) MsgRemoveValidator

func (MsgRemoveValidator) GetInvolvedAddresses added in v1.0.5

func (msg MsgRemoveValidator) GetInvolvedAddresses() []types.AccAddress

func (MsgRemoveValidator) GetSignBytes added in v1.0.5

func (msg MsgRemoveValidator) GetSignBytes() []byte

get the bytes for the message signer to sign on

func (MsgRemoveValidator) GetSigners added in v1.0.5

func (msg MsgRemoveValidator) GetSigners() []types.AccAddress

func (MsgRemoveValidator) Route added in v1.0.5

func (msg MsgRemoveValidator) Route() string

nolint

func (MsgRemoveValidator) Type added in v1.0.5

func (msg MsgRemoveValidator) Type() string

func (MsgRemoveValidator) ValidateBasic added in v1.0.5

func (msg MsgRemoveValidator) ValidateBasic() error

quick validity check

type MsgSideChainUnjail added in v1.2.4

type MsgSideChainUnjail struct {
	ValidatorAddr types.ValAddress `json:"address"`
	SideChainId   string           `json:"side_chain_id"`
}

func NewMsgSideChainUnjail added in v1.2.4

func NewMsgSideChainUnjail(validatorAddr types.ValAddress, sideChainId string) MsgSideChainUnjail

func (MsgSideChainUnjail) GetInvolvedAddresses added in v1.2.4

func (msg MsgSideChainUnjail) GetInvolvedAddresses() []types.AccAddress

func (MsgSideChainUnjail) GetSignBytes added in v1.2.4

func (msg MsgSideChainUnjail) GetSignBytes() []byte

func (MsgSideChainUnjail) GetSigners added in v1.2.4

func (msg MsgSideChainUnjail) GetSigners() []types.AccAddress

func (MsgSideChainUnjail) Route added in v1.2.4

func (msg MsgSideChainUnjail) Route() string

func (MsgSideChainUnjail) Type added in v1.2.4

func (msg MsgSideChainUnjail) Type() string

func (MsgSideChainUnjail) ValidateBasic added in v1.2.4

func (msg MsgSideChainUnjail) ValidateBasic() error

type MsgUndelegate added in v1.2.8

type MsgUndelegate struct {
	DelegatorAddr types.AccAddress `json:"delegator_addr"`
	ValidatorAddr types.ValAddress `json:"validator_addr"`
	Amount        types.Coin       `json:"amount"`
}

func (MsgUndelegate) GetInvolvedAddresses added in v1.2.8

func (msg MsgUndelegate) GetInvolvedAddresses() []types.AccAddress

func (MsgUndelegate) GetSignBytes added in v1.2.8

func (msg MsgUndelegate) GetSignBytes() []byte

get the bytes for the message signer to sign on

func (MsgUndelegate) GetSigners added in v1.2.8

func (msg MsgUndelegate) GetSigners() []types.AccAddress

func (MsgUndelegate) Route added in v1.2.8

func (msg MsgUndelegate) Route() string

nolint

func (MsgUndelegate) Type added in v1.2.8

func (msg MsgUndelegate) Type() string

func (MsgUndelegate) ValidateBasic added in v1.2.8

func (msg MsgUndelegate) ValidateBasic() error

quick validity check

type MsgUnjail added in v1.2.8

type MsgUnjail struct {
	ValidatorAddr sdk.ValAddress `json:"address"` // address of the validator operator
}

MsgUnjail - struct for unjailing jailed validator

func NewMsgUnjail added in v1.2.8

func NewMsgUnjail(validatorAddr sdk.ValAddress) MsgUnjail

func (MsgUnjail) GetInvolvedAddresses added in v1.2.8

func (msg MsgUnjail) GetInvolvedAddresses() []sdk.AccAddress

func (MsgUnjail) GetSignBytes added in v1.2.8

func (msg MsgUnjail) GetSignBytes() []byte

get the bytes for the message signer to sign on

func (MsgUnjail) GetSigners added in v1.2.8

func (msg MsgUnjail) GetSigners() []sdk.AccAddress

func (MsgUnjail) Route added in v1.2.8

func (msg MsgUnjail) Route() string

nolint

func (MsgUnjail) Type added in v1.2.8

func (msg MsgUnjail) Type() string

func (MsgUnjail) ValidateBasic added in v1.2.8

func (msg MsgUnjail) ValidateBasic() error

quick validity check

type OracleParams added in v1.2.4

type OracleParams struct {
	ConsensusNeeded types.Dec `json:"ConsensusNeeded"` //  Minimum deposit for a proposal to enter voting period.
}

func (*OracleParams) GetParamAttribute added in v1.2.4

func (p *OracleParams) GetParamAttribute() (string, bool)

func (*OracleParams) UpdateCheck added in v1.2.4

func (p *OracleParams) UpdateCheck() error

type OracleRelayer added in v1.2.8

type OracleRelayer struct {
	Address types.ValAddress `json:"address"`
	Power   int64            `json:"power"`
}

type Output

type Output struct {
	Address types.AccAddress `json:"address"`
	Coins   types.Coins      `json:"coins"`
}

Transaction Output

func NewOutput

func NewOutput(addr types.AccAddress, coins types.Coins) Output

NewOutput - create a transaction output, used with SendMsg

func (Output) GetSignBytes

func (out Output) GetSignBytes() []byte

Return bytes to sign for Output

func (Output) ValidateBasic

func (out Output) ValidateBasic() error

ValidateBasic - validate transaction output

type Package added in v1.2.4

type Package struct {
	ChannelId sdk.IbcChannelID
	Sequence  uint64
	Payload   []byte
}

type Packages added in v1.2.4

type Packages []Package

type Prophecy added in v1.2.4

type Prophecy struct {
	ID     string `json:"id"`
	Status Status `json:"status"`

	//This is a mapping from a claim to the list of validators that made that claim.
	ClaimValidators map[string][]types.ValAddress `json:"claim_validators"`
	//This is a mapping from a validator bech32 address to their claim
	ValidatorClaims map[string]string `json:"validator_claims"`
}

func (Prophecy) SerializeForDB added in v1.2.4

func (prophecy Prophecy) SerializeForDB() (DBProphecy, error)

SerializeForDB serializes a prophecy into a DBProphecy

type ProposalKind

type ProposalKind byte

Type that represents Proposal Type as a byte

const (
	ProposalTypeNil             ProposalKind = 0x00
	ProposalTypeText            ProposalKind = 0x01
	ProposalTypeParameterChange ProposalKind = 0x02
	ProposalTypeSoftwareUpgrade ProposalKind = 0x03
	ProposalTypeListTradingPair ProposalKind = 0x04
	// ProposalTypeFeeChange belongs to ProposalTypeParameterChange. We use this to make it easily to distinguish。
	ProposalTypeFeeChange ProposalKind = 0x05
)

nolint

func ProposalTypeFromString

func ProposalTypeFromString(str string) (ProposalKind, error)

String to proposalType byte. Returns ff if invalid.

func (ProposalKind) Format

func (pt ProposalKind) Format(s fmt.State, verb rune)

For Printf / Sprintf, returns bech32 when using %s nolint: errcheck

func (ProposalKind) Marshal

func (pt ProposalKind) Marshal() ([]byte, error)

Marshal needed for protobuf compatibility

func (ProposalKind) MarshalJSON

func (pt ProposalKind) MarshalJSON() ([]byte, error)

Marshals to JSON using string

func (ProposalKind) String

func (pt ProposalKind) String() string

Turns VoteOption byte to String

func (*ProposalKind) Unmarshal

func (pt *ProposalKind) Unmarshal(data []byte) error

Unmarshal needed for protobuf compatibility

func (*ProposalKind) UnmarshalJSON

func (pt *ProposalKind) UnmarshalJSON(data []byte) error

Unmarshals from JSON assuming Bech32 encoding

type RefundHTLTMsg added in v1.1.3

type RefundHTLTMsg struct {
	From   types.AccAddress `json:"from"`
	SwapID types.SwapBytes  `json:"swap_id"`
}

func NewRefundHTLTMsg added in v1.1.3

func NewRefundHTLTMsg(from types.AccAddress, swapID []byte) RefundHTLTMsg

func (RefundHTLTMsg) GetInvolvedAddresses added in v1.1.3

func (msg RefundHTLTMsg) GetInvolvedAddresses() []types.AccAddress

func (RefundHTLTMsg) GetSignBytes added in v1.1.3

func (msg RefundHTLTMsg) GetSignBytes() []byte

func (RefundHTLTMsg) GetSigners added in v1.1.3

func (msg RefundHTLTMsg) GetSigners() []types.AccAddress

func (RefundHTLTMsg) Route added in v1.1.3

func (msg RefundHTLTMsg) Route() string

func (RefundHTLTMsg) String added in v1.1.3

func (msg RefundHTLTMsg) String() string

func (RefundHTLTMsg) Type added in v1.1.3

func (msg RefundHTLTMsg) Type() string

func (RefundHTLTMsg) ValidateBasic added in v1.1.3

func (msg RefundHTLTMsg) ValidateBasic() error

type SCChangeParams added in v1.2.4

type SCChangeParams struct {
	SCParams    []SCParam `json:"sc_params"`
	Description string    `json:"description"`
}

func (*SCChangeParams) Check added in v1.2.4

func (s *SCChangeParams) Check() error

type SCParam added in v1.2.4

type SCParam interface {
	UpdateCheck() error
	// native means weather the parameter stored in native store context or side chain store context
	//GetParamAttribute() (string, bool)
	GetParamAttribute() (string, bool)
}

--------- Definition side chain prams change ------------------- //

type SendMsg

type SendMsg struct {
	Inputs  []Input  `json:"inputs"`
	Outputs []Output `json:"outputs"`
}

SendMsg - high level transaction of the coin module

func CreateSendMsg

func CreateSendMsg(from types.AccAddress, fromCoins types.Coins, transfers []Transfer) SendMsg

func NewMsgSend

func NewMsgSend(in []Input, out []Output) SendMsg

NewMsgSend - construct arbitrary multi-in, multi-out send msg.

func (SendMsg) GetInvolvedAddresses

func (msg SendMsg) GetInvolvedAddresses() []types.AccAddress

func (SendMsg) GetSignBytes

func (msg SendMsg) GetSignBytes() []byte

Implements Msg.

func (SendMsg) GetSigners

func (msg SendMsg) GetSigners() []types.AccAddress

Implements Msg.

func (SendMsg) Route

func (msg SendMsg) Route() string

func (SendMsg) Type

func (msg SendMsg) Type() string

func (SendMsg) ValidateBasic

func (msg SendMsg) ValidateBasic() error

Implements Msg.

type SetAccountFlagsMsg added in v1.0.8

type SetAccountFlagsMsg struct {
	From  types.AccAddress `json:"from"`
	Flags uint64           `json:"flags"`
}

func NewSetAccountFlagsMsg added in v1.0.8

func NewSetAccountFlagsMsg(from types.AccAddress, flags uint64) SetAccountFlagsMsg

func (SetAccountFlagsMsg) GetInvolvedAddresses added in v1.0.8

func (msg SetAccountFlagsMsg) GetInvolvedAddresses() []types.AccAddress

func (SetAccountFlagsMsg) GetSignBytes added in v1.0.8

func (msg SetAccountFlagsMsg) GetSignBytes() []byte

func (SetAccountFlagsMsg) GetSigners added in v1.0.8

func (msg SetAccountFlagsMsg) GetSigners() []types.AccAddress

func (SetAccountFlagsMsg) Route added in v1.0.8

func (msg SetAccountFlagsMsg) Route() string

func (SetAccountFlagsMsg) String added in v1.0.8

func (msg SetAccountFlagsMsg) String() string

func (SetAccountFlagsMsg) Type added in v1.0.8

func (msg SetAccountFlagsMsg) Type() string

func (SetAccountFlagsMsg) ValidateBasic added in v1.0.8

func (msg SetAccountFlagsMsg) ValidateBasic() error

type SetURIMsg added in v1.2.3

type SetURIMsg struct {
	From     types.AccAddress `json:"from"`
	Symbol   string           `json:"symbol"`
	TokenURI string           `json:"token_uri"`
}

SetURIMsg def

func NewSetUriMsg added in v1.2.3

func NewSetUriMsg(from types.AccAddress, symbol string, tokenURI string) SetURIMsg

NewSetUriMsg for instance creation

func (SetURIMsg) GetInvolvedAddresses added in v1.2.3

func (msg SetURIMsg) GetInvolvedAddresses() []types.AccAddress

GetInvolvedAddresses part of Msg interface

func (SetURIMsg) GetSignBytes added in v1.2.3

func (msg SetURIMsg) GetSignBytes() []byte

GetSignBytes part of Msg interface

func (SetURIMsg) GetSigners added in v1.2.3

func (msg SetURIMsg) GetSigners() []types.AccAddress

GetSigners part of Msg interface

func (SetURIMsg) Route added in v1.2.3

func (msg SetURIMsg) Route() string

Route part of Msg interface

func (SetURIMsg) String added in v1.2.3

func (msg SetURIMsg) String() string

String part of Msg interface

func (SetURIMsg) Type added in v1.2.3

func (msg SetURIMsg) Type() string

Type part of Msg interface

func (SetURIMsg) ValidateBasic added in v1.2.3

func (msg SetURIMsg) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

type SideChainDelegateMsg added in v1.2.4

type SideChainDelegateMsg struct {
	DelegatorAddr types.AccAddress `json:"delegator_addr"`
	ValidatorAddr types.ValAddress `json:"validator_addr"`
	Delegation    types.Coin       `json:"delegation"`

	SideChainId string `json:"side_chain_id"`
}

func NewSideChainDelegateMsg added in v1.2.4

func NewSideChainDelegateMsg(sideChainId string, delAddr types.AccAddress, valAddr types.ValAddress, delegation types.Coin) SideChainDelegateMsg

func (SideChainDelegateMsg) GetInvolvedAddresses added in v1.2.4

func (msg SideChainDelegateMsg) GetInvolvedAddresses() []types.AccAddress

func (SideChainDelegateMsg) GetSignBytes added in v1.2.4

func (msg SideChainDelegateMsg) GetSignBytes() []byte

func (SideChainDelegateMsg) GetSigners added in v1.2.4

func (msg SideChainDelegateMsg) GetSigners() []types.AccAddress

func (SideChainDelegateMsg) Route added in v1.2.4

func (msg SideChainDelegateMsg) Route() string

func (SideChainDelegateMsg) Type added in v1.2.4

func (msg SideChainDelegateMsg) Type() string

func (SideChainDelegateMsg) ValidateBasic added in v1.2.4

func (msg SideChainDelegateMsg) ValidateBasic() error

type SideChainDepositMsg added in v1.2.4

type SideChainDepositMsg struct {
	ProposalID  int64            `json:"proposal_id"` // ID of the proposal
	Depositer   types.AccAddress `json:"depositer"`   // Address of the depositer
	Amount      types.Coins      `json:"amount"`      // Coins to add to the proposal's deposit
	SideChainId string           `json:"side_chain_id"`
}

----------------------------------------------------------- SideChainDepositMsg

func NewSideChainDepositMsg added in v1.2.4

func NewSideChainDepositMsg(depositer types.AccAddress, proposalID int64, amount types.Coins, sideChainId string) SideChainDepositMsg

func (SideChainDepositMsg) GetInvolvedAddresses added in v1.2.4

func (msg SideChainDepositMsg) GetInvolvedAddresses() []types.AccAddress

Implements Msg. Identical to MsgDeposit, keep here for code readability.

func (SideChainDepositMsg) GetSignBytes added in v1.2.4

func (msg SideChainDepositMsg) GetSignBytes() []byte

Implements Msg.

func (SideChainDepositMsg) GetSigners added in v1.2.4

func (msg SideChainDepositMsg) GetSigners() []types.AccAddress

Implements Msg. Identical to MsgDeposit, keep here for code readability.

func (SideChainDepositMsg) Route added in v1.2.4

func (msg SideChainDepositMsg) Route() string

nolint

func (SideChainDepositMsg) String added in v1.2.4

func (msg SideChainDepositMsg) String() string

func (SideChainDepositMsg) Type added in v1.2.4

func (msg SideChainDepositMsg) Type() string

func (SideChainDepositMsg) ValidateBasic added in v1.2.4

func (msg SideChainDepositMsg) ValidateBasic() error

Implements Msg.

type SideChainRedelegateMsg added in v1.2.4

type SideChainRedelegateMsg struct {
	DelegatorAddr    types.AccAddress `json:"delegator_addr"`
	ValidatorSrcAddr types.ValAddress `json:"validator_src_addr"`
	ValidatorDstAddr types.ValAddress `json:"validator_dst_addr"`
	Amount           types.Coin       `json:"amount"`
	SideChainId      string           `json:"side_chain_id"`
}

func NewSideChainRedelegateMsg added in v1.2.4

func NewSideChainRedelegateMsg(sideChainId string, delegatorAddr types.AccAddress, valSrcAddr types.ValAddress, valDstAddr types.ValAddress, amount types.Coin) SideChainRedelegateMsg

func (SideChainRedelegateMsg) GetInvolvedAddresses added in v1.2.4

func (msg SideChainRedelegateMsg) GetInvolvedAddresses() []types.AccAddress

func (SideChainRedelegateMsg) GetSignBytes added in v1.2.4

func (msg SideChainRedelegateMsg) GetSignBytes() []byte

func (SideChainRedelegateMsg) GetSigners added in v1.2.4

func (msg SideChainRedelegateMsg) GetSigners() []types.AccAddress

func (SideChainRedelegateMsg) Route added in v1.2.4

func (msg SideChainRedelegateMsg) Route() string

func (SideChainRedelegateMsg) Type added in v1.2.4

func (msg SideChainRedelegateMsg) Type() string

func (SideChainRedelegateMsg) ValidateBasic added in v1.2.4

func (msg SideChainRedelegateMsg) ValidateBasic() error

type SideChainSubmitProposalMsg added in v1.2.4

type SideChainSubmitProposalMsg struct {
	Title          string           `json:"title"`           //  Title of the proposal
	Description    string           `json:"description"`     //  Description of the proposal
	ProposalType   ProposalKind     `json:"proposal_type"`   //  Type of proposal. Initial set {PlainTextProposal, SoftwareUpgradeProposal}
	Proposer       types.AccAddress `json:"proposer"`        //  Address of the proposer
	InitialDeposit types.Coins      `json:"initial_deposit"` //  Initial deposit paid by sender. Must be strictly positive.
	VotingPeriod   time.Duration    `json:"voting_period"`   //  Length of the voting period (s)
	SideChainId    string           `json:"side_chain_id"`
}

----------------------------------------------------------- SideChainSubmitProposalMsg

func NewSideChainSubmitProposalMsg added in v1.2.4

func NewSideChainSubmitProposalMsg(title string, description string, proposalType ProposalKind, proposer types.AccAddress, initialDeposit types.Coins, votingPeriod time.Duration, sideChainId string) SideChainSubmitProposalMsg

func (SideChainSubmitProposalMsg) GetInvolvedAddresses added in v1.2.4

func (msg SideChainSubmitProposalMsg) GetInvolvedAddresses() []types.AccAddress

Implements Msg. Identical to MsgSubmitProposal, keep here for code readability.

func (SideChainSubmitProposalMsg) GetSignBytes added in v1.2.4

func (msg SideChainSubmitProposalMsg) GetSignBytes() []byte

Implements Msg.

func (SideChainSubmitProposalMsg) GetSigners added in v1.2.4

func (msg SideChainSubmitProposalMsg) GetSigners() []types.AccAddress

Implements Msg. Identical to MsgSubmitProposal, keep here for code readability.

func (SideChainSubmitProposalMsg) Route added in v1.2.4

func (msg SideChainSubmitProposalMsg) Route() string

nolint

func (SideChainSubmitProposalMsg) String added in v1.2.4

func (msg SideChainSubmitProposalMsg) String() string

func (SideChainSubmitProposalMsg) Type added in v1.2.4

func (SideChainSubmitProposalMsg) ValidateBasic added in v1.2.4

func (msg SideChainSubmitProposalMsg) ValidateBasic() error

Implements Msg.

type SideChainUndelegateMsg added in v1.2.4

type SideChainUndelegateMsg struct {
	DelegatorAddr types.AccAddress `json:"delegator_addr"`
	ValidatorAddr types.ValAddress `json:"validator_addr"`
	Amount        types.Coin       `json:"amount"`
	SideChainId   string           `json:"side_chain_id"`
}

func NewSideChainUndelegateMsg added in v1.2.4

func NewSideChainUndelegateMsg(sideChainId string, delegatorAddr types.AccAddress, valAddr types.ValAddress, amount types.Coin) SideChainUndelegateMsg

func (SideChainUndelegateMsg) GetInvolvedAddresses added in v1.2.4

func (msg SideChainUndelegateMsg) GetInvolvedAddresses() []types.AccAddress

func (SideChainUndelegateMsg) GetSignBytes added in v1.2.4

func (msg SideChainUndelegateMsg) GetSignBytes() []byte

func (SideChainUndelegateMsg) GetSigners added in v1.2.4

func (msg SideChainUndelegateMsg) GetSigners() []types.AccAddress

func (SideChainUndelegateMsg) Route added in v1.2.4

func (msg SideChainUndelegateMsg) Route() string

func (SideChainUndelegateMsg) Type added in v1.2.4

func (msg SideChainUndelegateMsg) Type() string

func (SideChainUndelegateMsg) ValidateBasic added in v1.2.4

func (msg SideChainUndelegateMsg) ValidateBasic() error

type SideChainVoteMsg added in v1.2.4

type SideChainVoteMsg struct {
	ProposalID  int64            `json:"proposal_id"` // ID of the proposal
	Voter       types.AccAddress `json:"voter"`       //  address of the voter
	Option      VoteOption       `json:"option"`      //  option from OptionSet chosen by the voter
	SideChainId string           `json:"side_chain_id"`
}

func NewSideChainVoteMsg added in v1.2.4

func NewSideChainVoteMsg(voter types.AccAddress, proposalID int64, option VoteOption, sideChainId string) SideChainVoteMsg

func (SideChainVoteMsg) GetInvolvedAddresses added in v1.2.4

func (msg SideChainVoteMsg) GetInvolvedAddresses() []types.AccAddress

Implements Msg. Identical to MsgVote, keep here for code readability.

func (SideChainVoteMsg) GetSignBytes added in v1.2.4

func (msg SideChainVoteMsg) GetSignBytes() []byte

Implements Msg.

func (SideChainVoteMsg) GetSigners added in v1.2.4

func (msg SideChainVoteMsg) GetSigners() []types.AccAddress

Implements Msg. Identical to MsgVote, keep here for code readability.

func (SideChainVoteMsg) Route added in v1.2.4

func (msg SideChainVoteMsg) Route() string

func (SideChainVoteMsg) String added in v1.2.4

func (msg SideChainVoteMsg) String() string

func (SideChainVoteMsg) Type added in v1.2.4

func (msg SideChainVoteMsg) Type() string

func (SideChainVoteMsg) ValidateBasic added in v1.2.4

func (msg SideChainVoteMsg) ValidateBasic() error

Implements Msg.

type SideDowntimeSlashPackage added in v1.2.4

type SideDowntimeSlashPackage struct {
	SideConsAddr  []byte `json:"side_cons_addr"`
	SideHeight    uint64 `json:"side_height"`
	SideChainId   uint16 `json:"side_chain_id"`
	SideTimestamp uint64 `json:"side_timestamp"`
}

type SlashParams added in v1.2.4

type SlashParams struct {
	MaxEvidenceAge           time.Duration `json:"max_evidence_age"`
	SignedBlocksWindow       int64         `json:"signed_blocks_window"`
	MinSignedPerWindow       types.Dec     `json:"min_signed_per_window"`
	DoubleSignUnbondDuration time.Duration `json:"double_sign_unbond_duration"`
	DowntimeUnbondDuration   time.Duration `json:"downtime_unbond_duration"`
	TooLowDelUnbondDuration  time.Duration `json:"too_low_del_unbond_duration"`
	SlashFractionDoubleSign  types.Dec     `json:"slash_fraction_double_sign"`
	SlashFractionDowntime    types.Dec     `json:"slash_fraction_downtime"`
	DoubleSignSlashAmount    int64         `json:"double_sign_slash_amount"`
	DowntimeSlashAmount      int64         `json:"downtime_slash_amount"`
	SubmitterReward          int64         `json:"submitter_reward"`
	DowntimeSlashFee         int64         `json:"downtime_slash_fee"`
}

func (*SlashParams) GetParamAttribute added in v1.2.4

func (p *SlashParams) GetParamAttribute() (string, bool)

func (*SlashParams) UpdateCheck added in v1.2.4

func (p *SlashParams) UpdateCheck() error

type SmartChainAddress added in v1.2.4

type SmartChainAddress [20]byte

SmartChainAddress defines a standard smart chain address

func NewSmartChainAddress added in v1.2.4

func NewSmartChainAddress(addr string) SmartChainAddress

NewSmartChainAddress is a constructor function for SmartChainAddress

func (SmartChainAddress) IsEmpty added in v1.2.4

func (addr SmartChainAddress) IsEmpty() bool

func (SmartChainAddress) MarshalJSON added in v1.2.4

func (addr SmartChainAddress) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ethereum address to JSON

func (*SmartChainAddress) SetBytes added in v1.2.4

func (addr *SmartChainAddress) SetBytes(b []byte)

func (SmartChainAddress) String added in v1.2.4

func (addr SmartChainAddress) String() string

Route should return the name of the module

func (*SmartChainAddress) UnmarshalJSON added in v1.2.4

func (addr *SmartChainAddress) UnmarshalJSON(input []byte) error

UnmarshalJSON unmarshals an smart chain address

type StakeParams added in v1.2.4

type StakeParams struct {
	UnbondingTime time.Duration `json:"unbonding_time"`

	MaxValidators       uint16 `json:"max_validators"`        // maximum number of validators
	BondDenom           string `json:"bond_denom"`            // bondable coin denomination
	MinSelfDelegation   int64  `json:"min_self_delegation"`   // the minimal self-delegation amount
	MinDelegationChange int64  `json:"min_delegation_change"` // the minimal delegation amount changed
}

Params defines the high level settings for staking

func (*StakeParams) GetParamAttribute added in v1.2.4

func (p *StakeParams) GetParamAttribute() (string, bool)

func (*StakeParams) UpdateCheck added in v1.2.4

func (p *StakeParams) UpdateCheck() error

type Status added in v1.2.4

type Status struct {
	Text       StatusText `json:"text"`
	FinalClaim string     `json:"final_claim"`
}

type StatusText added in v1.2.4

type StatusText int
const (
	PendingStatusText StatusText = iota
	SuccessStatusText
	FailedStatusText
)

func (StatusText) MarshalJSON added in v1.2.4

func (text StatusText) MarshalJSON() ([]byte, error)

func (StatusText) String added in v1.2.4

func (text StatusText) String() string

func (*StatusText) UnmarshalJSON added in v1.2.4

func (text *StatusText) UnmarshalJSON(b []byte) error

type SubmitProposalMsg

type SubmitProposalMsg struct {
	Title          string           `json:"title"`           //  Title of the proposal
	Description    string           `json:"description"`     //  Description of the proposal
	ProposalType   ProposalKind     `json:"proposal_type"`   //  Type of proposal. Initial set {PlainTextProposal, SoftwareUpgradeProposal}
	Proposer       types.AccAddress `json:"proposer"`        //  Address of the proposer
	InitialDeposit types.Coins      `json:"initial_deposit"` //  Initial deposit paid by sender. Must be strictly positive.
	VotingPeriod   time.Duration    `json:"voting_period"`   //  Length of the voting period (s)
}

----------------------------------------------------------- SubmitProposalMsg

func NewMsgSubmitProposal

func NewMsgSubmitProposal(title string, description string, proposalType ProposalKind, proposer types.AccAddress, initialDeposit types.Coins, votingPeriod time.Duration) SubmitProposalMsg

func (SubmitProposalMsg) Get

func (msg SubmitProposalMsg) Get(key interface{}) (value interface{})

Implements Msg.

func (SubmitProposalMsg) GetInvolvedAddresses

func (msg SubmitProposalMsg) GetInvolvedAddresses() []types.AccAddress

func (SubmitProposalMsg) GetSignBytes

func (msg SubmitProposalMsg) GetSignBytes() []byte

Implements Msg.

func (SubmitProposalMsg) GetSigners

func (msg SubmitProposalMsg) GetSigners() []types.AccAddress

Implements Msg.

func (SubmitProposalMsg) Route

func (msg SubmitProposalMsg) Route() string

nolint

func (SubmitProposalMsg) String

func (msg SubmitProposalMsg) String() string

func (SubmitProposalMsg) Type

func (msg SubmitProposalMsg) Type() string

func (SubmitProposalMsg) ValidateBasic

func (msg SubmitProposalMsg) ValidateBasic() error

Implements Msg.

type TimeLockMsg added in v1.0.5

type TimeLockMsg struct {
	From        types.AccAddress `json:"from"`
	Description string           `json:"description"`
	Amount      types.Coins      `json:"amount"`
	LockTime    int64            `json:"lock_time"`
}

func NewTimeLockMsg added in v1.0.5

func NewTimeLockMsg(from types.AccAddress, description string, amount types.Coins, lockTime int64) TimeLockMsg

func (TimeLockMsg) GetInvolvedAddresses added in v1.0.5

func (msg TimeLockMsg) GetInvolvedAddresses() []types.AccAddress

func (TimeLockMsg) GetSignBytes added in v1.0.5

func (msg TimeLockMsg) GetSignBytes() []byte

func (TimeLockMsg) GetSigners added in v1.0.5

func (msg TimeLockMsg) GetSigners() []types.AccAddress

func (TimeLockMsg) Route added in v1.0.5

func (msg TimeLockMsg) Route() string

func (TimeLockMsg) String added in v1.0.5

func (msg TimeLockMsg) String() string

func (TimeLockMsg) Type added in v1.0.5

func (msg TimeLockMsg) Type() string

func (TimeLockMsg) ValidateBasic added in v1.0.5

func (msg TimeLockMsg) ValidateBasic() error

type TimeRelockMsg added in v1.0.5

type TimeRelockMsg struct {
	From        types.AccAddress `json:"from"`
	Id          int64            `json:"time_lock_id"`
	Description string           `json:"description"`
	Amount      types.Coins      `json:"amount"`
	LockTime    int64            `json:"lock_time"`
}

func NewTimeRelockMsg added in v1.0.5

func NewTimeRelockMsg(from types.AccAddress, id int64, description string, amount types.Coins, lockTime int64) TimeRelockMsg

func (TimeRelockMsg) GetInvolvedAddresses added in v1.0.5

func (msg TimeRelockMsg) GetInvolvedAddresses() []types.AccAddress

func (TimeRelockMsg) GetSignBytes added in v1.0.5

func (msg TimeRelockMsg) GetSignBytes() []byte

func (TimeRelockMsg) GetSigners added in v1.0.5

func (msg TimeRelockMsg) GetSigners() []types.AccAddress

func (TimeRelockMsg) Route added in v1.0.5

func (msg TimeRelockMsg) Route() string

func (TimeRelockMsg) String added in v1.0.5

func (msg TimeRelockMsg) String() string

func (TimeRelockMsg) Type added in v1.0.5

func (msg TimeRelockMsg) Type() string

func (TimeRelockMsg) ValidateBasic added in v1.0.5

func (msg TimeRelockMsg) ValidateBasic() error

type TimeUnlockMsg added in v1.0.5

type TimeUnlockMsg struct {
	From types.AccAddress `json:"from"`
	Id   int64            `json:"time_lock_id"`
}

func NewTimeUnlockMsg added in v1.0.5

func NewTimeUnlockMsg(from types.AccAddress, id int64) TimeUnlockMsg

func (TimeUnlockMsg) GetInvolvedAddresses added in v1.0.5

func (msg TimeUnlockMsg) GetInvolvedAddresses() []types.AccAddress

func (TimeUnlockMsg) GetSignBytes added in v1.0.5

func (msg TimeUnlockMsg) GetSignBytes() []byte

func (TimeUnlockMsg) GetSigners added in v1.0.5

func (msg TimeUnlockMsg) GetSigners() []types.AccAddress

func (TimeUnlockMsg) Route added in v1.0.5

func (msg TimeUnlockMsg) Route() string

func (TimeUnlockMsg) String added in v1.0.5

func (msg TimeUnlockMsg) String() string

func (TimeUnlockMsg) Type added in v1.0.5

func (msg TimeUnlockMsg) Type() string

func (TimeUnlockMsg) ValidateBasic added in v1.0.5

func (msg TimeUnlockMsg) ValidateBasic() error

type TinyTokenIssueMsg added in v1.2.3

type TinyTokenIssueMsg struct {
	From        types.AccAddress `json:"from"`
	Name        string           `json:"name"`
	Symbol      string           `json:"symbol"`
	TotalSupply int64            `json:"total_supply"`
	Mintable    bool             `json:"mintable"`
	TokenURI    string           `json:"token_uri"`
}

TinyTokenIssueMsg def

func NewTinyTokenIssueMsg added in v1.2.3

func NewTinyTokenIssueMsg(from types.AccAddress, name, symbol string, supply int64, mintable bool, tokenURI string) TinyTokenIssueMsg

NewTinyTokenIssueMsg for instance creation

func (TinyTokenIssueMsg) GetInvolvedAddresses added in v1.2.3

func (msg TinyTokenIssueMsg) GetInvolvedAddresses() []types.AccAddress

GetInvolvedAddresses part of Msg interface

func (TinyTokenIssueMsg) GetSignBytes added in v1.2.3

func (msg TinyTokenIssueMsg) GetSignBytes() []byte

GetSignBytes part of Msg interface

func (TinyTokenIssueMsg) GetSigners added in v1.2.3

func (msg TinyTokenIssueMsg) GetSigners() []types.AccAddress

GetSigners part of Msg interface

func (TinyTokenIssueMsg) Route added in v1.2.3

func (msg TinyTokenIssueMsg) Route() string

Route part of Msg interface

func (TinyTokenIssueMsg) String added in v1.2.3

func (msg TinyTokenIssueMsg) String() string

String part of Msg interface

func (TinyTokenIssueMsg) Type added in v1.2.3

func (msg TinyTokenIssueMsg) Type() string

Type part of Msg interface

func (TinyTokenIssueMsg) ValidateBasic added in v1.2.3

func (msg TinyTokenIssueMsg) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

type TokenBurnMsg

type TokenBurnMsg struct {
	From   types.AccAddress `json:"from"`
	Symbol string           `json:"symbol"`
	Amount int64            `json:"amount"`
}

TokenBurnMsg def

func NewTokenBurnMsg

func NewTokenBurnMsg(from types.AccAddress, symbol string, amount int64) TokenBurnMsg

NewMsg for instance creation

func (TokenBurnMsg) GetInvolvedAddresses

func (msg TokenBurnMsg) GetInvolvedAddresses() []types.AccAddress

GetInvolvedAddresses is part of Msg interface

func (TokenBurnMsg) GetSignBytes

func (msg TokenBurnMsg) GetSignBytes() []byte

func (TokenBurnMsg) GetSigners

func (msg TokenBurnMsg) GetSigners() []types.AccAddress

GetSigners is part of Msg interface

func (TokenBurnMsg) Route

func (msg TokenBurnMsg) Route() string

Route is part of Msg interface

func (TokenBurnMsg) String

func (msg TokenBurnMsg) String() string

String is part of Msg interface

func (TokenBurnMsg) Type

func (msg TokenBurnMsg) Type() string

Type is part of Msg interface

func (TokenBurnMsg) ValidateBasic

func (msg TokenBurnMsg) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

type TokenFreezeMsg

type TokenFreezeMsg struct {
	From   types.AccAddress `json:"from"`
	Symbol string           `json:"symbol"`
	Amount int64            `json:"amount"`
}

TokenFreezeMsg def

func NewFreezeMsg

func NewFreezeMsg(from types.AccAddress, symbol string, amount int64) TokenFreezeMsg

NewFreezeMsg for instance creation

func (TokenFreezeMsg) GetInvolvedAddresses

func (msg TokenFreezeMsg) GetInvolvedAddresses() []types.AccAddress

GetInvolvedAddresses is part of Msg interface

func (TokenFreezeMsg) GetSignBytes

func (msg TokenFreezeMsg) GetSignBytes() []byte

func (TokenFreezeMsg) GetSigners

func (msg TokenFreezeMsg) GetSigners() []types.AccAddress

func (TokenFreezeMsg) Route

func (msg TokenFreezeMsg) Route() string

Route is part of Msg interface

func (TokenFreezeMsg) String

func (msg TokenFreezeMsg) String() string

String is part of Msg interface

func (TokenFreezeMsg) Type

func (msg TokenFreezeMsg) Type() string

Type is part of Msg interface

func (TokenFreezeMsg) ValidateBasic

func (msg TokenFreezeMsg) ValidateBasic() error

type TokenIssueMsg

type TokenIssueMsg struct {
	From        types.AccAddress `json:"from"`
	Name        string           `json:"name"`
	Symbol      string           `json:"symbol"`
	TotalSupply int64            `json:"total_supply"`
	Mintable    bool             `json:"mintable"`
}

TokenIssueMsg def

func NewTokenIssueMsg

func NewTokenIssueMsg(from types.AccAddress, name, symbol string, supply int64, mintable bool) TokenIssueMsg

NewTokenIssueMsg for instance creation

func (TokenIssueMsg) GetInvolvedAddresses

func (msg TokenIssueMsg) GetInvolvedAddresses() []types.AccAddress

GetInvolvedAddresses part of Msg interface

func (TokenIssueMsg) GetSignBytes

func (msg TokenIssueMsg) GetSignBytes() []byte

GetSignBytes part of Msg interface

func (TokenIssueMsg) GetSigners

func (msg TokenIssueMsg) GetSigners() []types.AccAddress

GetSigners part of Msg interface

func (TokenIssueMsg) Route

func (msg TokenIssueMsg) Route() string

Route part of Msg interface

func (TokenIssueMsg) String

func (msg TokenIssueMsg) String() string

String part of Msg interface

func (TokenIssueMsg) Type

func (msg TokenIssueMsg) Type() string

Type part of Msg interface

func (TokenIssueMsg) ValidateBasic

func (msg TokenIssueMsg) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

type TokenUnfreezeMsg

type TokenUnfreezeMsg struct {
	From   types.AccAddress `json:"from"`
	Symbol string           `json:"symbol"`
	Amount int64            `json:"amount"`
}

TokenUnfreezeMsg def

func NewUnfreezeMsg

func NewUnfreezeMsg(from types.AccAddress, symbol string, amount int64) TokenUnfreezeMsg

NewUnfreezeMsg for instance creation

func (TokenUnfreezeMsg) GetInvolvedAddresses

func (msg TokenUnfreezeMsg) GetInvolvedAddresses() []types.AccAddress

GetInvolvedAddresses is part of Msg interface

func (TokenUnfreezeMsg) GetSignBytes

func (msg TokenUnfreezeMsg) GetSignBytes() []byte

func (TokenUnfreezeMsg) GetSigners

func (msg TokenUnfreezeMsg) GetSigners() []types.AccAddress

func (TokenUnfreezeMsg) Route

func (msg TokenUnfreezeMsg) Route() string

Route is part of Msg interface

func (TokenUnfreezeMsg) String

func (msg TokenUnfreezeMsg) String() string

String is part of Msg interface

func (TokenUnfreezeMsg) Type

func (msg TokenUnfreezeMsg) Type() string

Type is part of Msg interface

func (TokenUnfreezeMsg) ValidateBasic

func (msg TokenUnfreezeMsg) ValidateBasic() error

type Transfer added in v1.0.1

type Transfer struct {
	ToAddr types.AccAddress
	Coins  types.Coins
}

type TransferInSynPackage added in v1.2.4

type TransferInSynPackage struct {
	Bep2TokenSymbol   [32]byte
	ContractAddress   SmartChainAddress
	Amounts           []*big.Int
	ReceiverAddresses []sdk.AccAddress
	RefundAddresses   []SmartChainAddress
	ExpireTime        uint64
}

type TransferOutMsg added in v1.2.4

type TransferOutMsg struct {
	From       sdk.AccAddress    `json:"from"`
	To         SmartChainAddress `json:"to"`
	Amount     sdk.Coin          `json:"amount"`
	ExpireTime int64             `json:"expire_time"`
}

func NewTransferOutMsg added in v1.2.4

func NewTransferOutMsg(from sdk.AccAddress, to SmartChainAddress, amount sdk.Coin, expireTime int64) TransferOutMsg

func (TransferOutMsg) GetInvolvedAddresses added in v1.2.4

func (msg TransferOutMsg) GetInvolvedAddresses() []sdk.AccAddress

func (TransferOutMsg) GetSignBytes added in v1.2.4

func (msg TransferOutMsg) GetSignBytes() []byte

func (TransferOutMsg) GetSigners added in v1.2.4

func (msg TransferOutMsg) GetSigners() []sdk.AccAddress

func (TransferOutMsg) Route added in v1.2.4

func (msg TransferOutMsg) Route() string

func (TransferOutMsg) String added in v1.2.4

func (msg TransferOutMsg) String() string

func (TransferOutMsg) Type added in v1.2.4

func (msg TransferOutMsg) Type() string

func (TransferOutMsg) ValidateBasic added in v1.2.4

func (msg TransferOutMsg) ValidateBasic() error

type TransferOutRefundPackage added in v1.2.4

type TransferOutRefundPackage struct {
	Bep2TokenSymbol [32]byte
	RefundAmount    *big.Int
	RefundAddr      sdk.AccAddress
	RefundReason    uint32
}

type TransferOutSynPackage added in v1.2.4

type TransferOutSynPackage struct {
	Bep2TokenSymbol [32]byte
	ContractAddress SmartChainAddress
	Amount          *big.Int
	Recipient       SmartChainAddress
	RefundAddress   sdk.AccAddress
	ExpireTime      uint64
}

type TransferOwnershipMsg added in v1.2.6

type TransferOwnershipMsg struct {
	From     types.AccAddress `json:"from"`
	Symbol   string           `json:"symbol"`
	NewOwner types.AccAddress `json:"new_owner"`
}

TransferOwnershipMsg def

func NewTransferOwnershipMsg added in v1.2.6

func NewTransferOwnershipMsg(from types.AccAddress, symbol string, newOwner types.AccAddress) TransferOwnershipMsg

func (TransferOwnershipMsg) GetInvolvedAddresses added in v1.2.6

func (msg TransferOwnershipMsg) GetInvolvedAddresses() []types.AccAddress

func (TransferOwnershipMsg) GetSignBytes added in v1.2.6

func (msg TransferOwnershipMsg) GetSignBytes() []byte

func (TransferOwnershipMsg) GetSigners added in v1.2.6

func (msg TransferOwnershipMsg) GetSigners() []types.AccAddress

func (TransferOwnershipMsg) Route added in v1.2.6

func (msg TransferOwnershipMsg) Route() string

func (TransferOwnershipMsg) String added in v1.2.6

func (msg TransferOwnershipMsg) String() string

func (TransferOwnershipMsg) Type added in v1.2.6

func (msg TransferOwnershipMsg) Type() string

func (TransferOwnershipMsg) ValidateBasic added in v1.2.6

func (msg TransferOwnershipMsg) ValidateBasic() error

type UnbindMsg added in v1.2.4

type UnbindMsg struct {
	From   sdk.AccAddress `json:"from"`
	Symbol string         `json:"symbol"`
}

func NewUnbindMsg added in v1.2.4

func NewUnbindMsg(from sdk.AccAddress, symbol string) UnbindMsg

func (UnbindMsg) GetInvolvedAddresses added in v1.2.4

func (msg UnbindMsg) GetInvolvedAddresses() []sdk.AccAddress

func (UnbindMsg) GetSignBytes added in v1.2.4

func (msg UnbindMsg) GetSignBytes() []byte

func (UnbindMsg) GetSigners added in v1.2.4

func (msg UnbindMsg) GetSigners() []sdk.AccAddress

func (UnbindMsg) Route added in v1.2.4

func (msg UnbindMsg) Route() string

func (UnbindMsg) String added in v1.2.4

func (msg UnbindMsg) String() string

func (UnbindMsg) Type added in v1.2.4

func (msg UnbindMsg) Type() string

func (UnbindMsg) ValidateBasic added in v1.2.4

func (msg UnbindMsg) ValidateBasic() error

type VoteMsg

type VoteMsg struct {
	ProposalID int64            `json:"proposal_id"` // ID of the proposal
	Voter      types.AccAddress `json:"voter"`       //  address of the voter
	Option     VoteOption       `json:"option"`      //  option from OptionSet chosen by the voter
}

----------------------------------------------------------- VoteMsg

func NewMsgVote

func NewMsgVote(voter types.AccAddress, proposalID int64, option VoteOption) VoteMsg

func (VoteMsg) Get

func (msg VoteMsg) Get(key interface{}) (value interface{})

Implements Msg.

func (VoteMsg) GetInvolvedAddresses

func (msg VoteMsg) GetInvolvedAddresses() []types.AccAddress

func (VoteMsg) GetSignBytes

func (msg VoteMsg) GetSignBytes() []byte

Implements Msg.

func (VoteMsg) GetSigners

func (msg VoteMsg) GetSigners() []types.AccAddress

Implements Msg.

func (VoteMsg) Route

func (msg VoteMsg) Route() string

Implements Msg. nolint

func (VoteMsg) String

func (msg VoteMsg) String() string

func (VoteMsg) Type

func (msg VoteMsg) Type() string

func (VoteMsg) ValidateBasic

func (msg VoteMsg) ValidateBasic() error

Implements Msg.

type VoteOption

type VoteOption byte
const (
	OptionEmpty      VoteOption = 0x00
	OptionYes        VoteOption = 0x01
	OptionAbstain    VoteOption = 0x02
	OptionNo         VoteOption = 0x03
	OptionNoWithVeto VoteOption = 0x04
)

nolint

func VoteOptionFromString

func VoteOptionFromString(str string) (VoteOption, error)

String to proposalType byte. Returns ff if invalid.

func (VoteOption) Format

func (vo VoteOption) Format(s fmt.State, verb rune)

For Printf / Sprintf, returns bech32 when using %s nolint: errcheck

func (VoteOption) Marshal

func (vo VoteOption) Marshal() ([]byte, error)

Marshal needed for protobuf compatibility

func (VoteOption) MarshalJSON

func (vo VoteOption) MarshalJSON() ([]byte, error)

Marshals to JSON using string

func (VoteOption) String

func (vo VoteOption) String() string

Turns VoteOption byte to String

func (*VoteOption) Unmarshal

func (vo *VoteOption) Unmarshal(data []byte) error

Unmarshal needed for protobuf compatibility

func (*VoteOption) UnmarshalJSON

func (vo *VoteOption) UnmarshalJSON(data []byte) error

Unmarshals from JSON assuming Bech32 encoding

Jump to

Keyboard shortcuts

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