Add Velodrome V2 support on Base
This commit is contained in:
parent
5a49be1322
commit
5c76a87544
@ -1,4 +1,12 @@
|
||||
[
|
||||
{
|
||||
"version": "0.48.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add VelodromeV2 support on Base"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "0.47.0",
|
||||
"changes": [
|
||||
|
@ -24,6 +24,7 @@ import "./mixins/MixinCurve.sol";
|
||||
import "./mixins/MixinCurveV2.sol";
|
||||
import "./mixins/MixinMaverickV1.sol";
|
||||
import "./mixins/MixinSolidly.sol";
|
||||
import "./mixins/MixinVelodromeV2.sol";
|
||||
|
||||
contract BaseBridgeAdapter is
|
||||
AbstractBridgeAdapter(8453, "Base"),
|
||||
@ -33,7 +34,8 @@ contract BaseBridgeAdapter is
|
||||
MixinCurve,
|
||||
MixinCurveV2,
|
||||
MixinMaverickV1,
|
||||
MixinSolidly
|
||||
MixinSolidly,
|
||||
MixinVelodromeV2
|
||||
{
|
||||
constructor(IEtherToken weth) public MixinCurve(weth) {}
|
||||
|
||||
@ -80,6 +82,11 @@ contract BaseBridgeAdapter is
|
||||
return (0, true);
|
||||
}
|
||||
boughtAmount = _tradeMaverickV1(sellToken, buyToken, sellAmount, order.bridgeData);
|
||||
} else if (protocolId == BridgeProtocols.VELODROMEV2) {
|
||||
if (dryRun) {
|
||||
return (0, true);
|
||||
}
|
||||
boughtAmount = _tradeVelodromeV2(sellToken, sellAmount, order.bridgeData);
|
||||
}
|
||||
emit BridgeFill(order.source, sellToken, buyToken, sellAmount, boughtAmount);
|
||||
}
|
||||
|
@ -36,4 +36,12 @@ contract BaseBridgeAdapterTest is Test {
|
||||
function testSupportMaverickV1() public {
|
||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.MAVERICKV1) << 128)));
|
||||
}
|
||||
|
||||
function testSupportSolidly() public {
|
||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.SOLIDLY) << 128)));
|
||||
}
|
||||
|
||||
function testSupportVelodromeV2() public {
|
||||
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.VELODROMEV2) << 128)));
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,12 @@
|
||||
[
|
||||
{
|
||||
"version": "8.12.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add VelodromeV2 support on Base"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "8.11.0",
|
||||
"changes": [
|
||||
|
@ -271,7 +271,7 @@
|
||||
"wethTransformer": "0x63186ea36e78ecbf0128e448362f1b81e9bf7412",
|
||||
"payTakerTransformer": "0x5cc22a0e06ea11097c612a962e63674b90e96099",
|
||||
"affiliateFeeTransformer": "0x9e52d8b32d835206d09810c310593bcc77264066",
|
||||
"fillQuoteTransformer": "0xab93d03a3e7e51ec5edaef75d27f20917da4c18e",
|
||||
"fillQuoteTransformer": "0x2c46d57bb5af87a13a51dd5b62ba7d3bc7e12e9c",
|
||||
"positiveSlippageFeeTransformer": "0xf98a130d3b4029c70e6d93098cb82a003421341e"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user