Releases: thirdweb-dev/unity
v4.13.0
What's Changed
- [Cross-Platform] Smart Wallet Option
Factory Address
is now optional in yourThirdwebManager
.- You may now use Smart Wallets without any setup.
ThirdwebManager
Smart Wallet OptionGasless
now defaults totrue
.- We still recommend deploying your own factory in production, however this makes it easy to prototype cross-chain!
- [Cross-Platform] New Feature - Buy with Fiat
- OnRamp to crypto tokens using a credit card!
- US Support (International support coming soon).
- Multistep Buy with Fiat -> Buy with Crypto support for less liquid tokens, using intent identifiers.
- Testmode example available in
Scene_Pay
.
- [WebGL] Updated bridge.
This is a minor update, meaning some structural or api breaking changes occured. When upgrading, it is best to remove previous SDK files for a smooth importing process, backing up any prefab copies or scripts extending or overriding thirdweb prefabs and scripts.
v4.12.4
What's Changed
- [Cross-Platform] Added support for Treasure Ruby testnet.
v4.12.3
What's Changed
- [Native] Non-Blocking Encryption/Decryption: The process of encrypting/decrypting data when connecting to a
LocalWallet
has been optimized to avoid blocking the main thread.- Resolved Issue: This change fixes an issue where users experienced a freeze of approximately 0.5 to 1.5 seconds upon connecting to a
LocalWallet
. - Performance Trade-off: As a side effect of this update, the connection time to a
LocalWallet
may be about 1 second slower, depending on the device's performance capabilities.
- Resolved Issue: This change fixes an issue where users experienced a freeze of approximately 0.5 to 1.5 seconds upon connecting to a
v4.12.2
What's Changed
- [Cross-Platform] Updated chains package, added new chains.
- [WebGL] Updated bridge.
v4.12.1
What's Changed
- [Cross-Platform] Added
Wallet.AuthenticateAndLoginServerSide
that helps you use thirdweb Auth more easily, cross-platform.- Previously,
Wallet.Authenticate
mostly acted as a signed payload generator rather than a full authentication flow, and stored a local SIWE style session. You had to do the extra work of serializing, encoding and logging in to your backend as an extra step. - You may use this helper method instead if you have thirdweb Auth setup on your backend, passing in your domain and chain id, to replicate a full login flow without having to deal with payloads, encoding or signing/verifying.
- Defaults to calling
/auth/payload
and/auth/login
, overrideable. - Works with Smart Wallets.
- Uses
UnityWebRequest
, meaning it's WebGL compatible, however make sure CORS is setup correctly to test in WebGL as usual.
- Previously,
v4.12.0
What's Changed
Providing new ways for devs to sponsor transactions, powered by Engine!
- [Cross-Platform] Added support for the thirdweb Engine Relayer
- This relayer is a service provided by thirdweb for an alternative way to sponsor transactions on behalf of users through Engine.
- When using
Transaction.Send
orTransaction.SendAndWaitForTransactionResult
you may specify whether to use this gasless feature or not, other higher level APIs will default to the gasless flow if you have the relayer set up. - Replaces OpenZeppelin Defender Options.
- We still recommend using Account Abstraction for gasless sponsorship features through Smart Wallets, however in some cases a relayer is needed!
- [Native] Improved
Contract.Write
flow.- Better gas limit/price/fees estimations when not provided, similar to other APIs.
- Now uses the gasless relayer by default if it is set up in your
ThirdwebManager
, similar to other higher level APIs.
Visit our documentation portal to learn more at https://portal.thirdweb.com/unity
v4.11.0
What's Changed
- [Cross-Platform] Using Custom Contracts no longer requires passing an ABI on any platform.
- Using
Contract.Prepare
,Contract.Read
orContract.Write
will populate the ABI at runtime if it was not provided. - This is a great way to get started quickly, but it is not recommended for production environments for speed reasons.
- We've also added
Contract.FetchAbi
to fetch the ABI manually.
- Using
- [WebGL] Fixed regression introduced in 4.10 where using Smart Wallets with Embedded Wallets as a signer in WebGL would have caused
invalid auth provider: undefined
to be thrown. We now handle that case correctly. - [Cross-Platform] Renamed
EmbeddedWallet
toInAppWallet
, as well as most other related scripts, prefabs and files.- There are no functionality changes between the old
EmbeddedWallet
and the newInAppWallet
. - You may need to slightly adapt any previous prefabs you had and make sure the renamed classes are referenced properly.
- This is in an effort to move to a powerful In-App Wallet that potentially will encompass other wallet type functionalities within itself.
- There are no functionality changes between the old
This is a minor update, meaning some structural or api breaking changes occured. When upgrading, it is best to remove previous SDK files for a smooth importing process, backing up any prefab copies or scripts extending or overriding thirdweb prefabs and scripts.
v4.10.1
What's Changed
- [WebGL] Upgraded bridge, includes optimizations and improved smart wallet transaction simulation (less silent reverts).
- [Native] Added low level
Contract.ReadRaw
for parsing complex tuples into a Nethereum code generated style output type, useful when basic dynamic invocation/deserialization is not good enough for your use case. - [Native]
Wallet.GetAllActiveSigners()
now also returns admins, you may iterate through the output and checkisAdmin
to differentiate admins from basic session keys.
v4.10.0
What's Changed
Sign-in with your Phone Number! (Native Platforms)
Similar to the Email OTP flow, the Phone OTP auth method will send you an OTP as an SMS, resulting in an Embedded Wallet.
// Reference to your Thirdweb SDK
var sdk = ThirdwebManager.Instance.SDK;
// Configure the connection
var connection = new WalletConnection(
provider: WalletProvider.EmbeddedWallet,
chainId: 1,
phoneNumber: "+123456789",
authOptions: new AuthOptions(
authProvider: AuthProvider.PhoneOTP,
)
);
// Connect the wallet
string address = await sdk.Wallet.Connect(connection);
You may test it out in Scene_Prefabs
, the input field has been updated to check for both emails and phone numbers and adapt.
When creating your own UI, we suggest adapting the input field type according to the auth method used, specially for mobile.
This feature is only available on native platforms, WebGL coming soon!
Transaction Flow
This update brings the unification of all transaction flows and centralizes them around the Transaction
class. This means that edge cases, issues with gas on some chains with some APIs, and raw transaction APIs now all should feel smoother and more consistent.
What to expect:
- We will always estimate gas on your behalf if a gas limit is not passed.
- When on a chain that supports EIP-1559, we will always use optimized max and priority fee fetching mechanics and submit the tx as 1559, if a gas price is not explicitly passed (thus overriding our default checks for 1559 support).
- When on a chain that does not support EIP-1559, we will always use optimized gasPrice fetching mechanics and submit the tx as a legacy tx, if a max/priority fee is not explicitly passed (the transaction may still not be legacy with some external wallet providers that may override this).
- Account Abstraction has its own gas pricing flow and will always price User Operations accordingly.
- If relayer options are provided, the transactions will always default to the relayer unless a low level API is used where that can be overridden, such as
Transaction.Send
. Note that we recommend using Account Abstraction instead of relayers in general.
Miscellaneous
- [Cross-Platform] Added a utility to copy text to a buffer for cross-platform usage,
Utils.CopyToClipboard
(used inPrefab_ConnectWallet
) - [Native] Added a utility to fetch legacy gas price
Utils.GetLegacyGasPriceAsync
. - [WebGL] Fixed an Account Abstraction edge case where simulation would not account for delegate call overheads in the gas limit.
v4.9.1
What's Changed
- [Cross-Platform] Improved cross-chain gas price accuracy when using thirdweb default bundler with Account Abstraction.
- [Native]
Transaction.WaitForTransactionResult
now supports AA transactions and properly decodes silent reverts, throwing accordingly. - [Native] Updated chains.
- [WebGL] Updated bridge.
This patch is greatly recommended for Account Abstraction users.