diff --git a/scripts/config.ts b/scripts/config.ts index 15c1a93..b24cc96 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -48,7 +48,6 @@ const NETWORKS = { }, TREASURY_FEE_PERCENT: 100, // in BPS i.e 0.1% GATEWAY_CONTRACT: "0x1FA0EE7F9410F6fa49B7AD5Da72Cf01647090028", - IMPLEMENTATION: "", }, /** @@ -154,7 +153,7 @@ const NETWORKS = { * @dev Base Sepolia */ 84532: { - IMPLEMENTATION: "0xff0E00E0110C1FBb5315D276243497b66D3a4d8a", + GATEWAY_IMPLEMENTATION: "0xff0E00E0110C1FBb5315D276243497b66D3a4d8a", RPC_URL: `https://rpc.shield3.com/v3/0x14a34/${SHIELD3_API_KEY}/rpc`, SUPPORTED_TOKENS: { USDC: "0x036CbD53842c5426634e7929541eC2318f3dCF7e", diff --git a/scripts/deploy.ts b/scripts/deploy.ts index c6246d2..93021b2 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -57,8 +57,9 @@ async function deployGateway(): Promise { async function main() { - const response = await waitForInput("\nDo you want to deploy a new Gateway proxy? y/N\n"); - if (response !== "y") { + const response = await waitForInput("\nDo you want to deploy a new Gateway proxy? y\n"); + const responseStr = response as string; // Cast response to string + if (responseStr.toLowerCase() !== "y") { await deployGateway(); } else { await deployGatewayProxy(); diff --git a/scripts/utils.ts b/scripts/utils.ts index 7c171ae..9b72ac4 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -101,15 +101,15 @@ export async function updateConfigFile(chainId: number, implementationAddress: s configContent = configContent.replace(networkRegex, (match) => { const lines = match.split('\n'); const updatedLines = lines.map(line => { - if (line.trim().startsWith('IMPLEMENTATION:')) { - return line.replace(/IMPLEMENTATION:.*/, `IMPLEMENTATION: "${implementationAddress}",`); + if (line.trim().startsWith('GATEWAY_IMPLEMENTATION:')) { + return line.replace(/IMPLEMENTATION:.*/, `GATEWAY_IMPLEMENTATION: "${implementationAddress}",`); } return line; }); - if (!updatedLines.some(line => line.trim().startsWith('IMPLEMENTATION:'))) { + if (!updatedLines.some(line => line.trim().startsWith('GATEWAY_IMPLEMENTATION:'))) { // If IMPLEMENTATION doesn't exist, add it before the closing brace - updatedLines.splice(-1, 0, `\t\tIMPLEMENTATION: "${implementationAddress}",`); + updatedLines.splice(-1, 0, `\t\GATEWAY_IMPLEMENTATION: "${implementationAddress}",`); } return updatedLines.join('\n');