Help us shape the future of Go! Take the 2026 Go Developer Survey

wrapcontract

package
v0.1.70 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WrapContractCmd = &cobra.Command{
	Use:     "wrap-contract bytecode|file",
	Aliases: []string{"wrapcontract", "wrapContract"},
	Short:   "Wrap deployed bytecode into create bytecode.",
	Long:    usage,
	RunE: func(cmd *cobra.Command, args []string) error {
		deployedBytecode, err := getInputData(args)
		if err != nil {
			cmd.PrintErrf("There was an error reading input for wrapping contract: %s", err.Error())
			return err
		}
		storageBytecode, err := getStorageBytecode()
		if err != nil {
			cmd.PrintErrf("There was an error reading storage map: %s", err.Error())
		}
		createBytecode := util.WrapDeployedCode(deployedBytecode, storageBytecode)
		fmt.Println(createBytecode)
		return nil
	},
	Args: func(cmd *cobra.Command, args []string) error {
		if len(args) > 1 {
			return fmt.Errorf("expected at most one argument: bytecode")
		}
		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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