keyscli

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 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.Coin, bool)

GetStorageInfo searches events for StorageDepositEvent or StorageUnlockEvent and returns the bytes delta and fee. If this is "unlock", then bytes delta and fee are negative. The third return is true if found, else false.

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 PrintTxInfo

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

PrintTxInfo 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
	MaxDeposit string
}

func (*MakeRunCfg) RegisterFlags

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

type MakeTxCfg

type MakeTxCfg struct {
	RootCfg *client.BaseCfg

	GasWanted int64
	GasFee    string
	Memo      string

	Broadcast bool
	ChainID   string
}

func (*MakeTxCfg) RegisterFlags

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

Jump to

Keyboard shortcuts

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