-
-
Notifications
You must be signed in to change notification settings - Fork 93
Internal functions are not estimated. #94
Comments
Hi @andreafspeziale, thanks very kind of you. Yes I think this is a limitation of the way the reporter works. As the tests run it fetches the executed transactions from each block, looks at their So if you never directly call a method, the reporter won't be able to associate gas readings with it, although you could wrap a public mock around internal functions and get an approximation of how much they cost that way. In your case, the fallback function is being used - this is something that needs investigation because it's possible the report could detect that. Have to check out what the tx.input data looks like there.... |
@cgewecke Thank you so much, keep us up to date! |
Same feature request here 🙌 , would be great if we can have the tracing gas report like eth-brownie has. May I ask what's the inherent limitation for not supporting it? @cgewecke |
Hi dear @cgewecke,
first of all thanks for the great tool!
Maybe I'm wrong or missing something but I've noticed that internal functions are not estimated in the report but they are in the inline test report.
I've been working on this little project TokenLocker contract where I've implemented this pattern:
The tests are running cool
(e.g ✓ should release the tokens to the first beneficiary expecting the LogRelease event (47139 gas))
but in the resume table at the end I got 0 estimation of the
release function
| TokenTimelock · release · - · - · - · 0 · - │
It could be my lack of experience.
Thanks in advance!
The text was updated successfully, but these errors were encountered: