tips

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addresses []string `yaml:"addresses"`
}

func ParseConfig

func ParseConfig(bz []byte) (*Config, error)

func (*Config) IsContractSupported

func (c *Config) IsContractSupported(address string) bool

type ContractsConfig

type ContractsConfig struct {
	Tips *Config `yaml:"tips"`
}

type Database

type Database interface {
	contractsbase.Database
	HasPost(height int64, subspaceID uint64, postID uint64) (bool, error)
	SaveTip(tip types.Tip) error
}

type Module

type Module struct {
	// contains filtered or unexported fields
}

func NewModule

func NewModule(junoCfg config.Config, node node.Node, grpcConnection *grpc.ClientConn, db Database) *Module

NewModule returns a new Module instance

func (*Module) HandleMsg

func (m *Module) HandleMsg(index int, msg sdk.Msg, tx *juno.Tx) error

HandleMsg implements modules.MessagesModule

func (*Module) HandleMsgExec

func (m *Module) HandleMsgExec(index int, _ *authz.MsgExec, _ int, executedMsg sdk.Msg, tx *juno.Tx) error

HandleMsgExec implements modules.AuthzMessageModule

func (*Module) Name

func (m *Module) Name() string

Name implements modules.Module

func (*Module) RefreshData

func (m *Module) RefreshData(height int64, subspaceID uint64) error

RefreshData refreshes the data related to the tips contract for the given subspace, if any

Jump to

Keyboard shortcuts

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