Skip to content

Incongruence between IHederaTokenService return value type vs actual return value #1328

Description

@Shungy

Description

The return response code in all functions in the interface has a int64 type (e.g.:

)

However, the library (HederaTokenService abstract contract) uses int32 when decoding (e.g.:

responseCode = success ? abi.decode(result, (int32)) : HederaResponseCodes.UNKNOWN;
)

I don't think it's a security risk but I recommend confirming it by checking the actual value returned by the precompile and whether if the negative values can cause an issue

Steps to reproduce

n/a

Additional context

No response

Hedera network

No response

Version

n/a

Operating system

None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions