-
Notifications
You must be signed in to change notification settings - Fork 196
Add SPK deploy #635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add SPK deploy #635
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
📝 WalkthroughWalkthroughA new YAML config file was added for token metadata and cross-chain connections. The warp route whitelist is now a fixed array with a single route instead of being nullable. The warp routes YAML was updated to include two token entries with detailed info and cross-chain links. Changes
Poem
✨ Finishing Touches
🧪 Generate Unit Tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
src/consts/base-config.yaml (1)
1-20: 🛠️ Refactor suggestionKeep the swamp DRY – avoid copy-pasting token blobs
Looks like these very same SPK token stanzas already live in
warpRoutes.yaml. Duplicating them in a second config file will bite us the next time addresses or decimals change – one half of the marsh will get out-of-date. Consider either
a) importing/merging a single source of truth, or
b) splitting the concerns (e.g. put chain-agnostic token metadata in one place and per-route overrides elsewhere).Doing so keeps maintenance nice and tidy like a well-raked swamp.
🧹 Nitpick comments (1)
src/consts/warpRoutes.yaml (1)
5-22: Mind the duplication & casing
- Same SPK token definitions appear in
base-config.yaml. Pick one stable home.- Ethereum addresses are best stored in EIP-55 checksum case to avoid accidental typos. A quick
npx ethers check-addresscan settle that.- The asymmetric
connectionsstrings flagged in the other file are present here too – worth cross-checking before the portal between chains gets clogged.Nothing blocking, but tidying these bits now saves swamp-cleaning later.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/consts/base-config.yaml(1 hunks)src/consts/warpRouteWhitelist.ts(1 hunks)src/consts/warpRoutes.yaml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: lint
- GitHub Check: build
🔇 Additional comments (1)
src/consts/base-config.yaml (1)
5-16: Give the connection strings another sniffThe
connectionsentries (ethereum|ethereum|…andethereum|base|…) look asymmetric. If the format is<registry>|<chain>|<address>you may have mixed up the first segment for the Base-side entry (expectedbase|…|…perhaps?). Please eyeball the schema or run the validator to be sure the bridge back home actually finds its mate.
| export const warpRouteWhitelist: Array<string> = [ | ||
| 'SPK/base', | ||
| ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Route ID doesn’t follow the spec – likely to mis-match downstream
Comment says the shape is SYMBOL/chain1-chain2… (chains alphabetically).
'SPK/base' is missing the second chain. For the pair you introduced it ought to read 'SPK/base-ethereum'.
-export const warpRouteWhitelist: Array<string> = [
- 'SPK/base',
+export const warpRouteWhitelist: Array<string> = [
+ // chains in alphabetical order: base < ethereum
+ 'SPK/base-ethereum',
];Also remember: changing null → array means any code that relied on “null ⇒ include all routes” now gets a single-route filter. Make sure callers aren’t still checking for null.
Alright, let’s take a peek at how warpRouteWhitelist is defined and used across the repo:
🏁 Script executed:
#!/bin/bash
# Show the whitelist definition
sed -n '1,200p' src/consts/warpRouteWhitelist.ts
# Find all references to warpRouteWhitelist
rg "warpRouteWhitelist" -n .Length of output: 1431
Let’s double-check the actual chain names in warpCoreConfig.ts to ensure “ethereum” is correct:
🏁 Script executed:
#!/bin/bash
# Show the top of warpCoreConfig
sed -n '1,200p' src/features/warpCore/warpCoreConfig.ts
# Locate where registryWarpRoutes is defined or imported
rg "registryWarpRoutes" -n src/features/warpCoreLength of output: 3573
Fix warpRouteWhitelist entry & revisit null-case filtering
The whitelist entry needs the full SYMBOL/chainA-chainB format (chains alphabetically), and since we’ve switched from null to an array literal the “include all” path is now unreachable—our filter always runs.
• src/consts/warpRouteWhitelist.ts (around line 5)
export const warpRouteWhitelist: string[] = [
- 'SPK/base',
+ // chains in alphabetical order: base < ethereum
+ 'SPK/base-ethereum',
];• src/features/warpCore/warpCoreConfig.ts (lines 14–16)
– Currently uses warpRouteWhitelist ? filterToIds(…) : registryWarpRoutes.
– Since warpRouteWhitelist is never null, you’ll always hit the filter path. If you still want “null ⇒ include all,” either allow warpRouteWhitelist to be null or change the condition to check length > 0.
📝 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.
| export const warpRouteWhitelist: Array<string> = [ | |
| 'SPK/base', | |
| ]; | |
| export const warpRouteWhitelist: string[] = [ | |
| // chains in alphabetical order: base < ethereum | |
| 'SPK/base-ethereum', | |
| ]; |
🤖 Prompt for AI Agents
In src/consts/warpRouteWhitelist.ts around lines 5 to 7, update the whitelist
entry to follow the full SYMBOL/chainA-chainB format with chains alphabetically
sorted, changing 'SPK/base' to 'SPK/base-ethereum'. Additionally, in
src/features/warpCore/warpCoreConfig.ts around lines 14 to 16, revise the
conditional that checks warpRouteWhitelist so it verifies if the array length is
greater than zero instead of checking for null, ensuring the filter only applies
when the whitelist has entries and allowing an "include all" path when the
whitelist is empty.
Summary by CodeRabbit
New Features
Bug Fixes
'SPK/base'route, improving route control.