From 815024ef405226aa69521aab3a772b2e4b6393ba Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Wed, 19 Jan 2022 04:34:24 +0530 Subject: [PATCH] Weth connector fix --- contracts/optimism/connectors/weth/helpers.sol | 1 + contracts/optimism/connectors/weth/main.sol | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contracts/optimism/connectors/weth/helpers.sol b/contracts/optimism/connectors/weth/helpers.sol index 4c3e5c41..4f26ca19 100644 --- a/contracts/optimism/connectors/weth/helpers.sol +++ b/contracts/optimism/connectors/weth/helpers.sol @@ -4,4 +4,5 @@ import { TokenInterface } from "../../common/interfaces.sol"; abstract contract Helpers { TokenInterface constant internal wethContract = TokenInterface(0x4200000000000000000000000000000000000006); + TokenInterface constant internal wethFixContract = TokenInterface(0x4200000000000000000000000000000000000006); } diff --git a/contracts/optimism/connectors/weth/main.sol b/contracts/optimism/connectors/weth/main.sol index 0be13fd6..dab82d84 100644 --- a/contracts/optimism/connectors/weth/main.sol +++ b/contracts/optimism/connectors/weth/main.sol @@ -27,7 +27,7 @@ abstract contract Resolver is Events, DSMath, Basic, Helpers { uint _amt = getUint(getId, amt); _amt = _amt == uint(-1) ? address(this).balance : _amt; - wethContract.deposit{value: _amt}(); + wethFixContract.deposit{value: _amt}(); setUint(setId, _amt); @@ -50,8 +50,8 @@ abstract contract Resolver is Events, DSMath, Basic, Helpers { uint _amt = getUint(getId, amt); _amt = _amt == uint(-1) ? wethContract.balanceOf(address(this)) : _amt; - approve(wethContract, wethAddr, _amt); - wethContract.withdraw(_amt); + approve(wethFixContract, wethAddr, _amt); + wethFixContract.withdraw(_amt); setUint(setId, _amt);