-
-
Notifications
You must be signed in to change notification settings - Fork 93
Report not available for calls for contracts created by other contracts #64
Comments
@elenadimitrova Thanks for raising this - adding it to the README as a shortcoming. To capture this data automatically I think we'd need to inspect each transaction trace for At the moment the only work around is to have a fake test that calls new on the 'interior' contract in order to get the gas reading. Not sure if that's viable for your case. |
Thanks for the details @cgewecke I think I'm not familiar with the truffle stack yet, maybe an unknown mapping is common. |
@lsenta Yes, that's a good idea. Actually, I looked through your repo and was wondering where the missing contract is. Even the trace tracking idea mentioned above would require the existence of a source file and a truffle build 'artifact' that contains information like the ABI, the contract name, and the If that information is available the gas-reporter (as written) should be able to collect data about method calls. It can't capture deployment costs if the contract only deploys via another contract though. |
Sorry for the commit spam, I had a trial & error time with our CI. We don't mind you closing this ticket since we don't need the measure of the inner contract's FWIW, the workaround we came up with:
The reports looks fine now, thanks for maintaining the lib! |
Ok excellent! Thanks for the solution @lsenta. Will leave this open for the time being because I think it's still an issue / confusing for anyone who is using a factory method for deployments. |
Before we wouldn't get gas costs for calls on the ReputationMiningCycle contract. Workaround is: - give it its own file - require it before the tests starts (in migrations/) related issue: cgewecke/eth-gas-reporter#64
+1 to this issue. I'm deploying contracts multiple times during test to reset the contract state, so would be pretty nice to have an option to track contracts deployed while the test is running. *ps: just found this lib, it's amazing |
This would be really nice to have. I have a factory contract that deploys a contract, for which the source is not part of the codebase, but available in one of the dependency packages. I have tests that call the child contract, but no report is generated for such calls. I tried using |
No results are shown for contract created by another contract in test. Example is the
ReputationMiningCycle
contract calls inhttps://github.com/JoinColony/colonyNetwork/pull/179/files#diff-16a74db0d2b552059a5414340b64eafdR186
The text was updated successfully, but these errors were encountered: