Error unpredictable when calling view contract_ GAS_ LIMIT

Q & A of Denglian community 2022-04-04 12:24:28 阅读数:635

error unpredictable calling view contract_

The contract I deployed on the main network The modifier of the calling function is public view, But when I use it locally ethersJs When you call a function Part of the request returned correctly Most of the Returns an error :

reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',code: 'UNPREDICTABLE_GAS_LIMIT',

In fact, this method There is no need to pay gas fee

I'll add... After the method gas{ gasPrice: gas, gasLimit: 2000000 }

The same error will still occur

What's the problem

Other answers 1:
版权声明:本文为[Q & A of Denglian community]所创,转载请带上原文链接,感谢。