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

ethers-solc: compiling USDT on v0.4.18 gives out error #1176

Closed
joshieDo opened this issue Apr 25, 2022 · 2 comments
Closed

ethers-solc: compiling USDT on v0.4.18 gives out error #1176

joshieDo opened this issue Apr 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@joshieDo
Copy link
Contributor

joshieDo commented Apr 25, 2022

Trying to build USDT on foundry with solc v0.4.18 results in the following crash that can be traced over to the json line below.

the output is a valid one (acquired on the traces), it's just cant be deserialized for some reason

ethers-solc/src/compile/mod.rs

    /// Run `solc --stand-json` and return the `solc`'s output as the given json
    /// output
    pub fn compile_as<T: Serialize, D: DeserializeOwned>(&self, input: &T) -> Result<D> {
        let output = self.compile_output(input)?;
        Ok(serde_json::from_slice(&output)?)
    }

error:

➜  testdir git:(master) ✗ forge build --use 0.4.18
[⠊] Compiling...
[⠆] Compiling 1 files with 0.4.18
Error: 
   0: EOF while parsing a value at line 1 column 0

Location:
   cli/src/compile.rs:99
@joshieDo joshieDo added the bug Something isn't working label Apr 25, 2022
@joshieDo joshieDo changed the title compiling USDT on v0.4.18 gives out error ethers-solc: compiling USDT on v0.4.18 gives out error Apr 25, 2022
@mattsse
Copy link
Collaborator

mattsse commented Apr 26, 2022

thanks for this
could you try dumping the json in/output via ETHERS_SOLC_LOG=in=in.json,out=out.json and perhaps try parsing them separately from a formatted json, that should highlight the serde issue I think

@mattsse
Copy link
Collaborator

mattsse commented Apr 27, 2022

vote close @gakonst

@gakonst gakonst closed this as completed Apr 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants