types

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// module name
	ModuleName = "ibcasset"

	// StoreKey is string representation of the store key for auth
	StoreKey = "ibcasset"

	// RouterKey is the message route for Module
	RouterKey = ModuleName

	// FeeCollectorName the root string for the fee collector CU address
	FeeCollectorName = "fee_collector"

	// QuerierRoute is the querier route for cu
	QuerierRoute = StoreKey

	DefaultParamspace = ModuleName
)
View Source
const (
	QueryPendingDepositList = "PendingDepositList"
	QueryCUAsset            = "CUAsset"
	QueryOpCUAstInfo        = "OpCUAstInfo"
	QueryDepositExistance   = "DepositExistance"
)

Variables

View Source
var (
	// AddressStoreKeyPrefix prefix for CU-by-address store
	AddressStoreKeyPrefix = []byte{0x01}

	Sep = []byte{0x01}

	ExtAddressPrefix = []byte("extAddress")

	// param key for global CU number
	GlobalCUNumberKey = []byte("globalCUNumber")
)
View Source
var ModuleCdc *codec.Codec

module wide codec

Functions

func AddressStoreKey

func AddressStoreKey(addr sdk.CUAddress) []byte

AddressStoreKey turn an address to key used to get it from the CU store key = prefix + cuaddress

func DecodeSymbolFromDepositListKey

func DecodeSymbolFromDepositListKey(key []byte) string

func DepositStoreKey

func DepositStoreKey(symbol string, addr sdk.CUAddress, hash string, index uint64) []byte

key = prefix + symbol + cuaddress

func DepositStorePrefixKey

func DepositStorePrefixKey(symbol string, addr sdk.CUAddress) []byte

func DepositStorePrefixKeyWithAddr

func DepositStorePrefixKeyWithAddr(addr sdk.CUAddress) []byte

func ProtoBaseCUIBCAsset

func ProtoBaseCUIBCAsset() exported.CUIBCAsset

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on the codec

Types

type CUIBCAsset

type CUIBCAsset struct {
	Address          sdk.CUAddress       `json:"address" yaml:"address"`
	Type             sdk.CUType          `json:"cu_type" yaml:"type"`
	Assets           []sdk.Asset         `json:"assets" yaml:"assets"`
	AssetCoins       sdk.Coins           `json:"asset_coins" yaml:"asset_coins"`
	AssetCoinsHold   sdk.Coins           `json:"asset_coins_hold" yaml:"asset_coins_hold"`
	AssetPubkey      []byte              `json:"asset_pubkey" yaml:"asset_pubkey"`
	AssetPubkeyEpoch uint64              `json:"asset_pubkey_epoch" yaml:"asset_pubkey_epoch"`
	GasUsed          sdk.Coins           `json:"gas_used" yaml:"gas_used"`
	GasReceived      sdk.Coins           `json:"gas_received" yaml:"gas_received"`
	MigrationStatus  sdk.MigrationStatus `json:"migration_status" yaml:"migration_status"`
}

func (*CUIBCAsset) AddAsset

func (cuAst *CUIBCAsset) AddAsset(denom, address string, epoch uint64) error

func (*CUIBCAsset) AddAssetCoins

func (cuAst *CUIBCAsset) AddAssetCoins(coins sdk.Coins) sdk.Coins

func (*CUIBCAsset) AddAssetCoinsHold

func (cuAst *CUIBCAsset) AddAssetCoinsHold(coins sdk.Coins) sdk.Coins

func (*CUIBCAsset) AddGasReceived

func (cuAst *CUIBCAsset) AddGasReceived(coins sdk.Coins) sdk.Coins

func (*CUIBCAsset) AddGasRemained

func (cuAst *CUIBCAsset) AddGasRemained(chain string, addr string, amt sdk.Int)

func (*CUIBCAsset) AddGasUsed

func (cuAst *CUIBCAsset) AddGasUsed(coins sdk.Coins) sdk.Coins

func (*CUIBCAsset) GetAddress

func (cuAst *CUIBCAsset) GetAddress() sdk.CUAddress

func (*CUIBCAsset) GetAsset

func (cuAst *CUIBCAsset) GetAsset(denom string, epoch uint64) sdk.Asset

func (*CUIBCAsset) GetAssetAddress

func (cuAst *CUIBCAsset) GetAssetAddress(denom string, epoch uint64) string

func (*CUIBCAsset) GetAssetByAddr

func (cuAst *CUIBCAsset) GetAssetByAddr(denom string, addr string) sdk.Asset

func (*CUIBCAsset) GetAssetCoins

func (cuAst *CUIBCAsset) GetAssetCoins() sdk.Coins

func (*CUIBCAsset) GetAssetCoinsHold

func (cuAst *CUIBCAsset) GetAssetCoinsHold() sdk.Coins

func (*CUIBCAsset) GetAssetPubkey

func (cuAst *CUIBCAsset) GetAssetPubkey(epoch uint64) []byte

func (*CUIBCAsset) GetAssetPubkeyEpoch

func (cuAst *CUIBCAsset) GetAssetPubkeyEpoch() uint64

func (*CUIBCAsset) GetAssets

func (cuAst *CUIBCAsset) GetAssets() []sdk.Asset

func (*CUIBCAsset) GetCUType

func (cuAst *CUIBCAsset) GetCUType() sdk.CUType

func (*CUIBCAsset) GetGasReceived

func (cuAst *CUIBCAsset) GetGasReceived() sdk.Coins

func (*CUIBCAsset) GetGasRemained

func (cuAst *CUIBCAsset) GetGasRemained(chain string, addr string) sdk.Int

func (*CUIBCAsset) GetGasUsed

func (cuAst *CUIBCAsset) GetGasUsed() sdk.Coins

func (*CUIBCAsset) GetMigrationStatus

func (cuAst *CUIBCAsset) GetMigrationStatus() sdk.MigrationStatus

func (*CUIBCAsset) GetNonce

func (cuAst *CUIBCAsset) GetNonce(denom string, addr string) uint64

func (*CUIBCAsset) IsEnabledSendTx

func (cuAst *CUIBCAsset) IsEnabledSendTx(chain string, addr string) bool

func (*CUIBCAsset) MarshalYAML

func (cuAst *CUIBCAsset) MarshalYAML() (interface{}, error)

MarshalYAML returns the YAML representation of an custodianunit.

func (*CUIBCAsset) SetAddress

func (cuAst *CUIBCAsset) SetAddress(cuaddress sdk.CUAddress) error

func (*CUIBCAsset) SetAssetAddress

func (cuAst *CUIBCAsset) SetAssetAddress(denom, address string, epoch uint64) error

func (*CUIBCAsset) SetAssetPubkey

func (cuAst *CUIBCAsset) SetAssetPubkey(pubkey []byte, epoch uint64) error

func (*CUIBCAsset) SetCUType

func (cuAst *CUIBCAsset) SetCUType(cuType sdk.CUType) error

SetCUType set the custodian unit type if the type of custodian unit already defined return error

func (*CUIBCAsset) SetEnableSendTx

func (cuAst *CUIBCAsset) SetEnableSendTx(enabled bool, chain string, addr string)

func (*CUIBCAsset) SetMigrationStatus

func (cuAst *CUIBCAsset) SetMigrationStatus(status sdk.MigrationStatus)

func (*CUIBCAsset) SetNonce

func (cuAst *CUIBCAsset) SetNonce(denom string, nonce uint64, addr string)

func (*CUIBCAsset) SubAssetCoins

func (cuAst *CUIBCAsset) SubAssetCoins(coins sdk.Coins) sdk.Coins

func (*CUIBCAsset) SubAssetCoinsHold

func (cuAst *CUIBCAsset) SubAssetCoinsHold(coins sdk.Coins) sdk.Coins

func (*CUIBCAsset) SubGasReceived

func (cuAst *CUIBCAsset) SubGasReceived(coins sdk.Coins) sdk.Coins

func (*CUIBCAsset) SubGasRemained

func (cuAst *CUIBCAsset) SubGasRemained(chain string, addr string, amt sdk.Int)

func (*CUIBCAsset) SubGasUsed

func (cuAst *CUIBCAsset) SubGasUsed(coins sdk.Coins) sdk.Coins

type DepositExistanceParams

type DepositExistanceParams struct {
	Symbol  string
	Address sdk.CUAddress
	TxHash  string
	Index   uint64
}

func NewDepositExistanceParams

func NewDepositExistanceParams(symbol string, addr sdk.CUAddress, txHash string, index uint64) *DepositExistanceParams

type QueryCUAssetParams

type QueryCUAssetParams struct {
	Address sdk.CUAddress
}

QueryCUParams defines the params for querying cu.

func NewQueryCUAssetParams

func NewQueryCUAssetParams(addr sdk.CUAddress) QueryCUAssetParams

NewQueryCUParams creates a new instance of QueryCUParams.

type QueryCUChainAddressParams

type QueryCUChainAddressParams struct {
	Chain   string
	Address string
}

type QueryOpCUAstInfoParams

type QueryOpCUAstInfoParams struct {
	Symbol string
}

QueryCUParams defines the params for querying cu.

type QueryPendingDepositListParams

type QueryPendingDepositListParams struct {
	Address sdk.CUAddress
}

func NewQueryPendingDepositListParams

func NewQueryPendingDepositListParams(addr sdk.CUAddress) *QueryPendingDepositListParams

Jump to

Keyboard shortcuts

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