remove_contract

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "remove-contract <name>",
	Short: "Remove a contract deployed to an account",
	Args:  cobra.ExactArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		projectConf := cli.LoadConfig()

		contractName := args[0]

		signerAccount := projectConf.Accounts[conf.Signer]

		if signerAccount == nil && conf.Signer == "service" {
			signerAccount = projectConf.Accounts["emulator-account"]
		}

		tx := templates.RemoveAccountContract(signerAccount.Address, contractName)

		cli.SendTransaction(
			projectConf.HostWithOverride(conf.Host),
			signerAccount,
			tx,
			conf.Results,
		)
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Signer  string `default:"service" flag:"signer,s"`
	Host    string `flag:"host" info:"Flow Access API host address"`
	Results bool   `default:"false" flag:"results" info:"Display the results of the transaction"`
}

Jump to

Keyboard shortcuts

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