Remove obsolete TODOs in fvm and apply small fixes - #8698
janezpodhostnik wants to merge 1 commit into
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (10)
💤 Files with no reviewable changes (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe changes make the reusable runtime environment package-private, update related references, correct address-based test fixtures, simplify slab address handling, and remove or update obsolete comments. ChangesRuntime encapsulation and cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Merge Risk: ⚪ Minimal · up to This cleanup makes the reusable runtime private and corrects address-based code and fixtures without changing the intended runtime behavior; no actionable current-head risk is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
No concerns from this review. No execution-behavior changes: comment/TODO removals, one value-identical address derivation, one type unexport, and test-fixture metadata — no HCU implications, no error-message changes. Verified (all correct):
Build plus targeted tests pass: Nit (1)
|
Reviewed the TODO comments in the fvm package and investigated each one
against the current code. This PR removes 5 obsolete TODOs and resolves
3 more with small fixes.
Removed (obsolete)
blueprints/contracts.go: "get rid of authorizers". Under Cadence 1.0 theauthorizer is required: the deploy template takes an
auth(AddContract) &Accountsigner, obtainable only from a transactionauthorizer.
evm/emulator/state/collection.go: "expose SlabID.Address() in atree".atree v0.16.1 exports it; replaced the
AddressAsUint64workaround withslabID.Address().evm/types/precompiled.go: "skip encoding inputs in future versions".Already done: encoding v2 (current) dropped the input fields.
fvm_test.go: "this should be sc.EVM.Address not found there???". Thefield exists as
sc.EVMContract; switched to it (value-identical bydesign,
EVMContract.Address == FlowServiceAccount.Address).evm/handler/handler_test.go: "add unhappy-case emulator tests". Theyexist: withdraw/deposit unhappy cases with injected emulator failures.
Fixed
errors/base.go:NewInvalidArgumentErrorfdoc now lists the actualfailure cases instead of a TODO.
runtime/reusable_cadence_runtime.go: unexportedSwappableEnvironment(now
swappableEnvironment), the last exported type flagged by the TODO.All uses were in-package.
transactionPayerBalanceChecker_test.go: filled in the fixture locationand qualified identifier to match the real FlowFees
VerifyPayerBalanceResulttype.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Documentation
Refactor
Tests
Maintenance