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

Fix wast field is missing #2380

Merged
merged 2 commits into from
Apr 27, 2023
Merged

Fix wast field is missing #2380

merged 2 commits into from
Apr 27, 2023

Conversation

wtdcode
Copy link
Contributor

@wtdcode wtdcode commented Apr 27, 2023

Motivation

The wast field maybe missing in solc compiler output.

JSON input:

{
    "language": "Solidity",
    "sources": {
        "src.sol": {
            "content": "contract T{}"
        }
    },
    "settings": {
        "optimizer": {
            "enabled": false,
            "runs": 200
        },
        "outputSelection": {
            "*": {
                "": [
                    "*"
                ],
                "*": [
                    "*"
                ]
            }
        },
        "evmVersion": "london",
        "libraries": {}
    }
}

Output:

/tmp $ solc --standard-json < compile.json | jq . | grep -C1 wasm
        },
        "ewasm": {
          "wasm": ""
        },
/tmp $

This is causing failure to deserialize compilers json outputs while the compilation is successful.

Solution

As proposed.

PR Checklist

  • Added Tests

No need for tests.

  • Added Documentation

No need for further docs.

  • Breaking changes

This shouldn't introduce any breaking changes.

ethers-solc/src/artifacts/mod.rs Outdated Show resolved Hide resolved
@gakonst gakonst merged commit f6ddb9a into gakonst:master Apr 27, 2023
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants