types

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Overview

nolint

Index

Constants

View Source
const (
	LockCoinsTypeQuantity = 1
	LockCoinsTypeFee      = 2
)
View Source
const (
	CodeInvalidAsset                               uint32 = 61000
	CodeBlockedRecipient                           uint32 = 61001
	CodeSendDisabled                               uint32 = 61002
	CodeSendCoinsFromAccountToModuleFailed         uint32 = 61003
	CodeUnrecognizedLockCoinsType                  uint32 = 61004
	CodeFailedToUnlockAddress                      uint32 = 61005
	CodeInvalidCoins                               uint32 = 61006
	CodeInvalidPriceDigit                          uint32 = 61007
	CodeInvalidMinTradeSize                        uint32 = 61008
	CodeAddressIsRequired                          uint32 = 61009
	CodeGetConfirmOwnership                        uint32 = 61010
	CodeUpdateLockedCoins                          uint32 = 61011
	CodeUnknownTokenQueryType                      uint32 = 61012
	CodeUserInputSymbolIsEmpty                     uint32 = 61013
	CodeNotAllowedOriginalSymbol                   uint32 = 61014
	CodeWholeNameIsNotValid                        uint32 = 61015
	CodeDescLenBiggerThanLimit                     uint32 = 61016
	CodeTotalSupplyOutOfRange                      uint32 = 61017
	CodeAmountBiggerThanTotalSupplyUpperbound      uint32 = 61018
	CodeAmountIsNotValid                           uint32 = 61019
	CodeMsgSymbolIsEmpty                           uint32 = 61020
	CodeMintCoinsFailed                            uint32 = 61021
	CodeSendCoinsFromModuleToAccountFailed         uint32 = 61022
	CodeBurnCoinsFailed                            uint32 = 61023
	CodeConfirmOwnershipNotExistOrBlockTimeAfter   uint32 = 61024
	CodeWholeNameAndDescriptionIsNotModified       uint32 = 61025
	CodeTokenIsNotMintable                         uint32 = 61026
	CodeMsgTransfersAmountBiggerThanSendLimit      uint32 = 61027
	CodeInputOwnerIsNotEqualTokenOwner             uint32 = 61028
	CodeinputFromAddressIsNotEqualTokenInfoOwner   uint32 = 61029
	CodeConfirmOwnershipAddressNotEqualsMsgAddress uint32 = 61030
	CodeGetDecimalFromDecimalStringFailed          uint32 = 61031
	CodeTotalsupplyExceedsTheUpperLimit            uint32 = 61032
	CodeBlockedContractRecipient                   uint32 = 61033
	CodeSendCoinsFromAccountToAccountFailed        uint32 = 61034
)
View Source
const (
	// ModuleName is the name of the staking module
	ModuleName = "token"

	DefaultParamspace = ModuleName
	DefaultCodespace  = ModuleName

	// StoreKey is the string store representation
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the staking module
	QuerierRoute = ModuleName

	// RouterKey is the msg router key for the staking module
	RouterKey = ModuleName

	KeyLock = "lock"
	KeyMint = "mint"

	// query endpoints supported by the governance Querier
	QueryInfo       = "info"
	QueryTokens     = "tokens"
	QueryParameters = "params"
	QueryCurrency   = "currency"
	QueryAccount    = "accounts"
	QueryKeysNum    = "store"

	QueryAccountV2 = "accountsV2"
	QueryTokensV2  = "tokensV2"
	QueryTokenV2   = "tokenV2"

	UploadAccount = "upload"
)
View Source
const (
	DescLenLimit   = 256
	MultiSendLimit = 1000

	// 90 billion
	TotalSupplyUpperbound = int64(9 * 1e10)
)
View Source
const (
	DefaultFeeIssue  = "2500"
	DefaultFeeMint   = "10"
	DefaultFeeBurn   = "10"
	DefaultFeeModify = "0"
	DefaultFeeChown  = "10"
)
View Source
const DefaultOwnershipConfirmWindow = 24 * time.Hour

DefaultOwnershipConfirmWindow defines default confirm window

Variables

View Source
var (
	TokenKey                  = []byte{0x00} // the address prefix of the token's symbol
	TokenNumberKey            = []byte{0x01} // key for token number address
	LockKey                   = []byte{0x02} // the address prefix of the locked coins
	PrefixUserTokenKey        = []byte{0x03} // the address prefix of the user-token relationship
	LockedFeeKey              = []byte{0x04} // the address prefix of the locked order fee coins
	PrefixConfirmOwnershipKey = []byte{0x05} // the prefix of the confirm ownership key
)
View Source
var (
	KeyFeeIssue               = []byte("FeeIssue")
	KeyFeeMint                = []byte("FeeMint")
	KeyFeeBurn                = []byte("FeeBurn")
	KeyFeeModify              = []byte("FeeModify")
	KeyFeeChown               = []byte("FeeChown")
	KeyOwnershipConfirmWindow = []byte("OwnershipConfirmWindow")
)
View Source
var ModuleCdc *codec.Codec

generic sealed codec to be used throughout this module

Functions

func DecAccountArrToBaseAccountArr

func DecAccountArrToBaseAccountArr(decAccounts []DecAccount) (baseAccountArr []auth.Account)

func ErrAddressIsRequired

func ErrAddressIsRequired() sdk.EnvelopedErr

func ErrAmountBiggerThanTotalSupplyUpperbound

func ErrAmountBiggerThanTotalSupplyUpperbound() sdk.EnvelopedErr

func ErrAmountIsNotValid

func ErrAmountIsNotValid(amount string) sdk.EnvelopedErr

func ErrBlockedContractRecipient

func ErrBlockedContractRecipient(contractAddr string) sdk.EnvelopedErr

ErrBlockedContractRecipient returns an error when a transfer is tried on a blocked contract recipient

func ErrBlockedRecipient

func ErrBlockedRecipient(blockedAddr string) sdk.EnvelopedErr

ErrBlockedRecipient returns an error when a transfer is tried on a blocked recipient

func ErrBurnCoinsFailed

func ErrBurnCoinsFailed(msg string) sdk.EnvelopedErr

func ErrCodeConfirmOwnershipAddressNotEqualsMsgAddress

func ErrCodeConfirmOwnershipAddressNotEqualsMsgAddress(address sdk.AccAddress) sdk.EnvelopedErr

func ErrCodeTotalsupplyExceedsTheUpperLimit

func ErrCodeTotalsupplyExceedsTheUpperLimit(totalSupplyAfterMint sdk.Dec, TotalSupplyUpperbound int64) sdk.EnvelopedErr

func ErrCodeinputFromAddressIsNotEqualTokenInfoOwner

func ErrCodeinputFromAddressIsNotEqualTokenInfoOwner(address sdk.AccAddress) sdk.EnvelopedErr

func ErrConfirmOwnershipNotExistOrBlockTimeAfter

func ErrConfirmOwnershipNotExistOrBlockTimeAfter() sdk.EnvelopedErr

func ErrDescLenBiggerThanLimit

func ErrDescLenBiggerThanLimit() sdk.EnvelopedErr

func ErrFailedToUnlockAddress

func ErrFailedToUnlockAddress(coins string, addr string) sdk.EnvelopedErr

func ErrGetConfirmOwnership

func ErrGetConfirmOwnership() sdk.EnvelopedErr

func ErrGetDecimalFromDecimalStringFailed

func ErrGetDecimalFromDecimalStringFailed(msg string) sdk.EnvelopedErr

func ErrInputOwnerIsNotEqualTokenOwner

func ErrInputOwnerIsNotEqualTokenOwner(address sdk.AccAddress) sdk.EnvelopedErr

func ErrInvalidCoins

func ErrInvalidCoins(symbol string) sdk.EnvelopedErr

func ErrMintCoinsFailed

func ErrMintCoinsFailed(msg string) sdk.EnvelopedErr

func ErrMsgSymbolIsEmpty

func ErrMsgSymbolIsEmpty() sdk.EnvelopedErr

func ErrMsgTransfersAmountBiggerThanSendLimit

func ErrMsgTransfersAmountBiggerThanSendLimit() sdk.EnvelopedErr

func ErrNotAllowedOriginalSymbol

func ErrNotAllowedOriginalSymbol(symbol string) sdk.EnvelopedErr

func ErrSendCoinsFromAccountToAccountFailed

func ErrSendCoinsFromAccountToAccountFailed(msg string) sdk.EnvelopedErr

func ErrSendCoinsFromAccountToModuleFailed

func ErrSendCoinsFromAccountToModuleFailed(message string) sdk.EnvelopedErr

func ErrSendCoinsFromModuleToAccountFailed

func ErrSendCoinsFromModuleToAccountFailed(msg string) sdk.EnvelopedErr

func ErrSendDisabled

func ErrSendDisabled() sdk.EnvelopedErr

ErrSendDisabled returns an error when the transaction sending is disabled in bank module

func ErrTokenIsNotMintable

func ErrTokenIsNotMintable() sdk.EnvelopedErr

func ErrTotalSupplyOutOfRange

func ErrTotalSupplyOutOfRange() sdk.EnvelopedErr

func ErrUnknownTokenQueryType

func ErrUnknownTokenQueryType() sdk.EnvelopedErr

func ErrUnrecognizedLockCoinsType

func ErrUnrecognizedLockCoinsType(lockCoinsType int) sdk.EnvelopedErr

func ErrUpdateLockedCoins

func ErrUpdateLockedCoins() sdk.EnvelopedErr

func ErrUserInputSymbolIsEmpty

func ErrUserInputSymbolIsEmpty() sdk.EnvelopedErr

func ErrWholeNameAndDescriptionIsNotModified

func ErrWholeNameAndDescriptionIsNotModified() sdk.EnvelopedErr

func ErrWholeNameIsNotValidl

func ErrWholeNameIsNotValidl() sdk.EnvelopedErr

func GetConfirmOwnershipKey

func GetConfirmOwnershipKey(symbol string) []byte

func GetLockAddress

func GetLockAddress(addr sdk.AccAddress) []byte

func GetLockFeeAddress

func GetLockFeeAddress(addr sdk.AccAddress) []byte

GetLockFeeAddress gets the key for the lock fee information with address

func GetTokenAddress

func GetTokenAddress(symbol string) []byte

func GetUserTokenKey

func GetUserTokenKey(owner sdk.AccAddress, symbol string) []byte

func GetUserTokenPrefix

func GetUserTokenPrefix(owner sdk.AccAddress) []byte

func NotAllowedOriginSymbol

func NotAllowedOriginSymbol(name string) bool

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable for auth module

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on the Amino codec

func ValidOriginalSymbol

func ValidOriginalSymbol(name string) bool

func WholeNameCheck

func WholeNameCheck(wholeName string) (newName string, isValid bool)

Types

type AccCoins

type AccCoins struct {
	Acc   sdk.AccAddress `json:"address"`
	Coins sdk.SysCoins   `json:"coins"`
}

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authexported.Account
	IterateAccounts(ctx sdk.Context, cb func(account authexported.Account) bool)
}

type AccountParam

type AccountParam struct {
	Symbol string `json:"symbol"`
	Show   string `json:"show"`
}

type AccountParamV2

type AccountParamV2 struct {
	Currency string `json:"currency"`
	HideZero string `json:"hide_zero"`
}

type AccountResponse

type AccountResponse struct {
	Address    string    `json:"address"`
	Currencies CoinsInfo `json:"currencies"`
}

func NewAccountResponse

func NewAccountResponse(addr string) AccountResponse

type BaseAccount

type BaseAccount struct {
	Address       sdk.AccAddress `json:"address"`
	Coins         sdk.Coins      `json:"coins"`
	PubKey        crypto.PubKey  `json:"public_key"`
	AccountNumber uint64         `json:"account_number"`
	Sequence      uint64         `json:"sequence"`
}

type CoinInfo

type CoinInfo struct {
	Symbol    string `json:"symbol" v2:"currency"`
	Available string `json:"available" v2:"available"`
	Locked    string `json:"locked" v2:"locked"`
}

func NewCoinInfo

func NewCoinInfo(symbol, available, locked string) *CoinInfo

type CoinsInfo

type CoinsInfo []CoinInfo

func MergeCoinInfo

func MergeCoinInfo(availableCoins, lockedCoins sdk.SysCoins) (coinsInfo CoinsInfo)

func (CoinsInfo) Len

func (d CoinsInfo) Len() int

func (CoinsInfo) Less

func (d CoinsInfo) Less(i, j int) bool

func (CoinsInfo) Swap

func (d CoinsInfo) Swap(i, j int)

type ConfirmOwnership

type ConfirmOwnership struct {
	Symbol  string         `json:"symbol"`
	Address sdk.AccAddress `json:"address"`
	Expire  time.Time      `json:expire`
}

type Currency

type Currency struct {
	Description string  `json:"description"`
	Symbol      string  `json:"symbol"`
	TotalSupply sdk.Dec `json:"total_supply"`
}

func (Currency) String

func (currency Currency) String() string

type DecAccount

type DecAccount struct {
	Address       sdk.AccAddress `json:"address"`
	Coins         sdk.SysCoins   `json:"coins"`
	PubKey        crypto.PubKey  `json:"public_key"`
	AccountNumber uint64         `json:"account_number"`
	Sequence      uint64         `json:"sequence"`
}

func BaseAccountToDecAccount

func BaseAccountToDecAccount(account auth.BaseAccount) DecAccount

func (DecAccount) String

func (acc DecAccount) String() string

String implements fmt.Stringer

func (*DecAccount) ToBaseAccount

func (acc *DecAccount) ToBaseAccount() *auth.BaseAccount

type FeeDetail

type FeeDetail struct {
	Address   string `gorm:"index;type:varchar(80)" json:"address" v2:"address"`
	Receiver  string `gorm:"index;type:varchar(80)" json:"receiver" v2:"receiver"` // added for opendex
	Fee       string `gorm:"type:varchar(40)" json:"fee" v2:"fee"`
	FeeType   string `gorm:"index;type:varchar(20)" json:"fee_type" v2:"fee_type"` // defined in order/types/const.go
	Timestamp int64  `gorm:"type:bigint" json:"timestamp" v2:"timestamp"`
}

nolint

type MsgConfirmOwnership

type MsgConfirmOwnership struct {
	Symbol  string         `json:"symbol"`
	Address sdk.AccAddress `json:"new_owner"`
}

MsgConfirmOwnership - high level transaction of the coin module

func NewMsgConfirmOwnership

func NewMsgConfirmOwnership(newOwner sdk.AccAddress, symbol string) MsgConfirmOwnership

func (MsgConfirmOwnership) GetSignBytes

func (msg MsgConfirmOwnership) GetSignBytes() []byte

func (MsgConfirmOwnership) GetSigners

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

func (MsgConfirmOwnership) Route

func (msg MsgConfirmOwnership) Route() string

func (MsgConfirmOwnership) Type

func (msg MsgConfirmOwnership) Type() string

func (MsgConfirmOwnership) ValidateBasic

func (msg MsgConfirmOwnership) ValidateBasic() sdk.Error

type MsgMultiSend

type MsgMultiSend struct {
	From      sdk.AccAddress `json:"from"`
	Transfers []TransferUnit `json:"transfers"`
}

func NewMsgMultiSend

func NewMsgMultiSend(from sdk.AccAddress, transfers []TransferUnit) MsgMultiSend

func (MsgMultiSend) GetSignBytes

func (msg MsgMultiSend) GetSignBytes() []byte

func (MsgMultiSend) GetSigners

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

func (MsgMultiSend) Route

func (msg MsgMultiSend) Route() string

func (MsgMultiSend) Type

func (msg MsgMultiSend) Type() string

func (MsgMultiSend) ValidateBasic

func (msg MsgMultiSend) ValidateBasic() sdk.Error

type MsgSend

type MsgSend struct {
	FromAddress sdk.AccAddress `json:"from_address"`
	ToAddress   sdk.AccAddress `json:"to_address"`
	Amount      sdk.SysCoins   `json:"amount"`
}

MsgSend - high level transaction of the coin module

func NewMsgTokenSend

func NewMsgTokenSend(from, to sdk.AccAddress, coins sdk.SysCoins) MsgSend

func (MsgSend) GetSignBytes

func (msg MsgSend) GetSignBytes() []byte

func (MsgSend) GetSigners

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

func (MsgSend) Route

func (msg MsgSend) Route() string

func (MsgSend) Type

func (msg MsgSend) Type() string

func (MsgSend) ValidateBasic

func (msg MsgSend) ValidateBasic() sdk.Error

type MsgTokenBurn

type MsgTokenBurn struct {
	Amount sdk.SysCoin    `json:"amount"`
	Owner  sdk.AccAddress `json:"owner"`
}

func NewMsgTokenBurn

func NewMsgTokenBurn(amount sdk.SysCoin, owner sdk.AccAddress) MsgTokenBurn

func (MsgTokenBurn) GetSignBytes

func (msg MsgTokenBurn) GetSignBytes() []byte

func (MsgTokenBurn) GetSigners

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

func (MsgTokenBurn) Route

func (msg MsgTokenBurn) Route() string

func (MsgTokenBurn) Type

func (msg MsgTokenBurn) Type() string

func (MsgTokenBurn) ValidateBasic

func (msg MsgTokenBurn) ValidateBasic() sdk.Error

type MsgTokenIssue

type MsgTokenIssue struct {
	Description    string         `json:"description"`
	Symbol         string         `json:"symbol"`
	OriginalSymbol string         `json:"original_symbol"`
	WholeName      string         `json:"whole_name"`
	TotalSupply    string         `json:"total_supply"`
	Owner          sdk.AccAddress `json:"owner"`
	Mintable       bool           `json:"mintable"`
}

func NewMsgTokenIssue

func NewMsgTokenIssue(tokenDescription, symbol, originalSymbol, wholeName, totalSupply string, owner sdk.AccAddress, mintable bool) MsgTokenIssue

func (MsgTokenIssue) GetSignBytes

func (msg MsgTokenIssue) GetSignBytes() []byte

func (MsgTokenIssue) GetSigners

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

func (MsgTokenIssue) Route

func (msg MsgTokenIssue) Route() string

func (MsgTokenIssue) Type

func (msg MsgTokenIssue) Type() string

func (MsgTokenIssue) ValidateBasic

func (msg MsgTokenIssue) ValidateBasic() sdk.Error

type MsgTokenMint

type MsgTokenMint struct {
	Amount sdk.SysCoin    `json:"amount"`
	Owner  sdk.AccAddress `json:"owner"`
}

func NewMsgTokenMint

func NewMsgTokenMint(amount sdk.SysCoin, owner sdk.AccAddress) MsgTokenMint

func (MsgTokenMint) GetSignBytes

func (msg MsgTokenMint) GetSignBytes() []byte

func (MsgTokenMint) GetSigners

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

func (MsgTokenMint) Route

func (msg MsgTokenMint) Route() string

func (MsgTokenMint) Type

func (msg MsgTokenMint) Type() string

func (MsgTokenMint) ValidateBasic

func (msg MsgTokenMint) ValidateBasic() sdk.Error

type MsgTokenModify

type MsgTokenModify struct {
	Owner                 sdk.AccAddress `json:"owner"`
	Symbol                string         `json:"symbol"`
	Description           string         `json:"description"`
	WholeName             string         `json:"whole_name"`
	IsDescriptionModified bool           `json:"description_modified"`
	IsWholeNameModified   bool           `json:"whole_name_modified"`
}

func NewMsgTokenModify

func NewMsgTokenModify(symbol, desc, wholeName string, isDescEdit, isWholeNameEdit bool, owner sdk.AccAddress) MsgTokenModify

func (MsgTokenModify) GetSignBytes

func (msg MsgTokenModify) GetSignBytes() []byte

func (MsgTokenModify) GetSigners

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

func (MsgTokenModify) Route

func (msg MsgTokenModify) Route() string

func (MsgTokenModify) Type

func (msg MsgTokenModify) Type() string

func (MsgTokenModify) ValidateBasic

func (msg MsgTokenModify) ValidateBasic() sdk.Error

type MsgTransferOwnership

type MsgTransferOwnership struct {
	FromAddress sdk.AccAddress `json:"from_address"`
	ToAddress   sdk.AccAddress `json:"to_address"`
	Symbol      string         `json:"symbol"`
}

MsgTransferOwnership - high level transaction of the coin module

func NewMsgTransferOwnership

func NewMsgTransferOwnership(from, to sdk.AccAddress, symbol string) MsgTransferOwnership

func (MsgTransferOwnership) GetSignBytes

func (msg MsgTransferOwnership) GetSignBytes() []byte

func (MsgTransferOwnership) GetSigners

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

func (MsgTransferOwnership) Route

func (msg MsgTransferOwnership) Route() string

func (MsgTransferOwnership) Type

func (msg MsgTransferOwnership) Type() string

func (MsgTransferOwnership) ValidateBasic

func (msg MsgTransferOwnership) ValidateBasic() sdk.Error

type Params

type Params struct {
	FeeIssue               sdk.SysCoin   `json:"issue_fee"`
	FeeMint                sdk.SysCoin   `json:"mint_fee"`
	FeeBurn                sdk.SysCoin   `json:"burn_fee"`
	FeeModify              sdk.SysCoin   `json:"modify_fee"`
	FeeChown               sdk.SysCoin   `json:"transfer_ownership_fee"`
	OwnershipConfirmWindow time.Duration `json:"ownership_confirm_window"`
}

mint parameters

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() params.ParamSetPairs

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of auth module's parameters. nolint

func (Params) String

func (p Params) String() string

String implements the stringer interface.

type Token

type Token struct {
	Description         string         `json:"description" v2:"description"`                     // e.g. "The utility token of the OKX ecosystem"
	Symbol              string         `json:"symbol" v2:"symbol"`                               // e.g. system.Currency
	OriginalSymbol      string         `json:"original_symbol" v2:"original_symbol"`             // e.g. "OKB"
	WholeName           string         `json:"whole_name" v2:"whole_name"`                       // e.g. "OKB"
	OriginalTotalSupply sdk.Dec        `json:"original_total_supply" v2:"original_total_supply"` // e.g. 1000000000.00000000
	Type                int            `json:"type"`                                             //e.g. 1 common token, 2 interest token
	Owner               sdk.AccAddress `json:"owner" v2:"owner"`                                 // e.g. ex1cftp8q8g4aa65nw9s5trwexe77d9t6cr8ndu02
	Mintable            bool           `json:"mintable" v2:"mintable"`                           // e.g. false
}

func (Token) String

func (token Token) String() string

type TokenResp

type TokenResp struct {
	Description         string         `json:"description" v2:"description"`
	Symbol              string         `json:"symbol" v2:"symbol"`
	OriginalSymbol      string         `json:"original_symbol" v2:"original_symbol"`
	WholeName           string         `json:"whole_name" v2:"whole_name"`
	OriginalTotalSupply sdk.Dec        `json:"original_total_supply" v2:"original_total_supply"`
	Type                int            `json:"type"`
	Owner               sdk.AccAddress `json:"owner" v2:"owner"`
	Mintable            bool           `json:"mintable" v2:"mintable"`
	TotalSupply         sdk.Dec        `json:"total_supply" v2:"total_supply"`
}

func GenTokenResp

func GenTokenResp(token Token) TokenResp

func (TokenResp) String

func (token TokenResp) String() string

type Tokens

type Tokens []TokenResp

func (Tokens) String

func (tokens Tokens) String() string

type Transfer

type Transfer struct {
	To     string `json:"to"`
	Amount string `json:"amount"`
}

type TransferUnit

type TransferUnit struct {
	To    sdk.AccAddress `json:"to"`
	Coins sdk.SysCoins   `json:"coins"`
}

func StrToTransfers

func StrToTransfers(str string) (transfers []TransferUnit, err error)

Convert a formatted json string into a TransferUnit array e.g.) [{"to": "addr", "amount": "1BNB,2BTC"}, ...]

Jump to

Keyboard shortcuts

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