Skip to content

feat: upgrade @railgun-community/wallet to 10.9.0, handle new EIP-7702 transaction type - #97

Closed
munikes wants to merge 17 commits into
Railgun-Community:mainfrom
munikes:feat/sdk-10.9.0-eip7702
Closed

feat: upgrade @railgun-community/wallet to 10.9.0, handle new EIP-7702 transaction type#97
munikes wants to merge 17 commits into
Railgun-Community:mainfrom
munikes:feat/sdk-10.9.0-eip7702

Conversation

@munikes

@munikes munikes commented Aug 26, 2026

Copy link
Copy Markdown

Upgrades @railgun-community/wallet from 10.8.1 to 10.9.0 and @railgun-community/shared-models from 8.0.0 to 8.0.1.

The newer SDK adds EIP-7702 support, which introduces two breaking type changes: BroadcasterRawParamsTransact became a discriminated union (COMMON | TX7702) keyed on transactType, and EVMGasType gained Type4. Together these produce 7 compile errors across 4 files.

This PR does not implement EIP-7702 relaying — it makes the broadcaster reject those requests explicitly rather than assuming the old COMMON-only shape:

  • transact-method.ts: type guard rejecting non-COMMON requests before destructuring, following the file's existing rejection pattern (dbg + incrementReliability(BAD_DATA) + return).
  • gas-estimate.ts / process-transaction.ts: explicit throw for Type4, alongside the existing Type2 guards. TransactionGasDetailsType4 uses maxFeePerGas/maxPriorityFeePerGas rather than gasPrice, so it could never satisfy those code paths anyway.
  • gas-by-speed-block-native.ts / gas-by-speed.ts: added the missing EVMGasType.Type4 switch case (this was the actual cause of the 'not all code paths return a value' errors).

Verified with the full build pipeline (tsc + tsc-alias) and running in production on Ethereum mainnet: a real relayed transaction completed end-to-end after the upgrade, with reliability incrementing normally.

munikes added 17 commits August 6, 2026 02:30
The BNB address (0xA649325...CE23F) was mislabeled as 'WETH' in
BLUECHIP_POLY, and is bridged via the Multichain bridge which has
been defunct since its 2023 exploit. It has $0 price/liquidity on
PolygonScan and never resolves a price via CoinGecko.

No live, liquid BNB representation currently exists on Polygon PoS
worth including as a fee token, so this removes the entry entirely
rather than relabeling it.
TokenAddressBSC.WBNB (0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c) was
labeled with symbol 'WETH' in BLUECHIP_BSC. The token itself is a
legitimate, liquid asset and prices resolve fine regardless (price
lookups are by address, not symbol), but the label is misleading in
logs and any UI that surfaces the symbol.
coingeckoPriceLookup was making one HTTP request per token address in
a loop with a 250ms delay, despite CoinGecko's simple/token_price
endpoint natively supporting comma-separated contract_addresses in a
single call. For a broadcaster running 3 networks with ~6-8 tokens
each, this meant ~20 requests per refresh cycle (every ~60s) instead
of 3 — burning through the free Demo tier's 10,000 requests/month
quota in about 10 hours of uptime.

Also lowered batchSize from 50 to 30 to match CoinGecko's documented
Demo tier limit of 30 addresses per request (50 would only be safe on
paid tiers).
FEI: Fei Protocol officially dissolved in August 2022 (Tribe DAO
voted to redeem FEI->DAI and wind down operations). Observed in
production: CoinGecko price for this token gets stuck/fails to
refresh for 25+ minutes at a stretch while every other configured
token refreshes normally each cycle.

RENBTC: the backing bridge (RenVM) shut down in late 2022 following
the Alameda/FTX collapse, with no active development since.
On-chain volume is negligible (~$3/24h as observed), making it
unsuitable as a fee token even though it still resolves a price.

Neither token is a good candidate for fee collection: FEI is a
defunct stablecoin and RENBTC is functionally illiquid.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​railgun-community/​shared-models@​8.0.0 ⏵ 8.0.180 +410077 +387100
Updated@​railgun-community/​wallet@​10.8.1 ⏵ 10.9.078 +110084 +193100

View full report

@munikes

munikes commented Aug 26, 2026

Copy link
Copy Markdown
Author

Closing — this branch accidentally included commits from my other open PRs (#89-#96) in its history. Reopening from a clean branch based on upstream/main.

@munikes munikes closed this Aug 26, 2026
@munikes
munikes deleted the feat/sdk-10.9.0-eip7702 branch August 26, 2026 15:17
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.

1 participant