thirdweb@5.28.0
Minor Changes
-
#3198
ca31a6c
Thanks @gregfromstl! - Exports toSerializableTransaction to convert preparedTransaction into a fully serializable transaction.
Exports estimateGasCost to estimate the gas cost of a transaction in ether and wei.
Exports getGasPrice to get the currect gas price for a chain.toSerializableTransaction
import { prepareTransaction, toSerializableTransaction } from "thirdweb"; const transaction = await prepareTransaction({ transaction: { to: "0x...", value: 100, }, }); const serializableTransaction = await toSerializableTransaction({ transaction, }); account.sendTransaction(serializableTransaction);
estimateGasCost
import { estimateGasCost } from "thirdweb"; const gasCost = await estimateGasCost({ transaction });
getGasPrice
import { getGasPrice } from "thirdweb"; const gasPrice = await getGasPrice({ client, chain });
Patch Changes
-
#3207
e7443ed
Thanks @MananTank! - Fixes #3204 - Account methods not properly updated when account is changed in wallet -
#3226
58d14c9
Thanks @joaquim-verges! - Add option to choose the contract type for erc1155/generateMintSignature -
#3227
043f0da
Thanks @joaquim-verges! - Better gas estimation for opBNB mainnet & testnet -
#3201
0328bc8
Thanks @joaquim-verges! - Fallback to default metadata on failure to fetch erc20 metadata