diff --git a/contracts/zero-ex/CHANGELOG.json b/contracts/zero-ex/CHANGELOG.json index 209b788709..28f073b64f 100644 --- a/contracts/zero-ex/CHANGELOG.json +++ b/contracts/zero-ex/CHANGELOG.json @@ -1,4 +1,12 @@ [ + { + "version": "0.48.0", + "changes": [ + { + "note": "Add VelodromeV2 support on Base" + } + ] + }, { "version": "0.47.0", "changes": [ diff --git a/contracts/zero-ex/contracts/src/transformers/bridges/BaseBridgeAdapter.sol b/contracts/zero-ex/contracts/src/transformers/bridges/BaseBridgeAdapter.sol index 4d743712d1..aec3042eb4 100644 --- a/contracts/zero-ex/contracts/src/transformers/bridges/BaseBridgeAdapter.sol +++ b/contracts/zero-ex/contracts/src/transformers/bridges/BaseBridgeAdapter.sol @@ -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); } diff --git a/contracts/zero-ex/tests/transformers/bridges/BaseBridgeAdapterTest.t.sol b/contracts/zero-ex/tests/transformers/bridges/BaseBridgeAdapterTest.t.sol index 684a5d862e..c9a708cfbb 100644 --- a/contracts/zero-ex/tests/transformers/bridges/BaseBridgeAdapterTest.t.sol +++ b/contracts/zero-ex/tests/transformers/bridges/BaseBridgeAdapterTest.t.sol @@ -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))); + } } diff --git a/packages/contract-addresses/CHANGELOG.json b/packages/contract-addresses/CHANGELOG.json index a7b1acfc9b..2161d74a1d 100644 --- a/packages/contract-addresses/CHANGELOG.json +++ b/packages/contract-addresses/CHANGELOG.json @@ -1,4 +1,12 @@ [ + { + "version": "8.12.0", + "changes": [ + { + "note": "Add VelodromeV2 support on Base" + } + ] + }, { "version": "8.11.0", "changes": [ diff --git a/packages/contract-addresses/addresses.json b/packages/contract-addresses/addresses.json index 3b639c0339..2f03d6f541 100644 --- a/packages/contract-addresses/addresses.json +++ b/packages/contract-addresses/addresses.json @@ -271,7 +271,7 @@ "wethTransformer": "0x63186ea36e78ecbf0128e448362f1b81e9bf7412", "payTakerTransformer": "0x5cc22a0e06ea11097c612a962e63674b90e96099", "affiliateFeeTransformer": "0x9e52d8b32d835206d09810c310593bcc77264066", - "fillQuoteTransformer": "0xab93d03a3e7e51ec5edaef75d27f20917da4c18e", + "fillQuoteTransformer": "0x2c46d57bb5af87a13a51dd5b62ba7d3bc7e12e9c", "positiveSlippageFeeTransformer": "0xf98a130d3b4029c70e6d93098cb82a003421341e" } }