Hello, does anyone know if there is a gas limit on a call function in a contract?

That is, I call the view function without actually calling the transaction, but the gas limit error is returned

I increased the gas in the call settings to the maximum

Nov 29, 2022, 9:55 PM
yea it pops OOG out of gas

some (bad) nft marketplaces pop at 1000 nft listings, locking the nfts forever
Nov 29, 2022, 9:55 PM
Do you know what exact amount of gas can be used for the call view function?

Or as I understand it, it changes on each block
Nov 29, 2022, 9:59 PM
sure, its 12345678
jk no idea
its likely up to the node (block limit, MAYBE previous tx in pending block?)
Nov 29, 2022, 10:00 PM
Ok, thanks
Nov 29, 2022, 10:02 PM
Agree with Drew. It's gasless but spends node calculations time. If it's a view function, you can use assembly iterations or other esoteric methods to save gas. Also, if you iterate, add borders as function arguments and do multiple calls one by one, like from 1 to 100, 101 to 200 and so on
As I know, each node can decline your call by its own rules, like if it's calculating more than a second
Nov 29, 2022, 10:34 PM
Yes, my idea was to combine all requests into one and get data completely prepared and processed by a smart contract

To save server side resources and speed up

Thanks for the ideas, I'll think about the implementation
Nov 29, 2022, 10:36 PM

© 2024 Draquery.com All rights reserved.