Skip to content

Conversation

@joshmarinacci
Copy link
Contributor

@joshmarinacci joshmarinacci commented Nov 21, 2025

Description:

Adds support for token create with custom fees. Removes FT vs NFT distinction for Token Create because the price is the same. The prices only differ for Token Mint.

Related issue(s):

Fixes # #21832

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@joshmarinacci joshmarinacci requested review from a team as code owners November 21, 2025 01:50
@joshmarinacci joshmarinacci self-assigned this Nov 21, 2025
@joshmarinacci joshmarinacci added this to the v0.69 milestone Nov 21, 2025
@lfdt-bot
Copy link

lfdt-bot commented Nov 21, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codacy-production
Copy link

codacy-production bot commented Nov 21, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 50.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (daf07a0) 97104 75083 77.32%
Head commit (d90eed3) 97100 (-4) 75077 (-6) 77.32% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#22275) 2 1 50.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...oken/impl/calculator/TokenCreateFeeCalculator.java 0.00% 1 Missing and 1 partial ⚠️

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #22275      +/-   ##
============================================
- Coverage     73.40%   73.40%   -0.01%     
+ Complexity    23545    23537       -8     
============================================
  Files          2574     2574              
  Lines         97201    97197       -4     
  Branches      10315    10314       -1     
============================================
- Hits          71355    71347       -8     
- Misses        22070    22072       +2     
- Partials       3776     3778       +2     
Files with missing lines Coverage Δ Complexity Δ
.../token/impl/calculator/TokenMintFeeCalculator.java 100.00% <ø> (ø) 4.00 <0.00> (ø)
...oken/impl/calculator/TokenCreateFeeCalculator.java 30.76% <0.00%> (-12.09%) 3.00 <0.00> (-2.00)

... and 18 files with indirect coverage changes

Impacted file tree graph

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

Copy link
Contributor

@Neeharika-Sompalli Neeharika-Sompalli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still relevant , considering this PR #21980

@joshmarinacci
Copy link
Contributor Author

I will rebase once the previous PR is merged. Part of this PR won't be needed anymore, but I think it'll still be needed for the custom fees.

Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
add mint unique token test
add Token model tests
add mintCommonToken handler tests

Signed-off-by: Josh Marinacci <[email protected]>
move token services simple fees tests to separate file

Signed-off-by: Josh Marinacci <[email protected]>
create new compare() function to compare old and new versions of fees

Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
switch token create and token mint to calculators
update token extras fees

Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
…reeze, token pause, token unpause

Signed-off-by: Josh Marinacci <[email protected]>
remove unneeded code

Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
@joshmarinacci joshmarinacci changed the title feat: Simple fees support for Token Create Unique, Token Create with custom fees, and Token Mint Unique feat: Simple fees support for Token Create with custom fees Dec 4, 2025
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
joshmarinacci and others added 6 commits December 4, 2025 11:22
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
Copy link
Contributor

@Neeharika-Sompalli Neeharika-Sompalli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @joshmarinacci . Regarding token mint pricing for multiple nft mints, we can re-visit how to charge exactly.

Signed-off-by: Josh Marinacci <[email protected]>
@joshmarinacci joshmarinacci merged commit fed4ae9 into main Dec 9, 2025
80 of 82 checks passed
@joshmarinacci joshmarinacci deleted the token-service-unique branch December 9, 2025 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants