neo-go/cli
Anna Shaleva 39e096da64 examples: use base64 to encode HASHY token ID
Base58 does not preserve one-to-one byte correspondence with the
original data, so different combinations of the same number of bytes
might have different encoded string length. We use GAS transfer to mint
HASHY token, where the token hash is Base58Encode(Ripemd160(data + txHash)).

The problem is that `invokescript` RPC call is used to define transfer tx
sysfee, thus, txHash during testinvoke differs from the actual one, that's
why resulting token ID may have different length during testinvoke and
real invoke. As far as we use token ID as a key to store contract
values, the storage price may also differ. The result is failing
TestNEP11_OwnerOf_BalanceOf_Transfer test due to `gas limit exceeded`
error:

```
    logger.go:130: 2021-06-10T21:09:08.984+0300	WARN	contract invocation failed	{"tx": "45a0220b19725eaa0a4d01fa7a6cdaac8498592e8f3b43bdde27aae7d9ecf635", "block": 5, "error": "error encountered at instruction 36 (SYSCALL): error during call from native: error encountered at instruction 22 (SYSCALL): failed to invoke syscall 1736177434: gas limit exceeded"}
    executor_test.go:219:
        	Error Trace:	executor_test.go:219
        	            				nep11_test.go:132
        	            				nep11_test.go:235
        	Error:      	Not equal:
        	            	expected: 0x2
        	            	actual  : 0x4
        	Test:       	TestNEP11_OwnerOf_BalanceOf_Transfer
```

Fixed by using base64 instead of base58 (base64 preserves the resulting
encoded string length for the same input length).
2021-06-11 13:57:59 +03:00
..
cmdargs cli: allow to specify CustomContracts/Groups signer 2021-05-28 15:46:33 +03:00
flags *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
input *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
options rpc: allow to use address, id or name instead of scripthash [Client] 2020-11-03 17:58:24 +03:00
paramcontext *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
server *: fix all errcheck warnings in testing code 2021-05-12 21:45:12 +03:00
smartcontract cli,compiler: allow to specify manifest permissions 2021-06-04 11:16:22 +03:00
testdata cli,compiler: allow to specify manifest permissions 2021-06-04 11:16:22 +03:00
util cli: use Writer from app instead of Stdout 2020-09-18 12:05:31 +03:00
vm cli: support escape codes 2021-02-11 16:06:11 +03:00
wallet cli: add wallet candidate getstate 2021-05-31 11:18:59 +03:00
.gitignore Better error messages (#24) 2018-02-24 10:10:45 +01:00
candidate_test.go cli: add wallet candidate getstate 2021-05-31 11:18:59 +03:00
contract_test.go *: fix all errcheck warnings in testing code 2021-05-12 21:45:12 +03:00
dump_test.go *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
executor_test.go core: rename Neo.Crypto.CheckMultisig interop 2021-05-11 18:38:14 +03:00
main.go cli: set ctl.ErrWriter 2020-11-10 15:20:03 +03:00
main_test.go *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
multisig_test.go cli: unify 'contract deploy' and 'contract invoke*' commands 2021-04-23 12:40:13 +03:00
nep11_test.go examples: use base64 to encode HASHY token ID 2021-06-11 13:57:59 +03:00
nep17_test.go compiler: count local variables on the go 2021-05-19 11:50:07 +03:00
options_test.go *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
wallet_test.go core: rename Neo.Crypto.CheckMultisig interop 2021-05-11 18:38:14 +03:00