types

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeConvertTransfer  = "converted_transfer"
	EventTypeConvertReceived  = "converted_received_packet"
	EventTypeConvertRefund    = "converted_refund"
	AttributeKeySentAmount    = "sent_amount"
	AttributeKeySentDenom     = "sent_denom"
	AttributeKeyPacketAmount  = "packet_amount"
	AttributeKeyPacketDenom   = "packet_denom"
	AttributeKeyConvertAmount = "converted_amount"
	AttributeKeyConvertDenom  = "converted_denom"
)
View Source
const (
	// Module name used for custom module account, events and registered errors.
	ModuleName = "scibctransfer"
	// Use a different version here for escrow address generation
	Version = "ics20-sc.1"
)

Variables

View Source
var (
	ErrConvertingToUnitDenom         = sdkerrors.Register(ModuleName, 1, "error converting to unit denom")
	ErrConvertingToCounterpartyDenom = sdkerrors.Register(ModuleName, 2, "error converting to counterparty denom")
	ErrAmountTooLowToConvert         = sdkerrors.Register(ModuleName, 3, "amount too low to convert to counterparty denom")
	ErrAmountTooLargeToSend          = sdkerrors.Register(ModuleName, 4, "amount too large to transfer")
)

Functions

func GetEscrowAddress

func GetEscrowAddress(portID, channelID string) sdk.AccAddress

GetEscrowAddress returns the escrow address for the specified channel. The escrow address follows the format as outlined in ADR 028: https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-028-public-key-addresses.md

Types

type BankKeeper

type BankKeeper interface {
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

type MsgServer

type MsgServer interface {
	// Transfer defines a rpc handler method for MsgTransfer.
	Transfer(context.Context, *transfertypes.MsgTransfer) (*transfertypes.MsgTransferResponse, error)
}

type SDKTransferKeeper

type SDKTransferKeeper interface {
	OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data transfertypes.FungibleTokenPacketData) error
	OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, data transfertypes.FungibleTokenPacketData, ack channeltypes.Acknowledgement) error
	OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, data transfertypes.FungibleTokenPacketData) error
}

Directories

Path Synopsis
Package scibctransfermocks is a generated GoMock package.
Package scibctransfermocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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