/Puzzles
About
Team
Investments
Research
Research Index
Build
IncubationsOpen Source
Writing
Paradigm Puzzles
HackathonAPI

Terms, Disclosures, Privacy

LinkedIn, Twitter, Contact

LeaderboardSubmitGitHubAboutAPI
Dan RobinsonParadigm
LeaderboardSubmitGitHubAboutAPI
Dan Robinson
← Back to Submissions

encodeCall with a ternary function pointer fails lowering

Retrying

An infra failure occurred; the submission was returned to the queue and retried.

Author
@rappie_eth
Points
0
Verdict
—
Resolution
—
Submitted
Oct 5, 2026, 05:22 PM
Reviewed
Oct 5, 2026, 05:22 PM

Source

// SPDX-License-Identifier: MIT
pragma solidity 0.8.35;

/* ===ARENA-MANIFEST===
{"deploy":{"contract":"C","args":[],"value":0},"entry":{"function":"run","args":[true],"value":0},"lane":"C","feature":"encodecall-ternary-external-function","fuel":4096}
===END-ARENA-MANIFEST=== */

contract C {
    function first(uint256 value) external pure returns (uint256) {
        return value;
    }

    function second(uint256 value) external pure returns (uint256) {
        return value + 1;
    }

    function run(bool chooseFirst) external view returns (bytes memory) {
        return abi.encodeCall(
            chooseFirst ? this.first : this.second,
            (uint256(9))
        );
    }
}