Closed PaulRBerg closed 5 years ago
My truffle config was slightly out of date, due to https://github.com/0xProject/dev-tools-truffle-example/pull/14
But even after applying the patch, I get the same behaviour.
Okay, so I went deep down the rabbit hole. It seems that the specific issue is that the value returned by this._web3Wrapper.getContractCodeAsync(subcallAddress)
does NOT match the bytecode of the artifacts found in the 0x-artifacts
folder.
I suspect that there is something wrong with TruffleArtifactAdapter
, as the logs printed during coverage indicate that some truffle artifacts get built in a temporary folder on my Mac (in /var
).
It turns out this is an issue with "sol-compiler". Closing this in favour of #2094.
Expected Behavior
Bytecode should be matched.
Current Behavior
Bytecode is not matched and a bunch of errors are thrown.
Possible Solution
I surmise that there's something wrong with the bridge to truffle.
Steps to Reproduce (for bugs)
Context
I'm trying to cover my contracts with
sol-coverage
in a truffle project which I configured using the dev-tools-truffle-example repo.The weird thing is that despite the errors, the coverage gets generated correctly (or at least I hope so).
Your Environment
@0x/sol-coverage
@0x/sol-profiler
@0x/sol-trace
@0x/subproviders
truffle