types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeRegisterRewardshare      = "register_rewardshare"
	EventTypeCancelRewardshare        = "cancel_rewardshare"
	EventTypeUpdateRewardshare        = "update_rewardshare"
	EventTypeDistributeDevRewardshare = "distribute_dev_rewardshare"

	AttributeKeyContract          = "contract"
	AttributeKeyWithdrawerAddress = "withdrawer_address"
)

rewardshare events

View Source
const (
	// module name
	ModuleName = "rewardshare"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey to be used for message routing
	RouterKey = ModuleName
)

constants

View Source
const (
	TypeMsgRegisterRewardshare = "register_rewardshare"
	TypeMsgCancelRewardshare   = "cancel_rewardshare"
	TypeMsgUpdateRewardshare   = "update_rewardshare"
)

Variables

View Source
var (

	// ModuleCdc references the global erc20 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 modules/erc20 and
	// defined at the application level.
	ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())

	// AminoCdc is a amino codec created to support amino JSON compatible msgs.
	AminoCdc = codec.NewAminoCodec(amino)
)
View Source
var (
	ErrInternalRewardshare              = sdkerrors.Register(ModuleName, 2, "internal rewardshare error")
	ErrRewardshareDisabled              = sdkerrors.Register(ModuleName, 3, "rewardshare module is disabled by governance")
	ErrRewardshareAlreadyRegistered     = sdkerrors.Register(ModuleName, 4, "rewardshare already exists for given contract")
	ErrRewardshareNoContractDeployed    = sdkerrors.Register(ModuleName, 5, "no contract deployed")
	ErrRewardshareContractNotRegistered = sdkerrors.Register(ModuleName, 6, "no rewardshare registered for contract")
	ErrRewardshareDeployerIsNotEOA      = sdkerrors.Register(ModuleName, 7, "no rewardshare registered for contract")
)

errors

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 (
	KeyPrefixRewardshare = []byte{prefixRewardshare}
	KeyPrefixDeployer    = []byte{prefixDeployer}
	KeyPrefixWithdrawer  = []byte{prefixWithdrawer}
)

KVStore key prefixes

View Source
var (
	DefaultEnableRewardshare = true
	DefaultDeveloperShares   = sdk.NewDecWithPrec(50, 2) // 50%
	// Cost for executing `crypto.CreateAddress` must be at least 36 gas for the
	// contained keccak256(word) operation
	DefaultAddrDerivationCostCreate = uint64(50)

	ParamStoreKeyEnableRewardshare        = []byte("EnableRewardshare")
	ParamStoreKeyDeveloperShares          = []byte("DeveloperShares")
	ParamStoreKeyAddrDerivationCostCreate = []byte("AddrDerivationCostCreate")
)

Parameter store key

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthRewardshare        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRewardshare          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRewardshare = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

func GetKeyPrefixDeployer

func GetKeyPrefixDeployer(deployerAddress sdk.AccAddress) []byte

GetKeyPrefixDeployer returns the KVStore key prefix for storing registered rewardshare contract for a deployer

func GetKeyPrefixWithdrawer

func GetKeyPrefixWithdrawer(withdrawerAddress sdk.AccAddress) []byte

GetKeyPrefixWithdrawer returns the KVStore key prefix for storing registered rewardshare contract for a withdrawer

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable returns the parameter key table.

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register implementations

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/rewardshare interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization and EIP-712 compatibility.

func RegisterMsgHandler

func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMsgHandlerClient

func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error

RegisterMsgHandlerClient registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgClient" to call the correct interceptors.

func RegisterMsgHandlerFromEndpoint

func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(moduleName string) sdk.AccAddress
}

AccountKeeper defines the expected interface needed to retrieve account info.

type BankKeeper

type BankKeeper interface {
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface needed to retrieve account balances.

type EVMKeeper

type EVMKeeper interface {
	EVMConfig(ctx sdk.Context, proposerAddress sdk.ConsAddress) (*evmtypes.EVMConfig, error)
	GetParams(ctx sdk.Context) evmtypes.Params
	GetAccountWithoutBalance(ctx sdk.Context, addr common.Address) *statedb.Account
}

EVMKeeper defines the expected EVM keeper interface used on erc20

type GenesisState

type GenesisState struct {
	// module parameters
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// active registered contracts for fee distribution
	Rewardshares []Rewardshare `protobuf:"bytes,2,rep,name=rewardshares,proto3" json:"rewardshares"`
}

GenesisState defines the module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState sets default evm genesis state with empty accounts and default params and chain config values.

func NewGenesisState

func NewGenesisState(params Params, rewardshares []Rewardshare) GenesisState

NewGenesisState creates a new genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetRewardshares

func (m *GenesisState) GetRewardshares() []Rewardshare

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 MsgCancelRewardshare

type MsgCancelRewardshare struct {
	// contract hex address
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// deployer bech32 address
	DeployerAddress string `protobuf:"bytes,2,opt,name=deployer_address,json=deployerAddress,proto3" json:"deployer_address,omitempty"`
}

MsgCancelRewardshare defines a message that cancels a registered Rewardshare

func NewMsgCancelRewardshare

func NewMsgCancelRewardshare(
	contract common.Address,
	deployer sdk.AccAddress,
) *MsgCancelRewardshare

NewMsgCancelRewardshare creates new instance of MsgCancelRewardshare.

func (*MsgCancelRewardshare) Descriptor

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

func (*MsgCancelRewardshare) GetContractAddress

func (m *MsgCancelRewardshare) GetContractAddress() string

func (*MsgCancelRewardshare) GetDeployerAddress

func (m *MsgCancelRewardshare) GetDeployerAddress() string

func (*MsgCancelRewardshare) GetSignBytes

func (msg *MsgCancelRewardshare) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgCancelRewardshare) GetSigners

func (msg MsgCancelRewardshare) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgCancelRewardshare) Marshal

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

func (*MsgCancelRewardshare) MarshalTo

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

func (*MsgCancelRewardshare) MarshalToSizedBuffer

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

func (*MsgCancelRewardshare) ProtoMessage

func (*MsgCancelRewardshare) ProtoMessage()

func (*MsgCancelRewardshare) Reset

func (m *MsgCancelRewardshare) Reset()

func (MsgCancelRewardshare) Route

func (msg MsgCancelRewardshare) Route() string

Route returns the message route for a MsgCancelRewardshare.

func (*MsgCancelRewardshare) Size

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

func (*MsgCancelRewardshare) String

func (m *MsgCancelRewardshare) String() string

func (MsgCancelRewardshare) Type

func (msg MsgCancelRewardshare) Type() string

Type returns the message type for a MsgCancelRewardshare.

func (*MsgCancelRewardshare) Unmarshal

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

func (MsgCancelRewardshare) ValidateBasic

func (msg MsgCancelRewardshare) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgCancelRewardshare) XXX_DiscardUnknown

func (m *MsgCancelRewardshare) XXX_DiscardUnknown()

func (*MsgCancelRewardshare) XXX_Marshal

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

func (*MsgCancelRewardshare) XXX_Merge

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

func (*MsgCancelRewardshare) XXX_Size

func (m *MsgCancelRewardshare) XXX_Size() int

func (*MsgCancelRewardshare) XXX_Unmarshal

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

type MsgCancelRewardshareResponse

type MsgCancelRewardshareResponse struct {
}

MsgCancelRewardshareResponse defines the MsgCancelRewardshare response type

func (*MsgCancelRewardshareResponse) Descriptor

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

func (*MsgCancelRewardshareResponse) Marshal

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

func (*MsgCancelRewardshareResponse) MarshalTo

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

func (*MsgCancelRewardshareResponse) MarshalToSizedBuffer

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

func (*MsgCancelRewardshareResponse) ProtoMessage

func (*MsgCancelRewardshareResponse) ProtoMessage()

func (*MsgCancelRewardshareResponse) Reset

func (m *MsgCancelRewardshareResponse) Reset()

func (*MsgCancelRewardshareResponse) Size

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

func (*MsgCancelRewardshareResponse) String

func (*MsgCancelRewardshareResponse) Unmarshal

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

func (*MsgCancelRewardshareResponse) XXX_DiscardUnknown

func (m *MsgCancelRewardshareResponse) XXX_DiscardUnknown()

func (*MsgCancelRewardshareResponse) XXX_Marshal

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

func (*MsgCancelRewardshareResponse) XXX_Merge

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

func (*MsgCancelRewardshareResponse) XXX_Size

func (m *MsgCancelRewardshareResponse) XXX_Size() int

func (*MsgCancelRewardshareResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// RegisterRewardshare registers a new contract for receiving transaction fees
	RegisterRewardshare(ctx context.Context, in *MsgRegisterRewardshare, opts ...grpc.CallOption) (*MsgRegisterRewardshareResponse, error)
	// UpdateRewardshare updates the withdrawer address of a rewardshare
	UpdateRewardshare(ctx context.Context, in *MsgUpdateRewardshare, opts ...grpc.CallOption) (*MsgUpdateRewardshareResponse, error)
	// CancelRewardshare cancels a contract's fee registration and further receival
	// of transaction fees
	CancelRewardshare(ctx context.Context, in *MsgCancelRewardshare, opts ...grpc.CallOption) (*MsgCancelRewardshareResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgRegisterRewardshare

type MsgRegisterRewardshare struct {
	// contract hex address
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// bech32 address of message sender, must be the same as the origin EOA
	// sending the transaction which deploys the contract
	DeployerAddress string `protobuf:"bytes,2,opt,name=deployer_address,json=deployerAddress,proto3" json:"deployer_address,omitempty"`
	// bech32 address of account receiving the transaction fees
	WithdrawerAddress string `protobuf:"bytes,3,opt,name=withdrawer_address,json=withdrawerAddress,proto3" json:"withdrawer_address,omitempty"`
	// array of nonces from the address path, where the last nonce is the nonce
	// that determines the contract's address - it can be an EOA nonce or a
	// factory contract nonce
	Nonces []uint64 `protobuf:"varint,4,rep,packed,name=nonces,proto3" json:"nonces,omitempty"`
}

MsgRegisterRewardshare defines a message that registers a Rewardshare

func NewMsgRegisterRewardshare

func NewMsgRegisterRewardshare(
	contract common.Address,
	deployer,
	withdrawer sdk.AccAddress,
	nonces []uint64,
) *MsgRegisterRewardshare

NewMsgRegisterRewardshare creates new instance of MsgRegisterRewardshare

func (*MsgRegisterRewardshare) Descriptor

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

func (*MsgRegisterRewardshare) GetContractAddress

func (m *MsgRegisterRewardshare) GetContractAddress() string

func (*MsgRegisterRewardshare) GetDeployerAddress

func (m *MsgRegisterRewardshare) GetDeployerAddress() string

func (*MsgRegisterRewardshare) GetNonces

func (m *MsgRegisterRewardshare) GetNonces() []uint64

func (*MsgRegisterRewardshare) GetSignBytes

func (msg *MsgRegisterRewardshare) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgRegisterRewardshare) GetSigners

func (msg MsgRegisterRewardshare) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgRegisterRewardshare) GetWithdrawerAddress

func (m *MsgRegisterRewardshare) GetWithdrawerAddress() string

func (*MsgRegisterRewardshare) Marshal

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

func (*MsgRegisterRewardshare) MarshalTo

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

func (*MsgRegisterRewardshare) MarshalToSizedBuffer

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

func (*MsgRegisterRewardshare) ProtoMessage

func (*MsgRegisterRewardshare) ProtoMessage()

func (*MsgRegisterRewardshare) Reset

func (m *MsgRegisterRewardshare) Reset()

func (MsgRegisterRewardshare) Route

func (msg MsgRegisterRewardshare) Route() string

Route returns the name of the module

func (*MsgRegisterRewardshare) Size

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

func (*MsgRegisterRewardshare) String

func (m *MsgRegisterRewardshare) String() string

func (MsgRegisterRewardshare) Type

func (msg MsgRegisterRewardshare) Type() string

Type returns the the action

func (*MsgRegisterRewardshare) Unmarshal

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

func (MsgRegisterRewardshare) ValidateBasic

func (msg MsgRegisterRewardshare) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgRegisterRewardshare) XXX_DiscardUnknown

func (m *MsgRegisterRewardshare) XXX_DiscardUnknown()

func (*MsgRegisterRewardshare) XXX_Marshal

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

func (*MsgRegisterRewardshare) XXX_Merge

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

func (*MsgRegisterRewardshare) XXX_Size

func (m *MsgRegisterRewardshare) XXX_Size() int

func (*MsgRegisterRewardshare) XXX_Unmarshal

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

type MsgRegisterRewardshareResponse

type MsgRegisterRewardshareResponse struct {
}

MsgRegisterRewardshareResponse defines the MsgRegisterRewardshare response type

func (*MsgRegisterRewardshareResponse) Descriptor

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

func (*MsgRegisterRewardshareResponse) Marshal

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

func (*MsgRegisterRewardshareResponse) MarshalTo

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

func (*MsgRegisterRewardshareResponse) MarshalToSizedBuffer

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

func (*MsgRegisterRewardshareResponse) ProtoMessage

func (*MsgRegisterRewardshareResponse) ProtoMessage()

func (*MsgRegisterRewardshareResponse) Reset

func (m *MsgRegisterRewardshareResponse) Reset()

func (*MsgRegisterRewardshareResponse) Size

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

func (*MsgRegisterRewardshareResponse) String

func (*MsgRegisterRewardshareResponse) Unmarshal

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

func (*MsgRegisterRewardshareResponse) XXX_DiscardUnknown

func (m *MsgRegisterRewardshareResponse) XXX_DiscardUnknown()

func (*MsgRegisterRewardshareResponse) XXX_Marshal

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

func (*MsgRegisterRewardshareResponse) XXX_Merge

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

func (*MsgRegisterRewardshareResponse) XXX_Size

func (m *MsgRegisterRewardshareResponse) XXX_Size() int

func (*MsgRegisterRewardshareResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// RegisterRewardshare registers a new contract for receiving transaction fees
	RegisterRewardshare(context.Context, *MsgRegisterRewardshare) (*MsgRegisterRewardshareResponse, error)
	// UpdateRewardshare updates the withdrawer address of a rewardshare
	UpdateRewardshare(context.Context, *MsgUpdateRewardshare) (*MsgUpdateRewardshareResponse, error)
	// CancelRewardshare cancels a contract's fee registration and further receival
	// of transaction fees
	CancelRewardshare(context.Context, *MsgCancelRewardshare) (*MsgCancelRewardshareResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateRewardshare

type MsgUpdateRewardshare struct {
	// contract hex address
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// deployer bech32 address
	DeployerAddress string `protobuf:"bytes,2,opt,name=deployer_address,json=deployerAddress,proto3" json:"deployer_address,omitempty"`
	// new withdrawer bech32 address for receiving the transaction fees
	WithdrawerAddress string `protobuf:"bytes,3,opt,name=withdrawer_address,json=withdrawerAddress,proto3" json:"withdrawer_address,omitempty"`
}

MsgUpdateRewardshare defines a message that updates the withdrawer address for a registered Rewardshare

func NewMsgUpdateRewardshare

func NewMsgUpdateRewardshare(
	contract common.Address,
	deployer,
	withdraw sdk.AccAddress,
) *MsgUpdateRewardshare

NewMsgUpdateRewardshare creates new instance of MsgUpdateRewardshare

func (*MsgUpdateRewardshare) Descriptor

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

func (*MsgUpdateRewardshare) GetContractAddress

func (m *MsgUpdateRewardshare) GetContractAddress() string

func (*MsgUpdateRewardshare) GetDeployerAddress

func (m *MsgUpdateRewardshare) GetDeployerAddress() string

func (*MsgUpdateRewardshare) GetSignBytes

func (msg *MsgUpdateRewardshare) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgUpdateRewardshare) GetSigners

func (msg MsgUpdateRewardshare) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgUpdateRewardshare) GetWithdrawerAddress

func (m *MsgUpdateRewardshare) GetWithdrawerAddress() string

func (*MsgUpdateRewardshare) Marshal

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

func (*MsgUpdateRewardshare) MarshalTo

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

func (*MsgUpdateRewardshare) MarshalToSizedBuffer

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

func (*MsgUpdateRewardshare) ProtoMessage

func (*MsgUpdateRewardshare) ProtoMessage()

func (*MsgUpdateRewardshare) Reset

func (m *MsgUpdateRewardshare) Reset()

func (MsgUpdateRewardshare) Route

func (msg MsgUpdateRewardshare) Route() string

Route returns the name of the module

func (*MsgUpdateRewardshare) Size

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

func (*MsgUpdateRewardshare) String

func (m *MsgUpdateRewardshare) String() string

func (MsgUpdateRewardshare) Type

func (msg MsgUpdateRewardshare) Type() string

Type returns the the action

func (*MsgUpdateRewardshare) Unmarshal

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

func (MsgUpdateRewardshare) ValidateBasic

func (msg MsgUpdateRewardshare) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgUpdateRewardshare) XXX_DiscardUnknown

func (m *MsgUpdateRewardshare) XXX_DiscardUnknown()

func (*MsgUpdateRewardshare) XXX_Marshal

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

func (*MsgUpdateRewardshare) XXX_Merge

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

func (*MsgUpdateRewardshare) XXX_Size

func (m *MsgUpdateRewardshare) XXX_Size() int

func (*MsgUpdateRewardshare) XXX_Unmarshal

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

type MsgUpdateRewardshareResponse

type MsgUpdateRewardshareResponse struct {
}

MsgUpdateRewardshareResponse defines the MsgUpdateRewardshare response type

func (*MsgUpdateRewardshareResponse) Descriptor

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

func (*MsgUpdateRewardshareResponse) Marshal

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

func (*MsgUpdateRewardshareResponse) MarshalTo

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

func (*MsgUpdateRewardshareResponse) MarshalToSizedBuffer

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

func (*MsgUpdateRewardshareResponse) ProtoMessage

func (*MsgUpdateRewardshareResponse) ProtoMessage()

func (*MsgUpdateRewardshareResponse) Reset

func (m *MsgUpdateRewardshareResponse) Reset()

func (*MsgUpdateRewardshareResponse) Size

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

func (*MsgUpdateRewardshareResponse) String

func (*MsgUpdateRewardshareResponse) Unmarshal

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

func (*MsgUpdateRewardshareResponse) XXX_DiscardUnknown

func (m *MsgUpdateRewardshareResponse) XXX_DiscardUnknown()

func (*MsgUpdateRewardshareResponse) XXX_Marshal

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

func (*MsgUpdateRewardshareResponse) XXX_Merge

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

func (*MsgUpdateRewardshareResponse) XXX_Size

func (m *MsgUpdateRewardshareResponse) XXX_Size() int

func (*MsgUpdateRewardshareResponse) XXX_Unmarshal

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

type Params

type Params struct {
	// enable_rewardshare defines a parameter to enable the rewardshare module
	EnableRewardshare bool `protobuf:"varint,1,opt,name=enable_reward_share,json=enableRewardshare,proto3" json:"enable_reward_share,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 */
}

Params defines the rewardshare module params

func DefaultParams

func DefaultParams() Params

func NewParams

func NewParams(
	enableRewardshare bool,
	developerShares sdk.Dec,
	addrDerivationCostCreate uint64,
) Params

NewParams creates a new Params object

func (*Params) Descriptor

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

func (*Params) GetAddrDerivationCostCreate

func (m *Params) GetAddrDerivationCostCreate() uint64

func (*Params) GetEnableRewardshare

func (m *Params) GetEnableRewardshare() bool

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

ParamSetPairs returns the parameter set pairs.

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

func (p Params) Validate() 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

type QueryClient

type QueryClient interface {
	// Rewardshares retrieves all registered rewardshares
	Rewardshares(ctx context.Context, in *QueryRewardsharesRequest, opts ...grpc.CallOption) (*QueryRewardsharesResponse, error)
	// Rewardshare retrieves a registered rewardshare for a given contract address
	Rewardshare(ctx context.Context, in *QueryRewardshareRequest, opts ...grpc.CallOption) (*QueryRewardshareResponse, error)
	// Params retrieves the rewardshare module params
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// DeployerRewardshares retrieves all rewardshares that a given deployer has
	// registered
	DeployerRewardshares(ctx context.Context, in *QueryDeployerRewardsharesRequest, opts ...grpc.CallOption) (*QueryDeployerRewardsharesResponse, error)
	// WithdrawerRewardshares retrieves all rewardshares with a given withdrawer
	// address
	WithdrawerRewardshares(ctx context.Context, in *QueryWithdrawerRewardsharesRequest, opts ...grpc.CallOption) (*QueryWithdrawerRewardsharesResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryDeployerRewardsharesRequest

type QueryDeployerRewardsharesRequest struct {
	// deployer bech32 address
	DeployerAddress string `protobuf:"bytes,1,opt,name=deployer_address,json=deployerAddress,proto3" json:"deployer_address,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDeployerRewardsharesRequest is the request type for the Query/DeployerRewardshares RPC method.

func (*QueryDeployerRewardsharesRequest) Descriptor

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

func (*QueryDeployerRewardsharesRequest) GetDeployerAddress

func (m *QueryDeployerRewardsharesRequest) GetDeployerAddress() string

func (*QueryDeployerRewardsharesRequest) GetPagination

func (*QueryDeployerRewardsharesRequest) Marshal

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

func (*QueryDeployerRewardsharesRequest) MarshalTo

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

func (*QueryDeployerRewardsharesRequest) MarshalToSizedBuffer

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

func (*QueryDeployerRewardsharesRequest) ProtoMessage

func (*QueryDeployerRewardsharesRequest) ProtoMessage()

func (*QueryDeployerRewardsharesRequest) Reset

func (*QueryDeployerRewardsharesRequest) Size

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

func (*QueryDeployerRewardsharesRequest) String

func (*QueryDeployerRewardsharesRequest) Unmarshal

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

func (*QueryDeployerRewardsharesRequest) XXX_DiscardUnknown

func (m *QueryDeployerRewardsharesRequest) XXX_DiscardUnknown()

func (*QueryDeployerRewardsharesRequest) XXX_Marshal

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

func (*QueryDeployerRewardsharesRequest) XXX_Merge

func (*QueryDeployerRewardsharesRequest) XXX_Size

func (m *QueryDeployerRewardsharesRequest) XXX_Size() int

func (*QueryDeployerRewardsharesRequest) XXX_Unmarshal

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

type QueryDeployerRewardsharesResponse

type QueryDeployerRewardsharesResponse struct {
	ContractAddresses []string `protobuf:"bytes,1,rep,name=contract_addresses,json=contractAddresses,proto3" json:"contract_addresses,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDeployerRewardsharesResponse is the response type for the Query/DeployerRewardshares RPC method.

func (*QueryDeployerRewardsharesResponse) Descriptor

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

func (*QueryDeployerRewardsharesResponse) GetContractAddresses

func (m *QueryDeployerRewardsharesResponse) GetContractAddresses() []string

func (*QueryDeployerRewardsharesResponse) GetPagination

func (*QueryDeployerRewardsharesResponse) Marshal

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

func (*QueryDeployerRewardsharesResponse) MarshalTo

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

func (*QueryDeployerRewardsharesResponse) MarshalToSizedBuffer

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

func (*QueryDeployerRewardsharesResponse) ProtoMessage

func (*QueryDeployerRewardsharesResponse) ProtoMessage()

func (*QueryDeployerRewardsharesResponse) Reset

func (*QueryDeployerRewardsharesResponse) Size

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

func (*QueryDeployerRewardsharesResponse) String

func (*QueryDeployerRewardsharesResponse) Unmarshal

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

func (*QueryDeployerRewardsharesResponse) XXX_DiscardUnknown

func (m *QueryDeployerRewardsharesResponse) XXX_DiscardUnknown()

func (*QueryDeployerRewardsharesResponse) XXX_Marshal

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

func (*QueryDeployerRewardsharesResponse) XXX_Merge

func (*QueryDeployerRewardsharesResponse) XXX_Size

func (m *QueryDeployerRewardsharesResponse) XXX_Size() int

func (*QueryDeployerRewardsharesResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

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

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryRewardshareRequest

type QueryRewardshareRequest struct {
	// contract identifier is the hex contract address of a contract
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
}

QueryRewardshareRequest is the request type for the Query/Rewardshare RPC method.

func (*QueryRewardshareRequest) Descriptor

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

func (*QueryRewardshareRequest) GetContractAddress

func (m *QueryRewardshareRequest) GetContractAddress() string

func (*QueryRewardshareRequest) Marshal

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

func (*QueryRewardshareRequest) MarshalTo

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

func (*QueryRewardshareRequest) MarshalToSizedBuffer

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

func (*QueryRewardshareRequest) ProtoMessage

func (*QueryRewardshareRequest) ProtoMessage()

func (*QueryRewardshareRequest) Reset

func (m *QueryRewardshareRequest) Reset()

func (*QueryRewardshareRequest) Size

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

func (*QueryRewardshareRequest) String

func (m *QueryRewardshareRequest) String() string

func (*QueryRewardshareRequest) Unmarshal

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

func (*QueryRewardshareRequest) XXX_DiscardUnknown

func (m *QueryRewardshareRequest) XXX_DiscardUnknown()

func (*QueryRewardshareRequest) XXX_Marshal

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

func (*QueryRewardshareRequest) XXX_Merge

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

func (*QueryRewardshareRequest) XXX_Size

func (m *QueryRewardshareRequest) XXX_Size() int

func (*QueryRewardshareRequest) XXX_Unmarshal

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

type QueryRewardshareResponse

type QueryRewardshareResponse struct {
	Rewardshare Rewardshare `protobuf:"bytes,1,opt,name=rewardshare,proto3" json:"rewardshare"`
}

QueryRewardshareResponse is the response type for the Query/Rewardshare RPC method.

func (*QueryRewardshareResponse) Descriptor

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

func (*QueryRewardshareResponse) GetRewardshare

func (m *QueryRewardshareResponse) GetRewardshare() Rewardshare

func (*QueryRewardshareResponse) Marshal

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

func (*QueryRewardshareResponse) MarshalTo

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

func (*QueryRewardshareResponse) MarshalToSizedBuffer

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

func (*QueryRewardshareResponse) ProtoMessage

func (*QueryRewardshareResponse) ProtoMessage()

func (*QueryRewardshareResponse) Reset

func (m *QueryRewardshareResponse) Reset()

func (*QueryRewardshareResponse) Size

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

func (*QueryRewardshareResponse) String

func (m *QueryRewardshareResponse) String() string

func (*QueryRewardshareResponse) Unmarshal

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

func (*QueryRewardshareResponse) XXX_DiscardUnknown

func (m *QueryRewardshareResponse) XXX_DiscardUnknown()

func (*QueryRewardshareResponse) XXX_Marshal

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

func (*QueryRewardshareResponse) XXX_Merge

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

func (*QueryRewardshareResponse) XXX_Size

func (m *QueryRewardshareResponse) XXX_Size() int

func (*QueryRewardshareResponse) XXX_Unmarshal

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

type QueryRewardsharesRequest

type QueryRewardsharesRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRewardsharesRequest is the request type for the Query/Rewardshares RPC method.

func (*QueryRewardsharesRequest) Descriptor

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

func (*QueryRewardsharesRequest) GetPagination

func (m *QueryRewardsharesRequest) GetPagination() *query.PageRequest

func (*QueryRewardsharesRequest) Marshal

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

func (*QueryRewardsharesRequest) MarshalTo

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

func (*QueryRewardsharesRequest) MarshalToSizedBuffer

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

func (*QueryRewardsharesRequest) ProtoMessage

func (*QueryRewardsharesRequest) ProtoMessage()

func (*QueryRewardsharesRequest) Reset

func (m *QueryRewardsharesRequest) Reset()

func (*QueryRewardsharesRequest) Size

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

func (*QueryRewardsharesRequest) String

func (m *QueryRewardsharesRequest) String() string

func (*QueryRewardsharesRequest) Unmarshal

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

func (*QueryRewardsharesRequest) XXX_DiscardUnknown

func (m *QueryRewardsharesRequest) XXX_DiscardUnknown()

func (*QueryRewardsharesRequest) XXX_Marshal

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

func (*QueryRewardsharesRequest) XXX_Merge

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

func (*QueryRewardsharesRequest) XXX_Size

func (m *QueryRewardsharesRequest) XXX_Size() int

func (*QueryRewardsharesRequest) XXX_Unmarshal

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

type QueryRewardsharesResponse

type QueryRewardsharesResponse struct {
	Rewardshares []Rewardshare `protobuf:"bytes,1,rep,name=rewardshares,proto3" json:"rewardshares"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRewardsharesResponse is the response type for the Query/Rewardshares RPC method.

func (*QueryRewardsharesResponse) Descriptor

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

func (*QueryRewardsharesResponse) GetPagination

func (m *QueryRewardsharesResponse) GetPagination() *query.PageResponse

func (*QueryRewardsharesResponse) GetRewardshares

func (m *QueryRewardsharesResponse) GetRewardshares() []Rewardshare

func (*QueryRewardsharesResponse) Marshal

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

func (*QueryRewardsharesResponse) MarshalTo

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

func (*QueryRewardsharesResponse) MarshalToSizedBuffer

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

func (*QueryRewardsharesResponse) ProtoMessage

func (*QueryRewardsharesResponse) ProtoMessage()

func (*QueryRewardsharesResponse) Reset

func (m *QueryRewardsharesResponse) Reset()

func (*QueryRewardsharesResponse) Size

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

func (*QueryRewardsharesResponse) String

func (m *QueryRewardsharesResponse) String() string

func (*QueryRewardsharesResponse) Unmarshal

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

func (*QueryRewardsharesResponse) XXX_DiscardUnknown

func (m *QueryRewardsharesResponse) XXX_DiscardUnknown()

func (*QueryRewardsharesResponse) XXX_Marshal

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

func (*QueryRewardsharesResponse) XXX_Merge

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

func (*QueryRewardsharesResponse) XXX_Size

func (m *QueryRewardsharesResponse) XXX_Size() int

func (*QueryRewardsharesResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Rewardshares retrieves all registered rewardshares
	Rewardshares(context.Context, *QueryRewardsharesRequest) (*QueryRewardsharesResponse, error)
	// Rewardshare retrieves a registered rewardshare for a given contract address
	Rewardshare(context.Context, *QueryRewardshareRequest) (*QueryRewardshareResponse, error)
	// Params retrieves the rewardshare module params
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// DeployerRewardshares retrieves all rewardshares that a given deployer has
	// registered
	DeployerRewardshares(context.Context, *QueryDeployerRewardsharesRequest) (*QueryDeployerRewardsharesResponse, error)
	// WithdrawerRewardshares retrieves all rewardshares with a given withdrawer
	// address
	WithdrawerRewardshares(context.Context, *QueryWithdrawerRewardsharesRequest) (*QueryWithdrawerRewardsharesResponse, error)
}

QueryServer is the server API for Query service.

type QueryWithdrawerRewardsharesRequest

type QueryWithdrawerRewardsharesRequest struct {
	// withdrawer bech32 address
	WithdrawerAddress string `protobuf:"bytes,1,opt,name=withdrawer_address,json=withdrawerAddress,proto3" json:"withdrawer_address,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryWithdrawerRewardsharesRequest is the request type for the Query/WithdrawerRewardshares RPC method.

func (*QueryWithdrawerRewardsharesRequest) Descriptor

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

func (*QueryWithdrawerRewardsharesRequest) GetPagination

func (*QueryWithdrawerRewardsharesRequest) GetWithdrawerAddress

func (m *QueryWithdrawerRewardsharesRequest) GetWithdrawerAddress() string

func (*QueryWithdrawerRewardsharesRequest) Marshal

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

func (*QueryWithdrawerRewardsharesRequest) MarshalTo

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

func (*QueryWithdrawerRewardsharesRequest) MarshalToSizedBuffer

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

func (*QueryWithdrawerRewardsharesRequest) ProtoMessage

func (*QueryWithdrawerRewardsharesRequest) ProtoMessage()

func (*QueryWithdrawerRewardsharesRequest) Reset

func (*QueryWithdrawerRewardsharesRequest) Size

func (*QueryWithdrawerRewardsharesRequest) String

func (*QueryWithdrawerRewardsharesRequest) Unmarshal

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

func (*QueryWithdrawerRewardsharesRequest) XXX_DiscardUnknown

func (m *QueryWithdrawerRewardsharesRequest) XXX_DiscardUnknown()

func (*QueryWithdrawerRewardsharesRequest) XXX_Marshal

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

func (*QueryWithdrawerRewardsharesRequest) XXX_Merge

func (*QueryWithdrawerRewardsharesRequest) XXX_Size

func (*QueryWithdrawerRewardsharesRequest) XXX_Unmarshal

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

type QueryWithdrawerRewardsharesResponse

type QueryWithdrawerRewardsharesResponse struct {
	ContractAddresses []string `protobuf:"bytes,1,rep,name=contract_addresses,json=contractAddresses,proto3" json:"contract_addresses,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryWithdrawerRewardsharesResponse is the response type for the Query/WithdrawerRewardshares RPC method.

func (*QueryWithdrawerRewardsharesResponse) Descriptor

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

func (*QueryWithdrawerRewardsharesResponse) GetContractAddresses

func (m *QueryWithdrawerRewardsharesResponse) GetContractAddresses() []string

func (*QueryWithdrawerRewardsharesResponse) GetPagination

func (*QueryWithdrawerRewardsharesResponse) Marshal

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

func (*QueryWithdrawerRewardsharesResponse) MarshalTo

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

func (*QueryWithdrawerRewardsharesResponse) MarshalToSizedBuffer

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

func (*QueryWithdrawerRewardsharesResponse) ProtoMessage

func (*QueryWithdrawerRewardsharesResponse) ProtoMessage()

func (*QueryWithdrawerRewardsharesResponse) Reset

func (*QueryWithdrawerRewardsharesResponse) Size

func (*QueryWithdrawerRewardsharesResponse) String

func (*QueryWithdrawerRewardsharesResponse) Unmarshal

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

func (*QueryWithdrawerRewardsharesResponse) XXX_DiscardUnknown

func (m *QueryWithdrawerRewardsharesResponse) XXX_DiscardUnknown()

func (*QueryWithdrawerRewardsharesResponse) XXX_Marshal

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

func (*QueryWithdrawerRewardsharesResponse) XXX_Merge

func (*QueryWithdrawerRewardsharesResponse) XXX_Size

func (*QueryWithdrawerRewardsharesResponse) XXX_Unmarshal

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

type Rewardshare

type Rewardshare struct {
	// hex address of registered contract
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// bech32 address of contract deployer
	DeployerAddress string `protobuf:"bytes,2,opt,name=deployer_address,json=deployerAddress,proto3" json:"deployer_address,omitempty"`
	// bech32 address of account receiving the transaction fees it defaults to
	// deployer_address
	WithdrawerAddress string `protobuf:"bytes,3,opt,name=withdrawer_address,json=withdrawerAddress,proto3" json:"withdrawer_address,omitempty"`
}

Rewardshare defines an instance that organizes fee distribution conditions for the owner of a given smart contract

func NewRewardshare

func NewRewardshare(contract common.Address, deployer, withdrawer sdk.AccAddress) Rewardshare

NewRewardshare returns an instance of Rewardshare. If the provided withdrawer address is empty, it sets the value to an empty string.

func (*Rewardshare) Descriptor

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

func (Rewardshare) GetContractAddr

func (fs Rewardshare) GetContractAddr() common.Address

GetContractAddr returns the contract address

func (*Rewardshare) GetContractAddress

func (m *Rewardshare) GetContractAddress() string

func (Rewardshare) GetDeployerAddr

func (fs Rewardshare) GetDeployerAddr() sdk.AccAddress

GetDeployerAddr returns the contract deployer address

func (*Rewardshare) GetDeployerAddress

func (m *Rewardshare) GetDeployerAddress() string

func (Rewardshare) GetWithdrawerAddr

func (fs Rewardshare) GetWithdrawerAddr() sdk.AccAddress

GetWithdrawerAddr returns the account address to where the funds proceeding from the fees will be received. If the withdraw address is not defined, it defaults to the deployer address.

func (*Rewardshare) GetWithdrawerAddress

func (m *Rewardshare) GetWithdrawerAddress() string

func (*Rewardshare) Marshal

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

func (*Rewardshare) MarshalTo

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

func (*Rewardshare) MarshalToSizedBuffer

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

func (*Rewardshare) ProtoMessage

func (*Rewardshare) ProtoMessage()

func (*Rewardshare) Reset

func (m *Rewardshare) Reset()

func (*Rewardshare) Size

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

func (*Rewardshare) String

func (m *Rewardshare) String() string

func (*Rewardshare) Unmarshal

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

func (Rewardshare) Validate

func (fs Rewardshare) Validate() error

Validate performs a stateless validation of a Rewardshare

func (*Rewardshare) XXX_DiscardUnknown

func (m *Rewardshare) XXX_DiscardUnknown()

func (*Rewardshare) XXX_Marshal

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

func (*Rewardshare) XXX_Merge

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

func (*Rewardshare) XXX_Size

func (m *Rewardshare) XXX_Size() int

func (*Rewardshare) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CancelRewardshare

func (*UnimplementedMsgServer) RegisterRewardshare

func (*UnimplementedMsgServer) UpdateRewardshare

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Rewardshare

func (*UnimplementedQueryServer) Rewardshares

Jump to

Keyboard shortcuts

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