File tree 4 files changed +13
-0
lines changed
4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
12
12
### Features
13
13
14
14
* bump snapshot version to 4.12.2 [ #2093 ] ( https://github.com/hyperledger/web3j/pull/2093 )
15
+ * Adds Support for Linea ENS [ #2094 ] ( https://github.com/hyperledger/web3j/pull/2094 )
15
16
16
17
### BREAKING CHANGES
17
18
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ public class Contracts {
22
22
public static final String RINKEBY = "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" ;
23
23
public static final String GOERLI = "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" ;
24
24
public static final String SEPOLIA = "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" ;
25
+ public static final String LINEA = "0x50130b669B28C339991d8676FA73CF122a121267" ;
26
+ public static final String LINEA_SEPOLIA = "0x5B2636F0f2137B4aE722C01dd5122D7d3e9541f7" ;
25
27
26
28
public static String resolveRegistryContract (String chainId ) {
27
29
final Long chainIdLong = Long .parseLong (chainId );
@@ -35,6 +37,10 @@ public static String resolveRegistryContract(String chainId) {
35
37
return GOERLI ;
36
38
} else if (chainIdLong .equals (ChainIdLong .SEPOLIA )) {
37
39
return SEPOLIA ;
40
+ } else if (chainIdLong .equals (ChainIdLong .LINEA )) {
41
+ return LINEA ;
42
+ } else if (chainIdLong .equals (ChainIdLong .LINEA_SEPOLIA )) {
43
+ return LINEA_SEPOLIA ;
38
44
} else {
39
45
throw new EnsResolutionException (
40
46
"Unable to resolve ENS registry contract for network id: " + chainId );
Original file line number Diff line number Diff line change @@ -25,4 +25,6 @@ public class ChainIdLong {
25
25
public static final long KOVAN = 42 ;
26
26
public static final long ETHEREUM_CLASSIC_MAINNET = 61 ;
27
27
public static final long ETHEREUM_CLASSIC_TESTNET = 62 ;
28
+ public static final long LINEA = 59144 ;
29
+ public static final long LINEA_SEPOLIA = 59141 ;
28
30
}
Original file line number Diff line number Diff line change 18
18
19
19
import static org .junit .jupiter .api .Assertions .assertEquals ;
20
20
import static org .junit .jupiter .api .Assertions .assertThrows ;
21
+ import static org .web3j .ens .Contracts .LINEA ;
22
+ import static org .web3j .ens .Contracts .LINEA_SEPOLIA ;
21
23
import static org .web3j .ens .Contracts .MAINNET ;
22
24
import static org .web3j .ens .Contracts .RINKEBY ;
23
25
import static org .web3j .ens .Contracts .ROPSTEN ;
@@ -33,6 +35,8 @@ public void testResolveRegistryContract() {
33
35
assertEquals (resolveRegistryContract (ChainIdLong .ROPSTEN + "" ), (ROPSTEN ));
34
36
assertEquals (resolveRegistryContract (ChainIdLong .RINKEBY + "" ), (RINKEBY ));
35
37
assertEquals (resolveRegistryContract (ChainIdLong .SEPOLIA + "" ), (SEPOLIA ));
38
+ assertEquals (resolveRegistryContract (ChainIdLong .LINEA + "" ), (LINEA ));
39
+ assertEquals (resolveRegistryContract (ChainIdLong .LINEA_SEPOLIA + "" ), (LINEA_SEPOLIA ));
36
40
}
37
41
38
42
@ Test
You can’t perform that action at this time.
0 commit comments