You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
Linux 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
The bug
The abigen! macro fails with the confusing error: Illegal abi `{` , when called on the output of the solidity compiler (rather than just the abi). Here is a minimal example.
use ethers::prelude::*;abigen!(Foo,"npm:@openzeppelin/contracts@2.5.0/build/contracts/IERC20.json");fnmain(){println!("Hello, world!");}
The reason
The output of the solidity compiler isn't just the abi in JSON format, it is a larger JSON object with an abi key containing the abi. When the abi parser attempts to parse this it fails, falling back to the human readable parser which then fails with error: Illegal abi `{` .
It would be nice if we could support both formats.
The text was updated successfully, but these errors were encountered:
Ugh I was sort of opinionated on not parsing the artifacts, but that seems inevitable given that OZ has published packages like that. We should add that.
Version
Platform
Linux 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
The bug
The
abigen!
macro fails with the confusingerror: Illegal abi `{`
, when called on the output of the solidity compiler (rather than just the abi). Here is a minimal example.The reason
The output of the solidity compiler isn't just the abi in JSON format, it is a larger JSON object with an
abi
key containing the abi. When the abi parser attempts to parse this it fails, falling back to the human readable parser which then fails witherror: Illegal abi `{`
.It would be nice if we could support both formats.
The text was updated successfully, but these errors were encountered: