Skip to content

Commit 04d72f4

Browse files
authored
Merge pull request #133 from OffchainLabs/smol-fixes
Several small fixes
2 parents 16b49c3 + 212c5c1 commit 04d72f4

File tree

3 files changed

+47
-590
lines changed

3 files changed

+47
-590
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"format": "prettier './**/*.{js,json,md,yml,sol}' --write && yarn run lint --fix"
1616
},
1717
"devDependencies": {
18+
"chai": "^4.3.4",
1819
"eslint": "^8.15.0",
1920
"eslint-config-prettier": "^8.3.0",
2021
"eslint-plugin-mocha": "^9.0.0",

packages/gas-estimation/scripts/exec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ const gasEstimator = async () => {
5555
// NodeInterface.GasEstimateComponents() and get the fourth element and multiply by 16 => result[3]*16
5656
// L1S (Size in bytes of the calldata to post on the parent chain) =>
5757
// Will depend on the size (in bytes) of the calldata of the transaction
58-
// We add a fixed amount of 140 bytes to that amount for the transaction metadata (recipient, nonce, gas price, ...)
59-
// Final size will be less after compression, but this calculation gives a good estimation
6058

6159
// ****************************
6260
// * Other values you can get *
@@ -97,7 +95,6 @@ const gasEstimator = async () => {
9795
// -------------------------------------------------------------------------------
9896
// NOTE: This one might be a bit confusing, but parentChainGasEstimated (B in the formula) is calculated based on child-chain's gas fees
9997
const parentChainCost = parentChainGasEstimated.mul(childChainEstimatedPrice);
100-
// NOTE: This is similar to 140 + utils.hexDataLength(txData);
10198
const parentChainSize = parentChainCost.div(parentChainEstimatedPrice);
10299

103100
// Getting the result of the formula

0 commit comments

Comments
 (0)