Skip to content

fix: correct all deployment configs, add dev presets#7

Merged
niconiconi merged 1 commit intomainfrom
fix/deployments-verified
Mar 4, 2026
Merged

fix: correct all deployment configs, add dev presets#7
niconiconi merged 1 commit intomainfrom
fix/deployments-verified

Conversation

@niconiconi
Copy link
Copy Markdown
Contributor

Summary

  • Fix all mainnet pool IDs (ETH, BSC, Base) — every single one was wrong, verified via cast call on-chain
  • Update all service URLs from *.o.cash to *.2.o.cash (prod3)
  • Populate Base mainnet tokens (ETH + USDC) — was tokens: []
  • Add dev chain presets: ETH_DEV, BSC_DEV, BASE_DEV, SEPOLIA_DEV, BSC_TESTNET_DEV
  • Remove unused MAINNET_CHAINS / TESTNET_CHAINS arrays
  • Improve seed validation error message with HKDF context
  • Update README Quick Start to use SEPOLIA_TESTNET preset instead of placeholder URLs

Test plan

  • pnpm run type-check passes
  • pnpm run test — 37/37 files, 115/115 tests pass
  • Verify SDK can sync with prod and dev entry APIs using new configs

🤖 Generated with Claude Code

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refines the deployment configurations by correcting critical mainnet pool IDs and updating service URLs to the new prod3 environment. It also expands support for Base mainnet by populating its token configurations. A major improvement for developers is the introduction of comprehensive development chain presets, simplifying setup across various networks. These changes collectively enhance the accuracy and usability of the SDK's deployment configurations, ensuring correct interaction with the underlying blockchain infrastructure for both production and development workflows.

Highlights

  • Mainnet Configuration Fixes: Corrected all mainnet pool IDs for ETH, BSC, and Base, which were previously incorrect, and updated all service URLs from *.o.cash to *.2.o.cash (prod3).
  • Base Mainnet Token Population: Populated Base mainnet tokens to include ETH and USDC, as the configuration previously had an empty token list.
  • Development Chain Presets: Added new development chain presets for ETH_DEV, BSC_DEV, BASE_DEV, SEPOLIA_DEV, and BSC_TESTNET_DEV to streamline development environments.
  • Configuration Cleanup: Removed unused MAINNET_CHAINS and TESTNET_CHAINS arrays to simplify the codebase.
  • Improved Seed Validation: Enhanced the seed validation error message with HKDF context for better debugging.
  • README Update: Updated the README Quick Start guide to utilize the SEPOLIA_TESTNET preset instead of placeholder URLs.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/deployments.ts
    • Updated ETH_MAINNET configuration to correct token IDs and change service URLs to *.2.o.cash.
    • Updated BSC_MAINNET configuration to correct token IDs and change service URLs to *.2.o.cash.
    • Populated BASE_MAINNET tokens with ETH and USDC, added rpcUrl, and updated service URLs to *.2.o.cash.
    • Introduced new development chain configurations: ETH_DEV, BSC_DEV, BASE_DEV, SEPOLIA_DEV, and BSC_TESTNET_DEV.
    • Removed the MAINNET_CHAINS and TESTNET_CHAINS arrays.
  • src/index.ts
    • Modified exported chain configurations to include the newly added development presets (ETH_DEV, BSC_DEV, BASE_DEV, SEPOLIA_DEV, BSC_TESTNET_DEV) and removed the MAINNET_CHAINS and TESTNET_CHAINS exports.
Activity
  • The pnpm run type-check command passed successfully.
  • All 115 tests across 37 files passed when running pnpm run test.
  • Verification of the SDK's ability to sync with prod and dev entry APIs using the new configurations is pending.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several important updates to the deployment configurations. Key changes include correcting mainnet pool IDs for ETH, BSC, and Base, updating service URLs to *.2.o.cash (prod3), and populating the Base mainnet tokens which were previously empty. Additionally, new development chain presets (ETH_DEV, BSC_DEV, BASE_DEV, SEPOLIA_DEV, BSC_TESTNET_DEV) have been added, and unused MAINNET_CHAINS and TESTNET_CHAINS arrays have been removed for better code hygiene. The README Quick Start has also been updated to reflect these changes. Overall, these changes improve the correctness and flexibility of the SDK's deployment configurations.

ocashContractAddress: DEV_CONTRACT,
relayerUrl: devRelayer('eth'),
merkleProofUrl: devFreezer('eth'),
tokens: ETH_MAINNET.tokens!.map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The non-null assertion operator (!) is used here, assuming ETH_MAINNET.tokens will always be defined. While this might be true in the current deployments.ts file, the ChainConfigInput type defines tokens as optional (tokens?: TokenMetadata[]). If ETH_MAINNET.tokens were ever undefined, this would lead to a runtime error. Consider using optional chaining with a fallback to an empty array for more robust handling.

Suggested change
tokens: ETH_MAINNET.tokens!.map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),
tokens: (ETH_MAINNET.tokens || []).map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),

ocashContractAddress: DEV_CONTRACT,
relayerUrl: devRelayer('bsc'),
merkleProofUrl: devFreezer('bsc'),
tokens: BSC_MAINNET.tokens!.map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the previous comment, using the non-null assertion operator (!) on BSC_MAINNET.tokens can introduce a potential runtime error if tokens is ever undefined. It's safer to provide a fallback for optional properties.

Suggested change
tokens: BSC_MAINNET.tokens!.map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),
tokens: (BSC_MAINNET.tokens || []).map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),

ocashContractAddress: DEV_CONTRACT,
relayerUrl: devRelayer('base'),
merkleProofUrl: devFreezer('base'),
tokens: BASE_MAINNET.tokens!.map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The non-null assertion operator (!) on BASE_MAINNET.tokens could lead to a runtime error if tokens is undefined. A more defensive approach would be to use optional chaining or a default empty array.

Suggested change
tokens: BASE_MAINNET.tokens!.map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),
tokens: (BASE_MAINNET.tokens || []).map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),

ocashContractAddress: DEV_CONTRACT,
relayerUrl: devRelayer('sepolia'),
merkleProofUrl: devFreezer('sepolia'),
tokens: SEPOLIA_TESTNET.tokens!.map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using the non-null assertion operator (!) on SEPOLIA_TESTNET.tokens is brittle. If tokens is undefined, this will cause a runtime error. Consider a more robust way to handle this optional property.

Suggested change
tokens: SEPOLIA_TESTNET.tokens!.map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),
tokens: (SEPOLIA_TESTNET.tokens || []).map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),

ocashContractAddress: DEV_CONTRACT,
relayerUrl: devRelayer('bsctestnet'),
merkleProofUrl: devFreezer('bsctestnet'),
tokens: BSC_TESTNET.tokens!.map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The non-null assertion operator (!) on BSC_TESTNET.tokens carries the same risk as noted in previous comments. It's generally safer to explicitly handle cases where tokens might be undefined to prevent potential runtime issues.

Suggested change
tokens: BSC_TESTNET.tokens!.map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),
tokens: (BSC_TESTNET.tokens || []).map((t) => ({ ...t, depositFeeBps: 0, withdrawFeeBps: 0 })),

- Fix all mainnet pool IDs (ETH, BSC, Base) — verified via cast call on-chain
- Update all URLs to *.2.o.cash (prod3)
- Populate Base mainnet tokens (ETH + USDC, was empty)
- Add dev presets: ETH_DEV, BSC_DEV, BASE_DEV, SEPOLIA_DEV, BSC_TESTNET_DEV
  with hardcoded token metadata (independent from prod configs)
- Remove unused MAINNET_CHAINS/TESTNET_CHAINS arrays
- Improve seed validation error message
- Update README Quick Start to use SEPOLIA_TESTNET preset

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@niconiconi niconiconi force-pushed the fix/deployments-verified branch from 4bd9872 to 6b36bc9 Compare March 4, 2026 09:49
@niconiconi niconiconi merged commit 6b0d653 into main Mar 4, 2026
1 check passed
@niconiconi niconiconi deleted the fix/deployments-verified branch March 4, 2026 15:48
@niconiconi niconiconi restored the fix/deployments-verified branch March 4, 2026 15:48
@niconiconi niconiconi deleted the fix/deployments-verified branch March 4, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants