cmd

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package cmd contains the commands of abigen

Index

Constants

This section is empty.

Variables

View Source
var EtherscanCommand = &cli.Command{
	Name:  "generate-from-etherscan",
	Usage: "generate abi bindings from a deployed contract on etherscan",
	Flags: []cli.Flag{
		addressFlag,
		chainIDFlag,
		pkgFlag,
		filenameFlag,
		solVersionFlag,
		urlFlag,
	},

	Action: func(context *cli.Context) error {

		return internal.GenerateABIFromEtherscan(context.Context, uint32(context.Int(chainIDFlag.Name)), context.String(urlFlag.Name), common.HexToAddress(context.String(addressFlag.Name)), context.String(filenameFlag.String()), context.String(solVersionFlag.Name), context.String(pkgFlag.Name))
	},
}

EtherscanCommand is used to pull abi from an etherscan-like api.

View Source
var GenerateCommand = &cli.Command{
	Name:  "generate",
	Usage: "generate abi bindings from a file",
	Flags: []cli.Flag{
		solFlag,
		pkgFlag,
		filenameFlag,
		solVersionFlag,
		optimizerRunsFlags,
	},
	Action: func(context *cli.Context) error {

		return internal.BuildTemplates(context.String(solVersionFlag.Name), context.String(solFlag.Name), context.String(pkgFlag.Name), context.String(filenameFlag.Name), context.Int(optimizerRunsFlags.Name))
	},
}

GenerateCommand generates abi using flags.

Functions

func Run

func Run(args []string, buildInfo config.BuildInfo)

Run runs the cmd TODO maybe use ifacemaker to generate interfaces for these.

Types

This section is empty.

Jump to

Keyboard shortcuts

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