keeper

package
v0.0.0-...-32383df Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier creates a new querier for proximax-bridge clients.

Types

type CosignersRecord

type CosignersRecord struct {
	MainchainTxHadh    string   `json:"mainchain_tx_hash" yaml:"mainchain_tx_hash"`
	CosignerPublicKeys []string `json:"cosigner_public_keys" yaml:"cosigner_public_keys"`
}

type Keeper

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

Keeper of the proximax-bridge store

func NewKeeper

func NewKeeper(cdc *codec.Codec, key, keyForPeg, keyForUnpeg, keyForCosign, keyForInvite sdk.StoreKey, paramspace types.ParamSubspace, supplyKeeper types.SupplyKeeper, slashingKeeper types.SlashingKeeper, oracleKeeper types.OracleKeeper) Keeper

NewKeeper creates a proximax-bridge keeper

func (Keeper) AddNewCosigner

func (k Keeper) AddNewCosigner(ctx sdk.Context, address sdk.ValAddress, mainchainPublicKey string)

func (Keeper) GetCosignersRecord

func (k Keeper) GetCosignersRecord(ctx sdk.Context, mainChainTxHash string) (CosignersRecord, error)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams returns the total set of proximax-bridge parameters.

func (Keeper) GetPegRecord

func (k Keeper) GetPegRecord(ctx sdk.Context, txHash string) (PegRecord, error)

func (Keeper) GetPendingRequest

func (k Keeper) GetPendingRequest(ctx sdk.Context, mainChainTxHash string) (PendingInviteRequest, error)

func (Keeper) GetUnpegRecord

func (k Keeper) GetUnpegRecord(ctx sdk.Context, mainChainTxHash string) (UnpegRecord, error)

func (Keeper) IsUsedHash

func (k Keeper) IsUsedHash(ctx sdk.Context, hash string) bool

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) MarkAsUsedHash

func (k Keeper) MarkAsUsedHash(ctx sdk.Context, hash string)

func (Keeper) ProcessNotCosignedClaim

func (k Keeper) ProcessNotCosignedClaim(ctx sdk.Context, claim types.MsgNotCosignedClaim) (oracle.Status, error)

ProcessClaim processes a new claim coming in from a validator

func (Keeper) ProcessPegClaim

func (k Keeper) ProcessPegClaim(ctx sdk.Context, claim types.MsgPegClaim) (oracle.Status, error)

ProcessClaim processes a new claim coming in from a validator

func (Keeper) ProcessSuccessfulNotCosignedClaim

func (k Keeper) ProcessSuccessfulNotCosignedClaim(ctx sdk.Context, claim string) error

ProcessSuccessfulClaim processes a claim that has just completed successfully with consensus

func (Keeper) ProcessSuccessfulPegClaim

func (k Keeper) ProcessSuccessfulPegClaim(ctx sdk.Context, claim string) error

ProcessSuccessfulClaim processes a claim that has just completed successfully with consensus

func (Keeper) ProcessUnpeg

func (k Keeper) ProcessUnpeg(ctx sdk.Context, msg types.MsgUnpeg) error

func (Keeper) SetCosigners

func (k Keeper) SetCosigners(ctx sdk.Context, mainChainTxHash string, cosignerPublicKey string) error

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the proximax-bridge parameters to the param space.

func (Keeper) SetPegRecord

func (k Keeper) SetPegRecord(ctx sdk.Context, txHash string, consumed sdk.Coins, remainning int64) error

func (Keeper) SetPendingInviteRequest

func (k Keeper) SetPendingInviteRequest(ctx sdk.Context, txHash string, address sdk.ValAddress, mainchainPublicKey string) error

func (Keeper) SetUnpegRecord

func (k Keeper) SetUnpegRecord(ctx sdk.Context, mainChainTxHash string, accountAddress sdk.AccAddress, amount sdk.Coins) error

type PegRecord

type PegRecord struct {
	MainchainTxHash string    `json:"mainchain_tx_hash" yaml:"mainchain_tx_hash"`
	Consumed        sdk.Coins `json:"consumed" yaml:"consumed"`
	Remainning      int64     `json:"remainning" yaml:"remainning"`
}

type PendingInviteRequest

type PendingInviteRequest struct {
	Address            sdk.ValAddress `json:"address" yaml:"address"`
	MainchainPublicKey string         `json:"mainchain_public_key" yaml:"mainchain_public_key"`
	MainchainTxHash    string         `json:"mainchain_tx_hash" yaml:"mainchain_tx_hash"`
}

type UnpegRecord

type UnpegRecord struct {
	Address         sdk.AccAddress `json:"address" yaml:"address"`
	MainchainTxHash string         `json:"mainchain_tx_hash" yaml:"mainchain_tx_hash"`
	Amount          sdk.Coins      `json:"amount" yaml:"amount"`
}

Jump to

Keyboard shortcuts

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