types

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: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "cross"

	// Version defines the current version the Cross
	// module supports
	Version = "cross-1"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// PortID defines the portID of this module
	PortID = "cross"
)

Variables

View Source
var (
	ErrInvalidVersion         = sdkerrors.Register(ModuleName, 1100, "invalid cross module version")
	ErrInvalidAcknowledgement = sdkerrors.Register(ModuleName, 1101, "invalid acknowledgement")
	ErrAcknowledgementExists  = sdkerrors.Register(ModuleName, 1102, "acknowledgement for packet already exists")
)

cross module sentinel errors

View Source
var (
	InitiatorKeyPrefix     = []byte("initiator")
	AuthKeyPrefix          = []byte("auth")
	AtomicKeyPrefix        = []byte("atomic")
	ContractManagerPrefix  = []byte("cmanager")
	ContractStoreKeyPrefix = []byte("cstore")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Acknowledgement added in v0.0.9

type Acknowledgement struct {
	IsSuccess bool   `protobuf:"varint,1,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"`
	Result    []byte `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
}

func NewAcknowledgement added in v0.0.9

func NewAcknowledgement(success bool, result []byte) *Acknowledgement

func UnmarshalAcknowledgement added in v0.0.9

func UnmarshalAcknowledgement(bz []byte) (*Acknowledgement, error)

func (Acknowledgement) Acknowledgement added in v0.1.0

func (ack Acknowledgement) Acknowledgement() []byte

func (*Acknowledgement) Descriptor added in v0.0.9

func (*Acknowledgement) Descriptor() ([]byte, []int)

func (*Acknowledgement) Marshal added in v0.0.9

func (m *Acknowledgement) Marshal() (dAtA []byte, err error)

func (*Acknowledgement) MarshalTo added in v0.0.9

func (m *Acknowledgement) MarshalTo(dAtA []byte) (int, error)

func (*Acknowledgement) MarshalToSizedBuffer added in v0.0.9

func (m *Acknowledgement) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Acknowledgement) ProtoMessage added in v0.0.9

func (*Acknowledgement) ProtoMessage()

func (*Acknowledgement) Reset added in v0.0.9

func (m *Acknowledgement) Reset()

func (*Acknowledgement) Size added in v0.0.9

func (m *Acknowledgement) Size() (n int)

func (*Acknowledgement) String added in v0.0.9

func (m *Acknowledgement) String() string

func (Acknowledgement) Success added in v0.0.9

func (ack Acknowledgement) Success() bool

func (*Acknowledgement) Unmarshal added in v0.0.9

func (m *Acknowledgement) Unmarshal(dAtA []byte) error

func (*Acknowledgement) XXX_DiscardUnknown added in v0.0.9

func (m *Acknowledgement) XXX_DiscardUnknown()

func (*Acknowledgement) XXX_Marshal added in v0.0.9

func (m *Acknowledgement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Acknowledgement) XXX_Merge added in v0.0.9

func (m *Acknowledgement) XXX_Merge(src proto.Message)

func (*Acknowledgement) XXX_Size added in v0.0.9

func (m *Acknowledgement) XXX_Size() int

func (*Acknowledgement) XXX_Unmarshal added in v0.0.9

func (m *Acknowledgement) XXX_Unmarshal(b []byte) error

type ChannelKeeper

type ChannelKeeper interface {
	GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool)
	GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool)
	SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error
	ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capabilitytypes.Capability) error
}

ChannelKeeper defines the expected IBC channel keeper

type ClientKeeper

type ClientKeeper interface {
	GetClientConsensusState(ctx sdk.Context, clientID string) (connection ibcexported.ConsensusState, found bool)
}

ClientKeeper defines the expected IBC client keeper

type ConnectionKeeper

type ConnectionKeeper interface {
	GetConnection(ctx sdk.Context, connectionID string) (connection connectiontypes.ConnectionEnd, found bool)
}

ConnectionKeeper defines the expected IBC connection keeper

type GenesisState

type GenesisState struct {
}

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns a GenesisState instance

func NewGenesisState

func NewGenesisState() *GenesisState

NewGenesisState creates a new cross module GenesisState instance.

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type PortKeeper

type PortKeeper interface {
	BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability
}

PortKeeper defines the expected IBC port keeper

type PrefixStoreKey

type PrefixStoreKey struct {
	StoreKey sdk.StoreKey
	Prefix   []byte
}

func NewPrefixStoreKey

func NewPrefixStoreKey(storeKey sdk.StoreKey, prefix []byte) *PrefixStoreKey

func (*PrefixStoreKey) Name

func (sk *PrefixStoreKey) Name() string

func (*PrefixStoreKey) String

func (sk *PrefixStoreKey) String() string

type TxID added in v0.2.0

type TxID = []byte

TxID represents a ID of transaction. This value must be unique in a chain

type TxIndex added in v0.2.0

type TxIndex = uint32

TxIndex represents an index of an array of contract transactions

Jump to

Keyboard shortcuts

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