Skip to content

Commit b4cc238

Browse files
committed
feat: config example gas token decimal
1 parent b4d7694 commit b4cc238

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docker/config-example.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ MAX_L1_MESSAGE_GAS_LIMIT = 10000000
1414
L1_CONTRACT_DEPLOYMENT_BLOCK = 0
1515

1616
ALTERNATIVE_GAS_TOKEN_ENABLED = true
17+
# EXAMPLE_GAS_TOKEN_DECIMAL = 6
1718

1819
TEST_ENV_MOCK_FINALIZE_ENABLED = true
1920
TEST_ENV_MOCK_FINALIZE_TIMEOUT_SEC = 3600

scripts/deterministic/DeployScroll.s.sol

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ contract ScrollStandardERC20FactorySetOwner is ScrollStandardERC20Factory {
8080
}
8181

8282
contract DeployScroll is DeterminsticDeployment {
83+
using stdToml for string;
84+
8385
/*********
8486
* Types *
8587
*********/
@@ -639,10 +641,16 @@ contract DeployScroll is DeterminsticDeployment {
639641
}
640642

641643
function deployGasToken() private gasToken(true) {
644+
uint8 decimal = 18;
645+
string memory key = ".general.EXAMPLE_GAS_TOKEN_DECIMAL";
646+
if (vm.keyExistsToml(cfg, key)) {
647+
decimal = uint8(cfg.readUint(key));
648+
}
649+
642650
bytes memory args = abi.encode(
643651
"ScrollGasToken", // _name
644652
"GasToken", // _symbol
645-
18, // _decimals
653+
decimal, // _decimals
646654
DEPLOYER_ADDR, // _recipient
647655
10**28 // _amount
648656
);

0 commit comments

Comments
 (0)