Skip to content

Commit 19e0c33

Browse files
authored
Add Velodrome V2 compatibility test to Optimism Bridge Adapter Test (0xProject#740)
* Add Velodrome V2 compatibility test to Optimism Bridge Adapter Test * Replace Avalanche Bridge Adapter with Optimism Bridge Adapter
1 parent 43e3dce commit 19e0c33

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
/*
3+
Copyright 2023 ZeroEx Intl.
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
*/
14+
15+
pragma solidity ^0.6.5;
16+
pragma experimental ABIEncoderV2;
17+
18+
import "forge-std/Test.sol";
19+
import "../../../contracts/src/transformers/bridges/OptimismBridgeAdapter.sol";
20+
import "../../../contracts/src/transformers/bridges/BridgeProtocols.sol";
21+
22+
contract OptimismBridgeAdapterTest is Test {
23+
address constant WETH = 0x4200000000000000000000000000000000000006;
24+
25+
OptimismBridgeAdapter private adapter;
26+
27+
function setUp() public {
28+
vm.chainId(10);
29+
adapter = new OptimismBridgeAdapter(IEtherToken(WETH));
30+
}
31+
32+
function testSupportVelodromeV2() public {
33+
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.VELODROMEV2) << 128)));
34+
}
35+
}

0 commit comments

Comments
 (0)