Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for wildcard output selector bug in solc <= 0.5.8 #755

Open
cameel opened this issue Jan 20, 2025 · 0 comments
Open

Workaround for wildcard output selector bug in solc <= 0.5.8 #755

cameel opened this issue Jan 20, 2025 · 0 comments
Labels
low impact Changes are not very noticeable or potential benefits are limited. medium effort Default level of effort should have We like the idea but it’s not important enough to be a part of the roadmap.

Comments

@cameel
Copy link
Member

cameel commented Jan 20, 2025

Related to ethereum/solidity#14214.

In ethereum/solidity#6606 (released in 0.5.9) we fixed a bug that broke the * at source level. Since solc-js acts as a compatibility layer for older binaries, we should include a workaround for that bug here.

We can avoid triggering the bug by modifying the input JSON to either use * at contract level as well or by listing all contract explicitly.

Repro

{
    "language": "Solidity",
    "sources": {
        "C.sol": {
            "content": "pragma solidity *; contract C {}"
        }
    },
    "settings": {
        "outputSelection": {"*": {"C": ["evm.bytecode"]}}
    }
}
{
    "contracts": {
        "C.sol": {
            "C": {
                "evm": {
                    "bytecode": {
                        "linkReferences": {},
                        "object": "",
                        "opcodes": "",
                        "sourceMap": ""
                    }
                }
            }
        }
    },
    "sources": {
        "C.sol": {
            "id": 0
        }
    }
}
@cameel cameel added low impact Changes are not very noticeable or potential benefits are limited. medium effort Default level of effort should have We like the idea but it’s not important enough to be a part of the roadmap. labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low impact Changes are not very noticeable or potential benefits are limited. medium effort Default level of effort should have We like the idea but it’s not important enough to be a part of the roadmap.
Projects
None yet
Development

No branches or pull requests

1 participant