11use ethrex_common:: { H160 , types:: ChainConfig } ;
22use serde:: Deserialize ;
3- use std:: cell :: LazyCell ;
3+ use std:: sync :: LazyLock ;
44use std:: str:: FromStr ;
55
66// Chain config for different forks as defined on https://ethereum.github.io/execution-spec-tests/v3.0.0/consuming_tests/common_types/#fork
7- pub static MERGE_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
7+ pub static MERGE_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
88 chain_id : 1_u64 ,
99 homestead_block : Some ( 0 ) ,
1010 dao_fork_block : Some ( 0 ) ,
@@ -25,24 +25,24 @@ pub static MERGE_CONFIG: LazyCell<ChainConfig> = LazyCell::new(|| ChainConfig {
2525 terminal_total_difficulty : Some ( 0 ) ,
2626 ..Default :: default ( )
2727} ) ;
28- pub static MERGE_TO_SHANGHAI_AT_15K_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
28+ pub static MERGE_TO_SHANGHAI_AT_15K_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
2929 shanghai_time : Some ( 0x3a98 ) ,
3030 ..* MERGE_CONFIG
3131} ) ;
32- pub static SHANGHAI_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
32+ pub static SHANGHAI_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
3333 shanghai_time : Some ( 0 ) ,
3434 ..* MERGE_CONFIG
3535} ) ;
36- pub static SHANGHAI_TO_CANCUN_AT_15K_CONFIG : LazyCell < ChainConfig > =
37- LazyCell :: new ( || ChainConfig {
36+ pub static SHANGHAI_TO_CANCUN_AT_15K_CONFIG : LazyLock < ChainConfig > =
37+ LazyLock :: new ( || ChainConfig {
3838 cancun_time : Some ( 0x3a98 ) ,
3939 ..* SHANGHAI_CONFIG
4040 } ) ;
41- pub static CANCUN_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
41+ pub static CANCUN_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
4242 cancun_time : Some ( 0 ) ,
4343 ..* SHANGHAI_CONFIG
4444} ) ;
45- pub static CANCUN_TO_PRAGUE_AT_15K_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || {
45+ pub static CANCUN_TO_PRAGUE_AT_15K_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || {
4646 ChainConfig {
4747 prague_time : Some ( 0x3a98 ) ,
4848 // Mainnet address
@@ -51,43 +51,43 @@ pub static CANCUN_TO_PRAGUE_AT_15K_CONFIG: LazyCell<ChainConfig> = LazyCell::new
5151 ..* CANCUN_CONFIG
5252 }
5353} ) ;
54- pub static PRAGUE_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
54+ pub static PRAGUE_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
5555 prague_time : Some ( 0 ) ,
5656 ..* CANCUN_TO_PRAGUE_AT_15K_CONFIG
5757} ) ;
5858
59- pub static PRAGUE_TO_OSAKA_AT_15K_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
59+ pub static PRAGUE_TO_OSAKA_AT_15K_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
6060 osaka_time : Some ( 0x3a98 ) ,
6161 ..* PRAGUE_CONFIG
6262} ) ;
6363
64- pub static OSAKA_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
64+ pub static OSAKA_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
6565 osaka_time : Some ( 0 ) ,
6666 ..* PRAGUE_CONFIG
6767} ) ;
6868
69- pub static OSAKA_TO_BPO1_AT_15K_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
69+ pub static OSAKA_TO_BPO1_AT_15K_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
7070 bpo1_time : Some ( 0x3a98 ) ,
7171 ..* OSAKA_CONFIG
7272} ) ;
7373
74- pub static BPO1_TO_BPO2_AT_15K_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
74+ pub static BPO1_TO_BPO2_AT_15K_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
7575 bpo1_time : Some ( 0 ) ,
7676 bpo2_time : Some ( 0x3a98 ) ,
7777 ..* OSAKA_CONFIG
7878} ) ;
7979
80- pub static BPO2_TO_BPO3_AT_15K_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
80+ pub static BPO2_TO_BPO3_AT_15K_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
8181 bpo2_time : Some ( 0 ) ,
8282 bpo3_time : Some ( 0x3a98 ) ,
8383 ..* OSAKA_CONFIG
8484} ) ;
85- pub static BPO3_TO_BPO4_AT_15K_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
85+ pub static BPO3_TO_BPO4_AT_15K_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
8686 bpo3_time : Some ( 0 ) ,
8787 bpo4_time : Some ( 0x3a98 ) ,
8888 ..* OSAKA_CONFIG
8989} ) ;
90- pub static BPO4_TO_BPO5_AT_15K_CONFIG : LazyCell < ChainConfig > = LazyCell :: new ( || ChainConfig {
90+ pub static BPO4_TO_BPO5_AT_15K_CONFIG : LazyLock < ChainConfig > = LazyLock :: new ( || ChainConfig {
9191 bpo4_time : Some ( 0 ) ,
9292 bpo5_time : Some ( 0x3a98 ) ,
9393 ..* OSAKA_CONFIG
0 commit comments