Skip to content

Custom error named parameters passed in call order instead of declaration order #16452

@nikola-matic

Description

@nikola-matic

Description

Solidity’s --via-ir compilation pipeline incorrectly ABI‑encodes custom error arguments when require(condition, Error({named args})) uses named parameters written out of declaration order.

Steps to Reproduce

error NamedArgsError(uint256 a, uint256 b);

contract ViaIRNamedArgsTarget {
    function trigger() external pure {
        require(false, NamedArgsError({b: 7, a: 2}));
    }
}

Decoding in legacy yield a=2 and b=7 as it should, whereas under via-IR it yields a=7 and b=2.

Metadata

Metadata

Assignees

Labels

bug 🐛low effortThere is not much implementation work to be done. The task is very easy or tiny.medium impactDefault level of impact

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions