33
44local config = std.extVar("config" );
55
6- // if the key is not present in the config , throw an error
6+ // if not exist conf , throw an error
77local require(key, conf) =
88 if std.objectHas (config, conf) then
99 { [key]: config[conf] }
1010 else
1111 error "required field not found :" + conf;
1212
13- // if the key is not present in the config, use the default value
13+ // if not exist conf, return the default value
1414local default(key, conf, default) =
1515 if std.objectHas (config, conf) then
1616 { [key]: config[conf] }
1717 else
1818 { [key]: default };
1919
20- // if the key is not present in the config, use empty object
20+ // if not exist conf, return empty
2121local optional(key, conf) =
2222 if std.objectHas (config, conf) then
2323 { [key]: config[conf] }
@@ -63,7 +63,7 @@ local GovernanceDeployConfig =
6363 default("enableGovernance" , "enableGovernance" , false )
6464 + default("governanceTokenSymbol" , "governanceTokenSymbol" , "NA" )
6565 + default("governanceTokenName" , "governanceTokenName" , "NotApplicable" )
66- + optional ("governanceTokenOwner" , "governanceTokenOwner " );
66+ + require ("governanceTokenOwner" , "ADMIN_ADDRESS " );
6767
6868local GasPriceOracleDeployConfig =
6969 default("gasPriceOracleOverhead" , "gasPriceOracleOverhead" , 2100 )
@@ -101,8 +101,8 @@ local L2CoreDeployConfig =
101101 + default("finalizationPeriodSeconds" , "finalizationPeriodSeconds" , 12 )
102102 + default("maxSequencerDrift" , "maxSequencerDrift" , 600 )
103103 + default("sequencerWindowSize" , "sequencerWindowSize" , 3600 )
104- + default("channelTimeoutBedrock " , "channelTimeoutBedrock " , 300 )
105- + default ("channelTimeoutGranite" , "channelTimeoutGranite" , 0 )
104+ + default("channelTimeout " , "channelTimeout " , 300 )
105+ + optional ("channelTimeoutGranite" , "channelTimeoutGranite" )
106106 + default("batchInboxAddress" , "batchInboxAddress" , "0xff00000000000000000000000000000000000000" )
107107 + default("systemConfigStartBlock" , "systemConfigStartBlock" , 0 );
108108
@@ -114,28 +114,33 @@ local AltDADeployConfig =
114114 + default("daBondSize" , "daBondSize" , 1000000 )
115115 + default("daResolverRefundPercentage" , "daResolverRefundPercentage" , 0 );
116116
117+ local SuperchainL1DeployConfig =
118+ require("superchainConfigGuardian" , "ADMIN_ADDRESS" )
119+ + default("requiredProtocolVersion" , "requiredProtocolVersion" , "0x0000000000000000000000000000000000000000000000000000000000000000" )
120+ + default("recommendedProtocolVersion" , "recommendedProtocolVersion" , "0x0000000000000000000000000000000000000000000000000000000000000000" );
121+
117122local OutputOracleDeployConfig =
118123 default("l2OutputOracleSubmissionInterval" , "l2OutputOracleSubmissionInterval" , 1800 )
119- + default ("l2OutputOracleStartingTimestamp" , "l2OutputOracleStartingTimestamp" , 0 )
120- + require ("l2OutputOracleStartingBlockNumber" , "TIMESTAMP" )
124+ + require ("l2OutputOracleStartingTimestamp" , "TIMESTAMP" )
125+ + default ("l2OutputOracleStartingBlockNumber" , "l2OutputOracleStartingBlockNumber" , 0 )
121126 + require("l2OutputOracleProposer" , "PROPOSER_ADDRESS" )
122127 + require("l2OutputOracleChallenger" , "ADMIN_ADDRESS" );
123128
124129local FaultProofDeployConfig =
125- default("useFaultProof" , "useFaultProof" , false )
126- + optional ("faultGameAbsolutePrestate" , "faultGameAbsolutePrestate" )
127- + optional ("faultGameMaxDepth" , "faultGameMaxDepth" )
128- + optional ("faultGameClockExtension" , "faultGameClockExtension" )
129- + optional ("faultGameMaxClockDuration" , "faultGameMaxClockDuration" )
130- + optional ("faultGameGenesisBlock" , "faultGameGenesisBlock" )
131- + optional ("faultGameGenesisOutputRoot" , "faultGameGenesisOutputRoot" )
132- + optional ("faultGameSplitDepth" , "faultGameSplitDepth" )
133- + optional ("faultGameWithdrawalDelay" , "faultGameWithdrawalDelay" )
134- + optional ("preimageOracleMinProposalSize" , "preimageOracleMinProposalSize" )
135- + optional ("preimageOracleChallengePeriod" , "preimageOracleChallengePeriod" )
136- + optional ("proofMaturityDelaySeconds" , "proofMaturityDelaySeconds" )
137- + optional ("disputeGameFinalityDelaySeconds" , "disputeGameFinalityDelaySeconds" )
138- + optional ("respectedGameType" , "respectedGameType" );
130+ default("useFaultProof" , "useFaultProof" , true )
131+ + default ("faultGameAbsolutePrestate" , "faultGameAbsolutePrestate" , "0x0000000000000000000000000000000000000000000000000000000000000000 " )
132+ + default ("faultGameMaxDepth" , "faultGameMaxDepth" , 73 )
133+ + default ("faultGameClockExtension" , "faultGameClockExtension" , 18000 )
134+ + default ("faultGameMaxClockDuration" , "faultGameMaxClockDuration" , 302400 )
135+ + default ("faultGameGenesisBlock" , "faultGameGenesisBlock" , 0 )
136+ + default ("faultGameGenesisOutputRoot" , "faultGameGenesisOutputRoot" , "0x0000000000000000000000000000000000000000000000000000000000000000 " )
137+ + default ("faultGameSplitDepth" , "faultGameSplitDepth" , 30 )
138+ + default ("faultGameWithdrawalDelay" , "faultGameWithdrawalDelay" , 604800 )
139+ + default ("preimageOracleMinProposalSize" , "preimageOracleMinProposalSize" , 126000 )
140+ + default ("preimageOracleChallengePeriod" , "preimageOracleChallengePeriod" , 86400 )
141+ + default ("proofMaturityDelaySeconds" , "proofMaturityDelaySeconds" , 604800 )
142+ + default ("disputeGameFinalityDelaySeconds" , "disputeGameFinalityDelaySeconds" , 302400 )
143+ + default ("respectedGameType" , "respectedGameType" , 0 );
139144
140145//-----------------------------------------------------------------------//
141146// output
@@ -153,5 +158,6 @@ L1StartingBlockTag
153158+ UpgradeScheduleDeployConfig
154159+ L2CoreDeployConfig
155160+ AltDADeployConfig
161+ + SuperchainL1DeployConfig
156162+ OutputOracleDeployConfig
157163+ FaultProofDeployConfig
0 commit comments