Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Nov 20, 2024
1 parent 172aa0c commit e770df7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/modes/interOrderbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export async function dryrun({
} catch {
/**/
}
gasLimit = ethers.BigNumber.from(await signer.estimateGas(rawtx))
gasLimit = ethers.BigNumber.from(await signer.estimateGas({ ...rawtx, type: "legacy" }))
.mul(config.gasLimitMultiplier)
.div(100);
} catch (e) {
Expand Down Expand Up @@ -162,7 +162,7 @@ export async function dryrun({
try {
blockNumber = Number(await viemClient.getBlockNumber());
spanAttributes["blockNumber"] = blockNumber;
gasLimit = ethers.BigNumber.from(await signer.estimateGas(rawtx))
gasLimit = ethers.BigNumber.from(await signer.estimateGas({ ...rawtx, type: "legacy" }))
.mul(config.gasLimitMultiplier)
.div(100);
rawtx.gas = gasLimit.toBigInt();
Expand Down
4 changes: 2 additions & 2 deletions src/modes/intraOrderbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export async function dryrun({
} catch {
/**/
}
gasLimit = ethers.BigNumber.from(await signer.estimateGas(rawtx))
gasLimit = ethers.BigNumber.from(await signer.estimateGas({ ...rawtx, type: "legacy" }))
.mul(config.gasLimitMultiplier)
.div(100);
} catch (e) {
Expand Down Expand Up @@ -169,7 +169,7 @@ export async function dryrun({
try {
blockNumber = Number(await viemClient.getBlockNumber());
spanAttributes["blockNumber"] = blockNumber;
gasLimit = ethers.BigNumber.from(await signer.estimateGas(rawtx))
gasLimit = ethers.BigNumber.from(await signer.estimateGas({ ...rawtx, type: "legacy" }))
.mul(config.gasLimitMultiplier)
.div(100);
rawtx.gas = gasLimit.toBigInt();
Expand Down
6 changes: 4 additions & 2 deletions src/modes/routeProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export async function dryrun({
} catch {
/**/
}
gasLimit = ethers.BigNumber.from(await signer.estimateGas(rawtx))
gasLimit = ethers.BigNumber.from(await signer.estimateGas({ ...rawtx, type: "legacy" }))
.mul(config.gasLimitMultiplier)
.div(100);
} catch (e) {
Expand Down Expand Up @@ -229,7 +229,9 @@ export async function dryrun({
try {
blockNumber = Number(await viemClient.getBlockNumber());
spanAttributes["blockNumber"] = blockNumber;
gasLimit = ethers.BigNumber.from(await signer.estimateGas(rawtx))
gasLimit = ethers.BigNumber.from(
await signer.estimateGas({ ...rawtx, type: "legacy" }),
)
.mul(config.gasLimitMultiplier)
.div(100);
rawtx.gas = gasLimit.toBigInt();
Expand Down

0 comments on commit e770df7

Please sign in to comment.