Skip to content

Commit 01e2690

Browse files
authored
Check UniswapV3 support on Avalanche and BSC BridgeAdapters (#737)
1 parent 4835a1b commit 01e2690

2 files changed

Lines changed: 70 additions & 0 deletions

File tree

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/AvalancheBridgeAdapter.sol";
20+
import "../../../contracts/src/transformers/bridges/BridgeProtocols.sol";
21+
22+
contract AvalancheBridgeAdapterTest is Test {
23+
address constant WAVAX = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7;
24+
25+
AvalancheBridgeAdapter private adapter;
26+
27+
function setUp() public {
28+
vm.chainId(43114);
29+
adapter = new AvalancheBridgeAdapter(IEtherToken(WAVAX));
30+
}
31+
32+
function testSupportsUniswapV3() public {
33+
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.UNISWAPV3) << 128)));
34+
}
35+
}
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/BSCBridgeAdapter.sol";
20+
import "../../../contracts/src/transformers/bridges/BridgeProtocols.sol";
21+
22+
contract BSCBridgeAdapterTest is Test {
23+
address constant WBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;
24+
25+
BSCBridgeAdapter private adapter;
26+
27+
function setUp() public {
28+
vm.chainId(56);
29+
adapter = new BSCBridgeAdapter(IEtherToken(WBNB));
30+
}
31+
32+
function testSupportsUniswapV3() public {
33+
assertTrue(adapter.isSupportedSource(bytes32(uint256(BridgeProtocols.UNISWAPV3) << 128)));
34+
}
35+
}

0 commit comments

Comments
 (0)