cli

package
v0.0.0-...-083c870 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const DenominationString = "Available unit: NEW, WEI"

DenominationString is for denomination string const DenominationString = "Available unit: Wei, Ada, Babbage, Shannon, Szabo, Finney, Ether, Einstein, Douglas, Gwei"

Variables

View Source
var DefaultChainID = big.NewInt(16888)

DefaultChainID default chain ID

View Source
var DenominationList = []string{"NEW", "WEI"}

DenominationList is array for denomination string var DenominationList = []string{"Wei", "Ada", "Babbage", "Shannon", "Szabo", "Finney", "Ether", "Einstein", "Douglas", "Gwei"}

View Source
var IsDecimalString = regexp.MustCompile(`^[1-9]\d*$|^0$|^0\.\d*$|^[1-9](\d)*\.(\d)*$`).MatchString

Functions

func EmptyRun

func EmptyRun(cmd *cobra.Command, args []string)

func TestCLIVersion

func TestCLIVersion(t *testing.T)

TestCLIVersion test cli version

Types

type Bank

type Bank struct {
	Address  common.Address `json:"address"`
	Password string         `json:"password,omitempty"`

	// rsa
	RSAPEMPrivateKeyFile string
	RSAPEMPublicKeyFile  string
}

Bank struct

type CLI

type CLI struct {
	// contains filtered or unexported fields
}

CLI represents a command-line interface. This class is not threadsafe.

func CopyCLI

func CopyCLI(cli *CLI) *CLI

CopyCLI returns an copy CLI

func NewCLI

func NewCLI() *CLI

NewCLI returns an initialized CLI

func (*CLI) BuildClient

func (cli *CLI) BuildClient() error

BuildClient BuildClient

func (*CLI) Embeddable

func (cli *CLI) Embeddable() *CLI

Embeddable returns a CLI that you can embed into your own Go programs. This is not thread-safe.

func (*CLI) Execute

func (cli *CLI) Execute()

Execute parses the command line and processes it.

func (*CLI) Run

func (cli *CLI) Run(args ...string) string

Run executes CLI with the given arguments. Used for testing. Not thread safe.

func (*CLI) TestCommand

func (cli *CLI) TestCommand(command string) string

TestCommand test command

type CashMessage

type CashMessage struct {
	Cash uint64 `json:"cash"    gencodec:"required"`
	Data []byte `json:"data"    gencodec:"required"`
}

type Transaction

type Transaction struct {
	From      common.Address `json:"from"`
	To        common.Address `json:"to"`
	Value     *big.Int       `json:"value"`
	Unit      string         `json:"unit"`
	Data      []byte         `json:"data"`
	Nonce     uint64         `json:"nonce"`
	GasPrice  *big.Int       `json:"gasPrice"`
	GasLimit  uint64         `json:"gas"`
	NetworkID *big.Int       `json:"networkID"`
	Password  string         `json:"password,omitempty"`
}

Transaction for send Transaction

Jump to

Keyboard shortcuts

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