countercontract

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

A simple counter contract example based on WASM wrapper

Index

Constants

View Source
const (
	CounterKey = "counter_value"
)

State key for the counter contract

Variables

This section is empty.

Functions

func GetCounter

func GetCounter() uint64

GetCounter returns the current counter value

func Increment

func Increment(value uint64) uint64

Increment the counter

func Initialize

func Initialize() int32

Initialize the contract This function starts with a capital letter, so it will be automatically exported and called when the contract is deployed

func Reset

func Reset()

Reset sets the counter value back to 0

Types

This section is empty.

Jump to

Keyboard shortcuts

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