Skip to content

Commit

Permalink
add scalar command for altgas
Browse files Browse the repository at this point in the history
  • Loading branch information
dghelm committed Sep 5, 2024
1 parent 6d1e1ce commit 4868e2f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/content/docs/en/sdk/guides/production-deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,20 @@ For Scroll's Sepolia environment, we use the following resources:
| rollup-explorer-backend | 2 | 3 |6000|
| rollup-node| 1 | 0.1 |200|
| rpc-gateway| 1 | 0.1 |100|
| Total | 22| 15.9 |120000|
| Total | 22| 15.9 |120000|

### Accounting for L1 Fees on Alternative Gas Token Chains

On Scroll, transactions on L2 have two components -- the gas costs for execution and an L1 data fee. When gas on your network is paid in a token that has no standard relationship to the currency being used to pay for data fees on the L1, you will need to introduce tooling that can set the gas caluclation "scalar" values.

At the moment, we have not built any automated tooling for this, and instead of viewing the ERC20 value as 1:1 with Sepolia Ether, we suggest setting the scalars to 0 to eliminate these overheads.

To do so, you can run the following commands using your L2 RPC URL and Owner account private key:

```bash
cast send --rpc-url http://l2-rpc.scrollsdk 0x5300000000000000000000000000000000000002 "setCommitScalar(uint256)" 0 --private-key [private-key]
```

```bash
cast send --rpc-url http://l2-rpc.scrollsdk 0x5300000000000000000000000000000000000002 "setBlobScalar(uint256)" 0 --private-key [private-key]
```

0 comments on commit 4868e2f

Please sign in to comment.