-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathPolygonAdapterTestnets.sol
54 lines (47 loc) · 2.03 KB
/
PolygonAdapterTestnets.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.8;
import {TestNetChainIds} from 'solidity-utils/contracts/utils/ChainHelpers.sol';
import {PolygonAdapterBase} from '../../src/contracts/adapters/polygon/PolygonAdapterBase.sol';
import {IPolygonAdapter} from '../../src/contracts/adapters/polygon/IPolygonAdapter.sol';
contract PolygonAdapterMumbai is PolygonAdapterBase {
/**
* @param crossChainController address of the cross chain controller that will use this bridge adapter
* @param fxTunnel polygon bridge address
* @param trustedRemotes list of remote configurations to set as trusted
*/
constructor(
address crossChainController,
address fxTunnel,
uint256 providerGasLimit,
TrustedRemotesConfig[] memory trustedRemotes
) PolygonAdapterBase(crossChainController, fxTunnel, providerGasLimit, trustedRemotes) {}
/// @inheritdoc IPolygonAdapter
function isDestinationChainIdSupported(uint256 chainId) public pure override returns (bool) {
return chainId == TestNetChainIds.ETHEREUM_SEPOLIA;
}
/// @inheritdoc IPolygonAdapter
function getOriginChainId() public pure override returns (uint256) {
return TestNetChainIds.ETHEREUM_SEPOLIA;
}
}
contract PolygonAdapterGoerli is PolygonAdapterBase {
/**
* @param crossChainController address of the cross chain controller that will use this bridge adapter
* @param fxTunnel polygon bridge address
* @param trustedRemotes list of remote configurations to set as trusted
*/
constructor(
address crossChainController,
address fxTunnel,
uint256 providerGasLimit,
TrustedRemotesConfig[] memory trustedRemotes
) PolygonAdapterBase(crossChainController, fxTunnel, providerGasLimit, trustedRemotes) {}
/// @inheritdoc IPolygonAdapter
function isDestinationChainIdSupported(uint256 chainId) public pure override returns (bool) {
return chainId == TestNetChainIds.POLYGON_AMOY;
}
/// @inheritdoc IPolygonAdapter
function getOriginChainId() public pure override returns (uint256) {
return TestNetChainIds.POLYGON_AMOY;
}
}