@@ -16,6 +16,17 @@ import {InteroperableAddress} from "@openzeppelin/contracts/utils/draft-Interope
16
16
abstract contract AxelarGatewayBase is Ownable {
17
17
using InteroperableAddress for bytes ;
18
18
19
+ /// @dev Axelar's official gateway for the current chain.
20
+ IAxelarGateway internal immutable _axelarGateway;
21
+
22
+ // Remote gateway.
23
+ // `addr` is the isolated address part of ERC-7930. Its not a full ERC-7930 interoperable address.
24
+ mapping (bytes2 chainType = > mapping (bytes chainReference = > bytes addr )) private _remoteGateways;
25
+
26
+ // chain equivalence ERC-7930 (no address) <> Axelar
27
+ mapping (bytes erc7930 = > string axelar ) private _erc7930ToAxelar;
28
+ mapping (string axelar = > bytes erc7930 ) private _axelarToErc7930;
29
+
19
30
/// @dev A remote gateway has been registered for a chain.
20
31
event RegisteredRemoteGateway (bytes remote );
21
32
@@ -29,17 +40,6 @@ abstract contract AxelarGatewayBase is Ownable {
29
40
error ChainEquivalenceAlreadyRegistered (bytes erc7930binary , string axelar );
30
41
error RemoteGatewayAlreadyRegistered (bytes2 chainType , bytes chainReference );
31
42
32
- /// @dev Axelar's official gateway for the current chain.
33
- IAxelarGateway internal immutable _axelarGateway;
34
-
35
- // Remote gateway.
36
- // `addr` is the isolated address part of ERC-7930. Its not a full ERC-7930 interoperable address.
37
- mapping (bytes2 chainType = > mapping (bytes chainReference = > bytes addr )) private _remoteGateways;
38
-
39
- // chain equivalence ERC-7930 (no address) <> Axelar
40
- mapping (bytes erc7930 = > string axelar ) private _erc7930ToAxelar;
41
- mapping (string axelar = > bytes erc7930 ) private _axelarToErc7930;
42
-
43
43
/// @dev Sets the local gateway address (i.e. Axelar's official gateway for the current chain).
44
44
constructor (IAxelarGateway _gateway ) {
45
45
_axelarGateway = _gateway;
0 commit comments