common

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeStoreTransactionID

func MakeStoreTransactionID(txID types.TxID, txIndex uint8) []byte

func MakeTxID

func MakeTxID(ctx sdk.Context, msg types.MsgInitiate) types.TxID

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc *codec.Codec,
	storeKey sdk.StoreKey,
	channelKeeper types.ChannelKeeper,
	portKeeper types.PortKeeper,
	scopedKeeper capability.ScopedKeeper,
	resolverProvider types.ObjectResolverProvider,
	channelResolver types.ChannelResolver,
) Keeper

func (Keeper) AbortTransaction

func (k Keeper) AbortTransaction(
	ctx sdk.Context,
	contractHandler types.ContractHandler,
	txID types.TxID,
	txIndex types.TxIndex,
	txInfo *types.TxInfo,
) error

func (Keeper) ChannelKeeper

func (k Keeper) ChannelKeeper() types.ChannelKeeper

func (Keeper) ChannelResolver

func (k Keeper) ChannelResolver() types.ChannelResolver

func (Keeper) CommitImmediatelyTransaction

func (k Keeper) CommitImmediatelyTransaction(
	ctx sdk.Context,
	contractHandler types.ContractHandler,
	txID types.TxID,
	txIndex types.TxIndex,
	tx types.ContractTransaction,
	links []types.Object,
) error

func (Keeper) CommitTransaction

func (k Keeper) CommitTransaction(
	ctx sdk.Context,
	contractHandler types.ContractHandler,
	txID types.TxID,
	txIndex types.TxIndex,
	txInfo *types.TxInfo,
) (types.ContractHandlerResult, error)

func (Keeper) EnsureCoordinatorStatus

func (k Keeper) EnsureCoordinatorStatus(ctx sdk.Context, txID types.TxID, status uint8) (*types.CoordinatorInfo, error)

func (Keeper) EnsureTxStatus

func (k Keeper) EnsureTxStatus(ctx sdk.Context, txID types.TxID, txIndex types.TxIndex, status uint8) (*types.TxInfo, error)

func (Keeper) GetContractResult

func (k Keeper) GetContractResult(ctx sdk.Context, txID types.TxID, txIndex types.TxIndex) (types.ContractHandlerResult, bool)

func (Keeper) GetCoordinator

func (k Keeper) GetCoordinator(ctx sdk.Context, txID types.TxID) (*types.CoordinatorInfo, bool)

func (Keeper) GetTx

func (k Keeper) GetTx(ctx sdk.Context, txID types.TxID, txIndex types.TxIndex) (*types.TxInfo, bool)

func (Keeper) IterateUnacknowledgedPackets

func (k Keeper) IterateUnacknowledgedPackets(ctx sdk.Context, cb func(key []byte) bool)

func (Keeper) PacketExecuted

func (k Keeper) PacketExecuted(ctx sdk.Context, packet channelexported.PacketI, acknowledgement []byte) error

PacketExecuted defines a wrapper function for the channel Keeper's function in order to expose it to the cross handler. Keeper retreives channel capability and passes it into channel keeper for authentication

func (Keeper) PortKeeper

func (k Keeper) PortKeeper() types.PortKeeper

func (Keeper) PrepareTransaction

func (k Keeper) PrepareTransaction(
	ctx sdk.Context,
	contractHandler types.ContractHandler,
	txID types.TxID,
	txIndex types.TxIndex,
	tx types.ContractTransaction,
	links []types.Object,
) error

func (Keeper) RemoveContractResult

func (k Keeper) RemoveContractResult(ctx sdk.Context, txID types.TxID, txIndex types.TxIndex)

func (Keeper) RemoveUnacknowledgedPacket

func (k Keeper) RemoveUnacknowledgedPacket(ctx sdk.Context, sourcePort, sourceChannel string, seq uint64)

func (Keeper) ScopedKeeper

func (k Keeper) ScopedKeeper() capability.ScopedKeeper

func (Keeper) SendPacket

func (k Keeper) SendPacket(
	ctx sdk.Context,
	packetSender types.PacketSender,
	payload types.PacketDataPayload,
	sourcePort,
	sourceChannel,
	destinationPort,
	destinationChannel string,
	timeoutHeight uint64,
	timeoutTimestamp uint64,
) error

func (Keeper) SetContractResult

func (k Keeper) SetContractResult(ctx sdk.Context, txID types.TxID, txIndex types.TxIndex, result types.ContractHandlerResult)

func (Keeper) SetCoordinator

func (k Keeper) SetCoordinator(ctx sdk.Context, txID types.TxID, ci types.CoordinatorInfo)

func (Keeper) SetTx

func (k Keeper) SetTx(ctx sdk.Context, txID types.TxID, txIndex types.TxIndex, tx types.TxInfo)

func (Keeper) SetUnacknowledgedPacket

func (k Keeper) SetUnacknowledgedPacket(ctx sdk.Context, sourcePort, sourceChannel string, seq uint64)

func (Keeper) UpdateCoordinatorStatus

func (k Keeper) UpdateCoordinatorStatus(ctx sdk.Context, txID types.TxID, status uint8) error

func (Keeper) UpdateTxStatus

func (k Keeper) UpdateTxStatus(ctx sdk.Context, txID types.TxID, txIndex types.TxIndex, status uint8) error

Jump to

Keyboard shortcuts

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