thirdweb@5.22.0
Minor Changes
-
#3001
726618b
Thanks @gregfromstl! - Adds basic EIP-5792 support for wallets with functionsgetCapabilities
,sendCalls
,showCallsStatus
,getCallsStatus
.Example Usage
getCapabilities
Returns the capabilities of the wallet according to EIP-5792.
import { getCapabilities } from "thirdweb/wallets/eip5792"; const capabilities = await getCapabilities({ wallet });
sendCalls
Sends the given calls to the wallet for execution, and attempts to fallback to normal execution if the wallet does not support EIP-5792.
import { sendCalls } from "thirdweb/wallets/eip5792"; const transfer1 = transfer({ contract: USDC_CONTRACT, amount: 5000, to: "0x33d9B8BEfE81027E2C859EDc84F5636cbb202Ed6", }); const transfer2 = transfer({ contract: USDT_CONTRACT, amount: 1000, to: "0x33d9B8BEfE81027E2C859EDc84F5636cbb202Ed6", }); const bundleId = await sendCalls({ wallet, client, calls: [transfer1, transfer2], });
showCallsStatus
Requests the wallet to show the status of a given bundle ID.
import { showCallsStatus } from "thirdweb/wallets/eip5792"; await showCallsStatus({ wallet, bundleId });
getCallsStatus
Returns the status of the given bundle ID and the transaction receipts if completed.
import { getCallsStatus } from "thirdweb/wallets/eip5792"; const status = await getCallsStatus({ wallet, bundleId });
Patch Changes
-
#3048
cfe60d2
Thanks @kien-ngo! - Improve error message forresolveAbiFromBytecode
-
#3040
ce45475
Thanks @gregfromstl! - Fixes caching issue when usingdefineChain
-
#3037
f006429
Thanks @joaquim-verges! - Updates for react native compatibility