feat(nano): implement contract accessor#1382
Merged
Conversation
0485558 to
1f8766e
Compare
|
| Branch | feat/nano/contract-accessor |
| Testbed | ubuntu-22.04 |
🚨 1 Alert
| Benchmark | Measure Units | View | Benchmark Result (Result Δ%) | Upper Boundary (Limit %) |
|---|---|---|---|---|
| sync-v2 (up to 20000 blocks) | Latency minutes (m) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 2.16 m(+28.89%)Baseline: 1.68 m | 2.01 m (107.41%) |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result minutes (m) (Result Δ%) | Lower Boundary minutes (m) (Limit %) | Upper Boundary minutes (m) (Limit %) |
|---|---|---|---|---|
| sync-v2 (up to 20000 blocks) | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 2.16 m(+28.89%)Baseline: 1.68 m | 1.51 m (69.83%) | 2.01 m (107.41%) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1382 +/- ##
==========================================
+ Coverage 85.81% 85.83% +0.02%
==========================================
Files 429 430 +1
Lines 32453 32570 +117
Branches 5057 5072 +15
==========================================
+ Hits 27850 27957 +107
- Misses 3586 3593 +7
- Partials 1017 1020 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d15184b to
f16cad4
Compare
glevco
commented
Aug 25, 2025
msbrogli
requested changes
Aug 25, 2025
5d7e920 to
c018c90
Compare
1 task
msbrogli
reviewed
Aug 25, 2025
c018c90 to
c02679a
Compare
jansegre
previously approved these changes
Aug 25, 2025
Member
jansegre
left a comment
There was a problem hiding this comment.
I really like the API. I don't really like the prepare_view_call and prepare_public_call names, maybe they are too long. But I don't have a better suggestion. I'm OK with going with those for now.
msbrogli
previously approved these changes
Aug 26, 2025
c02679a to
ba2ee51
Compare
msbrogli
previously approved these changes
Aug 27, 2025
2960f81 to
6166f29
Compare
jansegre
approved these changes
Aug 29, 2025
msbrogli
approved these changes
Aug 29, 2025
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Implement a new API for interacting with contracts. For now, it just supports interacting with view and public methods from other contracts.
Acceptance Criteria
HATHOR_TOKEN_UIDconstant to allowed imports on blueprints.get_contractsyscall to be used in blueprint methods. It returns aContractAccessorinstance which is a wrapper for a contract and a runner, allowing blueprints to call methods of other contracts directly on that instance, instead of using manual syscalls.test_types_across_contracts.pytest to use the new API, as a demo.Unresolved Discussions
Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged