Skip to content

feat(nano): add str utils for Address class#1391

Merged
jansegre merged 1 commit intomasterfrom
feat/nano/str-address-utils
Sep 9, 2025
Merged

feat(nano): add str utils for Address class#1391
jansegre merged 1 commit intomasterfrom
feat/nano/str-address-utils

Conversation

@jansegre
Copy link
Member

@jansegre jansegre commented Sep 3, 2025

Motivation

Currently there isn't a way to convert to/from string and addresses in Blueprint code. Instead of simply exposing the internal functions to do it, this PR exposes a friendlier API.

Acceptance Criteria

  • add str(address) support for address: Address
  • add Address.from_str(raw_address)

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@jansegre jansegre requested review from glevco and msbrogli September 3, 2025 14:29
@jansegre jansegre self-assigned this Sep 3, 2025
@jansegre jansegre moved this from Todo to In Progress (Done) in Hathor Network Sep 3, 2025
@github-actions
Copy link

github-actions bot commented Sep 3, 2025

🐰 Bencher Report

Branchfeat/nano/str-address-utils
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
minutes (m)
(Result Δ%)
Lower Boundary
minutes (m)
(Limit %)
Upper Boundary
minutes (m)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚷 view threshold
1.86 m
(+10.76%)Baseline: 1.68 m
1.51 m
(81.26%)
2.02 m
(92.30%)
🐰 View full continuous benchmarking report in Bencher

glevco
glevco previously approved these changes Sep 3, 2025
@glevco glevco moved this from In Progress (Done) to In Review (WIP) in Hathor Network Sep 3, 2025
@jansegre jansegre force-pushed the feat/nano/str-address-utils branch from 7f9398a to 1f6f05f Compare September 4, 2025 15:31
@jansegre jansegre force-pushed the feat/nano/str-address-utils branch from 1f6f05f to bf7b5c2 Compare September 9, 2025 14:59
@codecov
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

❌ Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.86%. Comparing base (12464d2) to head (bf7b5c2).

Files with missing lines Patch % Lines
hathor/nanocontracts/types.py 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1391      +/-   ##
==========================================
- Coverage   85.91%   85.86%   -0.05%     
==========================================
  Files         430      430              
  Lines       32570    32583      +13     
  Branches     5072     5074       +2     
==========================================
- Hits        27981    27979       -2     
- Misses       3575     3587      +12     
- Partials     1014     1017       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@glevco glevco moved this from In Review (WIP) to In Review (Done) in Hathor Network Sep 9, 2025
@jansegre jansegre force-pushed the feat/nano/str-address-utils branch from bf7b5c2 to e00c5c7 Compare September 9, 2025 19:15
@jansegre jansegre merged commit 18b35b7 into master Sep 9, 2025
9 of 13 checks passed
@jansegre jansegre deleted the feat/nano/str-address-utils branch September 9, 2025 20:18
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Sep 9, 2025
@jansegre jansegre mentioned this pull request Sep 11, 2025
2 tasks
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Sep 18, 2025
@jansegre jansegre mentioned this pull request Sep 24, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants