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
Consider a situation in which I have an Ethereum contract called TwoGather.sol, and discovery compile successfully compiles it into the build folder as build/smart_contracts/TwoGather.json
First question: It seems that I cannot just pass this file to the eth_contract macro, but that I first need to extract only the array that can be found at the abi property, is that correct? I was getting errors passing the file from the build/smart_contracts folder and that seemed to get me further.
Based on the the voting example this seems correct.
97 | #[eth_contract("TwoGather_abi_only.json")]
= help: message: called Result::unwrap() on an Err value: TokenParseError { error: "unexpected token" }
We don't see the rest of the contract but the eth_contract declaration seems correct, and the json looks valid in the post.
Will refer to the voting example while I try reproduce the error, perhaps Brendan can share a broken project.
The text was updated successfully, but these errors were encountered:
Allow a way to pull the abi from a locally built contract json. This will facilitate development of custom contracts more easily.
Provide better error messages when an abi fails to parse - at least the line/character number where the failure occurred!
Possible bug leading to the error, will request more info about the compiler.
by removing the length [48] from the bytes then the error went away.
I think this must be an error in your discovery parser, because the solidity contract compiled fine and the bytes[48] is a valid type in solidity.
I would encourage your team to look into/fix that bug. Thx.
forum post
2 parts to this one
Based on the the voting example this seems correct.
We don't see the rest of the contract but the eth_contract declaration seems correct, and the json looks valid in the post.
Will refer to the voting example while I try reproduce the error, perhaps Brendan can share a broken project.
The text was updated successfully, but these errors were encountered: