keeper

package
v0.14.99 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	QTokenAddressBySymbol  = "token-address-symbol"
	QTokenAddressByAsset   = "token-address-asset"
	QDepositState          = "deposit-state"
	QAddressByKeyRole      = "address-by-key-role"
	QAddressByKeyID        = "address-by-key-id"
	QNextMasterAddress     = "next-master-address"
	QAxelarGatewayAddress  = "gateway-address"
	QBytecode              = "bytecode"
	QLatestBatchedCommands = "latest-batched-commands"
	QBatchedCommands       = "batched-commands"
	QPendingCommands       = "pending-commands"
	QCommand               = "command"
	QChains                = "chains"
)

Query labels

View Source
const (
	BCGateway           = "gateway"
	BCGatewayDeployment = "gateway-deployment"
	BCToken             = "token"
	BCBurner            = "burner"
)

Bytecode labels

View Source
const (
	BySymbol = "symbol"
	ByAsset  = "asset"
)

Token address labels

Variables

This section is empty.

Functions

func GetCommandResponse added in v0.10.0

func GetCommandResponse(ctx sdk.Context, chainName string, n types.Nexus, cmd types.Command) (types.QueryCommandResponse, error)

GetCommandResponse converts a Command into a CommandResponse type

func NewAddressValidator added in v0.9.0

func NewAddressValidator() nexus.AddressValidator

NewAddressValidator returns the callback for validating hex-encoded EVM addresses

func NewMsgServerImpl

func NewMsgServerImpl(keeper types.BaseKeeper, t types.TSS, n types.Nexus, s types.Signer, v types.Voter, snap types.Snapshotter) types.MsgServiceServer

NewMsgServerImpl returns an implementation of the bitcoin MsgServiceServer interface for the provided Keeper.

func NewQuerier

func NewQuerier(k types.BaseKeeper, s types.Signer, n types.Nexus) sdk.Querier

NewQuerier returns a new querier for the evm module

func NewTssHandler

func NewTssHandler(keeper types.BaseKeeper, nexus types.Nexus, signer types.Signer) tss.Handler

NewTssHandler returns the handler for processing signatures delivered by the tss module

func QueryAddressByKeyID

func QueryAddressByKeyID(ctx sdk.Context, s types.Signer, n types.Nexus, chainName string, keyID tss.KeyID) ([]byte, error)

QueryAddressByKeyID returns the address of the given key ID

func QueryAddressByKeyRole

func QueryAddressByKeyRole(ctx sdk.Context, s types.Signer, n types.Nexus, chainName string, keyRoleStr string) ([]byte, error)

QueryAddressByKeyRole returns the current address of the given key role

func QueryBatchedCommands

func QueryBatchedCommands(ctx sdk.Context, k types.ChainKeeper, s types.Signer, n types.Nexus, batchedCommandsIDHex string) ([]byte, error)

QueryBatchedCommands returns the batched commands for the given ID

func QueryDepositState

func QueryDepositState(ctx sdk.Context, k types.ChainKeeper, n types.Nexus, data []byte) ([]byte, error)

QueryDepositState returns the state of an ERC20 deposit confirmation

func QueryLatestBatchedCommands

func QueryLatestBatchedCommands(ctx sdk.Context, keeper types.ChainKeeper, s types.Signer) ([]byte, error)

QueryLatestBatchedCommands returns the latest batched commands

func QueryPendingCommands added in v0.10.0

func QueryPendingCommands(ctx sdk.Context, keeper types.ChainKeeper, n types.Nexus) ([]byte, error)

QueryPendingCommands returns the pending commands for a gateway

func QueryTokenAddressByAsset

func QueryTokenAddressByAsset(ctx sdk.Context, k types.ChainKeeper, n types.Nexus, asset string) ([]byte, error)

QueryTokenAddressByAsset returns the address of the token contract by asset

func QueryTokenAddressBySymbol

func QueryTokenAddressBySymbol(ctx sdk.Context, k types.ChainKeeper, n types.Nexus, symbol string) ([]byte, error)

QueryTokenAddressBySymbol returns the address of the token contract by symbol

Types

type BaseKeeper added in v0.13.3

type BaseKeeper struct {
	// contains filtered or unexported fields
}

BaseKeeper implements the base Keeper

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramsKeeper types.ParamsKeeper) BaseKeeper

NewKeeper returns a new EVM base keeper

func (BaseKeeper) DeletePendingChain added in v0.13.3

func (k BaseKeeper) DeletePendingChain(ctx sdk.Context, chain string)

DeletePendingChain deletes a chain that is not registered yet

func (BaseKeeper) ExportGenesis added in v0.13.3

func (k BaseKeeper) ExportGenesis(ctx sdk.Context) types.GenesisState

ExportGenesis generates a genesis file from the state

func (BaseKeeper) ForChain added in v0.13.3

func (k BaseKeeper) ForChain(chain string) types.ChainKeeper

ForChain returns the keeper associated to the given chain

func (BaseKeeper) GetPendingChain added in v0.13.3

func (k BaseKeeper) GetPendingChain(ctx sdk.Context, chainName string) (types.PendingChain, bool)

GetPendingChain returns the chain object with the given name, false if the chain is either unknown or confirmed

func (BaseKeeper) HasChain added in v0.13.3

func (k BaseKeeper) HasChain(ctx sdk.Context, chain string) bool

HasChain returns true of the chain has been set up

func (BaseKeeper) InitGenesis added in v0.13.3

func (k BaseKeeper) InitGenesis(ctx sdk.Context, state types.GenesisState)

InitGenesis initializes the state from a genesis file

func (BaseKeeper) Logger added in v0.13.3

func (k BaseKeeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (BaseKeeper) SetPendingChain added in v0.13.3

func (k BaseKeeper) SetPendingChain(ctx sdk.Context, chain nexus.Chain, p types.Params)

SetPendingChain stores the chain pending for confirmation

type Querier added in v0.13.4

type Querier struct {
	// contains filtered or unexported fields
}

Querier implements the grpc querier

func NewGRPCQuerier added in v0.13.4

func NewGRPCQuerier(k BaseKeeper, n types.Nexus) Querier

NewGRPCQuerier returns a new Querier

func (Querier) BurnerInfo added in v0.13.4

BurnerInfo implements the burner info grpc query

func (Querier) ConfirmationHeight added in v0.13.4

ConfirmationHeight implements the confirmation height grpc query

func (Querier) DepositState added in v0.13.4

DepositState fetches the state of a deposit confirmation using a grpc query

Jump to

Keyboard shortcuts

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