keeper

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const QUERY_PROPOSEDSWEEPADDRESSALL_LIMIT uint64 = 1000
View Source
const QUERY_REFUNDALL_LIMIT uint64 = 1000
View Source
const QUERY_SWEEPALL_LIMIT uint64 = 1000

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {

	// NOTE: If you add anything to this struct, add a nil check to ValidateMembers below!
	StakingKeeper *stakingkeeper.Keeper
	NyksKeeper    *nykskeeper.Keeper
	VoltKeeper    *voltkeeper.Keeper

	BankKeeper types.BankKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,
	ps paramtypes.Subspace,
	stakingKeeper *stakingkeeper.Keeper,
	nyksKeeper *nykskeeper.Keeper,
	voltKeeper *voltkeeper.Keeper,
	accKeeper *authkeeper.AccountKeeper,
	bankKeeper types.BankKeeper,
) *Keeper

func (Keeper) BroadcastTxRefund added in v0.0.2

func (Keeper) BroadcastTxRefundAll added in v0.0.2

func (Keeper) BroadcastTxSweep added in v0.0.2

func (Keeper) CheckJudgeValidatorInSet

func (k Keeper) CheckJudgeValidatorInSet(ctx sdk.Context, judgeAddress sdk.AccAddress) bool

CheckJudgeValidatorInSet checks if the validator address of a judge is in the set of validators

func (Keeper) GetAccountKeeper added in v0.0.2

func (k Keeper) GetAccountKeeper() types.AccountKeeper

GetAccountKeeper returns the account keeper.

func (Keeper) GetAllProposedSweepAddresses added in v0.0.2

func (k Keeper) GetAllProposedSweepAddresses(ctx sdk.Context, limit uint64) ([]types.MsgProposeSweepAddress, error)

GetAllProposedSweepAddresses returns all proposed sweep addresses for btc chain

func (Keeper) GetAllUnsignedTxRefundMsgs added in v0.0.2

func (k Keeper) GetAllUnsignedTxRefundMsgs(ctx sdk.Context, limit uint64) ([]types.MsgUnsignedTxRefund, error)

GetAllUnsignedTxRefundMsg returns all unsigned refund messages for btc chain using reserveId and judgeAddress

func (Keeper) GetAllUnsignedTxSweepMsgs added in v0.0.2

func (k Keeper) GetAllUnsignedTxSweepMsgs(ctx sdk.Context, limit uint64) ([]types.MsgUnsignedTxSweep, error)

GetAllUnsignedTxSweepMsg returns all unsigned sweep messages for btc chain using txId, unsignedSweepTx and judgeAddress

func (Keeper) GetBankKeeper added in v0.0.2

func (k Keeper) GetBankKeeper() types.BankKeeper

GetBankKeeper returns the bank keeper.

func (Keeper) GetBtcBroadcastTxRefundMsg added in v0.0.2

func (k Keeper) GetBtcBroadcastTxRefundMsg(ctx sdk.Context, reserveId uint64, roundId uint64) (*types.MsgBroadcastTxRefund, bool)

GetBtcBroadcastTxRefundMsg returns the broadcast tx sweep message for btc chain using reserveId and roundId

func (Keeper) GetBtcBroadcastTxSweepMsg

func (k Keeper) GetBtcBroadcastTxSweepMsg(ctx sdk.Context, reserveId uint64, roundId uint64) (*types.MsgBroadcastTxSweep, bool)

GetBtcBroadcastTxSweepMsg returns the broadcast tx sweep message for btc chain using reserveId and roundId

func (Keeper) GetBtcProposeRefundHashMsg

func (k Keeper) GetBtcProposeRefundHashMsg(ctx sdk.Context, judgeAddress sdk.AccAddress, refundHash string) (*types.MsgProposeRefundHash, bool)

GetBtcProposeRefundHashMsg returns the propose refund hash message for btc chain using judgeAddress, refundHash

func (Keeper) GetBtcSignRefundMsg

func (k Keeper) GetBtcSignRefundMsg(ctx sdk.Context, reserveId uint64, roundId uint64) ([]types.MsgSignRefund, bool)

GetBtcSignRefundMsg returns the signed refund message for btc chain using reserveId and roundId

func (Keeper) GetBtcSignRefundMsgWithOracleAddress added in v0.0.2

func (k Keeper) GetBtcSignRefundMsgWithOracleAddress(ctx sdk.Context, reserveId uint64, roundId uint64, btcOracleAddress sdk.AccAddress) (*types.MsgSignRefund, bool)

GetBtcSignRefundMsg returns the signed refund message for btc chain using reserveId and roundId

func (Keeper) GetBtcSignSweepMsg

func (k Keeper) GetBtcSignSweepMsg(ctx sdk.Context, reserveId uint64, roundId uint64) ([]types.MsgSignSweep, bool)

GetBtcSignSweepMsg returns the signed sweep message for btc chain using reserveId and roundId

func (Keeper) GetBtcSignSweepMsgWithOracleAddress added in v0.0.2

func (k Keeper) GetBtcSignSweepMsgWithOracleAddress(ctx sdk.Context, reserveId uint64, roundId uint64, btcOracleAddress sdk.AccAddress) (*types.MsgSignSweep, bool)

GetBtcSignSweepMsgWithOracleAddress checks if a given reserveId, roundId, btcOracleAddress mapping exists and returns the corresponding signed sweep message

func (Keeper) GetJudgeAddressForValidatorAddress

func (k Keeper) GetJudgeAddressForValidatorAddress(ctx sdk.Context, validatorAddress sdk.ValAddress) (sdk.AccAddress, error)

GetJudgeAddressForValidatorAddress returns the judge address for a given validator address

func (Keeper) GetJudgeValidator

func (k Keeper) GetJudgeValidator(ctx sdk.Context, judgeAddress sdk.AccAddress) stakingtypes.Validator

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetProposeSweepAddress added in v0.0.2

func (k Keeper) GetProposeSweepAddress(ctx sdk.Context, reserveId uint64, roundId uint64) (*types.MsgProposeSweepAddress, bool)

GetProposeSweepAddress returns the propose sweep address message for btc chain using reserveId and roundId

func (Keeper) GetUnsignedTxRefundMsg added in v0.0.2

func (k Keeper) GetUnsignedTxRefundMsg(ctx sdk.Context, reserveId uint64, roundId uint64) (*types.MsgUnsignedTxRefund, bool)

GetUnsignedTxRefundMsg returns the unsigned refund message for btc chain using reserveId and roundId

func (Keeper) GetUnsignedTxSweepMsg added in v0.0.2

func (k Keeper) GetUnsignedTxSweepMsg(ctx sdk.Context, reserveId uint64, roundId uint64) (*types.MsgUnsignedTxSweep, bool)

GetUnsignedTxSweepMsg returns the unsigned sweep message for btc chain using txId, unsignedSweepTx and judgeAddress

func (Keeper) GetValidatorAddressForJudgeAddress

func (k Keeper) GetValidatorAddressForJudgeAddress(ctx sdk.Context, judgeAddress sdk.AccAddress) (sdk.ValAddress, error)

GetValidatorAddressForJudgeAddress returns the validator address for a given judge address

func (Keeper) IterateBtcReserveAddresses

func (k Keeper) IterateBtcReserveAddresses(ctx sdk.Context, cb func([]byte, types.MsgRegisterReserveAddress) bool)

IterateBtcReserveAddresses iterates through all of the registered reserve addresses

func (Keeper) IterateRegisteredBroadcastTxRefundMsgs added in v0.0.2

func (k Keeper) IterateRegisteredBroadcastTxRefundMsgs(ctx sdk.Context, cb func([]byte, types.MsgBroadcastTxRefund) bool)

IterateRegisteredBroadcastTxRefundMsgs iterates through all of the registered broadcast refund messages

func (Keeper) IterateRegisteredBroadcastTxSweepMsgs

func (k Keeper) IterateRegisteredBroadcastTxSweepMsgs(ctx sdk.Context, cb func([]byte, types.MsgBroadcastTxSweep) bool)

IterateRegisteredBroadcastTxSweepMsgs iterates through all of the registered broadcast sweep messages

func (Keeper) IterateRegisteredJudges

func (k Keeper) IterateRegisteredJudges(ctx sdk.Context, cb func([]byte, types.MsgRegisterJudge) bool)

IterateRegisteredJudges iterates through all of the registered judge addresses

func (Keeper) IterateRegisteredProposeRefundHashMsgs

func (k Keeper) IterateRegisteredProposeRefundHashMsgs(ctx sdk.Context, cb func([]byte, types.MsgProposeRefundHash) bool)

IterateRegisteredProposeRefundHashMsgs iterates through all of the registered propose refund hash messages

func (Keeper) IterateRegisteredProposeSweepAddressMsgs added in v0.0.2

func (k Keeper) IterateRegisteredProposeSweepAddressMsgs(ctx sdk.Context, cb func([]byte, types.MsgProposeSweepAddress) bool)

IterateRegisteredProposeSweepAddressMsgs iterates through all of the registered propose sweep address messages

func (Keeper) IterateRegisteredSignRefundMsgs

func (k Keeper) IterateRegisteredSignRefundMsgs(ctx sdk.Context, cb func([]byte, types.MsgSignRefund) bool)

IterateRegisteredSignRefundMsgs iterates through all of the registered sign refund messages

func (Keeper) IterateRegisteredSignSweepMsgs

func (k Keeper) IterateRegisteredSignSweepMsgs(ctx sdk.Context, cb func([]byte, types.MsgSignSweep) bool)

IterateRegisteredSignSweepMsgs iterates through all of the registered sign sweep messages

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) ProposeSweepAddress added in v0.0.2

func (Keeper) ProposeSweepAddressesAll added in v0.0.2

func (Keeper) SetBtcBroadcastTxRefundMsg added in v0.0.2

func (k Keeper) SetBtcBroadcastTxRefundMsg(ctx sdk.Context, reserveId uint64, roundId uint64, judgeAddress sdk.AccAddress, SignedRefundTx string) error

SetBtcBroadcastTxRefundMsg sets the broadcast refund message for btc chain using reserveId, roundId, judgeAddress and SignedSweepTx

func (Keeper) SetBtcBroadcastTxSweepMsg

func (k Keeper) SetBtcBroadcastTxSweepMsg(ctx sdk.Context, reserveId uint64, roundId uint64, judgeAddress sdk.AccAddress, SignedSweepTx string) error

SetBtcBroadcastTxSweepMsg sets the broadcast refund message for btc chain using reserveId, roundId, judgeAddress and SignedSweepTx

func (Keeper) SetBtcProposeRefundHashMsg

func (k Keeper) SetBtcProposeRefundHashMsg(ctx sdk.Context, judgeAddress sdk.AccAddress, refundHash string) error

SetProposeRefundHashMsg sets the propose refund hash message for btc chain using judgeAddress, refundHash

func (Keeper) SetBtcSignRefundMsg

func (k Keeper) SetBtcSignRefundMsg(ctx sdk.Context, btcOracleAddress sdk.AccAddress, reserveId uint64, roundId uint64, singerPublicKey string, refundSignatures []string) error

SetBtcSignRefundMsg sets the signed refund message for btc chain using btcOracleAddress, reserveId, roundId, singerPublicKey and refundSignature

func (Keeper) SetBtcSignSweepMsg

func (k Keeper) SetBtcSignSweepMsg(ctx sdk.Context, btcOracleAddress sdk.AccAddress, reserveId uint64, roundId uint64, singerPublicKey string, sweepSignatures []string) error

SetBtcSignSweepMsg sets the signed sweep message for btc chain using btcOracleAddress, reserveId, roundId, signerPublicKey and sweepSignature

func (Keeper) SetJudgeAddressForValidatorAddress

func (k Keeper) SetJudgeAddressForValidatorAddress(ctx sdk.Context, creator sdk.AccAddress, validatorAddress sdk.ValAddress, judgeAddress sdk.AccAddress) error

SetJudgeAddressForValidatorAddress that will take judgeAddress and validatorAddress as input and store it in the store

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetProposeSweepAddress added in v0.0.2

func (k Keeper) SetProposeSweepAddress(ctx sdk.Context, btcAddress types.BtcAddress, btcScript string, reserveId uint64, roundId uint64, judgeAddress sdk.AccAddress) error

SetProposeSweepAddress sets the propose sweep address message for btc chain using btcAddress, btcScript, reserveId, roundId and judgeAddress

func (Keeper) SetReserveAddressForJudge

func (k Keeper) SetReserveAddressForJudge(ctx sdk.Context, judgeAddress sdk.AccAddress, reserveScript types.BtcScript, reserveAddress types.BtcAddress)

SetReserveAddressForJudge sets the btc address for a given twilight address

func (Keeper) SetUnsignedTxRefundMsg added in v0.0.2

func (k Keeper) SetUnsignedTxRefundMsg(ctx sdk.Context, reserveId uint64, roundId uint64, btcUnsignedRefundTx string, judgeAddress sdk.AccAddress) error

SetUnsignedTxRefundMsg sets the unsigned refund message for btc chain using reserveId, roundId, btcUnsignedRefundTx and judgeAddress

func (Keeper) SetUnsignedTxSweepMsg added in v0.0.2

func (k Keeper) SetUnsignedTxSweepMsg(ctx sdk.Context, txId string, unsignedSweepTx string, reserveId uint64, roundId uint64, judgeAddress sdk.AccAddress) error

SetUnsignedTxSweepMsg sets the unsigned sweep message for btc chain

func (Keeper) SignRefund added in v0.0.2

func (Keeper) SignSweep added in v0.0.2

func (Keeper) UnsignedTxRefund added in v0.0.2

func (Keeper) UnsignedTxRefundAll added in v0.0.2

func (Keeper) UnsignedTxSweep added in v0.0.2

func (Keeper) UnsignedTxSweepAll added in v0.0.2

Jump to

Keyboard shortcuts

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