Skip to content

feat: improved network selection in typescript/create-onchain-agent - #485

Merged
CarsonRoscoe merged 12 commits into
mainfrom
feat/ts-cli-improve-network-selection
Feb 28, 2025
Merged

CarsonRoscoe merged 12 commits into
mainfrom
feat/ts-cli-improve-network-selection

Conversation

@CarsonRoscoe

@CarsonRoscoe CarsonRoscoe commented Feb 28, 2025 •

Copy link
Copy Markdown
Contributor

Description

The old selection put ALL networks (EVM & SVM, mainnets & testnets, even custom chain id) into one big select list.
This PR organizes this select into multiple smaller selections.

  1. This fixes the "Custom Chain ID". Previously, a chain_id could be assigned, but no custom rpc was gathered, and you could still choose Privy (which does not expose a convenient way to customize by chainId/rpcUrl).

Now, going into the "Custom Chain ID" takes you through a different route entirely. You have to provide an accompanying rpc url, and a new api route is copied. This new API route is custom-evm/viem, which mirrors evm/viem, except rather than assigning a preconfigured Viem chain, it creates a new chain and assigns the chainId/rpc.

This new route already has the fixes from #468 and #484 built into it, so no fast follow will be required to bring it to parity after the merges.

Tests

Tested via manual trial and error down each CLI path and generated the results

Screenshot 2025-02-27 at 11 24 57 PM Screenshot 2025-02-27 at 11 25 01 PM Screenshot 2025-02-27 at 11 25 06 PM Screenshot 2025-02-27 at 11 26 05 PM Screenshot 2025-02-27 at 11 26 16 PM Screenshot 2025-02-27 at 11 26 21 PM Screenshot 2025-02-27 at 11 26 30 PM

@cb-heimdall

cb-heimdall commented Feb 28, 2025 •

Copy link
Copy Markdown

✅ Heimdall Review Status

Requirement Status More Info
Reviews ✅ 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@github-actions github-actions Bot added documentation Improvements or additions to documentation typescript needs triage labels Feb 28, 2025
@CarsonRoscoe
CarsonRoscoe marked this pull request as ready for review February 28, 2025 06:35
Comment thread typescript/create-onchain-agent/templates/next/app/api/agent/evm/viem/route.ts Outdated
@CarsonRoscoe
CarsonRoscoe force-pushed the feat/ts-cli-improve-network-selection branch from 689428d to 5935b33 Compare February 28, 2025 16:27
@CarsonRoscoe
CarsonRoscoe requested a review from 0xRAG February 28, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation typescript

Development

Successfully merging this pull request may close these issues.

3 participants