Skip to content

feat(dynamic-transaction-model): create fee tokens in nano#1350

Merged
jansegre merged 1 commit intomasterfrom
raul-oliveira/create-fee-tokens-in-nano
Oct 2, 2025
Merged

feat(dynamic-transaction-model): create fee tokens in nano#1350
jansegre merged 1 commit intomasterfrom
raul-oliveira/create-fee-tokens-in-nano

Conversation

@raul-oliveira
Copy link
Contributor

@raul-oliveira raul-oliveira commented Aug 6, 2025

Motivation

To enable fee tokens in nano contracts with the create_fee_token, mint, and melt syscalls.

Acceptance Criteria

  • allow create_fee_tokens paying with HTR by default
  • allow create_fee_tokens paying with deposit token
  • added the class TokenSyscallBalanceRules which is responsible for determine the fee amounts for each token version.
  • Refactor create_deposit_tokens syscall to use TokenSyscallBalanceRules
  • Remove duplicate call to changes_tracker, call_records, and self._updated_tokens_totals in syscalls that deals with tokens (create, mint, melt).
  • Mint and melt operations now will raise if the token isn't created.

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

@raul-oliveira raul-oliveira self-assigned this Aug 6, 2025
@raul-oliveira raul-oliveira moved this from Todo to In Progress (WIP) in Hathor Network Aug 6, 2025
@github-actions
Copy link

github-actions bot commented Sep 7, 2025

🐰 Bencher Report

Branchraul-oliveira/create-fee-tokens-in-nano
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.96 m
(+14.53%)Baseline: 1.71 m
1.54 m
(78.58%)
2.06 m
(95.44%)
🐰 View full continuous benchmarking report in Bencher

@raul-oliveira raul-oliveira force-pushed the raul-oliveira/create-fee-tokens-in-nano branch 2 times, most recently from 4f3d2c3 to 1cd22f5 Compare September 10, 2025 09:03
@raul-oliveira raul-oliveira marked this pull request as ready for review September 10, 2025 09:11
@raul-oliveira raul-oliveira force-pushed the raul-oliveira/create-fee-tokens-in-nano branch 2 times, most recently from 4c469e5 to 385e2ce Compare September 10, 2025 16:29
@raul-oliveira raul-oliveira moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Sep 10, 2025
@github-project-automation github-project-automation bot moved this from In Progress (Done) to In Review (WIP) in Hathor Network Sep 10, 2025
@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

❌ Patch coverage is 90.33457% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.83%. Comparing base (b9b9bc9) to head (7a2a4eb).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...athor/nanocontracts/syscall_token_balance_rules.py 88.73% 11 Missing and 5 partials ⚠️
hathor/nanocontracts/runner/runner.py 91.35% 5 Missing and 2 partials ⚠️
hathor/nanocontracts/storage/changes_tracker.py 75.00% 1 Missing and 1 partial ⚠️
hathor/nanocontracts/runner/types.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1350      +/-   ##
==========================================
- Coverage   85.86%   85.83%   -0.03%     
==========================================
  Files         431      432       +1     
  Lines       33287    33478     +191     
  Branches     5218     5247      +29     
==========================================
+ Hits        28581    28735     +154     
- Misses       3665     3693      +28     
- Partials     1041     1050       +9     

☔ 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.

@raul-oliveira raul-oliveira moved this from In Review (WIP) to In Progress (WIP) in Hathor Network Sep 11, 2025
@raul-oliveira raul-oliveira moved this from In Progress (WIP) to In Review (WIP) in Hathor Network Sep 11, 2025
jansegre
jansegre previously approved these changes Oct 1, 2025
@raul-oliveira raul-oliveira requested a review from glevco October 1, 2025 21:21
glevco
glevco previously approved these changes Oct 1, 2025
msbrogli
msbrogli previously approved these changes Oct 2, 2025
@raul-oliveira raul-oliveira force-pushed the raul-oliveira/create-fee-tokens-in-nano branch from 67b2d06 to 1c35bc6 Compare October 2, 2025 17:18
glevco
glevco previously approved these changes Oct 2, 2025
@raul-oliveira raul-oliveira force-pushed the raul-oliveira/create-fee-tokens-in-nano branch from 1c35bc6 to f1bfbfa Compare October 2, 2025 17:38
@raul-oliveira raul-oliveira requested a review from glevco October 2, 2025 17:38
msbrogli
msbrogli previously approved these changes Oct 2, 2025
@raul-oliveira raul-oliveira force-pushed the raul-oliveira/create-fee-tokens-in-nano branch from f1bfbfa to a8c0b2f Compare October 2, 2025 18:06
@raul-oliveira raul-oliveira force-pushed the raul-oliveira/create-fee-tokens-in-nano branch from a8c0b2f to 7769d16 Compare October 2, 2025 19:38
@raul-oliveira raul-oliveira force-pushed the raul-oliveira/create-fee-tokens-in-nano branch from 7769d16 to 7a2a4eb Compare October 2, 2025 19:39
@jansegre jansegre mentioned this pull request Oct 7, 2025
2 tasks
@jansegre jansegre mentioned this pull request Oct 16, 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.

4 participants