Merge pull request #163 from Instadapp/weth-optimism-connector-fix

[Optimism] WETH connector fix
This commit is contained in:
Thrilok kumar 2022-01-19 18:38:04 +05:30 committed by GitHub
commit 6450ceaba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -4,4 +4,5 @@ import { TokenInterface } from "../../common/interfaces.sol";
abstract contract Helpers {
TokenInterface constant internal wethContract = TokenInterface(0x4200000000000000000000000000000000000006);
TokenInterface constant internal wethFixContract = TokenInterface(0xa5044f8FfA8FbDdd0781cEDe502F1C493BB6978A);
}

View File

@ -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(wethContract, address(wethFixContract), _amt);
wethFixContract.withdraw(_amt);
setUint(setId, _amt);
@ -61,5 +61,5 @@ abstract contract Resolver is Events, DSMath, Basic, Helpers {
}
contract ConnectV2WETHOptimism is Resolver {
string constant public name = "WETH-v1.0";
string constant public name = "WETH-v1.1";
}