besu
besu copied to clipboard
Uniswap on Private network
trafficstars
Description
I am using a private network and have managed to deploy the Uniswap contracts with. no issues. However, when trying to interact with them I keep getting the following error:
reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',
code: 'UNPREDICTABLE_GAS_LIMIT',
error: Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"reason":"processing response error","code":"SERVER_ERROR","body":"{\n \"jsonrpc\" : \"2.0\",\n \"id\" : 58,\n \"error\" : {\n \"code\" : -32000,\n \"message\" : \"Execution reverted\",\n \"data\" : \"0x\"\n }\n}","error":{"code":-32000,"data":"0x"},"requestBody":"{\"method\":\"eth_estimateGas\",\"params\":[{\"gasPrice\":\"0x5d21dba00\",\"from\":\"xxx\",\"to\":\"xxx\",\"data\":\"0x8a7c195f00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000001\"}],\"id\":58,\"jsonrpc\":\"2.0\"}","requestMethod":"POST","url":"https://regular01.okapi.blockchaincoe.sandigital.dev.corp/"}, method="estimateGas", transaction={"from":"xxx","gasPrice":{"type":"BigNumber","hex":"0x05d21dba00"},"to":"xx","data":"0x8a7c195f00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000001","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.5.1)
It seems the execution is failing on the estimateGas call, but even if I set the gas limit manually, it returns the same error on the same call.
Executing the same contracts and code in the Rinkeby network works just fine.
Checking the node logs, I can see this revert:
2022-07-22 08:35:26.352+00:00 | vert.x-worker-thread-5 | TRACE | EVM | Depth: 0
Operation: REVERT
PC: 846
Gas cost: 0
Gas Remaining: 9007199254718446
Depth: 0
Stack:
0 0x0000000000000000000000000000000000000000000000000000000000000001
1 0x0000000000000000000000000000000000000000000000000000000000000064
2 0x00a8
3 0x000000000000000000000000000000000000000000000000000000008a7c195f
(Gas limit is set very high, so not likely to be the issue)
Versions
Besu version: 21.10.6
Smart contract information
Uniswap contracts. They work fine on Testnets like Rinkeby