Skip to content

feat(nano): Add salt to tokens created by contracts#1398

Merged
msbrogli merged 1 commit intomasterfrom
feat/token-creation-salt
Sep 11, 2025
Merged

feat(nano): Add salt to tokens created by contracts#1398
msbrogli merged 1 commit intomasterfrom
feat/token-creation-salt

Conversation

@msbrogli
Copy link
Member

@msbrogli msbrogli commented Sep 9, 2025

Motivation

Add a salt to the token creation by contracts. This change allows contracts to create multiple tokens with the same token symbol and was requested by a use case.

Acceptance Criteria

  1. Add salt: bytes as an optional attribute when creating a token using self.syscall.create_token(...). Default is no salt.
  2. Add salt: bytes as an optional attribute in derive_child_token_id(). Default is no salt.

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

@msbrogli msbrogli requested a review from jansegre as a code owner September 9, 2025 15:34
@msbrogli msbrogli self-assigned this Sep 9, 2025
@msbrogli msbrogli moved this from Todo to In Progress (WIP) in Hathor Network Sep 9, 2025
@msbrogli msbrogli requested a review from glevco September 9, 2025 15:35
@github-actions
Copy link

github-actions bot commented Sep 9, 2025

🐰 Bencher Report

Branchfeat/token-creation-salt
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.84 m
(+9.05%)Baseline: 1.68 m
1.52 m
(82.53%)
2.02 m
(90.87%)
🐰 View full continuous benchmarking report in Bencher

@msbrogli msbrogli force-pushed the feat/token-creation-salt branch 4 times, most recently from 004d4c6 to 8bbee69 Compare September 9, 2025 19:26
glevco
glevco previously approved these changes Sep 9, 2025
@msbrogli msbrogli force-pushed the feat/token-creation-salt branch 3 times, most recently from ff85f1f to 1364e28 Compare September 9, 2025 19:36
@codecov
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.94%. Comparing base (ec34dfe) to head (1c51c26).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1398      +/-   ##
==========================================
+ Coverage   85.88%   85.94%   +0.05%     
==========================================
  Files         432      432              
  Lines       32745    32746       +1     
  Branches     5102     5102              
==========================================
+ Hits        28122    28142      +20     
+ Misses       3603     3591      -12     
+ Partials     1020     1013       -7     

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

@msbrogli msbrogli force-pushed the feat/token-creation-salt branch 3 times, most recently from 0e905d5 to 778af18 Compare September 10, 2025 16:03
@msbrogli msbrogli 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
@glevco glevco moved this from In Review (WIP) to In Review (Done) in Hathor Network Sep 10, 2025
@msbrogli msbrogli force-pushed the feat/token-creation-salt branch from 778af18 to 1c51c26 Compare September 11, 2025 16:25
@msbrogli msbrogli merged commit 1c51c26 into master Sep 11, 2025
6 of 7 checks passed
@msbrogli msbrogli deleted the feat/token-creation-salt branch September 11, 2025 16:25
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Sep 11, 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

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants