neo-go/cli/wallet/nep11.go

37 lines
860 B
Go
Raw Normal View History

2021-04-22 15:21:18 +00:00
package wallet
import (
"github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest"
"github.com/urfave/cli"
)
func newNEP11Commands() []cli.Command {
return []cli.Command{
{
Name: "import",
Usage: "import NEP11 token to a wallet",
UsageText: "import --wallet <path> --rpc-endpoint <node> --timeout <time> --token <hash>",
Action: importNEP11Token,
Flags: importFlags,
},
2021-04-23 10:37:59 +00:00
{
Name: "info",
Usage: "print imported NEP11 token info",
UsageText: "print --wallet <path> [--token <hash-or-name>]",
Action: printNEP11Info,
Flags: []cli.Flag{
walletPathFlag,
tokenFlag,
},
},
2021-04-22 15:21:18 +00:00
}
}
func importNEP11Token(ctx *cli.Context) error {
return importNEPToken(ctx, manifest.NEP11StandardName)
}
2021-04-23 10:37:59 +00:00
func printNEP11Info(ctx *cli.Context) error {
return printNEPInfo(ctx, manifest.NEP11StandardName)
}