@@ -30,6 +30,7 @@ library ChainIds {
3030 uint256 internal constant PLASMA = 9745 ;
3131 uint256 internal constant XLAYER = 196 ;
3232 uint256 internal constant ANVIL = 31337 ;
33+ uint256 internal constant MEGAETH = 4326 ;
3334}
3435
3536library TestNetChainIds {
@@ -54,6 +55,7 @@ library TestNetChainIds {
5455 uint256 internal constant BOB_SEPOLIA = 808813 ;
5556 uint256 internal constant PLASMA_TESTNET = 9746 ;
5657 uint256 internal constant XLAYER_TESTNET = 1952 ;
58+ uint256 internal constant MEGAETH_TESTNET = 6342 ;
5759}
5860
5961library ChainHelpers {
@@ -113,6 +115,8 @@ library ChainHelpers {
113115 newFork = vm.createSelectFork (vm.rpcUrl ('plasma ' ));
114116 } else if (chainId == ChainIds.XLAYER) {
115117 newFork = vm.createSelectFork (vm.rpcUrl ('xlayer ' ));
118+ } else if (chainId == ChainIds.MEGAETH) {
119+ newFork = vm.createSelectFork (vm.rpcUrl ('megaeth ' ));
116120 } else {
117121 revert UnknownChainId ();
118122 }
@@ -163,6 +167,8 @@ library ChainHelpers {
163167 networkName = 'plasma ' ;
164168 } else if (chainId == ChainIds.XLAYER) {
165169 networkName = 'xlayer ' ;
170+ } else if (chainId == ChainIds.MEGAETH) {
171+ networkName = 'megaeth ' ;
166172 }
167173 // testnets
168174 else if (chainId == TestNetChainIds.ETHEREUM_SEPOLIA) {
@@ -203,6 +209,8 @@ library ChainHelpers {
203209 networkName = 'plasma_testnet ' ;
204210 } else if (chainId == TestNetChainIds.XLAYER_TESTNET) {
205211 networkName = 'xlayer_testnet ' ;
212+ } else if (chainId == TestNetChainIds.MEGAETH_TESTNET) {
213+ networkName = 'megaeth_testnet ' ;
206214 } else {
207215 revert ('chain id is not supported ' );
208216 }
0 commit comments