diff --git a/src/modes/interOrderbook.ts b/src/modes/interOrderbook.ts index 8fd93a0b..19dff052 100644 --- a/src/modes/interOrderbook.ts +++ b/src/modes/interOrderbook.ts @@ -177,8 +177,13 @@ export async function dryrun({ .div(100); if (gasLimit.isZero()) { throw new ExecutionRevertedError({ + cause: new BaseError("RPC returned 0 for eth_estimateGas", { + cause: new Error( + "Failed to estimated gas, RPC returned 0 for eth_estimateGas call without rejection", + ), + }), message: - "Failed to estimated gas, rpc returned 0 for gasEstimate call without rejection", + "Failed to estimated gas, RPC returned 0 for eth_estimateGas call without rejection", }); } rawtx.gas = gasLimit.toBigInt(); diff --git a/src/modes/intraOrderbook.ts b/src/modes/intraOrderbook.ts index ed35bafb..afdf786f 100644 --- a/src/modes/intraOrderbook.ts +++ b/src/modes/intraOrderbook.ts @@ -179,8 +179,13 @@ export async function dryrun({ .div(100); if (gasLimit.isZero()) { throw new ExecutionRevertedError({ + cause: new BaseError("RPC returned 0 for eth_estimateGas", { + cause: new Error( + "Failed to estimated gas, RPC returned 0 for eth_estimateGas call without rejection", + ), + }), message: - "Failed to estimated gas, rpc returned 0 for gasEstimate call without rejection", + "Failed to estimated gas, RPC returned 0 for eth_estimateGas call without rejection", }); } rawtx.gas = gasLimit.toBigInt(); diff --git a/src/modes/routeProcessor.ts b/src/modes/routeProcessor.ts index fd880cd0..6788161a 100644 --- a/src/modes/routeProcessor.ts +++ b/src/modes/routeProcessor.ts @@ -243,8 +243,13 @@ export async function dryrun({ .div(100); if (gasLimit.isZero()) { throw new ExecutionRevertedError({ + cause: new BaseError("RPC returned 0 for eth_estimateGas", { + cause: new Error( + "Failed to estimated gas, RPC returned 0 for eth_estimateGas call without rejection", + ), + }), message: - "Failed to estimated gas, rpc returned 0 for gasEstimate call without rejection", + "Failed to estimated gas, RPC returned 0 for eth_estimateGas call without rejection", }); } rawtx.gas = gasLimit.toBigInt();