keyscli

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: UNKNOWN not legal advice Imports: 0 Imported by: 0

README

keycli

keycli is an extension of tm2/keys/client, enhancing its functionality. It provides the following features:

  • addpkg: Allows you to upload a new package to the blockchain.
  • run: Execute Gno code by invoking the main() function from the target package.
  • call: Executes a single function call within a Realm.
  • maketx: Compose a transaction (tx) document to sign (and possibly broadcast).

Most of these features have been extracted from tm2/keys/client to ensure that tm2 remains completely independent of gnovm and gno.land. For more detailed information regarding this change, please refer to PR#1483

Documentation

Overview

Dedicated to my love, Lexi.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStorageInfo

func GetStorageInfo(events []abci.Event) (int64, std.Coins, bool)

GetStorageInfo searches events for StorageDepositEvent or StorageUnlockEvent and returns the bytes delta and coins delta. The coins delta omits RefundWithheld.

func NewMakeAddPkgCmd

func NewMakeAddPkgCmd(rootCfg *client.MakeTxCfg, io commands.IO) *commands.Command

func NewMakeCallCmd

func NewMakeCallCmd(rootCfg *client.MakeTxCfg, io commands.IO) *commands.Command

func NewMakeRunCmd

func NewMakeRunCmd(rootCfg *client.MakeTxCfg, cmdio commands.IO) *commands.Command

func NewMakeTxCmd

func NewMakeTxCmd(rootCfg *client.BaseCfg, io commands.IO) *commands.Command

func NewRootCmd

func NewRootCmd(io commands.IO, base client.BaseOptions) *commands.Command

func PrintTxMetrics

func PrintTxMetrics(io commands.IO, tx std.Tx, res *ctypes.ResultBroadcastTxCommit)

PrintTxMetrics prints common tx metrics (gas, storage, events, info, hash). This is used for both success and failure cases so users always see the relevant numbers.

func PrintTxSuccess

func PrintTxSuccess(io commands.IO, tx std.Tx, res *ctypes.ResultBroadcastTxCommit)

PrintTxSuccess prints the transaction result to io. If the events has storage deposit info then also print it with the total transaction cost.

Types

type MakeAddPkgCfg

type MakeAddPkgCfg struct {
	RootCfg    *client.MakeTxCfg
	PkgPath    string
	PkgDir     string
	Send       string
	MaxDeposit string
}

func (*MakeAddPkgCfg) RegisterFlags

func (c *MakeAddPkgCfg) RegisterFlags(fs *flag.FlagSet)

type MakeCallCfg

type MakeCallCfg struct {
	RootCfg *client.MakeTxCfg

	Send       string
	MaxDeposit string
	PkgPath    string
	FuncName   string
	Args       commands.StringArr
}

func (*MakeCallCfg) RegisterFlags

func (c *MakeCallCfg) RegisterFlags(fs *flag.FlagSet)

type MakeRunCfg

type MakeRunCfg struct {
	RootCfg    *client.MakeTxCfg
	Send       string
	MaxDeposit string
}

func (*MakeRunCfg) RegisterFlags

func (c *MakeRunCfg) RegisterFlags(fs *flag.FlagSet)

Jump to

Keyboard shortcuts

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