From dea4c4fd8df58883b268ee02a8811836efb4e466 Mon Sep 17 00:00:00 2001 From: Nicholas Addison Date: Fri, 17 Jan 2025 14:31:28 +1100 Subject: [PATCH] Made depositWETH work with Sonic --- contracts/tasks/tasks.js | 3 ++- contracts/utils/addresses.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/contracts/tasks/tasks.js b/contracts/tasks/tasks.js index f4568955b9..7c458b08b1 100644 --- a/contracts/tasks/tasks.js +++ b/contracts/tasks/tasks.js @@ -254,7 +254,8 @@ subtask("depositWETH", "Deposit ETH into WETH") const signer = await getSigner(); const { chainId } = await ethers.provider.getNetwork(); - const wethAddress = addresses[networkMap[chainId]].WETH; + const symbol = chainId == 146 ? "wS" : "WETH"; + const wethAddress = addresses[networkMap[chainId]][symbol]; const weth = await ethers.getContractAt("IWETH9", wethAddress); await depositWETH({ ...taskArgs, weth, signer }); diff --git a/contracts/utils/addresses.js b/contracts/utils/addresses.js index d8200991ab..e8473375e0 100644 --- a/contracts/utils/addresses.js +++ b/contracts/utils/addresses.js @@ -352,6 +352,10 @@ addresses.sonic.admin = "0xAdDEA7933Db7d83855786EB43a238111C69B00b6"; addresses.sonic.guardian = "0x63cdd3072F25664eeC6FAEFf6dAeB668Ea4de94a"; addresses.sonic.timelock = "0x31a91336414d3B955E494E7d485a6B06b55FC8fB"; +addresses.sonic.OSonicProxy = "0xb1e25689D55734FD3ffFc939c4C3Eb52DFf8A794"; +addresses.sonic.WOSonicProxy = "0x9F0dF7799f6FDAd409300080cfF680f5A23df4b1"; +addresses.sonic.OSonicVaultProxy = "0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186"; + // Holesky addresses.holesky.WETH = "0x94373a4919B3240D86eA41593D5eBa789FEF3848";