types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: LGPL-3.0 Imports: 9 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 (
	DefaultEnableRevenue   = true
	DefaultDeveloperShares = sdk.NewDecWithPrec(50, 2) // 50%
	// DefaultAddrDerivationCostCreate Cost for executing `crypto.CreateAddress` must be at least 36 gas for the
	// contained keccak256(word) operation
	DefaultAddrDerivationCostCreate = uint64(50)
)

Parameter store key

View Source
var (
	ParamsKey                             = []byte("Params")
	ParamStoreKeyEnableRevenue            = []byte("EnableRevenue")
	ParamStoreKeyDeveloperShares          = []byte("DeveloperShares")
	ParamStoreKeyAddrDerivationCostCreate = []byte("AddrDerivationCostCreate")
)

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable returns the parameter key table.

Types

type V2GenesisState

type V2GenesisState struct {
	// V2Params are the revenue module parameters
	V2Params V2Params `protobuf:"bytes,1,opt,name=V2Params,proto3" json:"V2Params"`
	// revenues is a slice of active registered contracts for fee distribution
	Revenues []types.Revenue `protobuf:"bytes,2,rep,name=revenues,proto3" json:"revenues"`
}

V2GenesisState defines the module's genesis state.

func (*V2GenesisState) Descriptor

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

func (*V2GenesisState) GetRevenues

func (m *V2GenesisState) GetRevenues() []types.Revenue

func (*V2GenesisState) GetV2Params

func (m *V2GenesisState) GetV2Params() V2Params

func (*V2GenesisState) Marshal

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

func (*V2GenesisState) MarshalTo

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

func (*V2GenesisState) MarshalToSizedBuffer

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

func (*V2GenesisState) ProtoMessage

func (*V2GenesisState) ProtoMessage()

func (*V2GenesisState) Reset

func (m *V2GenesisState) Reset()

func (*V2GenesisState) Size

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

func (*V2GenesisState) String

func (m *V2GenesisState) String() string

func (*V2GenesisState) Unmarshal

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

func (*V2GenesisState) XXX_DiscardUnknown

func (m *V2GenesisState) XXX_DiscardUnknown()

func (*V2GenesisState) XXX_Marshal

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

func (*V2GenesisState) XXX_Merge

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

func (*V2GenesisState) XXX_Size

func (m *V2GenesisState) XXX_Size() int

func (*V2GenesisState) XXX_Unmarshal

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

type V2Params

type V2Params struct {
	// enable_revenue defines a parameter to enable the revenue module
	EnableRevenue bool `protobuf:"varint,1,opt,name=enable_revenue,json=enableRevenue,proto3" json:"enable_revenue,omitempty"`
	// developer_shares defines the proportion of the transaction fees to be
	// distributed to the registered contract owner
	DeveloperShares github_com_cosmos_cosmos_sdk_types.Dec `` /* 146-byte string literal not displayed */
	// addr_derivation_cost_create defines the cost of address derivation for
	// verifying the contract deployer at fee registration
	AddrDerivationCostCreate uint64 `` /* 138-byte string literal not displayed */
}

V2Params defines the revenue module V2Params

func DefaultParams

func DefaultParams() V2Params

func NewParams

func NewParams(
	enableRevenue bool,
	developerShares sdk.Dec,
	addrDerivationCostCreate uint64,
) V2Params

NewParams creates a new Params object

func (*V2Params) Descriptor

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

func (*V2Params) GetAddrDerivationCostCreate

func (m *V2Params) GetAddrDerivationCostCreate() uint64

func (*V2Params) GetEnableRevenue

func (m *V2Params) GetEnableRevenue() bool

func (*V2Params) Marshal

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

func (*V2Params) MarshalTo

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

func (*V2Params) MarshalToSizedBuffer

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

func (*V2Params) ParamSetPairs

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

ParamSetPairs returns the parameter set pairs.

func (*V2Params) ProtoMessage

func (*V2Params) ProtoMessage()

func (*V2Params) Reset

func (m *V2Params) Reset()

func (*V2Params) Size

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

func (*V2Params) String

func (m *V2Params) String() string

func (*V2Params) Unmarshal

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

func (V2Params) Validate

func (p V2Params) Validate() error

func (*V2Params) XXX_DiscardUnknown

func (m *V2Params) XXX_DiscardUnknown()

func (*V2Params) XXX_Marshal

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

func (*V2Params) XXX_Merge

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

func (*V2Params) XXX_Size

func (m *V2Params) XXX_Size() int

func (*V2Params) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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