Skip to content

feat: change visibility of transferFrom, transferFromNFT, redirectForToken and updateNFTsMetadata - #139

Merged
natanasow merged 3 commits into
mainfrom
138-change-visibility-of-some-methods
Aug 21, 2026
Merged

feat: change visibility of transferFrom, transferFromNFT, redirectForToken and updateNFTsMetadata#139
natanasow merged 3 commits into
mainfrom
138-change-visibility-of-some-methods

Conversation

@natanasow

Copy link
Copy Markdown
Member

Description:

Change visibility of transferFrom (L289), transferFromNFT (L304), redirectForToken (L677) to internal in HederaTokenService..sol

Solution:

Changes the visibility of three helpers in HederaTokenService from external to internal:

  • transferFrom (L289)
  • transferFromNFT (L304)
  • redirectForToken (L677)

Updates the in-repo call sites that invoked them via this. (external self-call),
which will not compile once the functions are internal:

  • AtomicHTS.sol L90
  • examples/token-transfer/TokenTransferContract.sol L59, L68

Notes

  • No change to the underlying HTS precompile calls; only visibility and the
    internal call syntax.
  • redirectForToken has no internal self-call sites, so no call-site change is
    needed for it.
  • token-service-v2 / updateNFTsMetadata are not present at this ref; if the
    fix also targets v2, that file needs the same visibility change in the same PR.

Two possible scope additions:

  • token-service-v2 has the same three functions plus a fourth, updateNFTsMetadata.
  • Three call sites need to change in the same PR or the build breaks, since this. self-calls won't compile against internal: examples/token-transfer/TokenTransferContract.sol L59 and L68, and AtomicHTS.sol L90. Nothing calls this.redirectForToken.

Related issue(s):

Fixes #138

Notes for reviewer:

Checklist

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

Signed-off-by: nikolay <n.atanasow94@gmail.com>
@natanasow
natanasow requested review from a team as code owners August 12, 2026 07:40
@natanasow
natanasow requested a review from brunodam August 12, 2026 07:40
@natanasow natanasow changed the title chore: change visibility feat: change visibility of transferFrom, transferFromNFT, redirectForToken and updateNFTsMetadata Aug 12, 2026
@natanasow natanasow self-assigned this Aug 12, 2026
@natanasow natanasow added the enhancement New feature or request label Aug 12, 2026
@natanasow natanasow added this to the 0.1.0 milestone Aug 12, 2026
@natanasow

Copy link
Copy Markdown
Member Author

⚠️ when a new version is released, we should announce that there are ABI changes.

@natanasow
natanasow force-pushed the 138-change-visibility-of-some-methods branch from 2a403f1 to a8c1399 Compare August 19, 2026 08:12
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Test Results

 14 files  + 1   59 suites  +3   1h 16m 57s ⏱️ + 28m 7s
243 tests +10  243 ✅ +10  0 💤 ±0  0 ❌ ±0 
298 runs  +31  298 ✅ +31  0 💤 ±0  0 ❌ ±0 

Results for commit 0c63635. ± Comparison against base commit 44e20e3.

♻️ This comment has been updated with latest results.

# Conflicts:
#	contracts/token-service-v2/HederaTokenService.sol
#	contracts/token-service/HederaTokenService.sol
# Conflicts:
#	contracts/token-service-v2/HederaTokenService.sol
#	contracts/token-service/AtomicHTS.sol
#	contracts/token-service/HederaTokenService.sol

@stoyanov-st stoyanov-st left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@natanasow
natanasow merged commit 9c995df into main Aug 21, 2026
40 of 41 checks passed
@swirlds-automation

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change visibility of methods

4 participants