Skip to content

v4.8.0

Compare
Choose a tag to compare
@0xFirekeeper 0xFirekeeper released this 23 Mar 00:05
e12c16d

What's Changed

Unity SDK 4.8.0 is here!

It brings you various reliability, performance and API improvements, let's go through them.

Gas Fees
In most situations, you do not typically want to set a gas price or max fee/priority fee. The SDK used to use a simple way to suggest those before broadcasting your transaction. It now uses a custom flow when no gasPrice is provided to set your 1559 gas fees in a way that will both be more reliable as well as speed up transactions without increasing the cost too much. A follow-up to this update for L2s will be arriving in upcoming releases, whereby we may increase your gas fee internally and actually end up costing you less in total paid $ in L1 fees.
This should also fix issues on chains like Fantom and others.

The Great Refactor
Everyone hates when a dev changes the API randomly, but it's time the SDK grows up and detaches itself from JS SDK naming conventions.
Major properties and variables are now PascalCase and the scoping of some has changed.
For instance, ThirdwebManager.Instance.SDK.wallet is now ThirdwebManager.Instance.SDK.Wallet
All ThirdwebSDK and Contract subclasses are now following this convention.
Portal documentation will be updated shortly to reflect this change. Do note that functionality wise, it is still the same.
The Deployer class has been removed, please deploy from the thirdweb Dashboard or your own custom contract deployment process.

Return Types
We now return BigInteger instead of strings from tasks where it makes sense, so you don't have to do any parsing. Hooray!
Strings may still be returned in internal types for cross-platform purposes.

Signature Minting
Signature minting Generate function can now take in a private key override optional second parameter, and assuming it has a MINTER role, it can generate valid signatures that can be used to mint from the connected wallet - USE THIS ONLY FOR TESTING PURPOSES!
This flow previously partially existed but has now also been adapted to work in WebGL, it is still an unrecommended API.
The correct flow is to validate a request and generate a signature server side, however this is a useful feature for quick tests.

Miscellaneous
The ThirdwebManager now preserves the state of hidden/shown optional fields in subcategories when unfocused.
Fixed an issue with Storage in WebGL failing to download text in some cases, it now uses the sync version of System.IO.
Updated the chains package.
Updated the WebGL bridge.
Added unit tests.

This is an API-breaking update, please update carefully!