package wallet import ( "encoding/json" "errors" "fmt" "io/ioutil" "github.com/nspcc-dev/neo-go/cli/flags" "github.com/nspcc-dev/neo-go/cli/options" "github.com/nspcc-dev/neo-go/pkg/encoding/address" "github.com/nspcc-dev/neo-go/pkg/rpc/client" "github.com/nspcc-dev/neo-go/pkg/smartcontract/context" "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/wallet" "github.com/urfave/cli" ) func newNEP5Commands() []cli.Command { balanceFlags := []cli.Flag{ walletPathFlag, cli.StringFlag{ Name: "addr", Usage: "Address to use", }, cli.StringFlag{ Name: "token", Usage: "Token to use", }, } balanceFlags = append(balanceFlags, options.RPC...) importFlags := []cli.Flag{ walletPathFlag, cli.StringFlag{ Name: "token", Usage: "Token contract hash in LE", }, } importFlags = append(importFlags, options.RPC...) transferFlags := []cli.Flag{ walletPathFlag, outFlag, fromAddrFlag, toAddrFlag, cli.StringFlag{ Name: "token", Usage: "Token to use", }, cli.StringFlag{ Name: "amount", Usage: "Amount of asset to send", }, flags.Fixed8Flag{ Name: "gas", Usage: "Amount of GAS to attach to a tx", }, } transferFlags = append(transferFlags, options.RPC...) return []cli.Command{ { Name: "balance", Usage: "get address balance", UsageText: "balance --wallet --rpc-endpoint --timeout