Skip to content

Commit dc1e9f2

Browse files
authored
Merge pull request #23 from wormhole-foundation/chain-ids
Add Wormhole Chain IDs and license comments atop files
2 parents bacbe82 + bb2c3a4 commit dc1e9f2

File tree

7 files changed

+55
-0
lines changed

7 files changed

+55
-0
lines changed

src/Base.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// SPDX-License-Identifier: Apache 2
12
pragma solidity ^0.8.13;
23

34
import "./interfaces/IWormholeReceiver.sol";

src/CCTPAndTokenBase.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// SPDX-License-Identifier: Apache 2
12
pragma solidity ^0.8.13;
23

34
import "./interfaces/IWormholeReceiver.sol";

src/CCTPBase.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// SPDX-License-Identifier: Apache 2
12
pragma solidity ^0.8.13;
23

34
import "./interfaces/IWormholeReceiver.sol";

src/Chains.sol

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// SPDX-License-Identifier: Apache 2
2+
pragma solidity ^0.8.13;
3+
4+
// In the wormhole wire format, 0 indicates that a message is for any destination chain
5+
uint16 constant CHAIN_ID_UNSET = 0;
6+
uint16 constant CHAIN_ID_SOLANA = 1;
7+
uint16 constant CHAIN_ID_ETHEREUM = 2;
8+
uint16 constant CHAIN_ID_TERRA = 3;
9+
uint16 constant CHAIN_ID_BSC = 4;
10+
uint16 constant CHAIN_ID_POLYGON = 5;
11+
uint16 constant CHAIN_ID_AVALANCHE = 6;
12+
uint16 constant CHAIN_ID_OASIS = 7;
13+
uint16 constant CHAIN_ID_ALGORAND = 8;
14+
uint16 constant CHAIN_ID_AURORA = 9;
15+
uint16 constant CHAIN_ID_FANTOM = 10;
16+
uint16 constant CHAIN_ID_KARURA = 11;
17+
uint16 constant CHAIN_ID_ACALA = 12;
18+
uint16 constant CHAIN_ID_KLAYTN = 13;
19+
uint16 constant CHAIN_ID_CELO = 14;
20+
uint16 constant CHAIN_ID_NEAR = 15;
21+
uint16 constant CHAIN_ID_MOONBEAM = 16;
22+
uint16 constant CHAIN_ID_NEON = 17;
23+
uint16 constant CHAIN_ID_TERRA2 = 18;
24+
uint16 constant CHAIN_ID_INJECTIVE = 19;
25+
uint16 constant CHAIN_ID_OSMOSIS = 20;
26+
uint16 constant CHAIN_ID_SUI = 21;
27+
uint16 constant CHAIN_ID_APTOS = 22;
28+
uint16 constant CHAIN_ID_ARBITRUM = 23;
29+
uint16 constant CHAIN_ID_OPTIMISM = 24;
30+
uint16 constant CHAIN_ID_GNOSIS = 25;
31+
uint16 constant CHAIN_ID_PYTHNET = 26;
32+
uint16 constant CHAIN_ID_XPLA = 28;
33+
uint16 constant CHAIN_ID_BTC = 29;
34+
uint16 constant CHAIN_ID_BASE = 30;
35+
uint16 constant CHAIN_ID_SEI = 32;
36+
uint16 constant CHAIN_ID_ROOTSTOCK = 33;
37+
uint16 constant CHAIN_ID_SCROLL = 34;
38+
uint16 constant CHAIN_ID_MANTLE = 35;
39+
uint16 constant CHAIN_ID_WORMCHAIN = 3104;
40+
uint16 constant CHAIN_ID_COSMOSHUB = 4000;
41+
uint16 constant CHAIN_ID_EVMOS = 4001;
42+
uint16 constant CHAIN_ID_KUJIRA = 4002;
43+
uint16 constant CHAIN_ID_NEUTRON = 4003;
44+
uint16 constant CHAIN_ID_CELESTIA = 4004;
45+
uint16 constant CHAIN_ID_SEPOLIA = 10002;
46+
uint16 constant CHAIN_ID_ARBITRUM_SEPOLIA = 10003;
47+
uint16 constant CHAIN_ID_BASE_SEPOLIA = 10004;
48+
uint16 constant CHAIN_ID_OPTIMISM_SEPOLIA = 10005;

src/TokenBase.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// SPDX-License-Identifier: Apache 2
12
pragma solidity ^0.8.13;
23

34
import "./interfaces/IWormholeReceiver.sol";

src/Utils.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
// SPDX-License-Identifier: Apache 2
23
pragma solidity ^0.8.13;
34

45
import "./interfaces/IWormholeRelayer.sol";

src/WormholeRelayerSDK.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
// SPDX-License-Identifier: Apache 2
12
pragma solidity ^0.8.13;
23

34
import "./interfaces/IWormholeReceiver.sol";
45
import "./interfaces/IWormholeRelayer.sol";
6+
import "./Chains.sol";
57
import "./Utils.sol";
68
import {Base} from "./Base.sol";
79
import {TokenBase, TokenReceiver, TokenSender} from "./TokenBase.sol";

0 commit comments

Comments
 (0)