Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants