diff --git a/cli/candidate_test.go b/cli/candidate_test.go index 4358b992b..3018754d9 100644 --- a/cli/candidate_test.go +++ b/cli/candidate_test.go @@ -16,7 +16,7 @@ func TestRegisterCandidate(t *testing.T) { defer e.Close(t) e.In.WriteString("one\r") - e.Run(t, "neo-go", "wallet", "nep5", "multitransfer", + e.Run(t, "neo-go", "wallet", "nep17", "multitransfer", "--rpc-endpoint", "http://"+e.RPC.Addr, "--wallet", validatorWallet, "--from", validatorAddr, diff --git a/cli/multisig_test.go b/cli/multisig_test.go index 9672537eb..d8aebfef5 100644 --- a/cli/multisig_test.go +++ b/cli/multisig_test.go @@ -51,7 +51,7 @@ func TestSignMultisigTx(t *testing.T) { // Transfer funds to the multisig. e.In.WriteString("one\r") - e.Run(t, "neo-go", "wallet", "nep5", "multitransfer", + e.Run(t, "neo-go", "wallet", "nep17", "multitransfer", "--rpc-endpoint", "http://"+e.RPC.Addr, "--wallet", validatorWallet, "--from", validatorAddr, @@ -66,7 +66,7 @@ func TestSignMultisigTx(t *testing.T) { txPath := path.Join(tmpDir, "multisigtx.json") defer os.Remove(txPath) e.In.WriteString("pass\r") - e.Run(t, "neo-go", "wallet", "nep5", "transfer", + e.Run(t, "neo-go", "wallet", "nep17", "transfer", "--rpc-endpoint", "http://"+e.RPC.Addr, "--wallet", wallet1Path, "--from", multisigAddr, "--to", priv.Address(), "--token", "neo", "--amount", "1", diff --git a/cli/nep5_test.go b/cli/nep17_test.go similarity index 91% rename from cli/nep5_test.go rename to cli/nep17_test.go index cf6b2f4a1..78ecb478c 100644 --- a/cli/nep5_test.go +++ b/cli/nep17_test.go @@ -15,10 +15,10 @@ import ( "github.com/stretchr/testify/require" ) -func TestNEP5Balance(t *testing.T) { +func TestNEP17Balance(t *testing.T) { e := newExecutor(t, true) defer e.Close(t) - cmdbalance := []string{"neo-go", "wallet", "nep5", "balance"} + cmdbalance := []string{"neo-go", "wallet", "nep17", "balance"} cmdbase := append(cmdbalance, "--rpc-endpoint", "http://"+e.RPC.Addr, "--wallet", validatorWallet, @@ -99,7 +99,7 @@ func TestNEP5Balance(t *testing.T) { return } -func TestNEP5Transfer(t *testing.T) { +func TestNEP17Transfer(t *testing.T) { w, err := wallet.NewWalletFromFile("testdata/testwallet.json") require.NoError(t, err) defer w.Close() @@ -107,7 +107,7 @@ func TestNEP5Transfer(t *testing.T) { e := newExecutor(t, true) defer e.Close(t) args := []string{ - "neo-go", "wallet", "nep5", "transfer", + "neo-go", "wallet", "nep17", "transfer", "--rpc-endpoint", "http://" + e.RPC.Addr, "--wallet", validatorWallet, "--from", validatorAddr, @@ -132,7 +132,7 @@ func TestNEP5Transfer(t *testing.T) { require.Equal(t, big.NewInt(1), b) } -func TestNEP5MultiTransfer(t *testing.T) { +func TestNEP17MultiTransfer(t *testing.T) { privs, _ := generateKeys(t, 3) e := newExecutor(t, true) @@ -140,7 +140,7 @@ func TestNEP5MultiTransfer(t *testing.T) { neoContractHash, err := e.Chain.GetNativeContractScriptHash("neo") require.NoError(t, err) args := []string{ - "neo-go", "wallet", "nep5", "multitransfer", + "neo-go", "wallet", "nep17", "multitransfer", "--rpc-endpoint", "http://" + e.RPC.Addr, "--wallet", validatorWallet, "--from", validatorAddr, @@ -161,7 +161,7 @@ func TestNEP5MultiTransfer(t *testing.T) { require.Equal(t, big.NewInt(13), b) } -func TestNEP5ImportToken(t *testing.T) { +func TestNEP17ImportToken(t *testing.T) { e := newExecutor(t, true) defer e.Close(t) @@ -174,11 +174,11 @@ func TestNEP5ImportToken(t *testing.T) { gasContractHash, err := e.Chain.GetNativeContractScriptHash("gas") require.NoError(t, err) e.Run(t, "neo-go", "wallet", "init", "--wallet", walletPath) - e.Run(t, "neo-go", "wallet", "nep5", "import", + e.Run(t, "neo-go", "wallet", "nep17", "import", "--rpc-endpoint", "http://"+e.RPC.Addr, "--wallet", walletPath, "--token", gasContractHash.StringLE()) - e.Run(t, "neo-go", "wallet", "nep5", "import", + e.Run(t, "neo-go", "wallet", "nep17", "import", "--rpc-endpoint", "http://"+e.RPC.Addr, "--wallet", walletPath, "--token", neoContractHash.StringLE()) @@ -192,12 +192,12 @@ func TestNEP5ImportToken(t *testing.T) { e.checkNextLine(t, "^Address:\\s*"+address.Uint160ToString(gasContractHash)) } t.Run("WithToken", func(t *testing.T) { - e.Run(t, "neo-go", "wallet", "nep5", "info", + e.Run(t, "neo-go", "wallet", "nep17", "info", "--wallet", walletPath, "--token", gasContractHash.StringLE()) checkGASInfo(t) }) t.Run("NoToken", func(t *testing.T) { - e.Run(t, "neo-go", "wallet", "nep5", "info", + e.Run(t, "neo-go", "wallet", "nep17", "info", "--wallet", walletPath) checkGASInfo(t) _, err := e.Out.ReadString('\n') @@ -210,9 +210,9 @@ func TestNEP5ImportToken(t *testing.T) { }) t.Run("Remove", func(t *testing.T) { e.In.WriteString("y\r") - e.Run(t, "neo-go", "wallet", "nep5", "remove", + e.Run(t, "neo-go", "wallet", "nep17", "remove", "--wallet", walletPath, "--token", neoContractHash.StringLE()) - e.Run(t, "neo-go", "wallet", "nep5", "info", + e.Run(t, "neo-go", "wallet", "nep17", "info", "--wallet", walletPath) checkGASInfo(t) _, err := e.Out.ReadString('\n') diff --git a/cli/wallet/nep5.go b/cli/wallet/nep17.go similarity index 91% rename from cli/wallet/nep5.go rename to cli/wallet/nep17.go index 35f228712..27eab4ee5 100644 --- a/cli/wallet/nep5.go +++ b/cli/wallet/nep17.go @@ -26,7 +26,7 @@ var ( } ) -func newNEP5Commands() []cli.Command { +func newNEP17Commands() []cli.Command { balanceFlags := []cli.Flag{ walletPathFlag, tokenFlag, @@ -69,21 +69,21 @@ func newNEP5Commands() []cli.Command { Name: "balance", Usage: "get address balance", UsageText: "balance --wallet --rpc-endpoint [--timeout