Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 53 minutes and 17 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR introduces deployment configuration templates, refactors the deployment script with centralized environment handling, adjusts frontend chain and token selection logic (adding Sepolia support), modifies UI components for metadata display and link handling, updates CI workflows and .gitignore patterns, and adjusts Stellar contract deployment fallback behavior. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (6)
apps/frontend/components/bridge-ui/TradeAd.tsx (1)
321-325: Consider preserving line breaks in the description.
props.metadata.descriptionis rendered directly inside a<div>, so any newlines authored by the merchant will collapse into a single line of text. If descriptions are expected to be multi-line (themax-h-[150px] overflow-y-autoscroll container suggests longer content), addwhitespace-pre-wrap(orwhitespace-pre-line) so the formatting is preserved.✂️ Proposed tweak
- {props.metadata?.description && ( - <div className="font-perfectly-nineties text-[15px] italic leading-relaxed text-grey-50 border-l-2 border-primary/60 pl-3 max-h-[150px] overflow-y-auto"> + {props.metadata?.description && ( + <div className="font-perfectly-nineties text-[15px] italic leading-relaxed text-grey-50 border-l-2 border-primary/60 pl-3 max-h-[150px] overflow-y-auto whitespace-pre-wrap"> {props.metadata.description} </div> )}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/frontend/components/bridge-ui/TradeAd.tsx` around lines 321 - 325, The description div in TradeAd.tsx is collapsing merchant newlines; update the JSX that renders props.metadata.description (the <div className="..."> wrapping props.metadata.description) to include a whitespace utility (e.g., add "whitespace-pre-wrap" or "whitespace-pre-line" to the className) so authored line breaks are preserved while keeping the existing sizing/overflow behavior.apps/frontend/components/dashboard/AdCard.tsx (1)
19-22: Remove unusedexplorer_urlsmap and related imports.The
explorer_urlsmap at lines 19-22 and thehederaTestnet/sepoliaimports (line 9) are no longer referenced in this file. Remove them to keep the module clean.Proposed cleanup
-import { hederaTestnet, sepolia } from "viem/chains" @@ -const explorer_urls: Record<string, string> = { - [hederaTestnet.id]: hederaTestnet.blockExplorers.default.url, - [sepolia.id]: sepolia.blockExplorers.default.url, -} -🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/frontend/components/dashboard/AdCard.tsx` around lines 19 - 22, Remove the unused explorer_urls constant and the unused hederaTestnet and sepolia imports from AdCard.tsx: delete the explorer_urls Record<string,string> declaration and remove hederaTestnet and sepolia from the import list (and any now-unused import lines), then run the TypeScript/ESLint fixes to ensure no remaining unused-symbol warnings; references to explorer_urls, hederaTestnet, and sepolia identify the items to remove.scripts/deploy/.env.evm.example (1)
1-33: Consider documenting secret-file hygiene.Since the real (copied)
.env.sepoliafile will containEVM_ADMIN_PRIVATE_KEY, it's worth suggestingchmod 600 scripts/deploy/.env.sepoliaaftercp, similar to howdeploy-contracts.shalready doeschmod 600on the generated seed config. This is a nice-to-have for folks following the copy/paste instructions verbatim.# cp scripts/deploy/.env.evm.example scripts/deploy/.env.sepolia +# chmod 600 scripts/deploy/.env.sepolia # $EDITOR scripts/deploy/.env.sepolia🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/deploy/.env.evm.example` around lines 1 - 33, Add a one-line note to the .env example advising users to restrict permissions on the copied secret file (e.g., after running the shown cp command) by running chmod 600 on the resulting file containing EVM_ADMIN_PRIVATE_KEY; reference the same cp invocation used in the example and optionally mirror the existing chmod 600 behavior used in deploy-contracts.sh to make the hygiene recommendation explicit.scripts/deploy/deploy-contracts.sh (1)
110-123: Refactor looks solid; a couple of polish notes.
- Silence SC1090 explicitly. The static-analysis hint flags the non-constant
source. A scoped shellcheck directive inside the helper keeps the rest of the file clean:run_in_chain() { local chain="$1" cmd="$2" local env_file="${CHAIN_ENV_FILE[$chain]:-}" ( if [[ -n "$env_file" && -f "$env_file" ]]; then - set -a; source "$env_file"; set +a + # shellcheck disable=SC1090 + set -a; source "$env_file"; set +a fi cd "$ROOT_DIR/contracts/$chain/deploy" && eval "$cmd" ) }
CHAIN_ENV_FILEis hardcoded toevm/stellaronly. Chain validation at Lines 87-92 accepts anycontracts/<name>/deploy/package.json, so adding a third chain later would silently run with no env file sourced (since${CHAIN_ENV_FILE[$chain]:-}just yields empty). Either worth a comment noting the invariant, or generalize the flag parsing to accept--<chain>-envdynamically. Not blocking for this PR.Silent env-file miss. When
--evm-env/--stellar-envis passed but the path doesn't exist, the-f "$env_file"guard silently skips sourcing. That can mask typos and lead to deploys against the wrong defaults. Consider failing fast whenenv_fileis non-empty but not a file:if [[ -n "$env_file" && -f "$env_file" ]]; then + : + elif [[ -n "$env_file" ]]; then + log "env file not found: $env_file"; exit 2 + fi + if [[ -n "$env_file" && -f "$env_file" ]]; then # shellcheck disable=SC1090 set -a; source "$env_file"; set +a fi(Or collapse into one conditional.)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/deploy/deploy-contracts.sh` around lines 110 - 123, The helper run_in_chain currently sources a non-constant file (triggering SC1090) and silently skips when a provided env_file is missing; update run_in_chain/CHAIN_ENV_FILE so you add a scoped ShellCheck directive to silence SC1090 for the source line, and change the sourcing logic: if env_file is non-empty then check -f and source it, otherwise emit a clear error (via echo/processLogger and exit non-zero) so missing/mis-typed env paths fail fast; keep the rest of the subshell/cd/eval behavior intact and reference CHAIN_ENV_FILE, run_in_chain, and env_file when making the change.scripts/deploy/.env.stellar.example (1)
16-18: Minor doc wording nit.
STELLAR_NETWORKis a Stellar CLI network name/alias (resolved to a passphrase by the CLI), not a passphrase itself. The phrasing "network passphrase target" can read as if users should paste a passphrase string here. Consider:-# Stellar network passphrase target. `testnet` | `futurenet` | `mainnet` -# or a custom network registered via `stellar network add`. +# Stellar CLI network name. `testnet` | `futurenet` | `mainnet` +# or a custom network registered via `stellar network add`. STELLAR_NETWORK=testnet🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/deploy/.env.stellar.example` around lines 16 - 18, The comment notes the wording is misleading: update the example env comment so it clarifies that STELLAR_NETWORK is a Stellar CLI network name/alias (resolved to a passphrase by the CLI) rather than the passphrase itself; edit the comment lines above STELLAR_NETWORK in the scripts/deploy/.env.stellar.example to replace "Stellar network passphrase target" with wording like "Stellar CLI network name/alias (e.g. testnet, futurenet, mainnet) — the CLI resolves this to the network passphrase" and ensure the existing example value STELLAR_NETWORK=testnet remains unchanged..gitignore (1)
14-18: Consider scoping personal/local-only ignores out of the shared.gitignore.
docs/is a very broad ignore at repo root. If anyone later adds adocs/directory at the top level (architecture notes, ADRs, generated docs, etc.), it will be silently untracked. If there's a specific generateddocs/folder you want ignored, consider scoping it (e.g.,contracts/*/docs/or a more specific path), or adding a!docs/.gitkeep+!docs/**/*.mdpattern if intentional.pitch_deck_notes.md,pitch_deck_rework.md, andproofbridge_pitch.pdflook like contributor-local artifacts rather than files every contributor needs to ignore. Those are usually better placed in.git/info/excludeor a global~/.gitignore_globalso they don't pollute the repo's ignore rules.Not blocking — just flagging intent.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.gitignore around lines 14 - 18, The shared .gitignore currently contains broad or personal entries (the top-level "docs/" directory and files "pitch_deck_notes.md", "pitch_deck_rework.md", "proofbridge_pitch.pdf") that may hide repository-wide assets or are contributor-local; narrow the ignore scope by replacing or scoping "docs/" to the specific generated path(s) needed (e.g., target subfolder patterns like contracts/*/docs/ or a more specific path) or add negation rules if you intend to keep some docs tracked, and move the personal files (pitch_deck_notes.md, pitch_deck_rework.md, proofbridge_pitch.pdf) out of the project .gitignore into contributor-local ignores such as .git/info/exclude or a global ~/.gitignore_global so they don’t affect other contributors.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/frontend/components/bridge-ui/BridgeTab.tsx`:
- Around line 78-85: The effect in useEffect resets selectedTokenId on every
tokens update, overwriting a user selection; update the logic in the effect that
reads tokens?.data to first check whether the current selectedTokenId (from
state) still exists in the refreshed list and only change state if it does not
exist or is falsy — otherwise keep it; if no selection exists, fall back to
finding the preferred token via PROOFBRIDGE_TOKEN_SYMBOLS or use list[0], and
call setSelectedTokenId only in those fallback cases (reference useEffect,
tokens, selectedTokenId, setSelectedTokenId, PROOFBRIDGE_TOKEN_SYMBOLS).
In `@apps/frontend/components/bridge-ui/TradeAd.tsx`:
- Around line 330-339: In TradeAd.tsx update the placeholder Link for the
"Terms" text (the Link element wrapping "Terms") so it does not point to
href="#" — either set it to the real route (e.g. "/terms" or the app's canonical
terms URL) or remove/replace the anchor with non-clickable text (span) until the
route exists; ensure you modify the Link usage (and import if you remove it) so
the disclaimer no longer contains a dead link.
---
Nitpick comments:
In @.gitignore:
- Around line 14-18: The shared .gitignore currently contains broad or personal
entries (the top-level "docs/" directory and files "pitch_deck_notes.md",
"pitch_deck_rework.md", "proofbridge_pitch.pdf") that may hide repository-wide
assets or are contributor-local; narrow the ignore scope by replacing or scoping
"docs/" to the specific generated path(s) needed (e.g., target subfolder
patterns like contracts/*/docs/ or a more specific path) or add negation rules
if you intend to keep some docs tracked, and move the personal files
(pitch_deck_notes.md, pitch_deck_rework.md, proofbridge_pitch.pdf) out of the
project .gitignore into contributor-local ignores such as .git/info/exclude or a
global ~/.gitignore_global so they don’t affect other contributors.
In `@apps/frontend/components/bridge-ui/TradeAd.tsx`:
- Around line 321-325: The description div in TradeAd.tsx is collapsing merchant
newlines; update the JSX that renders props.metadata.description (the <div
className="..."> wrapping props.metadata.description) to include a whitespace
utility (e.g., add "whitespace-pre-wrap" or "whitespace-pre-line" to the
className) so authored line breaks are preserved while keeping the existing
sizing/overflow behavior.
In `@apps/frontend/components/dashboard/AdCard.tsx`:
- Around line 19-22: Remove the unused explorer_urls constant and the unused
hederaTestnet and sepolia imports from AdCard.tsx: delete the explorer_urls
Record<string,string> declaration and remove hederaTestnet and sepolia from the
import list (and any now-unused import lines), then run the TypeScript/ESLint
fixes to ensure no remaining unused-symbol warnings; references to
explorer_urls, hederaTestnet, and sepolia identify the items to remove.
In `@scripts/deploy/.env.evm.example`:
- Around line 1-33: Add a one-line note to the .env example advising users to
restrict permissions on the copied secret file (e.g., after running the shown cp
command) by running chmod 600 on the resulting file containing
EVM_ADMIN_PRIVATE_KEY; reference the same cp invocation used in the example and
optionally mirror the existing chmod 600 behavior used in deploy-contracts.sh to
make the hygiene recommendation explicit.
In `@scripts/deploy/.env.stellar.example`:
- Around line 16-18: The comment notes the wording is misleading: update the
example env comment so it clarifies that STELLAR_NETWORK is a Stellar CLI
network name/alias (resolved to a passphrase by the CLI) rather than the
passphrase itself; edit the comment lines above STELLAR_NETWORK in the
scripts/deploy/.env.stellar.example to replace "Stellar network passphrase
target" with wording like "Stellar CLI network name/alias (e.g. testnet,
futurenet, mainnet) — the CLI resolves this to the network passphrase" and
ensure the existing example value STELLAR_NETWORK=testnet remains unchanged.
In `@scripts/deploy/deploy-contracts.sh`:
- Around line 110-123: The helper run_in_chain currently sources a non-constant
file (triggering SC1090) and silently skips when a provided env_file is missing;
update run_in_chain/CHAIN_ENV_FILE so you add a scoped ShellCheck directive to
silence SC1090 for the source line, and change the sourcing logic: if env_file
is non-empty then check -f and source it, otherwise emit a clear error (via
echo/processLogger and exit non-zero) so missing/mis-typed env paths fail fast;
keep the rest of the subshell/cd/eval behavior intact and reference
CHAIN_ENV_FILE, run_in_chain, and env_file when making the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c4b538ca-df43-437c-9c8a-5729ab162a5d
📒 Files selected for processing (11)
.github/workflows/backend-relayer-e2e.yml.gitignoreapps/frontend/app/globals.cssapps/frontend/components/bridge-ui/BridgeTab.tsxapps/frontend/components/bridge-ui/TradeAd.tsxapps/frontend/components/dashboard/AdCard.tsxapps/frontend/lib/chains.tscontracts/stellar/deploy/src/stellar-cli.tsscripts/deploy/.env.evm.examplescripts/deploy/.env.stellar.examplescripts/deploy/deploy-contracts.sh
💤 Files with no reviewable changes (1)
- .github/workflows/backend-relayer-e2e.yml
Summary by CodeRabbit
New Features
Improvements
Style