Commit 181d284c authored by Maurelian's avatar Maurelian Committed by Kelvin Fichter

feat(contracts): Update deployment scripts for gas burn config

parent 141ffd88
...@@ -36,6 +36,8 @@ const parseEnv = () => { ...@@ -36,6 +36,8 @@ const parseEnv = () => {
'number' 'number'
), ),
ctcMaxTransactionGasLimit: ensure('MAX_TRANSACTION_GAS_LIMIT', 'number'), ctcMaxTransactionGasLimit: ensure('MAX_TRANSACTION_GAS_LIMIT', 'number'),
ctcL2GasDiscountDivisor: ensure('L2_GAS_DISCOUNT_DIVISOR', 'number'),
ctcEnqueueGasCost: ensure('ENQUEUE_GAS_COST', 'number'),
sccFraudProofWindow: ensure('FRAUD_PROOF_WINDOW_SECONDS', 'number'), sccFraudProofWindow: ensure('FRAUD_PROOF_WINDOW_SECONDS', 'number'),
sccSequencerPublishWindow: ensure( sccSequencerPublishWindow: ensure(
'SEQUENCER_PUBLISH_WINDOW_SECONDS', 'SEQUENCER_PUBLISH_WINDOW_SECONDS',
...@@ -51,6 +53,8 @@ const main = async () => { ...@@ -51,6 +53,8 @@ const main = async () => {
l1BlockTimeSeconds: config.l1BlockTimeSeconds, l1BlockTimeSeconds: config.l1BlockTimeSeconds,
ctcForceInclusionPeriodSeconds: config.ctcForceInclusionPeriodSeconds, ctcForceInclusionPeriodSeconds: config.ctcForceInclusionPeriodSeconds,
ctcMaxTransactionGasLimit: config.ctcMaxTransactionGasLimit, ctcMaxTransactionGasLimit: config.ctcMaxTransactionGasLimit,
ctcL2GasDiscountDivisor: config.ctcL2GasDiscountDivisor,
ctcEnqueueGasCost: config.ctcEnqueueGasCost,
sccFraudProofWindow: config.sccFraudProofWindow, sccFraudProofWindow: config.sccFraudProofWindow,
sccSequencerPublishWindow: config.sccFraudProofWindow, sccSequencerPublishWindow: config.sccFraudProofWindow,
ovmSequencerAddress: sequencer.address, ovmSequencerAddress: sequencer.address,
......
...@@ -21,6 +21,8 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -21,6 +21,8 @@ const deployFn: DeployFunction = async (hre) => {
(hre as any).deployConfig.ctcForceInclusionPeriodSeconds, (hre as any).deployConfig.ctcForceInclusionPeriodSeconds,
(hre as any).deployConfig.ctcForceInclusionPeriodBlocks, (hre as any).deployConfig.ctcForceInclusionPeriodBlocks,
(hre as any).deployConfig.ctcMaxTransactionGasLimit, (hre as any).deployConfig.ctcMaxTransactionGasLimit,
(hre as any).deployConfig.ctcL2GasDiscountDivisor,
(hre as any).deployConfig.ctcEnqueueGasCost,
], ],
}) })
} }
......
...@@ -6,6 +6,8 @@ import * as types from 'hardhat/internal/core/params/argumentTypes' ...@@ -6,6 +6,8 @@ import * as types from 'hardhat/internal/core/params/argumentTypes'
const DEFAULT_L1_BLOCK_TIME_SECONDS = 15 const DEFAULT_L1_BLOCK_TIME_SECONDS = 15
const DEFAULT_CTC_FORCE_INCLUSION_PERIOD_SECONDS = 60 * 60 * 24 * 30 // 30 days const DEFAULT_CTC_FORCE_INCLUSION_PERIOD_SECONDS = 60 * 60 * 24 * 30 // 30 days
const DEFAULT_CTC_MAX_TRANSACTION_GAS_LIMIT = 11_000_000 const DEFAULT_CTC_MAX_TRANSACTION_GAS_LIMIT = 11_000_000
const DEFAULT_CTC_L2_GAS_DISCOUNT_DIVISOR = 32
const DEFAULT_CTC_ENQUEUE_GAS_COST = 60_000
const DEFAULT_SCC_FRAUD_PROOF_WINDOW = 60 * 60 * 24 * 7 // 7 days const DEFAULT_SCC_FRAUD_PROOF_WINDOW = 60 * 60 * 24 * 7 // 7 days
const DEFAULT_SCC_SEQUENCER_PUBLISH_WINDOW = 60 * 30 // 30 minutes const DEFAULT_SCC_SEQUENCER_PUBLISH_WINDOW = 60 * 30 // 30 minutes
...@@ -28,6 +30,18 @@ task('deploy') ...@@ -28,6 +30,18 @@ task('deploy')
DEFAULT_CTC_MAX_TRANSACTION_GAS_LIMIT, DEFAULT_CTC_MAX_TRANSACTION_GAS_LIMIT,
types.int types.int
) )
.addOptionalParam(
'ctcL2GasDiscountDivisor',
'Max gas limit for L1 queue transactions.',
DEFAULT_CTC_L2_GAS_DISCOUNT_DIVISOR,
types.int
)
.addOptionalParam(
'ctcEnqueueGasCost',
'Max gas limit for L1 queue transactions.',
DEFAULT_CTC_ENQUEUE_GAS_COST,
types.int
)
.addOptionalParam( .addOptionalParam(
'sccFraudProofWindow', 'sccFraudProofWindow',
'Number of seconds until a transaction is considered finalized.', 'Number of seconds until a transaction is considered finalized.',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment