-
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
base: main
Are you sure you want to change the base?
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; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+271
to
+272
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| } | |
| continue; | |
| continue; | |
| } |
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.
good point
Copilot
AI
Feb 11, 2026
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.
extract_address_from_deployed_line returns the entire substring after deployed at , so if the deploy script ever prints anything after the address (e.g. trailing commas, extra text, ANSI codes), the stored value will not be a valid 0x address and downstream consumers will break. Consider extracting only the first token, then validating it is exactly 42 chars (0x + 40) and hex before returning.
| 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