counter

package
v0.0.0-...-a6871c7 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

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

func (Account) Init

func (Account) QueryCounter

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)

func (Account) TestDependencies

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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