Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

[Breaking change] Multichain SDK #477

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Jun 17, 2022

Separated provider and signer logic, which gives the following setup API:

const sdk = new ThirdwebSDK("polygon");
sdk.wallet.connect(signer);

and we still have of course:

const sdk = ThirdwebSDK.fromPrivateKey(pkey, "polygon");
const sdk = ThirdwebSDK.fromSigner(signer, "polygon");

That separation is what enables the much nicer multichain support and mismatch detection. So now if you're not connected to the right chain, it'll give a really clean error message instead of the current random ones we throw

@jnsdls
Copy link
Member

jnsdls commented Jun 17, 2022

🎉

… async (#492)

* Multichain SDK - override chain for any contract

* multi chain registry and factory

* pass optional chain to sdk.getX() and fix signer RPC switch when using private keys

* fix all the tests

* fix vote test
@joaquim-verges joaquim-verges changed the title [Breaking change] Change ThirdwebSDK instantiation logic and signer update flow [Breaking change] Multichain SDK Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants