cli: add nep11 properties command

This commit is contained in:
Anna Shaleva 2021-04-26 17:09:37 +03:00
parent ba7ebc2390
commit f61ab6bd11
4 changed files with 87 additions and 1 deletions

View file

@ -1,6 +1,7 @@
package main
import (
"fmt"
"io"
"io/ioutil"
"os"
@ -211,6 +212,22 @@ func TestNEP11_OwnerOf_BalanceOf_Transfer(t *testing.T) {
e.Run(t, cmdTokensOf...)
e.checkNextLine(t, string(tokenID))
// properties: no contract
cmdProperties := []string{
"neo-go", "wallet", "nep11", "properties",
"--rpc-endpoint", "http://" + e.RPC.Addr,
}
e.RunWithError(t, cmdProperties...)
cmdProperties = append(cmdProperties, "--token", h.StringLE())
// properties: no token ID
e.RunWithError(t, cmdProperties...)
cmdProperties = append(cmdProperties, "--id", string(tokenID))
// properties: ok
e.Run(t, cmdProperties...)
e.checkNextLine(t, fmt.Sprintf(`{"name":"HASHY %s"}`, string(tokenID)))
// tokensOf: good, several tokens
tokenID1 := mint(t)
e.Run(t, cmdTokensOf...)