mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
cli: add nep11 properties
command
This commit is contained in:
parent
ba7ebc2390
commit
f61ab6bd11
4 changed files with 87 additions and 1 deletions
|
@ -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...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue