mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
Merge pull request #1 from shriyatyagii/connext-connectors
This commit is contained in:
commit
77fae20b5b
|
@ -62,6 +62,6 @@ abstract contract ConnextResolver is Helpers {
|
|||
}
|
||||
}
|
||||
|
||||
contract ConnectV2ConnextOptimism is ConnextResolver {
|
||||
contract ConnectV2ConnextArbitrum is ConnextResolver {
|
||||
string public constant name = "Connext-v1.0";
|
||||
}
|
||||
|
|
|
@ -62,6 +62,6 @@ abstract contract ConnextResolver is Helpers {
|
|||
}
|
||||
}
|
||||
|
||||
contract ConnectV2ConnextOptimism is ConnextResolver {
|
||||
contract ConnectV2Connext is ConnextResolver {
|
||||
string public constant name = "Connext-v1.0";
|
||||
}
|
||||
|
|
|
@ -30,14 +30,14 @@ abstract contract ConnextResolver is Helpers {
|
|||
{
|
||||
uint256 _amount = getUint(getId, params.amount);
|
||||
TokenInterface tokenContract = TokenInterface(params.asset);
|
||||
bool isNative = params.asset == ethAddr;
|
||||
bool isNative = params.asset == maticAddr;
|
||||
|
||||
if (isNative) {
|
||||
_amount = _amount == uint256(-1) ? address(this).balance : _amount;
|
||||
params.asset = wethAddr;
|
||||
params.asset = wmaticAddr;
|
||||
tokenContract = TokenInterface(params.asset);
|
||||
// xcall does not take native asset, must wrap
|
||||
convertEthToWeth(true, tokenContract, _amount);
|
||||
convertMaticToWmatic(true, tokenContract, _amount);
|
||||
|
||||
} else {
|
||||
_amount = _amount == uint256(-1) ? tokenContract.balanceOf(address(this)) : _amount;
|
||||
|
@ -62,6 +62,6 @@ abstract contract ConnextResolver is Helpers {
|
|||
}
|
||||
}
|
||||
|
||||
contract ConnectV2ConnextOptimism is ConnextResolver {
|
||||
contract ConnectV2ConnextPolygon is ConnextResolver {
|
||||
string public constant name = "Connext-v1.0";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user