How to estimate gas of a receive method() in truffle #5353
Unanswered
SD170
asked this question in
General Q&A
Replies: 1 comment 5 replies
-
Hi! Unfortunately, there's no convenient way to do this at the moment. Doing In the meantime, you can do this manually using web3.js. If you have your contract instance, you can do
in order to perform the gas estimation that you want. You can of course also include a Hope that's helpful! |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know that if my contract has a name() method. I can go to the truffle console and try
and this will give the estimate gas for that method.
but what if have a receive method inside my contract to take ether:
and I wanna know it's gas. Then what is the correct syntax?
I've tried:
as I thought as receive is the default function for ether payment. But didn't work.
this doesn't work either.
can I get some help?
Beta Was this translation helpful? Give feedback.
All reactions