Add token image URI policy guard#113
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (24)
📝 WalkthroughWalkthroughThis PR implements URI safety validation for on-chain metadata token images. It adds public helper functions to StreamMetadataRenderer ( ChangesMetadata URI Safety Validation Feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Comment |
Summary
StreamMetadataRendererhelpers for the current content/script URI policyStreamCore.updateImagesAndAttributesScope note
A first local version also enforced collection base URI and external animation library URL writes, but pushed
StreamCoreover EIP-170. This PR keeps the deployable slice: token image production enforcement plus reusable renderer helpers. Collection base URI and external library URL production enforcement remain queued follow-up work.Validation
forge test --match-path test/StreamMetadataUriPolicy.t.sol -vvvforge test --match-path test/StreamMetadataEscaping.t.sol -vvvforge test --match-path test/StreamMetadataSizeLimits.t.sol -vvvforge build --sizes --via-ir --skip test --skip script --force(StreamCore24,508 bytes, 68 bytes headroom)make release-checksumsmake checkpowershell -ExecutionPolicy Bypass -File scripts\check.ps1forge fmt --checkon touched Solidity filesgit diff --checkRefs #51
Summary by CodeRabbit
Release Notes
New Features
Documentation
Tests
Chores