@@ -6,21 +6,21 @@ pub type AddressMap = HashMap<u64, Address>;
6
6
7
7
#[ derive( Clone , Copy , Debug , Hash , PartialEq , Eq ) ]
8
8
pub struct ChainAddresses {
9
- v3_core_factory : Address ,
10
- multicall : Address ,
11
- quoter : Address ,
12
- quoter_v2 : Address ,
13
- v3_migrator : Option < Address > ,
14
- nonfungible_position_manager : Address ,
15
- tick_lens : Option < Address > ,
16
- swap_router02 : Option < Address > ,
17
- mixed_route_quoter_v1 : Option < Address > ,
18
- mixed_route_quoter_v2 : Option < Address > ,
19
-
20
- v4_pool_manager : Option < Address > ,
21
- v4_position_manager : Option < Address > ,
22
- v4_state_view : Option < Address > ,
23
- v4_quoter : Option < Address > ,
9
+ pub v3_core_factory : Address ,
10
+ pub multicall : Address ,
11
+ pub quoter : Address ,
12
+ pub quoter_v2 : Address ,
13
+ pub v3_migrator : Option < Address > ,
14
+ pub nonfungible_position_manager : Address ,
15
+ pub tick_lens : Option < Address > ,
16
+ pub swap_router02 : Option < Address > ,
17
+ pub mixed_route_quoter_v1 : Option < Address > ,
18
+ pub mixed_route_quoter_v2 : Option < Address > ,
19
+
20
+ pub v4_pool_manager : Option < Address > ,
21
+ pub v4_position_manager : Option < Address > ,
22
+ pub v4_state_view : Option < Address > ,
23
+ pub v4_quoter : Option < Address > ,
24
24
}
25
25
26
26
pub const DEFAULT_NETWORKS : [ ChainId ; 3 ] = [ ChainId :: MAINNET , ChainId :: GOERLI , ChainId :: SEPOLIA ] ;
@@ -109,6 +109,10 @@ lazy_static! {
109
109
ChainId :: MONAD_TESTNET as u64 ,
110
110
address!( "0x733e88f248b742db6c14c0b1713af5ad7fdd59d0" ) ,
111
111
) ,
112
+ (
113
+ ChainId :: SONEIUM as u64 ,
114
+ address!( "0x97febbc2adbd5644ba22736e962564b23f5828ce" ) ,
115
+ ) ,
112
116
] )
113
117
} ;
114
118
}
@@ -168,14 +172,22 @@ lazy_static! {
168
172
ChainId :: MONAD_TESTNET as u64 ,
169
173
address!( "0xfb8e1c3b833f9e67a71c859a132cf783b645e436" ) ,
170
174
) ,
175
+ (
176
+ ChainId :: SONEIUM as u64 ,
177
+ address!( "0x273f68c234fa55b550b40e563c4a488e0d334320" ) ,
178
+ ) ,
171
179
] )
172
180
} ;
173
181
}
174
182
183
+ /// Choose not to impl `Default` for `ChainAddresses` to avoid "[E0379]: functions in trait impls
184
+ /// cannot be declared const"
175
185
impl ChainAddresses {
176
186
/// Networks that share most of the same addresses i.e. Mainnet, Goerli, Optimism, Arbitrum,
177
187
/// Polygon
178
- const fn default ( ) -> Self {
188
+ #[ inline]
189
+ #[ must_use]
190
+ pub const fn default ( ) -> Self {
179
191
Self {
180
192
v3_core_factory : address ! ( "0x1F98431c8aD98523631AE4a59f267346ea31F984" ) ,
181
193
multicall : address ! ( "0x1F98415757620B543A52E61c46B32eB19261F984" ) ,
@@ -524,6 +536,22 @@ const MONAD_TESTNET_ADDRESSES: ChainAddresses = ChainAddresses {
524
536
..ChainAddresses :: default ( )
525
537
} ;
526
538
539
+ const SONEIUM_ADDRESSES : ChainAddresses = ChainAddresses {
540
+ v3_core_factory : address ! ( "0x42ae7ec7ff020412639d443e245d936429fbe717" ) ,
541
+ multicall : address ! ( "0x8ad5ef2f2508288d2de66f04dd883ad5f4ef62b2" ) ,
542
+ quoter : address ! ( "0x3e6c707d0125226ff60f291b6bd1404634f00aba" ) ,
543
+ v3_migrator : Some ( address ! ( "0xa107580f73bd797bd8b87ff24e98346d99f93ddb" ) ) ,
544
+ nonfungible_position_manager : address ! ( "0x56c1205b0244332011c1e866f4ea5384eb6bfa2c" ) ,
545
+ tick_lens : Some ( address ! ( "0xcd08eefb928c86499e6235ac155906bb7c4dc41a" ) ) ,
546
+ swap_router02 : Some ( address ! ( "0x7e40db01736f88464e5f4e42394f3d5bbb6705b9" ) ) ,
547
+
548
+ v4_pool_manager : Some ( address ! ( "0x360e68faccca8ca495c1b759fd9eee466db9fb32" ) ) ,
549
+ v4_position_manager : Some ( address ! ( "0x1b35d13a2e2528f192637f14b05f0dc0e7deb566" ) ) ,
550
+ v4_state_view : Some ( address ! ( "0x76fd297e2d437cd7f76d50f01afe6160f86e9990" ) ) ,
551
+ v4_quoter : Some ( address ! ( "0x3972c00f7ed4885e145823eb7c655375d275a1c5" ) ) ,
552
+ ..ChainAddresses :: default ( )
553
+ } ;
554
+
527
555
lazy_static ! {
528
556
/// A map of chain IDs to their corresponding Uniswap contract addresses.
529
557
///
@@ -559,6 +587,7 @@ lazy_static! {
559
587
( ChainId :: UNICHAIN_SEPOLIA as u64 , UNICHAIN_SEPOLIA_ADDRESSES ) ,
560
588
( ChainId :: UNICHAIN as u64 , UNICHAIN_ADDRESSES ) ,
561
589
( ChainId :: MONAD_TESTNET as u64 , MONAD_TESTNET_ADDRESSES ) ,
590
+ ( ChainId :: SONEIUM as u64 , SONEIUM_ADDRESSES ) ,
562
591
] )
563
592
} ;
564
593
}
0 commit comments