When passing a Hash160 contract parameter in an invocation in a .neo-invoke.json, the hash is expected to be little-endian.
Suggestion
Since generally all interfaces handle contract hashes in big-endian, the .neo-invoke.json should also expect a big-endian in Hash160 contract parameters and the conversion to little-endian should be done internally.
To reproduce
I tried to pass the gas token hash as a Hash160 parameter to a method that then calls the gas token (the passed Hash160) to get the decimals.
This invocation fails with the following exception:
When I pass the contract hash in little-endian (although still with 0x prefix) as follows, the transaction halts:
Description
When passing a Hash160 contract parameter in an invocation in a
.neo-invoke.json
, the hash is expected to be little-endian.Suggestion
Since generally all interfaces handle contract hashes in big-endian, the
.neo-invoke.json
should also expect a big-endian in Hash160 contract parameters and the conversion to little-endian should be done internally.To reproduce
I tried to pass the gas token hash as a Hash160 parameter to a method that then calls the gas token (the passed Hash160) to get the decimals.
This invocation fails with the following exception:
When I pass the contract hash in little-endian (although still with
0x
prefix) as follows, the transaction halts:Extension Version
Neo N3 Visual DevTracker v2.1.45