Skip to content

Fix encoding of fixed-size arrays #43

@blitz-1306

Description

@blitz-1306

When implementing #42, we figured that ABI-encoding of inline arrays is not properly working for following cases:

Inline array type strings are computed to a tuples. This is done by solc-typed-ast here: https://github.com/Consensys/solc-typed-ast/blob/68aa8cacfef4e3de66764a136258d8fbf5c6e559/src/types/infer.ts#L2418-L2432. For those tuples web3's encodePacked() resulting empty byte array. We better clarify why type inference produce this, as it seems to be intentional.

Literals with type strings are emitted by CFGBuilder.getAbiTypeStringConst() and used in ExpressionCompiler.prepEncodeArgs().

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions