File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
crates/constants/src/types Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ impl SignetEnvironmentConstants {
51
51
52
52
impl TryFrom < KnownChains > for SignetEnvironmentConstants {
53
53
type Error = ParseChainError ;
54
+ <<<<<<< HEAD
54
55
55
56
fn try_from( chain : KnownChains ) -> Result < Self , Self :: Error > {
56
57
match chain {
@@ -61,6 +62,22 @@ impl TryFrom<KnownChains> for SignetEnvironmentConstants {
61
62
}
62
63
}
63
64
65
+ impl FromStr for SignetEnvironmentConstants {
66
+ type Err = ParseChainError ;
67
+
68
+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
69
+ s. parse :: < KnownChains > ( ) ?. try_into ( )
70
+ =======
71
+
72
+ fn try_from ( chain : KnownChains ) -> Result < Self , Self :: Error > {
73
+ match chain {
74
+ #[ cfg ( any( test, feature = "test-utils" ) ) ]
75
+ KnownChains :: Test => Ok ( Self :: test ( ) ) ,
76
+ }
77
+ >>>>>>> 0 dd5b37 ( feat : TryFrom impl for known chains on relevant types ( #97 ) )
78
+ }
79
+ }
80
+
64
81
impl FromStr for SignetEnvironmentConstants {
65
82
type Err = ParseChainError ;
66
83
Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ impl SignetSystemConstants {
223
223
224
224
impl TryFrom < KnownChains > for SignetSystemConstants {
225
225
type Error = ParseChainError ;
226
+ <<<<<<< HEAD
226
227
227
228
fn try_from( chain : KnownChains ) -> Result < Self , Self :: Error > {
228
229
match chain {
@@ -233,6 +234,22 @@ impl TryFrom<KnownChains> for SignetSystemConstants {
233
234
}
234
235
}
235
236
237
+ impl FromStr for SignetSystemConstants {
238
+ type Err = ParseChainError ;
239
+
240
+ fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
241
+ s. parse :: < KnownChains > ( ) ?. try_into ( )
242
+ =======
243
+
244
+ fn try_from ( chain : KnownChains ) -> Result < Self , Self :: Error > {
245
+ match chain {
246
+ #[ cfg ( any( test, feature = "test-utils" ) ) ]
247
+ KnownChains :: Test => Ok ( Self :: test ( ) ) ,
248
+ }
249
+ >>>>>>> 0 dd5b37 ( feat : TryFrom impl for known chains on relevant types ( #97 ) )
250
+ }
251
+ }
252
+
236
253
impl FromStr for SignetSystemConstants {
237
254
type Err = ParseChainError ;
238
255
You can’t perform that action at this time.
0 commit comments