Skip to content

.neo-invoke.json should expect Hash160 parameters in big-endian #90

@mialbu

Description

@mialbu

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.

Contract1

This invocation fails with the following exception:

VM STATE

When I pass the contract hash in little-endian (although still with 0x prefix) as follows, the transaction halts:

image

Extension Version

Neo N3 Visual DevTracker v2.1.45

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions