Skip to content

Commit

Permalink
Merge pull request #46 from zkLinkProtocol/issues_45
Browse files Browse the repository at this point in the history
optimize optimism scripts
  • Loading branch information
zkbenny authored Feb 18, 2024
2 parents 99a45e8 + 3402811 commit e9d0e07
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
6 changes: 1 addition & 5 deletions examples/optimism/scripts/changeFeeParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ task('changeFeeParams', 'Change fee params for zkLink').setAction(async (taskArg
const adapterParams = ethers.utils.defaultAbiCoder.encode(['uint256'], [minGasLimit]);
const { INIT_FEE_PARAMS } = require('../../../script/zksync_era');
console.log('Prepare to forward the message to L2...');
let tx = await arbitrator.changeFeeParams(optimismL1GatewayAddr, INIT_FEE_PARAMS, adapterParams, {
maxFeePerGas: 200000000000, // 200 Gwei
maxPriorityFeePerGas: 5000000000, // 5 Gwei
gasLimit: 5000000,
});
let tx = await arbitrator.changeFeeParams(optimismL1GatewayAddr, INIT_FEE_PARAMS, adapterParams);
const txHash = tx.hash;
await tx.wait();
console.log(`The tx hash: ${txHash}`);
Expand Down
6 changes: 1 addition & 5 deletions examples/optimism/scripts/setValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ task('setValidator', 'Set validator for zkLink')
const minGasLimit = 200000;
const adapterParams = ethers.utils.defaultAbiCoder.encode(['uint256'], [minGasLimit]);
console.log('Prepare to forward the message to L2...');
let tx = await arbitrator.setValidator(optimismL1GatewayAddr, validatorAddr, isActive, adapterParams, {
maxFeePerGas: 200000000000, // 200 Gwei
maxPriorityFeePerGas: 5000000000, // 5 Gwei
gasLimit: 5000000,
});
let tx = await arbitrator.setValidator(optimismL1GatewayAddr, validatorAddr, isActive, adapterParams);
const txHash = tx.hash;
await tx.wait();
console.log(`The tx hash: ${txHash}`);
Expand Down
5 changes: 1 addition & 4 deletions examples/optimism/scripts/syncBatchRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ task('syncBatchRoot', 'Forward message to L2').setAction(async (taskArgs, hre) =
const minGasLimit = 200000;
const adapterParams = ethers.utils.defaultAbiCoder.encode(['uint256'], [minGasLimit]);
console.log('Prepare to forward the message to L2...');
let tx = await arbitrator.forwardMessage(optimismL1GatewayAddr, 0, executeCalldata, adapterParams, {
maxFeePerGas: 10000000000,
maxPriorityFeePerGas: 5000000000,
});
let tx = await arbitrator.forwardMessage(optimismL1GatewayAddr, 0, executeCalldata, adapterParams);
const txHash = tx.hash;
await tx.wait();
console.log(`The tx hash: ${txHash}`);
Expand Down

0 comments on commit e9d0e07

Please sign in to comment.