keeper

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TxIndexCoordinator crosstypes.TxIndex = 0
	TxIndexParticipant crosstypes.TxIndex = 1
)
View Source
const (
	TypeName = "simple"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	cm txtypes.ContractManager,
	xccResolver xcctypes.XCCResolver,
	baseKeeper basekeeper.Keeper,
) Keeper

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) ReceiveCallAcknowledgement

func (k Keeper) ReceiveCallAcknowledgement(
	ctx sdk.Context,
	sourcePort string,
	sourceChannel string,
	ack types.PacketAcknowledgementCall,
	txID crosstypes.TxID,
) (isCommittable bool, err error)

ReceiveCallAcknowledgement receives PacketAcknowledgementCall to updates CoordinatorState caller is coordinator

func (Keeper) ReceiveCallPacket

func (k Keeper) ReceiveCallPacket(
	ctx sdk.Context,
	destPort,
	destChannel string,
	data types.PacketDataCall,
) (*txtypes.ContractCallResult, *types.PacketAcknowledgementCall, error)

ReceiveCallPacket receives a PacketDataCall to commit a transaction caller is participant

func (Keeper) SendCall

func (k Keeper) SendCall(
	ctx sdk.Context,
	packetSender packets.PacketSender,
	txID crosstypes.TxID,
	transactions []txtypes.ResolvedContractTransaction,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
) error

SendCall starts a simple commit flow caller is Coordinator

func (Keeper) TryCommit

func (k Keeper) TryCommit(
	ctx sdk.Context,
	txID crosstypes.TxID,
	isCommittable bool,
) (*txtypes.ContractCallResult, error)

TryCommit try to commit or abort a transaction caller is coordinator

Jump to

Keyboard shortcuts

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