Conversation
…h protections + docs: + readme.md
WalkthroughAdds a new Stylus WASM contract (Linketh) with ENS integration, namehash utility, tests, Cargo/toolchain and target-specific rustflags, multi-stage Docker build, GitHub CI/security workflows, repo docs/licenses, IDE files, and updated ignore configurations. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Linketh as "Linketh Contract"
participant ENS as "ENS Registry"
Note over User,Linketh: Initialize
User->>Linketh: init(ens_registry_address)
rect rgba(227,242,253,0.6)
Note over User,Linketh: Create Profile
User->>Linketh: create_profile(ens, cid, display, avatar)
Linketh->>ENS: owner(namehash(ens))
ENS-->>Linketh: ownerAddress
Linketh-->>User: emit ProfileCreated
end
rect rgba(232,245,233,0.6)
Note over User,Linketh: Update / Quick Links
User->>Linketh: update_profile(...)
Linketh-->>User: emit ProfileUpdated
User->>Linketh: set_quick_links([(title,url) x<=5])
Linketh-->>User: emit QuickLinksUpdated
end
rect rgba(255,243,224,0.6)
Note over User,Linketh: Query
User->>Linketh: get_profile(owner)
Linketh-->>User: (ens, cid, display, avatar)
User->>Linketh: get_quick_links(owner)
Linketh-->>User: [(title,url)...]
end
rect rgba(252,228,236,0.6)
Note over User,Linketh: Transfer / Delete
User->>Linketh: transfer_profile(new_owner)
Linketh-->>User: moves data, clears old
User->>Linketh: delete_profile()
Linketh-->>User: emit ProfileDeleted
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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 |
There was a problem hiding this comment.
Actionable comments posted: 26
🧹 Nitpick comments (36)
licenses/COPYRIGHT.md (2)
1-5: Tighten links and align naming.
- Avoid bare URLs; make them proper Markdown links.
- Optional: Rename link labels from LICENSE-APACHE/ LICENSE-MIT to match actual filenames or keep as-is but consistent.
Apply:
-Except as otherwise noted (below and/or in individual files), this project is licensed under the Apache License, Version 2.0 ([`LICENSE-APACHE`](Apache-2.0) or http://www.apache.org/licenses/LICENSE-2.0) or the MIT license, ([`LICENSE-MIT`](MIT) or http://opensource.org/licenses/MIT), at your option. +Except as otherwise noted (below and/or in individual files), this project is licensed under the Apache License, Version 2.0 ([`LICENSE-APACHE`](Apache-2.0) or <https://www.apache.org/licenses/LICENSE-2.0>) or the MIT license ([`LICENSE-MIT`](MIT) or <https://opensource.org/licenses/MIT>), at your option.
1-5: Ensure repo-level license discoverability and crate metadata.
- Add a top-level LICENSE (or dual-license notice) so GitHub can auto-detect.
- In Cargo.toml, set: license = "Apache-2.0 OR MIT" and include files under license-file(s) if needed.
licenses/DCO.txt (1)
1-34: LGTM — standard DCO text.No changes needed. Consider enabling a DCO/sign-off check in CI.
.github/pull_request_template.md (1)
5-10: Optional: expand checklist.Consider adding items for tests, docs, and CI passing for consistency.
Apply:
## Checklist - [ ] I have documented these changes where necessary. +- [ ] I added/updated tests and docs as needed. +- [ ] CI is green for this PR. - [ ] I have read the [DCO][DCO] and ensured that these changes comply. - [ ] I assign this work under its [open source licensing][terms]..idea/.gitignore (1)
1-8: Workspace-specific ignores are good; consider excluding more IDE artifactsNice catch ignoring workspace.xml, httpRequests, dataSources. Recommend also ignoring IntelliJ module files and VCS mappings to avoid churn:
# Default ignored files /shelf/ /workspace.xml # Editor-based HTTP Client requests /httpRequests/ # Datasource local storage ignored files /dataSources/ /dataSources.local.xml +*.iml +vcs.xmlAlso ensure the repo root .gitignore ignores
.idea/(not/idea). If you meant to keep only a curated subset, please confirm and we’ll adjust accordingly..idea/vcs.xml (1)
1-7: Avoid committing IDE VCS mappingsThis file is user/machine-specific and tends to cause noisy diffs. Prefer ignoring it (see suggested addition
vcs.xmlin .idea/.gitignore) or remove it from VCS.rust-toolchain.toml (1)
1-2: Pin to Rust 1.87.0 looks correct; released May 15, 2025The pin is valid and helps reproducibility. Consider specifying components/targets to keep CI/dev aligned for WASM builds.
[toolchain] channel = "1.87.0" +components = ["rustfmt", "clippy"] +targets = ["wasm32-unknown-unknown"] +profile = "minimal"(Rust 1.87.0 was released on May 15, 2025.) (blog.rust-lang.org, doc.rust-lang.org)
.env.example (1)
1-4: Reorder keys to satisfy dotenv-linter; add minimal context hintsOrdering is cosmetic but keeps CI linters green. Also, consider adding comments and a CHAIN_ID to avoid mainnet/testnet confusion.
-RPC_URL= -STYLUS_CONTRACT_ADDRESS= -PRIV_KEY_PATH= -ENS_REGISTRY_ADDRESS=0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e +# Network and RPC +CHAIN_ID= +RPC_URL= + +# Contract addresses +STYLUS_CONTRACT_ADDRESS= +ENS_REGISTRY_ADDRESS=0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e # Ethereum mainnet + +# Local signing +PRIV_KEY_PATH=Please confirm which network(s) you target (Arbitrum One/Sepolia vs Ethereum mainnet). The provided ENS registry address is the Ethereum mainnet registry; using it on L2 may require different handling.
.idea/vidalpaul-arb.soul.wasm.iml (1)
1-12: Do not version .iml module filesThese are per-IDE/per-user and will churn. Ignore
*.iml(see suggested change in .idea/.gitignore) and remove from VCS unless you have a team policy to keep them..idea/modules.xml (2)
1-8: Remove IDE metadata from VCS; ignore.idea/instead.Committing
.idea/*makes builds non-reproducible across dev machines and clutters PRs. Prefer ignoring and regenerating locally.Apply in .gitignore (see .gitignore comment for exact diff) and purge existing files:
git rm -r --cached .idea
5-5: Module name mismatch with repo; consider renaming for consistency.
vidalpaul-arb.soul.wasm.imldoesn’t reflect the repolinketh-contracts. Recommend aligning module name to the project..cargo/config.toml (2)
8-18: macOSdynamic_lookupcan hide unresolved symbols.These flags ease local builds but may mask linkage issues. Consider moving them to a local-only config (
.cargo/config.local) or documenting why they’re necessary.
1-6: WASM size/perf tuning belongs in Cargo profiles.For smaller/faster artifacts, add release profile settings in Cargo.toml instead of relying solely on linker flags.
Example (add to Cargo.toml):
[profile.release] opt-level = "z" lto = true codegen-units = 1 panic = "abort".gitignore (1)
6-6: Consider ignoring more local env variants.Add
.env.*to cover.env.test,.env.ci, etc.-.env +.env +.env.*.github/BRANCH_PROTECTION.md (2)
60-64: Avoid hard-coding test counts.“All 20 unit tests must pass” will drift. Prefer “All unit tests must pass.”
-- All 20 unit tests must pass +- All unit tests must pass
75-85: Fix markdownlint: remove trailing colons in headings.Cleans MD026 violations.
-### Via GitHub Web Interface: +### Via GitHub Web Interface -### Via GitHub CLI: +### Via GitHub CLI -### Check Status via GitHub API: +### Check Status via GitHub API -### Weekly Review Checklist: +### Weekly Review Checklist -### For `main` branch: +### For `main` branch -### For `develop` branch: +### For `develop` branchAlso applies to: 85-85, 152-159, 161-167, 7-7, 28-28
.dockerignore (1)
4-4: Duplicate.github/entry.One is enough.
- .github/ ... - .github/ + # (deduped)Also applies to: 47-48
README.md (3)
25-31: Specify a language for the “Project Structure” code fence (MD040).Add a language hint to silence markdownlint and improve rendering.
-``` +```text src/ ├── lib.rs # Main contract implementation ├── ens.rs # ENS utilities and namehash implementation ├── tests.rs # Comprehensive unit tests └── main.rs # Binary entry point--- `236-243`: **Clarify whether “export-abi” requires a cargo feature.** If ABI export needs a feature flag, call it out to prevent confusion. ```diff -cargo stylus export-abi +# If required in your setup: +# cargo build --features export-abi +cargo stylus export-abi
463-466: Use a heading instead of emphasized text (MD036).-**Built with ❤️ using Arbitrum Stylus, Rust, and decentralized technologies** +## Built with ❤️ using Arbitrum Stylus, Rust, and decentralized technologiesDockerfile (2)
32-38: Dependency caching stub shouldn’t use println! for the wasm target.Avoid std I/O in the dummy lib to reduce risk of wasm target linkage issues.
RUN mkdir src && \ echo "fn main() {}" > src/main.rs && \ - echo 'fn main() { println!("dummy"); }' > src/lib.rs + echo 'pub fn _dummy() {}' > src/lib.rs
28-31: Copy .cargo config early so dependency builds use the same flags/targets.COPY Cargo.toml Cargo.lock ./ +COPY .cargo/ ./.cargo/ @@ COPY src/ ./src/ COPY .env.example ./ +COPY .cargo/ ./.cargo/Also applies to: 46-49
.github/workflows/security.yml (3)
23-41: Fix indentation/trailing spaces to satisfy yamllint and avoid parsing surprises.Several lines have trailing spaces and two step blocks are under-indented.
- timeout-minutes: 15 - + timeout-minutes: 15 @@ - - name: Checkout code + - name: Checkout code @@ - - name: Setup Rust toolchain + - name: Setup Rust toolchain @@ - timeout-minutes: 10 - + timeout-minutes: 10 @@ - - name: Checkout code + - name: Checkout code @@ - - name: Setup Rust toolchain + - name: Setup Rust toolchainAlso ensure a trailing newline at EOF.
Also applies to: 160-170
99-127: Secret scan should cover the whole repo and ignore common directories.Broaden scope and cut false positives.
- for pattern in "${PATTERNS[@]}"; do - if grep -r -i -E "$pattern" src/ --exclude-dir=target 2>/dev/null; then + for pattern in "${PATTERNS[@]}"; do + if git ls-files -z | xargs -0 grep -n -i -E "$pattern" \ + --exclude-dir=target --exclude-dir=.git --exclude-dir=node_modules 2>/dev/null; then echo "⚠️ Potential sensitive information found: $pattern" FOUND=true fi done
1-16: Add restrictive permissions to the workflow.Least-privilege by default.
name: Security Audit +permissions: + contents: read.github/workflows/ci.yml (2)
118-126: Tarpaulin output filename likely doesn’t match “cobertura.xml”.Force Cobertura output and path to avoid artifact mismatches.
- cargo install cargo-tarpaulin - cargo tarpaulin --lib --out xml --timeout 120 + cargo install cargo-tarpaulin + mkdir -p coverage + cargo tarpaulin --lib --out Cobertura --output-dir coverage --timeout 120 @@ - with: - file: ./cobertura.xml + with: + files: ./coverage/cobertura.xml fail_ci_if_error: false
20-377: Trim trailing spaces and add a newline at EOF (yamllint).There are many trailing spaces flagged; please run yamllint/pre-commit to auto-fix.
Cargo.toml (1)
25-30: Feature wiring looks correct; consider documenting default “mini-alloc” tradeoffsDefaulting to mini-alloc is fine for WASM size, but note fragmentation/throughput tradeoffs. A brief README note would help future contributors.
src/ens.rs (2)
8-12: Mark ENS interface function as viewThe registry owner lookup is read-only. Marking it view documents intent and may enable tooling optimizations.
sol_interface! { interface ENS { - function owner(bytes32 node) external returns (address); + function owner(bytes32 node) external view returns (address); } }
1-1: Fix fmt failureCI shows cargo fmt issues in this file. Please run
cargo fmt.src/tests.rs (3)
1-3: Nested tests module inside tests module; flatten to avoid awkwardtests::tests::*paths
lib.rsalready declaresmod tests;. This file then defines anothermod tests { ... }, nesting the module. Flatten by removing the inner module wrapper.-#[cfg(test)] -mod tests { - use super::*; +// This file is compiled as `mod tests;` from lib.rs. Define tests directly here. +use super::*; @@ -}
10-21: Consider adding tests for contract methods (create_profile, delete_profile, transfer_profile, set_quick_links)Current tests exercise storage directly, not the public API. Add at least one happy-path and one failure-path (e.g., ENS registry not initialized) per method.
I can scaffold stylus-test friendly tests that mock ENS.owner and assert events. Want me to add them?
1-1: Fix fmt failureCI reports cargo fmt issues in this file. Please run
cargo fmt.src/lib.rs (3)
138-147: Clearing vector by repeated shrink is fine; considerwhile len > 0for clarityEquivalent behavior, slightly clearer and avoids re-reading len in the range.
- for _ in 0..quick_links_vec.len() { - quick_links_vec.shrink(); - } + while quick_links_vec.len() > 0 { + quick_links_vec.shrink(); + }
165-175: Filter quick links on both title and urlCurrently only empty titles are filtered. Also skip entries with empty URLs to avoid broken links.
- let title = link.title.get_string(); - if !title.is_empty() { - result.push((title, link.url.get_string())); - } + let title = link.title.get_string(); + let url = link.url.get_string(); + if !title.is_empty() && !url.is_empty() { + result.push((title, url)); + }
1-1: Fix fmt failureCI reports cargo fmt issues in this file. Please run
cargo fmt.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (24)
.cargo/config.toml(1 hunks).dockerignore(1 hunks).env.example(1 hunks).github/BRANCH_PROTECTION.md(1 hunks).github/pull_request_template.md(1 hunks).github/workflows/ci.yml(1 hunks).github/workflows/security.yml(1 hunks).gitignore(1 hunks).idea/.gitignore(1 hunks).idea/modules.xml(1 hunks).idea/vcs.xml(1 hunks).idea/vidalpaul-arb.soul.wasm.iml(1 hunks)Cargo.toml(1 hunks)Dockerfile(1 hunks)README.md(1 hunks)licenses/Apache-2.0(1 hunks)licenses/COPYRIGHT.md(1 hunks)licenses/DCO.txt(1 hunks)licenses/MIT(1 hunks)rust-toolchain.toml(1 hunks)src/ens.rs(1 hunks)src/lib.rs(1 hunks)src/main.rs(1 hunks)src/tests.rs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/lib.rs (1)
src/ens.rs (1)
namehash(14-29)
🪛 LanguageTool
licenses/DCO.txt
[grammar] ~1-~1: There might be a mistake here.
Context: Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 Th...
(QB_NEW_EN)
[grammar] ~6-~6: There might be a mistake here.
Context: ...y and distribute verbatim copies of this license document, but changing it is not...
(QB_NEW_EN)
[uncategorized] ~15-~15: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... have the right to submit it under the open source license indicated in the file; or ...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~19-~19: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...wledge, is covered under an appropriate open source license and I have the right under ...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~22-~22: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...le or in part by me, under the same open source license (unless I am permitted to s...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~34-~34: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...consistent with this project or the open source license(s) involved.
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[grammar] ~34-~34: There might be a mistake here.
Context: ... or the open source license(s) involved.
(QB_NEW_EN)
README.md
[grammar] ~18-~18: There might be a mistake here.
Context: ...ust compiled to WASM via Arbitrum Stylus - Storage: On-chain profile metadata, IP...
(QB_NEW_EN)
[grammar] ~19-~19: There might be a mistake here.
Context: ...chain profile metadata, IPFS for content - ENS Integration: Verifies domain owner...
(QB_NEW_EN)
[grammar] ~20-~20: There might be a mistake here.
Context: ...rifies domain ownership via ENS registry - Events: Comprehensive event logging fo...
(QB_NEW_EN)
[grammar] ~74-~74: There might be a mistake here.
Context: ...ludes comprehensive unit tests covering: - ENS namehash algorithm validation - Prof...
(QB_NEW_EN)
[grammar] ~75-~75: There might be a mistake here.
Context: ...ing: - ENS namehash algorithm validation - Profile storage operations - Quick links...
(QB_NEW_EN)
[grammar] ~76-~76: There might be a mistake here.
Context: ... validation - Profile storage operations - Quick links management - Edge cases and ...
(QB_NEW_EN)
[grammar] ~77-~77: There might be a mistake here.
Context: ...rage operations - Quick links management - Edge cases and error handling ```bash #...
(QB_NEW_EN)
[grammar] ~94-~94: There might be a mistake here.
Context: ...tests validating namehash implementation - Main Contract: 11 tests covering profi...
(QB_NEW_EN)
[grammar] ~95-~95: There might be a mistake here.
Context: ...**: 11 tests covering profile operations - Total: 20 comprehensive unit tests ##...
(QB_NEW_EN)
[grammar] ~150-~150: There might be a mistake here.
Context: ...ter deployment, initialize the contract with ENS registry: ```bash # Initialize ENS...
(QB_NEW_EN)
[grammar] ~302-~302: There might be a mistake here.
Context: ...main and develop branches Jobs: - 🔍 Code Validation: Formatting, lint...
(QB_NEW_EN)
[grammar] ~303-~303: There might be a mistake here.
Context: ...n**: Formatting, linting, security audit - 🏗️ Build and Test: Multi-version Ru...
(QB_NEW_EN)
[grammar] ~304-~304: There might be a mistake here.
Context: ...i-version Rust builds with test coverage - 🛡️ Stylus Check: CRITICAL - Ens...
(QB_NEW_EN)
[grammar] ~305-~305: There might be a mistake here.
Context: ...CRITICAL* - Ensures WASM compatibility - 🐳 Docker Build: Container build ver...
(QB_NEW_EN)
[grammar] ~306-~306: There might be a mistake here.
Context: ...er Build**: Container build verification - 📚 Documentation: Docs and README va...
(QB_NEW_EN)
[grammar] ~307-~307: There might be a mistake here.
Context: ...umentation**: Docs and README validation - 🔗 Integration Check: Full deploymen...
(QB_NEW_EN)
[grammar] ~308-~308: There might be a mistake here.
Context: ...k**: Full deployment pipeline simulation - 📦 Release Artifacts: WASM and ABI g...
(QB_NEW_EN)
[grammar] ~309-~309: There might be a mistake here.
Context: ...SM and ABI generation (main branch only) ### Security Pipeline (`.github/workflows/se...
(QB_NEW_EN)
[grammar] ~315-~315: There might be a mistake here.
Context: ...n**: Push, PR, daily schedule Jobs: - 🔐 Security Audit: Dependency vulner...
(QB_NEW_EN)
[grammar] ~316-~316: There might be a mistake here.
Context: ...ency vulnerabilities, license compliance - 🔬 Supply Chain Check: Unsafe code a...
(QB_NEW_EN)
[grammar] ~317-~317: There might be a mistake here.
Context: ...: Unsafe code analysis, proc macro audit ### Branch Protection **Main Branch Protect...
(QB_NEW_EN)
[grammar] ~321-~321: There might be a mistake here.
Context: ... Protection Main Branch Protection: - ✅ Requires PR reviews (minimum 1) - ✅ Re...
(QB_NEW_EN)
[grammar] ~322-~322: There might be a mistake here.
Context: ...n**: - ✅ Requires PR reviews (minimum 1) - ✅ Requires status checks: CI Success, ...
(QB_NEW_EN)
[grammar] ~323-~323: There might be a mistake here.
Context: ...✅ Requires status checks: CI Success, Stylus Compatibility Check - ✅ Requires branches to be up to date - ❌...
(QB_NEW_EN)
[grammar] ~324-~324: There might be a mistake here.
Context: ...` - ✅ Requires branches to be up to date - ❌ No force pushes or deletions allowed -...
(QB_NEW_EN)
[grammar] ~325-~325: There might be a mistake here.
Context: ...- ❌ No force pushes or deletions allowed - ✅ Includes administrators **Develop Bra...
(QB_NEW_EN)
[grammar] ~328-~328: There might be a mistake here.
Context: ...strators Develop Branch Protection: - ✅ Requires PR reviews (minimum 1) - ✅ ...
(QB_NEW_EN)
[grammar] ~329-~329: There might be a mistake here.
Context: ...n**: - ✅ Requires PR reviews (minimum 1) - ✅ Requires status checks: CI Success, ...
(QB_NEW_EN)
[grammar] ~330-~330: There might be a mistake here.
Context: ...✅ Requires status checks: CI Success, Stylus Compatibility Check - ❌ No force pushes or deletions allowed ...
(QB_NEW_EN)
[grammar] ~333-~333: There might be a mistake here.
Context: ...ROTECTION.md) for detailed configuration ### Critical Status Checks **🚨 Stylus Comp...
(QB_NEW_EN)
[grammar] ~337-~337: There might be a mistake here.
Context: ...This check is MANDATORY for merging: - Validates WASM compilation for `wasm32-u...
(QB_NEW_EN)
[grammar] ~339-~339: There might be a mistake here.
Context: ... check` to ensure Arbitrum compatibility - Enforces 128KB WASM size limit - **Failu...
(QB_NEW_EN)
[grammar] ~340-~340: There might be a mistake here.
Context: ...ility - Enforces 128KB WASM size limit - **Failure blocks all merges to protected b...
(QB_NEW_EN)
[grammar] ~341-~341: There might be a mistake here.
Context: ... blocks all merges to protected branches** ### Using CI/CD ```bash # Check CI status l...
(QB_NEW_EN)
[grammar] ~359-~359: There might be a mistake here.
Context: ...s & Limitations ### High Priority TODOs - [ ] L1 ENS Integration: Implement L1...
(QB_NEW_EN)
[grammar] ~365-~365: There might be a mistake here.
Context: ...execution costs ### Future Enhancements - [ ] Frontend Interface: Web interfac...
(QB_NEW_EN)
[grammar] ~366-~366: There might be a mistake here.
Context: ...**: Web interface for profile management - [ ] IPFS Pinning: Integration with I...
(QB_NEW_EN)
[grammar] ~367-~367: There might be a mistake here.
Context: ...: Integration with IPFS pinning services - [ ] Profile Templates: Predefined pr...
(QB_NEW_EN)
[grammar] ~368-~368: There might be a mistake here.
Context: ... Predefined profile templates and themes - [ ] Social Graph: Following/follower...
(QB_NEW_EN)
[grammar] ~369-~369: There might be a mistake here.
Context: ...aph**: Following/followers functionality - [ ] Profile Analytics: View statisti...
(QB_NEW_EN)
[grammar] ~372-~372: There might be a mistake here.
Context: ...agement metrics ### Current Limitations - ENS ownership verification currently req...
(QB_NEW_EN)
[grammar] ~383-~383: There might be a mistake here.
Context: ...d not audited** ### Key Security Points - ENS ownership verification is critical f...
(QB_NEW_EN)
[grammar] ~414-~414: There might be a mistake here.
Context: ...n contract logic and storage definitions - src/ens.rs: ENS-specific utilities with comprehens...
(QB_NEW_EN)
[grammar] ~415-~415: There might be a mistake here.
Context: ...cific utilities with comprehensive tests - src/tests.rs: Unit tests for contract functionality ...
(QB_NEW_EN)
[grammar] ~416-~416: There might be a mistake here.
Context: ...*: Unit tests for contract functionality - src/main.rs: Binary entry point for examples ## Te...
(QB_NEW_EN)
[grammar] ~435-~435: There might be a mistake here.
Context: ...ib -- --nocapture ``` ### Test Coverage - ✅ ENS namehash algorithm validation (9 t...
(QB_NEW_EN)
[grammar] ~436-~436: There might be a mistake here.
Context: ... namehash algorithm validation (9 tests) - ✅ Profile storage and retrieval (11 test...
(QB_NEW_EN)
[grammar] ~437-~437: There might be a mistake here.
Context: ...Profile storage and retrieval (11 tests) - ✅ Edge cases and error handling - ✅ Mult...
(QB_NEW_EN)
[grammar] ~438-~438: There might be a mistake here.
Context: ...tests) - ✅ Edge cases and error handling - ✅ Multi-user independence - ✅ Storage op...
(QB_NEW_EN)
[grammar] ~439-~439: There might be a mistake here.
Context: ...ror handling - ✅ Multi-user independence - ✅ Storage operations and data integrity ...
(QB_NEW_EN)
[grammar] ~448-~448: There might be a mistake here.
Context: ...ources - Arbitrum Stylus Documentation - [Stylus SDK GitHub](https://github.com/Of...
(QB_NEW_EN)
[grammar] ~449-~449: There might be a mistake here.
Context: ...entle-introduction) - Stylus SDK GitHub - [ENS Documentation](https://docs.ens.doma...
(QB_NEW_EN)
[grammar] ~450-~450: There might be a mistake here.
Context: ...Labs/stylus-sdk-rs) - ENS Documentation - [IPFS Documentation](https://docs.ipfs.io...
(QB_NEW_EN)
[grammar] ~451-~451: There might be a mistake here.
Context: ...docs.ens.domains/) - IPFS Documentation - [Cargo Stylus CLI](https://github.com/Off...
(QB_NEW_EN)
[grammar] ~456-~456: There might be a mistake here.
Context: ...For questions, issues, or contributions: - Open an issue on GitHub - Join the Arbit...
(QB_NEW_EN)
.github/BRANCH_PROTECTION.md
[grammar] ~9-~9: There might be a mistake here.
Context: ...branch: **Status Checks (Required)**: - ✅CI Success` (from ci.yml workflow) - ...
(QB_NEW_EN)
[grammar] ~10-~10: There might be a mistake here.
Context: ... - ✅ CI Success (from ci.yml workflow) - ✅ Stylus Compatibility Check (from ci....
(QB_NEW_EN)
[grammar] ~11-~11: There might be a mistake here.
Context: ...patibility Check(from ci.yml workflow) - ✅Build and Test` (from ci.yml workflow...
(QB_NEW_EN)
[grammar] ~12-~12: There might be a mistake here.
Context: ... Build and Test (from ci.yml workflow) - ✅ Code Validation (from ci.yml workflo...
(QB_NEW_EN)
[grammar] ~13-~13: There might be a mistake here.
Context: ...Code Validation (from ci.yml workflow) - ✅ Docker Build Test (from ci.yml workf...
(QB_NEW_EN)
[grammar] ~16-~16: There might be a mistake here.
Context: ....yml workflow) Protection Settings: - ✅ Require status checks to pass before m...
(QB_NEW_EN)
[grammar] ~30-~30: There might be a mistake here.
Context: ...branch: **Status Checks (Required)**: - ✅CI Success` (from ci.yml workflow) - ...
(QB_NEW_EN)
[grammar] ~31-~31: There might be a mistake here.
Context: ... - ✅ CI Success (from ci.yml workflow) - ✅ Stylus Compatibility Check (from ci....
(QB_NEW_EN)
[grammar] ~32-~32: There might be a mistake here.
Context: ...patibility Check(from ci.yml workflow) - ✅Build and Test` (from ci.yml workflow...
(QB_NEW_EN)
[grammar] ~33-~33: There might be a mistake here.
Context: ... Build and Test (from ci.yml workflow) - ✅ Code Validation (from ci.yml workflo...
(QB_NEW_EN)
[grammar] ~36-~36: There might be a mistake here.
Context: ....yml workflow) Protection Settings: - ✅ Require status checks to pass before m...
(QB_NEW_EN)
[grammar] ~50-~50: There might be a mistake here.
Context: ...nnot be deployed.** What it checks: - WASM compilation for `wasm32-unknown-unk...
(QB_NEW_EN)
[grammar] ~51-~51: There might be a mistake here.
Context: ...tion for wasm32-unknown-unknown target - Stylus runtime compatibility via `cargo ...
(QB_NEW_EN)
[grammar] ~56-~56: There might be a mistake here.
Context: ...tion requirements ### 🧪 Build and Test Why Critical: Ensures all unit tests p...
(QB_NEW_EN)
[grammar] ~57-~57: There might be a mistake here.
Context: ...ss and the code compiles without errors. What it checks: - Rust compilation for...
(QB_NEW_EN)
[grammar] ~59-~59: There might be a mistake here.
Context: ...les without errors. What it checks: - Rust compilation for both debug and rele...
(QB_NEW_EN)
[grammar] ~60-~60: There might be a mistake here.
Context: ...lation for both debug and release builds - All 20 unit tests must pass - WASM targe...
(QB_NEW_EN)
[grammar] ~61-~61: There might be a mistake here.
Context: ...ase builds - All 20 unit tests must pass - WASM target compilation - Test coverage ...
(QB_NEW_EN)
[grammar] ~62-~62: There might be a mistake here.
Context: ...ests must pass - WASM target compilation - Test coverage reporting ### ✨ Code Vali...
(QB_NEW_EN)
[grammar] ~65-~65: There might be a mistake here.
Context: ...overage reporting ### ✨ Code Validation Why Critical: Maintains code quality a...
(QB_NEW_EN)
[grammar] ~68-~68: There might be a mistake here.
Context: ...security standards. What it checks: - Code formatting via cargo fmt - Lintin...
(QB_NEW_EN)
[grammar] ~70-~70: There might be a mistake here.
Context: ...ia cargo clippy (zero warnings policy) - Security vulnerability scanning via `car...
(QB_NEW_EN)
[grammar] ~78-~78: There might be a mistake here.
Context: ...→ Branches 2. Click Add rule or edit existing rule 3. Set **Branch name patt...
(QB_NEW_EN)
[grammar] ~81-~81: There might be a mistake here.
Context: ...tatus checks**, add the required checks: - Search for and select each required stat...
(QB_NEW_EN)
[style] ~119-~119: ‘emergency situations’ might be wordy. Consider a shorter alternative.
Context: ...ssing Protection (Admins Only) In rare emergency situations, administrators can temporarily disable...
(EN_WORDINESS_PREMIUM_EMERGENCY_SITUATIONS)
[grammar] ~135-~135: There might be a mistake here.
Context: ...ures: 1. For Stylus Check Failures: - Review WASM compilation errors - Chec...
(QB_NEW_EN)
[grammar] ~140-~140: There might be a mistake here.
Context: ...compatibility 2. For Test Failures: - Fix failing unit tests - Ensure new c...
(QB_NEW_EN)
[grammar] ~145-~145: There might be a mistake here.
Context: ...ng APIs 3. For Validation Failures: - Run cargo fmt to fix formatting - A...
(QB_NEW_EN)
[grammar] ~161-~161: There might be a mistake here.
Context: ...status ``` ### Weekly Review Checklist: - [ ] Verify all required status checks ar...
(QB_NEW_EN)
[grammar] ~170-~170: There might be a mistake here.
Context: ...branch protection or to request changes: - Open an issue with label ci/cd - Conta...
(QB_NEW_EN)
[grammar] ~171-~171: There might be a mistake here.
Context: ... or to request changes: - Open an issue with label ci/cd - Contact repository admi...
(QB_NEW_EN)
🪛 markdownlint-cli2 (0.17.2)
licenses/COPYRIGHT.md
5-5: Bare URL used
(MD034, no-bare-urls)
5-5: Bare URL used
(MD034, no-bare-urls)
README.md
25-25: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
464-464: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
.github/BRANCH_PROTECTION.md
7-7: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
28-28: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
75-75: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
85-85: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
152-152: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
161-161: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
🪛 GitHub Actions: Linketh CI/CD Pipeline
src/ens.rs
[error] 1-1: cargo fmt -- --check failed. Formatting issues detected in src/ens.rs. Run 'cargo fmt' to fix.
src/tests.rs
[error] 1-1: cargo fmt -- --check failed. Formatting issues detected in src/tests.rs. Run 'cargo fmt' to fix.
src/lib.rs
[error] 1-1: cargo fmt -- --check failed. Formatting issues detected in src/lib.rs. Run 'cargo fmt' to fix.
🪛 dotenv-linter (3.3.0)
.env.example
[warning] 3-3: [UnorderedKey] The PRIV_KEY_PATH key should go before the RPC_URL key
(UnorderedKey)
[warning] 4-4: [UnorderedKey] The ENS_REGISTRY_ADDRESS key should go before the PRIV_KEY_PATH key
(UnorderedKey)
🪛 actionlint (1.7.7)
.github/workflows/security.yml
28-28: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
166-166: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
.github/workflows/ci.yml
26-26: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
79-79: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
140-140: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
237-237: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
265-265: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
294-294: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
325-325: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.37.1)
.github/workflows/security.yml
[error] 22-22: trailing spaces
(trailing-spaces)
[warning] 24-24: wrong indentation: expected 6 but found 4
(indentation)
[error] 26-26: trailing spaces
(trailing-spaces)
[error] 32-32: trailing spaces
(trailing-spaces)
[error] 41-41: trailing spaces
(trailing-spaces)
[error] 45-45: trailing spaces
(trailing-spaces)
[error] 48-48: trailing spaces
(trailing-spaces)
[error] 51-51: trailing spaces
(trailing-spaces)
[error] 98-98: trailing spaces
(trailing-spaces)
[error] 102-102: trailing spaces
(trailing-spaces)
[error] 113-113: trailing spaces
(trailing-spaces)
[error] 121-121: trailing spaces
(trailing-spaces)
[error] 128-128: trailing spaces
(trailing-spaces)
[error] 133-133: trailing spaces
(trailing-spaces)
[error] 140-140: trailing spaces
(trailing-spaces)
[error] 145-145: trailing spaces
(trailing-spaces)
[error] 160-160: trailing spaces
(trailing-spaces)
[warning] 162-162: wrong indentation: expected 6 but found 4
(indentation)
[error] 164-164: trailing spaces
(trailing-spaces)
[error] 170-170: trailing spaces
(trailing-spaces)
[error] 173-173: trailing spaces
(trailing-spaces)
[error] 178-178: trailing spaces
(trailing-spaces)
[error] 189-189: trailing spaces
(trailing-spaces)
[error] 198-198: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/ci.yml
[error] 20-20: trailing spaces
(trailing-spaces)
[error] 24-24: trailing spaces
(trailing-spaces)
[error] 32-32: trailing spaces
(trailing-spaces)
[error] 43-43: trailing spaces
(trailing-spaces)
[error] 51-51: trailing spaces
(trailing-spaces)
[error] 54-54: trailing spaces
(trailing-spaces)
[error] 57-57: trailing spaces
(trailing-spaces)
[error] 69-69: trailing spaces
(trailing-spaces)
[error] 73-73: trailing spaces
(trailing-spaces)
[error] 77-77: trailing spaces
(trailing-spaces)
[error] 84-84: trailing spaces
(trailing-spaces)
[error] 95-95: trailing spaces
(trailing-spaces)
[error] 103-103: trailing spaces
(trailing-spaces)
[error] 106-106: trailing spaces
(trailing-spaces)
[error] 109-109: trailing spaces
(trailing-spaces)
[error] 112-112: trailing spaces
(trailing-spaces)
[error] 115-115: trailing spaces
(trailing-spaces)
[error] 120-120: trailing spaces
(trailing-spaces)
[error] 134-134: trailing spaces
(trailing-spaces)
[error] 138-138: trailing spaces
(trailing-spaces)
[error] 145-145: trailing spaces
(trailing-spaces)
[error] 156-156: trailing spaces
(trailing-spaces)
[error] 164-164: trailing spaces
(trailing-spaces)
[error] 167-167: trailing spaces
(trailing-spaces)
[error] 170-170: trailing spaces
(trailing-spaces)
[error] 173-173: trailing spaces
(trailing-spaces)
[error] 191-191: trailing spaces
(trailing-spaces)
[error] 195-195: trailing spaces
(trailing-spaces)
[error] 198-198: trailing spaces
(trailing-spaces)
[error] 208-208: trailing spaces
(trailing-spaces)
[error] 218-218: trailing spaces
(trailing-spaces)
[error] 231-231: trailing spaces
(trailing-spaces)
[error] 235-235: trailing spaces
(trailing-spaces)
[error] 241-241: trailing spaces
(trailing-spaces)
[error] 244-244: trailing spaces
(trailing-spaces)
[error] 247-247: trailing spaces
(trailing-spaces)
[error] 259-259: trailing spaces
(trailing-spaces)
[error] 263-263: trailing spaces
(trailing-spaces)
[error] 270-270: trailing spaces
(trailing-spaces)
[error] 273-273: trailing spaces
(trailing-spaces)
[error] 288-288: trailing spaces
(trailing-spaces)
[error] 292-292: trailing spaces
(trailing-spaces)
[error] 299-299: trailing spaces
(trailing-spaces)
[error] 302-302: trailing spaces
(trailing-spaces)
[error] 319-319: trailing spaces
(trailing-spaces)
[error] 323-323: trailing spaces
(trailing-spaces)
[error] 330-330: trailing spaces
(trailing-spaces)
[error] 333-333: trailing spaces
(trailing-spaces)
[error] 338-338: trailing spaces
(trailing-spaces)
[error] 345-345: trailing spaces
(trailing-spaces)
[error] 359-359: trailing spaces
(trailing-spaces)
[error] 377-377: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Supply Chain Security
- GitHub Check: Security Audit
- GitHub Check: Security Audit
- GitHub Check: Supply Chain Security
🔇 Additional comments (7)
.cargo/config.toml (1)
1-6: Confirm WASM feature flags against Stylus requirements.Disabling
reference-typesand enablingbulk-memoryseems intentional for engine compat, but please confirm these are required for Arbitrum Stylus and won’t constrain future toolchains..github/BRANCH_PROTECTION.md (2)
50-55: Verify stated WASM limits and commands.“WASM binary size limits (must be under 128KB)” and
cargo stylus checkusage should be confirmed against current Stylus tooling; the limit may differ.
9-15: Required status check names match actual check-run contexts – the names listed in .github/BRANCH_PROTECTION.md exactly align with the output ofgh api …/check-runs(CI Success, Stylus Compatibility Check, Build and Test, Code Validation, Docker Build Test). No update needed..dockerignore (1)
72-76: If examples are part of CI or docs, consider keeping them.Ignoring
examples/may break Docker-stage builds that compile examples. If not needed, ignore is fine; otherwise, remove.Dockerfile (1)
98-104: Healthcheck and default CMD are good. Consider adding a simple “cargo stylus --version” smoke check..github/workflows/ci.yml (1)
175-183: WASM size limit confirmed
Stylus enforces a 128 KiB uncompressed (131 072 bytes) limit andcargo stylus checkautomatically validates the 24 KiB compressed threshold.Cargo.toml (1)
17-24: No change needed for Tokio version constraint. Theversion = "1.12.0"in Cargo.toml uses caret semantics (^1.12.0), allowing any 1.x ≥1.12.0 (Cargo.lock shows it resolved to 1.47.1), so you’re already getting a modern runtime without duplicate pinning.
| **Protection Settings**: | ||
| - ✅ Require status checks to pass before merging | ||
| - ✅ Require branches to be up to date before merging | ||
| - ✅ Require pull request reviews before merging (minimum 1 reviewer) | ||
| - ✅ Dismiss stale pull request approvals when new commits are pushed | ||
| - ✅ Require review from code owners (if CODEOWNERS file exists) | ||
| - ✅ Restrict pushes that create files larger than 100MB | ||
| - ✅ Require signed commits (recommended) | ||
| - ✅ Include administrators in these restrictions | ||
| - ✅ Allow force pushes: **DISABLED** | ||
| - ✅ Allow deletions: **DISABLED** |
There was a problem hiding this comment.
Incorrect protection item: GitHub doesn’t offer “Restrict pushes that create files >100MB” as a branch protection toggle.
Large-file limits are enforced by GitHub globally (100MB) or via Repository Rulesets/LFS, not classic branch protection. Adjust wording or move this to a Ruleset section.
-- ✅ Restrict pushes that create files larger than 100MB
+// Enforce large-file policies via Repository Rulesets or Git LFS (GitHub blocks >100MB by default).Committable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 LanguageTool
[grammar] ~16-~16: There might be a mistake here.
Context: ....yml workflow) Protection Settings: - ✅ Require status checks to pass before m...
(QB_NEW_EN)
🤖 Prompt for AI Agents
In .github/BRANCH_PROTECTION.md around lines 16 to 26, the document incorrectly
lists "Restrict pushes that create files larger than 100MB" as a branch
protection toggle; update the wording to reflect that GitHub enforces the 100MB
file limit globally or via Repository Rulesets/LFS rather than classic branch
protection, and either remove that bullet or move it into a new "Repository
Rulesets / LFS / Large file limits" section with a brief note explaining where
to configure or enforce large-file restrictions.
| [DCO]: https://github.com/OffchainLabs/stylus-hello-world/blob/main/licenses/DCO.txt | ||
| [terms]: https://github.com/OffchainLabs/stylus-hello-world/blob/main/licenses/COPYRIGHT.md |
There was a problem hiding this comment.
Fix links to use this repo’s files (not OffchainLabs).
Current links point to another repository.
Apply:
-[DCO]: https://github.com/OffchainLabs/stylus-hello-world/blob/main/licenses/DCO.txt
-[terms]: https://github.com/OffchainLabs/stylus-hello-world/blob/main/licenses/COPYRIGHT.md
+[DCO]: ../licenses/DCO.txt
+[terms]: ../licenses/COPYRIGHT.md📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| [DCO]: https://github.com/OffchainLabs/stylus-hello-world/blob/main/licenses/DCO.txt | |
| [terms]: https://github.com/OffchainLabs/stylus-hello-world/blob/main/licenses/COPYRIGHT.md | |
| [DCO]: ../licenses/DCO.txt | |
| [terms]: ../licenses/COPYRIGHT.md |
🤖 Prompt for AI Agents
.github/pull_request_template.md lines 11-12: the two link references point to
OffchainLabs/stylus-hello-world; update both URLs to reference the corresponding
files within THIS repository (replace the OffchainLabs/stylus-hello-world path
with this repo’s path and ensure the filenames and relative paths are correct),
verify links resolve to the local LICENSE/COPYRIGHT files or to the correct
repo-relative paths, and run a quick link check to confirm they work.
| // Initialize ENS registry address | ||
| pub fn init(&mut self, ens_registry_address: Address) { | ||
| self.ens_registry.set(ens_registry_address); | ||
| } | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion
Anyone can (re)initialize the ENS registry; add a one-time guard
init is publicly callable and can be invoked multiple times to change the registry address. This is a critical security issue.
Apply a one-time initialization guard (minimal change):
pub fn init(&mut self, ens_registry_address: Address) {
- self.ens_registry.set(ens_registry_address);
+ assert!(
+ self.ens_registry.get().is_zero(),
+ "Already initialized"
+ );
+ self.ens_registry.set(ens_registry_address);
}Optionally, add an admin field set on first call to restrict future admin ops.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Initialize ENS registry address | |
| pub fn init(&mut self, ens_registry_address: Address) { | |
| self.ens_registry.set(ens_registry_address); | |
| } | |
| // Initialize ENS registry address | |
| pub fn init(&mut self, ens_registry_address: Address) { | |
| assert!( | |
| self.ens_registry.get().is_zero(), | |
| "Already initialized" | |
| ); | |
| self.ens_registry.set(ens_registry_address); | |
| } |
🤖 Prompt for AI Agents
In src/lib.rs around lines 69 to 73, the public init allows repeated
reinitialization of the ENS registry; change it to enforce one-time
initialization by checking whether the stored ens_registry is still the
default/zero value and returning an error or panicking if it's already set, and
only set the address on the first successful call; optionally capture and store
the caller as an admin during that first call to gate future admin-only
operations.
| pub fn create_profile(&mut self, ens_name: String, cid: String, display: String, avatar: String) { | ||
| let sender = self.vm().msg_sender(); | ||
| let node = ens::namehash(ens_name.clone()); | ||
| let registry_addr = self.ens_registry.get(); | ||
| assert!(!registry_addr.is_zero(), "ENS registry not initialized"); | ||
|
|
||
| let ens_contract = ens::ENS::new(registry_addr); | ||
| let ens_owner = ens_contract.owner(&mut *self, node.into()).unwrap(); | ||
| assert!(ens_owner == sender, "You do not own this ENS"); | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion
Align with case-insensitive namehash and improve error on ENS call
Update to pass &str after changing namehash (and provide a clearer revert on call failure).
- let node = ens::namehash(ens_name.clone());
+ let node = ens::namehash(&ens_name);
@@
- let ens_owner = ens_contract.owner(&mut *self, node.into()).unwrap();
+ let ens_owner = ens_contract
+ .owner(&mut *self, node.into())
+ .expect("ENS owner lookup failed");📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| pub fn create_profile(&mut self, ens_name: String, cid: String, display: String, avatar: String) { | |
| let sender = self.vm().msg_sender(); | |
| let node = ens::namehash(ens_name.clone()); | |
| let registry_addr = self.ens_registry.get(); | |
| assert!(!registry_addr.is_zero(), "ENS registry not initialized"); | |
| let ens_contract = ens::ENS::new(registry_addr); | |
| let ens_owner = ens_contract.owner(&mut *self, node.into()).unwrap(); | |
| assert!(ens_owner == sender, "You do not own this ENS"); | |
| pub fn create_profile(&mut self, ens_name: String, cid: String, display: String, avatar: String) { | |
| let sender = self.vm().msg_sender(); | |
| let node = ens::namehash(&ens_name); | |
| let registry_addr = self.ens_registry.get(); | |
| assert!(!registry_addr.is_zero(), "ENS registry not initialized"); | |
| let ens_contract = ens::ENS::new(registry_addr); | |
| let ens_owner = ens_contract | |
| .owner(&mut *self, node.into()) | |
| .expect("ENS owner lookup failed"); | |
| assert!(ens_owner == sender, "You do not own this ENS"); |
🤖 Prompt for AI Agents
In src/lib.rs around lines 75 to 84, change the call to the case-insensitive
namehash to pass a &str (e.g. call ens::namehash(&ens_name) rather than cloning
the String) and replace the blind unwrap on the ENS owner call with proper error
handling that surfaces the underlying call error (use expect with a clear
message or match the Result and revert with a descriptive error including the
returned error details), then keep the ownership check against sender as before.
| // Transfer profile | ||
| pub fn transfer_profile(&mut self, new_owner: Address) { | ||
| let sender = self.vm().msg_sender(); | ||
|
|
||
| // Transfer profile data | ||
| { | ||
| let old_p = self.profiles.getter(sender); | ||
| let ens_str = old_p.ens.get_string(); | ||
| let cid_str = old_p.cid.get_string(); | ||
| let display_str = old_p.display_name.get_string(); | ||
| let avatar_str = old_p.avatar_cid.get_string(); | ||
|
|
||
| let mut new_p = self.profiles.setter(new_owner); | ||
| new_p.ens.set_str(&ens_str); | ||
| new_p.cid.set_str(&cid_str); | ||
| new_p.display_name.set_str(&display_str); | ||
| new_p.avatar_cid.set_str(&avatar_str); | ||
| } | ||
|
|
||
| // Transfer quick links | ||
| { | ||
| let mut link_data = Vec::new(); | ||
| let old_links = self.quick_links.getter(sender); | ||
| for i in 0..old_links.len() { | ||
| let old_link = old_links.get(i).unwrap(); | ||
| link_data.push((old_link.title.get_string(), old_link.url.get_string())); | ||
| } | ||
|
|
||
| let mut new_links = self.quick_links.setter(new_owner); | ||
| // Clear existing links | ||
| for _ in 0..new_links.len() { | ||
| new_links.shrink(); | ||
| } | ||
| for (title, url) in link_data { | ||
| let mut new_link = new_links.grow(); | ||
| new_link.title.set_str(&title); | ||
| new_link.url.set_str(&url); | ||
| } | ||
| } | ||
|
|
||
| // Clear sender's data | ||
| { | ||
| let mut p = self.profiles.setter(sender); | ||
| p.ens.erase(); | ||
| p.cid.erase(); | ||
| p.display_name.erase(); | ||
| p.avatar_cid.erase(); | ||
| } | ||
|
|
||
| { | ||
| let mut links = self.quick_links.setter(sender); | ||
| for _ in 0..links.len() { | ||
| links.shrink(); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Transfers can exceed the 5-link limit and do not emit an event
set_quick_links enforces max 5 links, but transfer_profile copies all links, bypassing the cap. Also consider emitting an event for observability.
Cap to 5 and emit QuickLinksUpdated:
- let mut new_links = self.quick_links.setter(new_owner);
+ let mut new_links = self.quick_links.setter(new_owner);
// Clear existing links
- for _ in 0..new_links.len() {
- new_links.shrink();
- }
- for (title, url) in link_data {
+ while new_links.len() > 0 {
+ new_links.shrink();
+ }
+ for (idx, (title, url)) in link_data.into_iter().enumerate() {
+ if idx >= 5 { break; } // enforce same cap as set_quick_links
let mut new_link = new_links.grow();
new_link.title.set_str(&title);
new_link.url.set_str(&url);
}Optionally after all copies:
log(self.vm(), QuickLinksUpdated { owner: new_owner });🤖 Prompt for AI Agents
In src/lib.rs around lines 179 to 234, transfer_profile currently copies all
quick links from sender to new_owner (bypassing the 5-link cap) and doesn’t emit
an event; fix by limiting copied links to a maximum of 5 (e.g., iterate only up
to old_links.len().min(5)) when building link_data and when populating
new_links, ensure you clear existing target links safely (shrink until length ==
0) then grow exactly for the capped items; after finishing the copy, emit the
QuickLinksUpdated event (log(self.vm(), QuickLinksUpdated { owner: new_owner }))
so observers see the change.
| #![cfg_attr(not(any(test, feature = "export-abi")), no_main)] | ||
|
|
||
| #[cfg(not(any(test, feature = "export-abi")))] | ||
| #[no_mangle] | ||
| pub extern "C" fn main() {} |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Verify that the C ABI entry symbol matches Stylus expectations.
Some Stylus templates export a different symbol than “main”. Ensure this compiles and links under wasm32-unknown-unknown.
🏁 Script executed:
#!/bin/bash
# Check for non-standard entry symbol usage across the repo
rg -nP 'no_mangle\]\s*pub\s+extern\s+"C"\s+fn\s+([a-zA-Z_][a-zA-Z0-9_]*)' -C2Length of output: 79
🏁 Script executed:
#!/bin/bash
# List all #[no_mangle] occurrences (with context)
rg -n '#\[\s*no_mangle\s*\]' -C2
# List all extern "C" fn definitions (with context)
rg -n 'extern "C" fn' -C2Length of output: 412
🏁 Script executed:
#!/bin/bash
# Display the first 200 lines of src/main.rs to inspect both default and export-abi branches
sed -n '1,200p' src/main.rsLength of output: 267
Ensure C ABI entrypoint under export-abi
The #[cfg(feature = "export-abi")] fn main() branch is a Rust‐mangled symbol (not exported as C ABI). Add #[no_mangle] pub extern "C" (or rename it to the exact symbol your Stylus template expects) so the WebAssembly export matches your template’s entrypoint.
🤖 Prompt for AI Agents
In src/main.rs around lines 1–5, the branch compiled under feature "export-abi"
currently defines a Rust-mangled main function; change it so the exported symbol
uses the C ABI and is not mangled by adding #[no_mangle] and pub extern "C" to
that function (e.g. #[cfg(feature = "export-abi")] #[no_mangle] pub extern "C"
fn main() { ... }) or rename the function to the exact symbol expected by the
Stylus template so the WebAssembly export matches the template’s entrypoint.
| #[cfg(feature = "export-abi")] | ||
| fn main() { | ||
| stylus_hello_world::print_from_args(); | ||
| } |
There was a problem hiding this comment.
Leftover template reference breaks builds (“stylus_hello_world”).
This crate isn’t declared; calling it will fail. Make the export-abi main a no-op or call your actual ABI export path.
-#[cfg(feature = "export-abi")]
-fn main() {
- stylus_hello_world::print_from_args();
-}
+#[cfg(feature = "export-abi")]
+fn main() {
+ // Placeholder for ABI export builds.
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| #[cfg(feature = "export-abi")] | |
| fn main() { | |
| stylus_hello_world::print_from_args(); | |
| } | |
| #[cfg(feature = "export-abi")] | |
| fn main() { | |
| // Placeholder for ABI export builds. | |
| } |
🤖 Prompt for AI Agents
In src/main.rs around lines 7 to 10, the conditional main references an
undeclared crate stylus_hello_world which breaks builds; replace this leftover
template call by either making the export-abi main a no-op (e.g., an empty
function body) or invoking the actual ABI export path from this crate (call your
crate's function/module instead). Update the #[cfg(feature = "export-abi")] fn
main to remove the stylus_hello_world::print_from_args() call and either leave
it empty or call the correct function from your crate that performs the ABI
export.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (5)
.github/workflows/ci.yml (5)
137-142: Replace deprecated actions-rs/toolchain with dtolnay/rust-toolchain; adjust inputs.Node12-based v1 no longer runs on GitHub-hosted runners. Use dtolnay and switch target→targets; drop override.
- - name: Setup Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - override: true + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown
234-238: Update toolchain action in security-audit job.- - name: Setup Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable
262-267: Update toolchain action in docs-check job.- - name: Setup Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - override: true + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown
291-296: Update toolchain action in integration-check job.- - name: Setup Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - override: true + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown
322-327: Update toolchain action in release-artifacts job.- - name: Setup Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - override: true + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown
🧹 Nitpick comments (4)
.github/workflows/ci.yml (4)
31-49: Prefer Swatinem/rust-cache over manual registry/build caches.Simpler, faster, and deduplicates config across jobs.
- - name: Cache cargo registry - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-registry- - - - name: Cache cargo build - uses: actions/cache@v4 - with: - path: target - key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-build- + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true
93-100: Same: simplify caching in matrix job.- - name: Cache cargo registry - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - key: ${{ runner.os }}-${{ matrix.rust-version }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.rust-version }}-cargo-registry- - - - name: Cache cargo build - uses: actions/cache@v4 - with: - path: target - key: ${{ runner.os }}-${{ matrix.rust-version }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.rust-version }}-cargo-build- + - uses: Swatinem/rust-cache@v2 + with: + key: ${{ matrix.rust-version }} + cache-on-failure: true
1-13: Add top-level concurrency and minimal permissions.Prevents redundant runs and follows least-privilege defaults.
name: Linketh CI/CD Pipeline on: push: @@ workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + env: CARGO_TERM_COLOR: always RUST_BACKTRACE: 1
20-20: Trim trailing spaces and add newline at EOF.YAMLlint flags these; cleaning them up avoids noisy diffs and tooling failures.
- fi␠ + fi +Also applies to: 24-24, 41-41, 49-49, 52-52, 55-55, 67-67, 71-71, 75-75, 92-92, 100-100, 103-103, 106-106, 109-109, 112-112, 117-117, 131-131, 135-135, 142-142, 153-153, 161-161, 164-164, 167-167, 170-170, 188-188, 192-192, 195-195, 205-205, 215-215, 228-228, 232-232, 238-238, 241-241, 244-244, 256-256, 260-260, 267-267, 270-270, 285-285, 289-289, 296-296, 299-299, 316-316, 320-320, 327-327, 330-330, 335-335, 342-342, 356-356, 374-374
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.dockerignore(1 hunks).github/workflows/ci.yml(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- .dockerignore
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/ci.yml
25-25: step must run script with "run" section or run action with "uses" section
(syntax-check)
76-76: step must run script with "run" section or run action with "uses" section
(syntax-check)
137-137: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
234-234: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
262-262: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
291-291: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
322-322: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.37.1)
.github/workflows/ci.yml
[error] 20-20: trailing spaces
(trailing-spaces)
[error] 24-24: trailing spaces
(trailing-spaces)
[error] 41-41: trailing spaces
(trailing-spaces)
[error] 49-49: trailing spaces
(trailing-spaces)
[error] 52-52: trailing spaces
(trailing-spaces)
[error] 55-55: trailing spaces
(trailing-spaces)
[error] 67-67: trailing spaces
(trailing-spaces)
[error] 71-71: trailing spaces
(trailing-spaces)
[error] 75-75: trailing spaces
(trailing-spaces)
[error] 92-92: trailing spaces
(trailing-spaces)
[error] 100-100: trailing spaces
(trailing-spaces)
[error] 103-103: trailing spaces
(trailing-spaces)
[error] 106-106: trailing spaces
(trailing-spaces)
[error] 109-109: trailing spaces
(trailing-spaces)
[error] 112-112: trailing spaces
(trailing-spaces)
[error] 117-117: trailing spaces
(trailing-spaces)
[error] 131-131: trailing spaces
(trailing-spaces)
[error] 135-135: trailing spaces
(trailing-spaces)
[error] 142-142: trailing spaces
(trailing-spaces)
[error] 153-153: trailing spaces
(trailing-spaces)
[error] 161-161: trailing spaces
(trailing-spaces)
[error] 164-164: trailing spaces
(trailing-spaces)
[error] 167-167: trailing spaces
(trailing-spaces)
[error] 170-170: trailing spaces
(trailing-spaces)
[error] 188-188: trailing spaces
(trailing-spaces)
[error] 192-192: trailing spaces
(trailing-spaces)
[error] 195-195: trailing spaces
(trailing-spaces)
[error] 205-205: trailing spaces
(trailing-spaces)
[error] 215-215: trailing spaces
(trailing-spaces)
[error] 228-228: trailing spaces
(trailing-spaces)
[error] 232-232: trailing spaces
(trailing-spaces)
[error] 238-238: trailing spaces
(trailing-spaces)
[error] 241-241: trailing spaces
(trailing-spaces)
[error] 244-244: trailing spaces
(trailing-spaces)
[error] 256-256: trailing spaces
(trailing-spaces)
[error] 260-260: trailing spaces
(trailing-spaces)
[error] 267-267: trailing spaces
(trailing-spaces)
[error] 270-270: trailing spaces
(trailing-spaces)
[error] 285-285: trailing spaces
(trailing-spaces)
[error] 289-289: trailing spaces
(trailing-spaces)
[error] 296-296: trailing spaces
(trailing-spaces)
[error] 299-299: trailing spaces
(trailing-spaces)
[error] 316-316: trailing spaces
(trailing-spaces)
[error] 320-320: trailing spaces
(trailing-spaces)
[error] 327-327: trailing spaces
(trailing-spaces)
[error] 330-330: trailing spaces
(trailing-spaces)
[error] 335-335: trailing spaces
(trailing-spaces)
[error] 342-342: trailing spaces
(trailing-spaces)
[error] 356-356: trailing spaces
(trailing-spaces)
[error] 374-374: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Security Audit
- GitHub Check: Supply Chain Security
- GitHub Check: Supply Chain Security
- GitHub Check: Security Audit
🔇 Additional comments (3)
.github/workflows/ci.yml (3)
118-123: Codecov input key and token.codecov-action v4 expects "files" (plural). Also verify whether a CODECOV_TOKEN is required for this repo visibility.
- with: - file: ./cobertura.xml - fail_ci_if_error: false + with: + files: ./cobertura.xml + fail_ci_if_error: false + # token: ${{ secrets.CODECOV_TOKEN }} # if repository is private
114-117: Ensure tarpaulin emits cobertura.xml at repo root.Tarpaulin’s format flag is case-sensitive in some versions; safer to use Xml and set output dir.
- cargo install cargo-tarpaulin - cargo tarpaulin --lib --out xml --timeout 120 + cargo install cargo-tarpaulin + cargo tarpaulin --lib --out Xml --output-dir . --timeout 120
216-220: Confirm cargo-stylus exists in runtime image.These commands will fail if the runtime stage doesn’t install cargo-stylus.
Do you want a quick Dockerfile patch to ensure cargo-stylus is present in runtime?
| - name: Setup Rust toolchain | ||
| - name: Setup Rust toolchain | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: ${{ matrix.rust-version }} | ||
| targets: wasm32-unknown-unknown | ||
| - name: Cache cargo registry |
There was a problem hiding this comment.
Fix duplicate step entry (actionlint error).
Same duplicate name issue here in build-and-test.
- - name: Setup Rust toolchain
- - name: Setup Rust toolchain
+ - name: Setup Rust toolchain📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Setup Rust toolchain | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust-version }} | |
| targets: wasm32-unknown-unknown | |
| - name: Cache cargo registry | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust-version }} | |
| targets: wasm32-unknown-unknown | |
| - name: Cache cargo registry |
🧰 Tools
🪛 actionlint (1.7.7)
76-76: step must run script with "run" section or run action with "uses" section
(syntax-check)
🤖 Prompt for AI Agents
.github/workflows/ci.yml around lines 76 to 82: there are two steps with the
exact same name "Setup Rust toolchain" causing an actionlint duplicate-name
error; remove the duplicate entry (or rename one if both are required for
different actions) so each step name is unique, ensuring you keep the step that
includes the dtolnay/rust-toolchain action with the toolchain and targets fields
and delete the redundant step, then validate the YAML to ensure indentation and
sequence are preserved.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (8)
.github/workflows/ci.yml (8)
112-116: Make coverage output deterministic for upload.Explicitly set output format and path so the subsequent upload step can find it.
- cargo install cargo-tarpaulin - cargo tarpaulin --lib --out xml --timeout 120 + cargo install --locked cargo-tarpaulin + cargo tarpaulin --lib --out Xml --output-dir . --timeout 120
117-123: Codecov: use correct input key and align path.codecov-action expects “files”, not “file”. Also ensure the filename matches tarpaulin output.
- uses: codecov/codecov-action@v4 - with: - file: ./cobertura.xml - fail_ci_if_error: false + uses: codecov/codecov-action@v4 + with: + files: ./cobertura.xml + fail_ci_if_error: falseIf this is a private repo, set CODECOV_TOKEN in repo secrets. Please confirm the coverage file exists in CI logs after the tarpaulin step.
30-48: Simplify and harden cargo caching.Replace manual registry/build caches with Swatinem/rust-cache for correctness and less churn.
- - name: Cache cargo registry - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-registry- - - - name: Cache cargo build - uses: actions/cache@v4 - with: - path: target - key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-build- + - name: Cache cargo (build + registry) + uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: trueApply similarly to other jobs that build Rust (81-99, 142-160, etc.).
161-166: Pin CLI install for reproducibility.Pin versions and use --locked to avoid upstream breakages.
- - name: Install Stylus CLI - run: cargo install --force cargo-stylus cargo-stylus-check + - name: Install Stylus CLI + run: | + cargo install --locked --force cargo-stylus@<version> + cargo install --locked --force cargo-stylus-check@<version>Replace with known-good versions.
297-298: Repeat: pin Stylus CLI installs here too.- - name: Install Stylus CLI - run: cargo install --force cargo-stylus cargo-stylus-check + - name: Install Stylus CLI + run: | + cargo install --locked --force cargo-stylus@<version> + cargo install --locked --force cargo-stylus-check@<version>
170-179: Harden WASM size check against missing file.Guard for absent artifact to produce a clearer failure.
- WASM_SIZE=$(stat -c%s target/wasm32-unknown-unknown/release/linketh.wasm) + WASM=target/wasm32-unknown-unknown/release/linketh.wasm + [ -f "$WASM" ] || { echo "❌ $WASM not found"; exit 1; } + WASM_SIZE=$(stat -c%s "$WASM") echo "WASM size: $WASM_SIZE bytes" if [ $WASM_SIZE -gt 131072 ]; then # 128KB limit
55-59: Pin cargo-audit install.Use --locked and a version to reduce CI flakiness.
- cargo install cargo-audit + cargo install --locked cargo-audit@<version>
373-373: Add newline at end of file.YAMLlint warning.
- fi \ No newline at end of file + fi +
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/ci.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/ci.yml
75-75: step must run script with "run" section or run action with "uses" section
(syntax-check)
136-136: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
233-233: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
261-261: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
290-290: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
321-321: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.37.1)
.github/workflows/ci.yml
[error] 373-373: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Security Audit
- GitHub Check: Supply Chain Security
- GitHub Check: Supply Chain Security
- GitHub Check: Security Audit
🔇 Additional comments (7)
.github/workflows/ci.yml (7)
75-81: Fix duplicate step and avoid @master ref.Two consecutive “Setup Rust toolchain” step names; first has no run/uses (actionlint error). Also, avoid using the action’s @master ref.
- - name: Setup Rust toolchain - - name: Setup Rust toolchain - uses: dtolnay/rust-toolchain@master + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.rust-version }} targets: wasm32-unknown-unknown
135-141: Update to maintained Rust toolchain action.actions-rs/toolchain@v1 is too old on GHA. Switch to dtolnay/rust-toolchain and adjust inputs.
- - name: Setup Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - override: true + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + targets: wasm32-unknown-unknown
232-237: Update toolchain action in security-audit job.Same outdated action; no need for override.
- - name: Setup Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable
260-266: Update toolchain action in docs-check job.- - name: Setup Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - override: true + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + targets: wasm32-unknown-unknown
289-295: Update toolchain action in integration-check job.- - name: Setup Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - override: true + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + targets: wasm32-unknown-unknown
320-326: Update toolchain action in release-artifacts job.- - name: Setup Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - override: true + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + targets: wasm32-unknown-unknown
195-219: Confirmed: runtime image provides cargo and cargo-stylus.
Runtime stage (FROM rust:1.78-slim) runsRUN cargo install --force cargo-stylus cargo-stylus-checkand uses the Rust image (cargo present), so the CI commands should succeed.
Summary by CodeRabbit
New Features
Tests
Documentation
CI/CD
Build / Chores