Skip to content

Commit

Permalink
Made depositWETH work with Sonic
Browse files Browse the repository at this point in the history
  • Loading branch information
naddison36 committed Jan 17, 2025
1 parent 570f5af commit dea4c4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/tasks/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
4 changes: 4 additions & 0 deletions contracts/utils/addresses.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down

0 comments on commit dea4c4f

Please sign in to comment.