add nexus testnet executor contract#998
Conversation
📝 WalkthroughWalkthroughA new executor contract address for Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
core/base/src/constants/contracts/executor.ts (1)
62-62: Add trailing comma for consistency.Line 37 (last Mainnet entry) includes a trailing comma, but this new entry does not. Adding it would maintain consistency and make future additions cleaner.
Suggested fix
- ["Nexus", "0xc4b1A023A14d62791ca8C1216575839a0Bd98Ecb"] + ["Nexus", "0xc4b1A023A14d62791ca8C1216575839a0Bd98Ecb"],🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@core/base/src/constants/contracts/executor.ts` at line 62, Add a trailing comma to the new Mainnet entry ["Nexus", "0xc4b1A023A14d62791ca8C1216575839a0Bd98Ecb"] in the array defined in executor.ts so it matches the surrounding entries' style; locate the array of network mappings (the MAINNET entries) and append a comma after that entry to maintain consistency and cleaner diffs for future additions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@core/base/src/constants/contracts/executor.ts`:
- Line 62: The MapLevels<[Network, Chain, string]> entry contains ["Nexus",
"0xc4b1A023A14d62791ca8C1216575839a0Bd98Ecb"] but "Nexus" is not a member of the
Chain union (derived from the chain definitions in
core/base/src/constants/chains.ts), causing a TypeScript type error; either
remove this ["Nexus", ...] mapping from the executor constants or add "Nexus" to
the chain definitions (and any required metadata) in
core/base/src/constants/chains.ts so that Chain includes "Nexus" before keeping
the map entry, and ensure MapLevels usage still type-checks.
---
Nitpick comments:
In `@core/base/src/constants/contracts/executor.ts`:
- Line 62: Add a trailing comma to the new Mainnet entry ["Nexus",
"0xc4b1A023A14d62791ca8C1216575839a0Bd98Ecb"] in the array defined in
executor.ts so it matches the surrounding entries' style; locate the array of
network mappings (the MAINNET entries) and append a comma after that entry to
maintain consistency and cleaner diffs for future additions.
🪄 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: 18f86cfc-9245-4f7a-9f48-bf487aa9f0bc
📒 Files selected for processing (1)
core/base/src/constants/contracts/executor.ts
| ["XRPLEVM", "0x4d9525D94D275dEB495b7C8840b154Ae04cfaC2A"], | ||
| ["Mezo", "0x0f9b8E144Cc5C5e7C0073829Afd30F26A50c5606"], | ||
| ["ZeroGravity", "0x7C43825EeB76DF7aAf3e1D2e8f684d4876F0CC05"], | ||
| ["Nexus", "0xc4b1A023A14d62791ca8C1216575839a0Bd98Ecb"] |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify "Nexus" is defined as a Chain in the codebase.
echo "=== Searching for Nexus in chain definitions ==="
rg -n -C3 '"Nexus"' --type=ts -g '*/constants/chains*'
echo ""
echo "=== Checking chains.ts for Nexus ==="
fd -i 'chains.ts' --exec cat {} \; | rg -n 'Nexus'
echo ""
echo "=== Checking all chain type definitions ==="
ast-grep --pattern '"Nexus"'Repository: wormhole-foundation/wormhole-sdk-ts
Length of output: 660
🏁 Script executed:
#!/bin/bash
# Find chains.ts file without restrictive patterns
echo "=== Locating chains.ts ==="
fd 'chains\.ts' -t f
echo ""
echo "=== Reading chains.ts to check Chain type definition ==="
fd 'chains\.ts' -t f --exec cat {} \;Repository: wormhole-foundation/wormhole-sdk-ts
Length of output: 4490
🏁 Script executed:
#!/bin/bash
# Read executor.ts to see the full context of line 62 and the type constraint
echo "=== Reading executor.ts around line 62 ==="
cat -n core/base/src/constants/contracts/executor.ts | head -80 | tail -30Repository: wormhole-foundation/wormhole-sdk-ts
Length of output: 2290
"Nexus" is not a valid member of the Chain type.
The satisfies MapLevels<[Network, Chain, string]> constraint on line 64 enforces strict type checking. The Chain type is derived from the chain definitions in core/base/src/constants/chains.ts, and "Nexus" does not exist in that union. This will cause TypeScript compilation to fail.
Either remove this entry or add "Nexus" to the chain definitions if it should be a supported chain.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@core/base/src/constants/contracts/executor.ts` at line 62, The
MapLevels<[Network, Chain, string]> entry contains ["Nexus",
"0xc4b1A023A14d62791ca8C1216575839a0Bd98Ecb"] but "Nexus" is not a member of the
Chain union (derived from the chain definitions in
core/base/src/constants/chains.ts), causing a TypeScript type error; either
remove this ["Nexus", ...] mapping from the executor constants or add "Nexus" to
the chain definitions (and any required metadata) in
core/base/src/constants/chains.ts so that Chain includes "Nexus" before keeping
the map entry, and ensure MapLevels usage still type-checks.
Summary by CodeRabbit