-
Notifications
You must be signed in to change notification settings - Fork 2
add: sessions key registry in DevnetInfo, remove post and seal layers from curio
#61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -263,6 +263,15 @@ pub fn parse_deployment_output(output_str: &str) -> Result<DeploymentResult, Box | |||||||||||||||||||||||||||||||||||||||||||||||||
| let mut in_network_config = false; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| for line in output_str.lines() { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| // Parse "SessionKeyRegistry deployed at 0x..." (appears before summary) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if line.contains("SessionKeyRegistry deployed at") { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if let Some(addr) = extract_address_from_deployed_line(line) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| info!("Found SessionKeyRegistry: {}", addr); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| addresses.insert("session_key_registry".to_string(), addr); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| continue; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| if line.contains("DEPLOYMENT SUMMARY") { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| in_summary = true; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| info!("Found DEPLOYMENT SUMMARY section"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -383,6 +392,23 @@ pub fn parse_deployment_output(output_str: &str) -> Result<DeploymentResult, Box | |||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Extract an address from a "<Name> deployed at 0x..." line. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||
| /// # Example | ||||||||||||||||||||||||||||||||||||||||||||||||||
| /// ```text | ||||||||||||||||||||||||||||||||||||||||||||||||||
| /// SessionKeyRegistry deployed at 0xaF69542d01111EdfB7B63Aa974E6A2c9A31EA1E9 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| /// ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| fn extract_address_from_deployed_line(line: &str) -> Option<String> { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| let marker = "deployed at "; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| let idx = line.find(marker)?; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| let addr = line[idx + marker.len()..].trim(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if addr.starts_with("0x") && addr.len() >= 42 { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Some(addr.to_string()) | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+401
to
+406
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| fn extract_address_from_deployed_line(line: &str) -> Option<String> { | |
| let marker = "deployed at "; | |
| let idx = line.find(marker)?; | |
| let addr = line[idx + marker.len()..].trim(); | |
| if addr.starts_with("0x") && addr.len() >= 42 { | |
| Some(addr.to_string()) | |
| fn is_valid_hex_address(token: &str) -> bool { | |
| if token.len() != 42 { | |
| return false; | |
| } | |
| if !token.starts_with("0x") { | |
| return false; | |
| } | |
| token[2..].chars().all(|c| c.is_ascii_hexdigit()) | |
| } | |
| fn extract_address_from_deployed_line(line: &str) -> Option<String> { | |
| let marker = "deployed at "; | |
| let idx = line.find(marker)?; | |
| let rest = line[idx + marker.len()..].trim(); | |
| let first_token = rest.split_whitespace().next()?; | |
| if is_valid_hex_address(first_token) { | |
| Some(first_token.to_string()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a bad point, but also maybe irrelevant since we control the code; not a bad thing to be as robust as we can though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, good catch
also I thought it was
pdp, I didn't knowpdp-onlywas a thing, hopefully this simplifies the running instances a little