Skip to content

Commit

Permalink
Merge pull request #23 from wormhole-foundation/chain-ids
Browse files Browse the repository at this point in the history
Add Wormhole Chain IDs and license comments atop files
  • Loading branch information
nik-suri authored Jan 4, 2024
2 parents bacbe82 + bb2c3a4 commit dc1e9f2
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Base.sol
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.13;

import "./interfaces/IWormholeReceiver.sol";
Expand Down
1 change: 1 addition & 0 deletions src/CCTPAndTokenBase.sol
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.13;

import "./interfaces/IWormholeReceiver.sol";
Expand Down
1 change: 1 addition & 0 deletions src/CCTPBase.sol
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.13;

import "./interfaces/IWormholeReceiver.sol";
Expand Down
48 changes: 48 additions & 0 deletions src/Chains.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.13;

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

import "./interfaces/IWormholeReceiver.sol";
Expand Down
1 change: 1 addition & 0 deletions src/Utils.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

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

import "./interfaces/IWormholeRelayer.sol";
Expand Down
2 changes: 2 additions & 0 deletions src/WormholeRelayerSDK.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.8.13;

import "./interfaces/IWormholeReceiver.sol";
import "./interfaces/IWormholeRelayer.sol";
import "./Chains.sol";
import "./Utils.sol";
import {Base} from "./Base.sol";
import {TokenBase, TokenReceiver, TokenSender} from "./TokenBase.sol";
Expand Down

0 comments on commit dc1e9f2

Please sign in to comment.