Skills 2026-10-05 09:26 UTC
starknet-agentic
Committed by adrienlacombe. Update Category: Bug Fixes & Stability Improvements. Commit details: fix(skills): route anonymous-wallet AVNU calls by the RPC's network (#640). This update resolves known runtime errors and enhances system reliability.
CommitRaw commit message
fix(skills): route anonymous-wallet AVNU calls by the RPC's network (#640)
* fix(skills): route anonymous-wallet AVNU calls by the RPC's network
The starknet-anonymous-wallet scripts always called the mainnet AVNU API,
so on a Sepolia RPC avnu-swap.js stopped with "Quote chainId ... does not
match account chainId ..." and the token helpers resolved symbols to
mainnet addresses.
- New scripts/_network.js derives the network from provider.getChainId().
Its SN_MAIN / SN_SEPOLIA table is the allowlist of AVNU API and paymaster
hosts; any other chain ID throws before AVNU is called.
- _tokens.js fetchVerifiedTokens(network) passes the matching { baseUrl }
to fetchTokens and caches per chain ID. It throws for a missing or
unlisted network instead of falling back to the SDK's mainnet default.
- avnu-swap.js passes { baseUrl } to getQuotes and quoteToCalls and
defaults the paymaster to the network's AVNU paymaster. PAYMASTER_URL
still overrides it and must stay https and in ALLOWED_PAYMASTER_HOSTS;
it now also fails if it points at the other network's paymaster.
The #638 flow (quoteToCalls -> estimatePaymasterTransactionFee ->
executePaymasterTransaction with a max fee, zero-fee guard, maxGasFee)
is unchanged. The explorer link follows the network.
- parse-smart.js, resolve-smart.js and vesu-pool.js resolve token symbols
on the RPC's network.
- SKILL.md: replace the mainnet-only bullet.
AVNU's Sepolia API currently lists no tokens and returns no quotes, so a
Sepolia swap now stops with "AVNU returned no verified tokens for
SN_SEPOLIA" until AVNU serves Sepolia data.
Needs human review: changes network selection and fee-payment
(paymaster) routing for swaps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(skills): refuse Vesu pools configured for another network
vesu-pool.js now resolves token symbols on the RPC's network, so a Sepolia
RPC would mix Sepolia token addresses with the mainnet pool address from
protocols.json. The script now reads the pool's network
(VESU.pools[name].network, else VESU.network) and refuses the pool with
CONFIGURE_VESU_POOL unless that network is the RPC's, before any token
lookup or pool call. _network.js gains `registryName` ("mainnet" /
"sepolia") to map chain IDs to protocols.json network names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>