types

package
v12.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: LGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 (
	// DefaultClaimsDenom is aserv
	DefaultClaimsDenom = utils.BaseDenom
	// DefaultDurationUntilDecay is 1 month = 30.4375 days
	DefaultDurationUntilDecay = 2629800 * time.Second
	// DefaultDurationOfDecay is 2 months
	DefaultDurationOfDecay = 2 * DefaultDurationUntilDecay
	// DefaultAuthorizedChannels  defines the list of default IBC authorized channels that can perform
	// IBC address attestations in order to migrate claimable amounts. By default
	// only Osmosis and Cosmos Hub channels are authorized
	DefaultAuthorizedChannels = []string{
		"channel-0",
		"channel-3",
	}
	DefaultEVMChannels = []string{
		"channel-2",
	}
	DefaultEnableClaims     = true
	DefaultAirdropStartTime = time.Time{}
)
View Source
var (
	ParamsKey                       = []byte("Params")
	ParamStoreKeyEnableClaims       = []byte("EnableClaims")
	ParamStoreKeyAirdropStartTime   = []byte("AirdropStartTime")
	ParamStoreKeyDurationUntilDecay = []byte("DurationUntilDecay")
	ParamStoreKeyDurationOfDecay    = []byte("DurationOfDecay")
	ParamStoreKeyClaimsDenom        = []byte("ClaimsDenom")
	ParamStoreKeyAuthorizedChannels = []byte("AuthorizedChannels")
	ParamStoreKeyEVMChannels        = []byte("EVMChannels")
)

Parameter store key

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable returns the parameter key table.

func ValidateChannels

func ValidateChannels(i interface{}) error

ValidateChannels checks if channels ids are valid

Types

type V3GenesisState

type V3GenesisState struct {
	// V3Params defines all the parameters of the module.
	V3Params V3Params `protobuf:"bytes,1,opt,name=V3Params,proto3" json:"V3Params"`
	// claims_records is a list of claim records with the corresponding airdrop recipient
	ClaimsRecords []types.ClaimsRecordAddress `protobuf:"bytes,2,rep,name=claims_records,json=claimsRecords,proto3" json:"claims_records"`
}

V3GenesisState define the claims module's genesis state.

func (*V3GenesisState) Descriptor

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

func (*V3GenesisState) GetClaimsRecords

func (m *V3GenesisState) GetClaimsRecords() []types.ClaimsRecordAddress

func (*V3GenesisState) GetV3Params

func (m *V3GenesisState) GetV3Params() V3Params

func (*V3GenesisState) Marshal

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

func (*V3GenesisState) MarshalTo

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

func (*V3GenesisState) MarshalToSizedBuffer

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

func (*V3GenesisState) ProtoMessage

func (*V3GenesisState) ProtoMessage()

func (*V3GenesisState) Reset

func (m *V3GenesisState) Reset()

func (*V3GenesisState) Size

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

func (*V3GenesisState) String

func (m *V3GenesisState) String() string

func (*V3GenesisState) Unmarshal

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

func (*V3GenesisState) XXX_DiscardUnknown

func (m *V3GenesisState) XXX_DiscardUnknown()

func (*V3GenesisState) XXX_Marshal

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

func (*V3GenesisState) XXX_Merge

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

func (*V3GenesisState) XXX_Size

func (m *V3GenesisState) XXX_Size() int

func (*V3GenesisState) XXX_Unmarshal

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

type V3Params

type V3Params struct {
	// enable_claims is the parameter to enable the claiming process
	EnableClaims bool `protobuf:"varint,1,opt,name=enable_claims,json=enableClaims,proto3" json:"enable_claims,omitempty"`
	// airdrop_start_time defines the timestamp of the airdrop start
	AirdropStartTime time.Time `protobuf:"bytes,2,opt,name=airdrop_start_time,json=airdropStartTime,proto3,stdtime" json:"airdrop_start_time"`
	// duration_until_decay of claimable tokens begin
	DurationUntilDecay time.Duration `protobuf:"bytes,3,opt,name=duration_until_decay,json=durationUntilDecay,proto3,stdduration" json:"duration_until_decay"`
	// duration_of_decay for token claim decay period
	DurationOfDecay time.Duration `protobuf:"bytes,4,opt,name=duration_of_decay,json=durationOfDecay,proto3,stdduration" json:"duration_of_decay"`
	// claims_denom is the denomination of the claimable coin
	ClaimsDenom string `protobuf:"bytes,5,opt,name=claims_denom,json=claimsDenom,proto3" json:"claims_denom,omitempty"`
	// authorized_channels is the list of authorized channel identifiers that can perform address
	// attestations via IBC.
	AuthorizedChannels []string `protobuf:"bytes,6,rep,name=authorized_channels,json=authorizedChannels,proto3" json:"authorized_channels,omitempty"`
	// evm_channels is the list of channel identifiers from EVM compatible chains
	EVMChannels []string `protobuf:"bytes,7,rep,name=evm_channels,json=evmChannels,proto3" json:"evm_channels,omitempty"`
}

V3Params defines the claims module's parameters.

func DefaultParams

func DefaultParams() V3Params

DefaultParams creates a parameter instance with default values for the claims module.

func NewParams

func NewParams(
	enableClaim bool,
	claimsDenom string,
	airdropStartTime time.Time,
	durationUntilDecay,
	durationOfDecay time.Duration,
	authorizedChannels,
	evmChannels []string,
) V3Params

NewParams creates a new Params object

func (V3Params) AirdropEndTime

func (p V3Params) AirdropEndTime() time.Time

AirdropEndTime returns the time at which no further claims will be processed.

func (V3Params) DecayStartTime

func (p V3Params) DecayStartTime() time.Time

DecayStartTime returns the time at which the Decay period starts

func (*V3Params) Descriptor

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

func (*V3Params) GetAirdropStartTime

func (m *V3Params) GetAirdropStartTime() time.Time

func (*V3Params) GetAuthorizedChannels

func (m *V3Params) GetAuthorizedChannels() []string

func (*V3Params) GetClaimsDenom

func (m *V3Params) GetClaimsDenom() string

func (*V3Params) GetDurationOfDecay

func (m *V3Params) GetDurationOfDecay() time.Duration

func (*V3Params) GetDurationUntilDecay

func (m *V3Params) GetDurationUntilDecay() time.Duration

func (*V3Params) GetEVMChannels

func (m *V3Params) GetEVMChannels() []string

func (*V3Params) GetEnableClaims

func (m *V3Params) GetEnableClaims() bool

func (V3Params) IsAuthorizedChannel

func (p V3Params) IsAuthorizedChannel(channel string) bool

IsAuthorizedChannel returns true if the channel provided is in the list of authorized channels

func (V3Params) IsClaimsActive

func (p V3Params) IsClaimsActive(blockTime time.Time) bool

IsClaimsActive returns true if the claiming process is active: - claims are enabled AND - block time is equal or after the airdrop start time AND - block time is before or equal the airdrop end time

func (V3Params) IsEVMChannel

func (p V3Params) IsEVMChannel(channel string) bool

IsEVMChannel returns true if the channel provided is in the list of EVM channels

func (*V3Params) Marshal

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

func (*V3Params) MarshalTo

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

func (*V3Params) MarshalToSizedBuffer

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

func (*V3Params) ParamSetPairs

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

ParamSetPairs returns the parameter set pairs.

func (*V3Params) ProtoMessage

func (*V3Params) ProtoMessage()

func (*V3Params) Reset

func (m *V3Params) Reset()

func (*V3Params) Size

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

func (*V3Params) String

func (m *V3Params) String() string

func (*V3Params) Unmarshal

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

func (V3Params) Validate

func (p V3Params) Validate() error

func (*V3Params) XXX_DiscardUnknown

func (m *V3Params) XXX_DiscardUnknown()

func (*V3Params) XXX_Marshal

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

func (*V3Params) XXX_Merge

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

func (*V3Params) XXX_Size

func (m *V3Params) XXX_Size() int

func (*V3Params) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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