0xSplits / splits-sdk

An SDK for building apps on top of 0xSplits
https://docs.splits.org/sdk
MIT License
31 stars 11 forks source link

Refactor chain id and public client #53

Open mihoward21 opened 1 month ago

mihoward21 commented 1 month ago

This is intended to be a non-breaking change.

  1. Make chainId optional in the constructor. Any function that needs a chainId now takes it in as an optional argument. When submitting a transaction, we'll use the chainId of the walletClient if it's needed.
  2. Make publicClients a new optional field on the constructor. It's a mapping of chainId --> public client. If that is supplied for a chain we are using, we'll use that public client. Otherwise fall back to the old (now deprecated) publicClient field.
vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
splits-kit ✅ Ready (Inspect) Visit Preview Jul 15, 2024 10:54pm
mihoward21 commented 1 month ago

This got way bigger than I originally intended. Sorry about that. It's actually not that many different kinds of changes, just the same things repeated in a lot of different files.