diff --git a/scripts/common.ts b/scripts/common.ts index 44c9d364c..7c18dac82 100644 --- a/scripts/common.ts +++ b/scripts/common.ts @@ -13,7 +13,7 @@ export async function getFeeOverrides(): Promise { const network = await ethers.provider.getNetwork(); if (network.chainId == 59144) { // for linea - return { maxFeePerGas: 5000000000, maxPriorityFeePerGas: 4900000000}; + return { maxFeePerGas: 5000000000, maxPriorityFeePerGas: 4900000000 }; } if (feeData.maxFeePerGas) { return { maxFeePerGas: feeData.maxFeePerGas, maxPriorityFeePerGas: feeData.maxPriorityFeePerGas || 0 }; diff --git a/scripts/sentinel/update_guard_state.ts b/scripts/sentinel/sentinel_guard.ts similarity index 68% rename from scripts/sentinel/update_guard_state.ts rename to scripts/sentinel/sentinel_guard.ts index dda619d8e..ed6200bec 100644 --- a/scripts/sentinel/update_guard_state.ts +++ b/scripts/sentinel/sentinel_guard.ts @@ -7,7 +7,7 @@ import { getDeployerSigner, getFeeOverrides } from '../common'; dotenv.config(); -async function updateGuardState(): Promise { +async function guard(): Promise { const deployerSigner = await getDeployerSigner(); const feeOverrides = await getFeeOverrides(); @@ -16,9 +16,7 @@ async function updateGuardState(): Promise { return; } const sentinel = Sentinel__factory.connect(sentinelAddr, deployerSigner); - const guardState = process.env.SENTINEL_GUARD_STATE as string; - await (await sentinel.updateGuardState(guardState, feeOverrides)).wait(); - + await (await sentinel.guard(feeOverrides)).wait(); } -updateGuardState(); +guard(); diff --git a/scripts/sentinel/sentinel_relax.ts b/scripts/sentinel/sentinel_relax.ts new file mode 100644 index 000000000..612c3deda --- /dev/null +++ b/scripts/sentinel/sentinel_relax.ts @@ -0,0 +1,22 @@ +import 'hardhat-deploy'; + +import * as dotenv from 'dotenv'; + +import { Sentinel__factory } from '../../typechain'; +import { getDeployerSigner, getFeeOverrides } from '../common'; + +dotenv.config(); + +async function relax(): Promise { + const deployerSigner = await getDeployerSigner(); + const feeOverrides = await getFeeOverrides(); + + const sentinelAddr = process.env.SENTINEL as string; + if (!sentinelAddr) { + return; + } + const sentinel = Sentinel__factory.connect(sentinelAddr, deployerSigner); + await (await sentinel.relax(feeOverrides)).wait(); +} + +relax();