"out of gas" error when using view method #4514
Unanswered
escottalexander
asked this question in
Troubleshooting
Replies: 1 comment
-
I think this can happen if the execution uses more gas than the block gas limit. Try increasing it in the Hardhat network config. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a view method defined in my contract that contains for loops and calls to other contract view methods. When I use Hardhat console to call this method it returns the following error:
If I send fewer parameters in the method then it works as expected. I was not aware of any gas limitation when calling a view method. Any ideas why I am getting this error?
This is how I am calling the method in Hardhat console
await theContract.renderMain([0,1,2,3,4])
I have also tried
await theContract.callStatic.renderMain([0,1,2,3,4])
and it yeilds the same error.Here is the method that is being called:
Beta Was this translation helpful? Give feedback.
All reactions