contract

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 26 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContractCmd = &cobra.Command{
	Use:   "contract",
	Short: config.TranslateInLang(_contractCmdShorts, config.UILanguage),
}

ContractCmd represents the contract command

View Source
var ContractCompileCmd = &cobra.Command{
	Use:   config.TranslateInLang(_contractCompileCmdUses, config.UILanguage),
	Short: config.TranslateInLang(_contractCompileCmdShorts, config.UILanguage),
	Args:  cobra.MinimumNArgs(1),
	RunE: func(cmd *cobra.Command, args []string) error {
		cmd.SilenceUsage = true
		err := compile(args)
		return output.PrintError(err)
	},
}

ContractCompileCmd represents the contract compile command

View Source
var ContractPrepareCmd = &cobra.Command{
	Use:   "prepare",
	Short: config.TranslateInLang(_prepareCmdShorts, config.UILanguage),
	Args:  cobra.ExactArgs(0),
	RunE: func(cmd *cobra.Command, args []string) error {
		cmd.SilenceUsage = true
		err := prepare()
		return err
	},
}

ContractPrepareCmd represents the contract prepare command

View Source
var (
	ErrInvalidArg = errors.New("invalid argument")
)

ErrInvalidArg indicates argument is invalid

Functions

func Compile

func Compile(sourceFiles ...string) (map[string]*compiler.Contract, error)

Compile compiles smart contract from source code

func ParseOutput added in v1.13.0

func ParseOutput(targetAbi *abi.ABI, targetMethod string, result string) (string, error)

ParseOutput parse contract output data

Types

This section is empty.

Jump to

Keyboard shortcuts

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