counter

package
v0.0.0-...-6cfe2dc Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OwnerPrefix          = collections.NewPrefix(0)
	CounterPrefix        = collections.NewPrefix(1)
	TestStateCodecPrefix = collections.NewPrefix(2)
)

Functions

func ProvideAccount

func ProvideAccount() accountstd.DepinjectAccount

Types

type Account

type Account struct {
	// Owner is the address of the account owner.
	Owner collections.Item[[]byte]
	// Counter is the counter value.
	Counter collections.Item[uint64]
	// TestStateCodec is used to test the binary codec provided by the runtime.
	// It simply stores the MsgInit.
	TestStateCodec collections.Item[counterv1.MsgTestDependencies]
	// contains filtered or unexported fields
}

Account implements the Account interface. It is an account who can be used to increase a counter.

func NewAccount

func NewAccount(d accountstd.Dependencies) (Account, error)

NewAccount creates a new account.

func (Account) Init

func (Account) RegisterExecuteHandlers

func (a Account) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder)

func (Account) RegisterInitHandler

func (a Account) RegisterInitHandler(builder *accountstd.InitBuilder)

func (Account) RegisterQueryHandlers

func (a Account) RegisterQueryHandlers(builder *accountstd.QueryBuilder)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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