keeper

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TxIndexCoordinator txtypes.TxIndex = 0
	TxIndexParticipant txtypes.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.Marshaler,
	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 txtypes.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 txtypes.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 txtypes.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