types

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "lockup"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName
)
View Source
const RootCodespace = "lockup"

Variables

View Source
var (
	// ErrLocked the chain is "locked up" and the transaction has been blocked
	// because it was sent from an address which is not exempt
	ErrLocked = sdkerrors.Register(RootCodespace, 1, "chain locked")
	// ErrUnhandled the message type to be locked does not yet have logic
	// specified for how to check it should be blocked
	ErrUnhandled = sdkerrors.Register(RootCodespace, 2, "unhandled")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// LockedKey Indexes the Locked boolean, indicating that the lockup module is active or inactive
	// In other words Locked -> The chain is "locked up"
	LockedKey = []byte("locked")

	// LockExemptKey Indexes the LockExempt addresses, who will be able to initiate transactions even
	// when the chain is locked
	LockExemptKey = []byte("lockExempt")

	// LockedMessageTypesKey Indexes the LockedMessageTypes array, the collection of messages which
	// will be blocked when the chain is locked up and not sent from a LockExempt address
	LockedMessageTypesKey = []byte("lockedMessageTypes")

	// LockedTokenDenomsKey Indexes the LockedTokenDenoms array, the collection of tokens which
	// will be blocked when the chain is locked up and not sent from a LockExempt address
	LockedTokenDenomsKey = []byte("lockedTokenDenoms")
)

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable for auth module

func ValidateLockExempt

func ValidateLockExempt(i interface{}) error

func ValidateLocked

func ValidateLocked(i interface{}) error

func ValidateLockedMessageTypes

func ValidateLockedMessageTypes(i interface{}) error

func ValidateLockedTokenDenoms

func ValidateLockedTokenDenoms(i interface{}) error

Types

type GenesisState

type GenesisState struct {
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState creates a simple GenesisState suitible for testing

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() *Params

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) ValidateBasic

func (s GenesisState) ValidateBasic() error

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 Params

type Params struct {
	// The lockup module is engaged if locked is true (chain is "locked up")
	Locked bool `protobuf:"varint,1,opt,name=locked,proto3" json:"locked,omitempty"`
	// Addresses not affected by the lockup module
	LockExempt []string `protobuf:"bytes,2,rep,name=lock_exempt,json=lockExempt,proto3" json:"lock_exempt,omitempty"`
	// Messages with one of these types are blocked when the chain is locked up
	// and not sent from a lock_exempt address
	LockedMessageTypes []string `protobuf:"bytes,3,rep,name=locked_message_types,json=lockedMessageTypes,proto3" json:"locked_message_types,omitempty"`
	// These tokens will be the only ones blocked while the chain is locked
	LockedTokenDenoms []string `protobuf:"bytes,4,rep,name=locked_token_denoms,json=lockedTokenDenoms,proto3" json:"locked_token_denoms,omitempty"`
}

Params struct

func DefaultParams

func DefaultParams() *Params

func (*Params) Descriptor

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

func (*Params) GetLockExempt

func (m *Params) GetLockExempt() []string

func (*Params) GetLocked

func (m *Params) GetLocked() bool

func (*Params) GetLockedMessageTypes

func (m *Params) GetLockedMessageTypes() []string

func (*Params) GetLockedTokenDenoms

func (m *Params) GetLockedTokenDenoms() []string

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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