chore: consistency and dead code cleanup - #134
Merged
natanasow merged 5 commits intoAug 20, 2026
Merged
Conversation
Signed-off-by: ValentinVPK <valentin.krumov@limechain.tech>
Signed-off-by: ValentinVPK <valentin.krumov@limechain.tech>
natanasow
approved these changes
Aug 18, 2026
…ode-cleanup Signed-off-by: ValentinVPK <valentin.krumov@limechain.tech>
Contributor
|
🎉 This PR is included in version 0.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Description:
Resolve two batches of non-behavioral cleanup across the reference contracts: consistency/dead-code issues (#129) and identifier/doc typos plus one misnamed function (#128). Nothing changes on-chain behavior except the single, isolated
send0x1fix noted below. Delivered as two commits, one per issue.#129 — consistency & dead code:
/// @dev This function reverts if the call is not successfulcomment from the non-reverting info getters intoken-service/HederaTokenService.solandtoken-service-v2/HederaTokenService.sol(12 each — the wrappers returnUNKNOWN, they don't revert)HRC1215Contract.sollicenseUNLICENSED→Apache-2.0HederaScheduleService.solpragma>=0.4.9→>=0.5.0(required by itsabi.decodeusage)PrngSystemContractinherit its interface (is IPrngSystemContract+override)payabletoAirdrop.multipleNftAirdropfor parity with the other airdrop entrypointscontract SamplefromInternalCallee.soland import the canonicalSample.sol(artifact-name collision)HederaTokenServicefromHRC755Contract;ExpiryHelper+KeyHelperfromTokenQuery/TokenTransfer/TokenManagement;ExpiryHelperfromTokenCreateContract/TokenCreateCustom#128 — identifier/doc typos + misnamed function:
DELEGETABLE_CONTRACT_ID→DELEGATABLE_CONTRACT_IDintoken-service/KeyHelper.solandtoken-service-v2/KeyHelper.solEDCSA→ECDSAinaccount-service/{IHRC632,HederaAccountService,IHederaAccountService}.soltineycents→tinycentsinexchange-rate/ExchangeRateMock.solreceipient→recipientintoken-service/AtomicHTS.solEcrecoverCaller.send0x1actually use.send()(returning the success bool) instead of.transfer(), so it's genuinely distinct fromtransfer0x1Related issue(s):
Fixes #129
Fixes #128
Notes for reviewer:
Verified with
npx hardhat compile(clean, 64 files, no new warnings). 21 files changed across two commits. The CI lint (eslint .+prettier test) doesn't touch Solidity, so no formatting impact.Scope / behavior notes worth a look:
send0x1is the only behavioral change in either issue..transfer()reverts on failure;.send()returns a bool and does not revert. The function now returns that bool and deliberately does notrevert()on failure (that non-reverting behavior is the point of.sendvs.transfer). It has no callers/tests in the repo, so nothing depends on the old behavior.DELEGETABLE_CONTRACT_ID→DELEGATABLE_CONTRACT_IDdoes not change the enum's on-wire integer value, but downstream code referencing the old (misspelled) name will no longer compile.ExchangeRateSystemContract/ExchangeRateMockandHederaAccountService, but those can't inherit their imported interface: it's the precompile's ABI (used only for.selector), and their wrappers areinternalwhile the interface functions areexternal— an internal function can't satisfy an external interface, so it wouldn't compile and is semantically backwards (they're consumers, not implementations). OnlyPrngSystemContractis a genuine implementer.TokenCreateContract/TokenCreateCustomalso carried deadExpiryHelperinheritance (they useKeyHelper, neverExpiryHelper), so those were included.ExpiryHelper.solnow has no importers but is intentionally kept — it's a published helper (part of theExpiryHelper/FeeHelper/KeyHelperset), so deleting it would be a breaking change to the published surface. The issue's proposed AtomicHTS pragma change was dropped: there's no single project-wide pragma rule (>=0.5.0 <0.9.0and>=0.4.9 <0.9.0are tied withintoken-service/), so it would have been arbitrary rather than an alignment.