Migration from SDK v4
Progressive migration
If you're currently using the @thirdweb-dev/sdk
, you can progressively migrate to the new thirdweb
unified SDK. Both SDKs can be used side by side and are interoperable with each other.
High level changes
- All imports from
@thirdweb-dev/*
should be replaced withthirdweb
unified SDK with sub-exports. - The unified SDK is
function
based rather thanclass
based for better tree shaking and performance. - All contract call are now prepared using
prepareContractCall
and sent using thesendTransaction
function. - Transactions are submitted without waiting for receipt by default. You can call the
waitForReceipt
function to wait for the transaction to be mined.