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: 13 Imported by: 0

Documentation

Index

Constants

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

Variables

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")
)
View Source
var (
	// ModuleCdc references the global x/ibc-transfer module codec. Note, the codec
	// should ONLY be used in certain instances of tests and for JSON encoding.
	//
	// The actual codec used for serialization should be provided to x/ibc-transfer and
	// defined at the application level.
	ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
)

Functions

func ContextWithLockManager

func ContextWithLockManager(ctx context.Context, lkmgr LockManager) context.Context

func DefaultContractHandleDecorators

func DefaultContractHandleDecorators() contracttypes.ContractHandleDecorator

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register the ibc transfer module interfaces to protobuf Any.

Types

type CommitKVStoreI

type CommitKVStoreI interface {
	KVStoreI
	contracttypes.CommitStoreI
}

CommitKVStoreI defines the expected key-value commit store

type KVStoreI

type KVStoreI interface {
	Prefix(prefix []byte) KVStoreI
	KVStore(ctx sdk.Context) sdk.KVStore

	Set(ctx sdk.Context, key, value []byte)
	Get(ctx sdk.Context, key []byte) []byte
	Has(ctx sdk.Context, key []byte) bool
	Delete(ctx sdk.Context, key []byte)
}

KVStoreI defines the expected key-value store

type LockManager

type LockManager interface {
	AddWrite(key, value []byte) error
	GetUpdatedValue(key []byte) ([]byte, bool)
	LockOPs() LockOPs
}

func LockManagerFromContext

func LockManagerFromContext(ctx context.Context) LockManager

func NewLockManager

func NewLockManager() LockManager

NewLockManager returns a LockManager instance

type LockOP

type LockOP struct {
	K []byte `protobuf:"bytes,1,opt,name=k,proto3" json:"k,omitempty"`
	V []byte `protobuf:"bytes,2,opt,name=v,proto3" json:"v,omitempty"`
}

func (LockOP) ApplyTo

func (lo LockOP) ApplyTo(kvs sdk.KVStore)

func (*LockOP) Descriptor

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

func (LockOP) Key

func (lo LockOP) Key() []byte

func (*LockOP) Marshal

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

func (*LockOP) MarshalTo

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

func (*LockOP) MarshalToSizedBuffer

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

func (*LockOP) ProtoMessage

func (*LockOP) ProtoMessage()

func (*LockOP) Reset

func (m *LockOP) Reset()

func (*LockOP) Size

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

func (*LockOP) String

func (m *LockOP) String() string

func (*LockOP) Unmarshal

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

func (LockOP) Value

func (lo LockOP) Value() []byte

func (*LockOP) XXX_DiscardUnknown

func (m *LockOP) XXX_DiscardUnknown()

func (*LockOP) XXX_Marshal

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

func (*LockOP) XXX_Merge

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

func (*LockOP) XXX_Size

func (m *LockOP) XXX_Size() int

func (*LockOP) XXX_Unmarshal

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

type LockOPs

type LockOPs struct {
	Ops []LockOP `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops"`
}

func (*LockOPs) Descriptor

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

func (*LockOPs) Marshal

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

func (*LockOPs) MarshalTo

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

func (*LockOPs) MarshalToSizedBuffer

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

func (*LockOPs) ProtoMessage

func (*LockOPs) ProtoMessage()

func (*LockOPs) Reset

func (m *LockOPs) Reset()

func (*LockOPs) Size

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

func (*LockOPs) String

func (m *LockOPs) String() string

func (*LockOPs) Unmarshal

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

func (*LockOPs) XXX_DiscardUnknown

func (m *LockOPs) XXX_DiscardUnknown()

func (*LockOPs) XXX_Marshal

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

func (*LockOPs) XXX_Merge

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

func (*LockOPs) XXX_Size

func (m *LockOPs) XXX_Size() int

func (*LockOPs) XXX_Unmarshal

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

type SetUpContractHandleDecorator

type SetUpContractHandleDecorator struct{}

func (SetUpContractHandleDecorator) Handle

Jump to

Keyboard shortcuts

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