### TL;DR
This PR introduces support for ERC20 tokens in the transaction flow, allowing users to seamlessly interact with contracts that require ERC20 token payments.
### What changed?
1. Added ERC20 token handling in the `useSendTransaction` hook to check balance and prompt users to buy ERC20 if needed.
2. Integrated ERC20 token fields, such as `erc20Value`, into the transaction preparation and cost estimation processes.
3. Updated various contract-writing scripts to include `erc20Value` overrides where necessary.
4. Enhanced the UI in `TxModal` and `BuyScreen` to display and process ERC20 token transactions.
5. Added tests for ERC20 token transactions in the `drop721.test.ts` file.
6. Extended documentation and examples to include ERC20 token use cases in transaction flows.
### How to test?
1. Run the unit tests in the `drop721.test.ts` file to ensure ERC20 transactions are correctly processed.
2. Use the `useSendTransaction` hook in a sample component and attempt transactions with both native and ERC20 tokens.
3. Verify that the ERC20 token purchase prompt appears when balance is insufficient.
### Why make this change?
Adding ERC20 support enhances the flexibility and functionality of the transaction flow, making it easier for users to interact with a wider range of smart contracts that require different types of token payments.
---
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on handling ERC20 transaction values in Pay components.
### Detailed summary
- Added `tokenDecimals` in `types.ts`
- Modified `title` in `PayEmbed.tsx` and `transferBatch.ts`
- Added `overrides` in `transfer.ts`, `transferFrom.ts`, `approve.ts`
- Added `erc20Value` in various transaction files
- Updated `prepare-transaction.ts` with `erc20Value`
- Added `erc20Value` in generated files for different ERC20 transactions
> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/common/__generated__/IMulticall/write/multicall.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/write/mintTo.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IBurnableERC721/write/burn.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IStaking721/write/withdraw.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IBundler/write/register.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/claimERC1155.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/addStake.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IDelayedReveal/write/reveal.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/transferFrom.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IKeyGateway/write/addFor.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/buy.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setMerkleRoot.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burn.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/withdraw.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burnFrom.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/depositTo.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleOps.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IClaimableERC721/write/claim.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IMintableERC721/write/mintTo.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/register.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recover.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/remove.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/makeOffer.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawTo.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transfer.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/offer.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/grantRoles.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC20/write/initialize.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInput.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IClaimableERC1155/write/claim.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/write/mintTo.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccount/write/validateUserOp.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IDrop/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/INFTMetadata/write/setTokenURI.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/rent.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/acceptOffer.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IOffers/write/cancelOffer.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/revokeRoles.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC721/write/initialize.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC20/write/initialize.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInput.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutput.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/write/setTokenURI.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20/write/airdropERC20.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/safeTransferFrom.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdGateway/write/registerFor.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/recoverFor.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IKeyRegistry/write/removeFor.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/DropERC1155/write/initialize.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/Marketplace/write/initialize.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC721/write/initialize.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/deleteRule.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutput.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeTransferFrom.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IStaking1155/write/claimRewards.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/withdrawStake.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/setApprovalForAll.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferFor.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/renounceRoles.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/TokenERC1155/write/initialize.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropNativeToken.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/getRoyalty.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burnBatch.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/setApprovalForAll.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IAirdropERC20Claimable/write/claim.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/incrementNonce.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/grantRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/add.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/setOwner.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/setMaxTotalSupply.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721/write/airdropERC721.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryAggregate.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/revokeRole.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/getSenderAddress.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateHandleOp.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/freezeBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/updateBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IAirdropERC721Claimable/write/claim.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/depositRewardTokens.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IStorageRegistry/write/batchRent.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/acceptOffer.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/installExtension.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactInputSingle.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/createPool.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setDefaultRoyaltyInfo.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setMaxTotalSupply.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/depositRewardTokens.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/createAccount.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerAdded.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/INFTStake/write/withdrawRewardTokens.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/closeAuction.ts`, `packages/thirdweb/src/extensions/modular/__generated__/IModularCore/write/installExtension.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/transferOwnership.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissions/write/renounceRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/ITWMultichainRegistry/write/remove.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactInputSingle.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/ISwapRouter/write/exactOutputSingle.ts`, `packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/write/setPlatformFeeInfo.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setRoyaltyInfoForToken.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/freezeBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/updateBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155/write/airdropERC1155.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IAirdropERC1155Claimable/write/claim.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeBatchTransferFrom.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/ITokenStake/write/withdrawRewardTokens.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateValidation.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/createListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/updateListing.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/uninstallExtension.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/aggregate3Value.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/OpenEditionERC721/write/initialize.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IQuoter/write/quoteExactOutputSingle.ts`, `packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/write/setContractURI.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/onSignerRemoved.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/handleAggregatedOps.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/IERC721Receiver/write/onERC721Received.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setContractURI.ts`, `packages/thirdweb/src/extensions/modular/__generated__/IModularCore/write/uninstallExtension.ts`, `packages/thirdweb/src/extensions/common/__generated__/IRoyaltyPayments/write/setRoyaltyEngine.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadata/write/setSharedMetadata.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/blockAndAggregate.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20WithSignature.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/depositRewardTokens.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/cancelListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/createListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/updateListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/bidInAuction.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleThreshold.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IThirdwebContract/write/setContractURI.ts`, `packages/thirdweb/src/extensions/uniswap/__generated__/IUniswapV3Factory/write/enableFeeAmount.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721WithSignature.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155Received.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IEditionStake/write/withdrawRewardTokens.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IPaymaster/write/validatePaymasterUserOp.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/buyFromListing.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/cancelAuction.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/createAuction.ts`, `packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155WithSignature.ts`, `packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/write/setPrimarySaleRecipient.ts`, `packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/write/mintWithSignature.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddress.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/setPlatformFeeInfo.ts`, `packages/thirdweb/src/extensions/multicall3/__generated__/IMulticall3/write/tryBlockAndAggregate.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/publishContract.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/DropERC1155/write/setSaleRecipientForToken.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IMarketplace/write/cancelDirectListing.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/grantRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/setRulesEngineOverride.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/setSharedMetadata.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISignatureMintERC721/write/mintWithSignature.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ModularCore/write/completeOwnershipHandover.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/revokeRole.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/unpublishContract.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/changeRecoveryAddressFor.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IRulesEngine/write/createRuleMultiplicative.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Receiver/write/onERC1155BatchReceived.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/write/mintWithSignature.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecovery.ts`, `packages/thirdweb/src/extensions/permissions/__generated__/IPermissionsEnumerable/write/renounceRole.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/ISharedMetadataBatch/write/deleteSharedMetadata.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionPayout.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IEnglishAuctions/write/collectAuctionTokens.ts`, `packages/thirdweb/src/extensions/farcaster/__generated__/IIdRegistry/write/transferAndChangeRecoveryFor.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveBuyerForListing.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractPublisher/write/setPublisherProfileUri.ts`, `packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/write/setPermissionsForSigner.ts`, `packages/thirdweb/src/extensions/common/__generated__/IClaimConditionsSinglePhase/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/marketplace/__generated__/IDirectListings/write/approveCurrencyForListing.ts`, `packages/thirdweb/src/extensions/thirdweb/__generated__/IContractFactory/write/deployProxyByImplementation.ts`, `packages/thirdweb/src/extensions/erc20/write/sigMint.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.tsx`, `packages/thirdweb/src/extensions/erc20/write/deposit.ts`, `packages/thirdweb/src/utils/extensions/drops/get-claim-params.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx`, `packages/thirdweb/src/extensions/erc20/write/getApprovalForTransaction.ts`, `apps/playground-web/src/components/pay/transaction-button.tsx`, `packages/thirdweb/src/extensions/erc721/drop721.test.ts`, `packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts`, `packages/thirdweb/src/react/web/hooks/transaction/useSendTransaction.tsx`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
Fixes#3683
<!-- start pr-codex -->
---
## PR-Codex overview
The focus of this PR is to add an optional 'from' parameter in the `readContract()` function and update default max block wait times to 100 in various files.
### Detailed summary
- Added optional 'from' parameter in `readContract()`
- Updated default max block wait times to 10 in specific files
- Increased default max block wait times to 100 in other files
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
This pull request introduces new features and modifications to the transaction history feature within the connect modal UI. Key changes include:
- Addition of a transaction history page accessible from the connect modal's main menu, allowing users to view and manage their transaction history more effectively.
- Refactoring of transaction-related components to enhance code maintainability and readability. Specifically, renaming components related to 'BuyTxHistory' to 'PayTxHistory' to better reflect their functionality.
- Updates to locale files to include new translations for added labels such as 'payTransactions' and 'walletTransactions'.
- Integration of new navigation options within the connect modal, enabling seamless switching between different transaction views, including 'Fiat Transactions' and 'Wallet Transactions'.
- Ensuring that the transaction history page supports multiple languages, with updated English, Spanish, Japanese, and Vietnamese locale files.
- Improvements to UI components to ensure consistent styling and user experience across the transaction history pages.
These enhancements aim to provide users with an improved interface for managing their transaction histories, thereby enhancing overall user experience.
---
<!-- start pr-codex -->
---
## PR-Codex overview
This PR adds a transaction history page to the connect modal UI.
### Detailed summary
- Added transaction history page to connect modal UI
- Renamed "pending-tx" to "transactions"
- Updated text and components related to transactions and fiat transactions
- Reorganized file structure for transaction-related screens and components
> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.tsx`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
### TL;DR
Adds support for using an ERC20 paymaster in smart accounts. This includes functionality to check and approve ERC20 allowances as needed.
### What changed?
- Introduced support for ERC20 paymasters in smart accounts.
- Added logic to check and approve ERC20 allowances.
- Updated the `defaultTokens` list to include a new token for testing purposes.
### How to test?
1. Ensure that the smart account can interact with ERC20 paymasters.
2. Verify that the account approval for ERC20 paymasters works as expected.
3. Check that the default tokens list reflects the new token and can be utilized appropriately.
### Why make this change?
To enable smart accounts to use ERC20 tokens for paymaster functionalities, enhancing versatility and use-case scenarios for smart accounts.
---
<!-- start pr-codex -->
---
## PR-Codex overview
The focus of this PR is to add support for ERC20 paymaster for smart accounts.
### Detailed summary
- Added ERC20 paymaster support for smart accounts
- Implemented functions for approving ERC20 transactions
- Modified smart account creation to handle ERC20 paymasters
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR adds the recipient address feature to PayEmbed and refactors recipient address handling in various components.
### Detailed summary
- Added recipient address to PayEmbed for sending purchased tokens
- Refactored handling of recipient address in different screens and hooks
- Updated logic for onramp and swap processes based on recipient address
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
### TL;DR
- Added domain data for typed data signatures.
- Updated hooks and utilities to use `account` instead of `signer`.
### What changed?
- Modified `useRegistry.ts`, `hooks.ts`, and `utils.ts` to replace `signer` with `account` for signing transactions.
- Updated `in-app-account.ts` to correctly handle domain data for typed data signatures.
### How to test?
1. Deploy a contract using the dashboard and ensure that `account` is used correctly instead of `signer`.
2. Validate that typed data signatures are correctly generated in the in-app wallet.
### Why make this change?
To improve the accuracy and reliability of in-app wallet typed data signatures by ensuring the correct handling of domain data and consistent use of `account` across the application.
---
<!-- start pr-codex -->
---
## PR-Codex overview
The focus of this PR is to fix in-app wallet typed data signatures and optimize contract-related functions.
### Detailed summary
- Fixed in-app wallet typed data signatures
- Updated contract-related functions for better optimization and clarity
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
This update introduces new methods for fetching proofs for ERCXX tokens (specifically ERC20, ERC721, and ERC1155). The methods `fetchProofsERC20`, `fetchProofsERC721`, and `fetchProofsERC1155` have been added to the airdrop extension. These methods allow users to retrieve claim Merkle proofs for the specified address and tokens, ensuring that users in the allowlist can claim their airdrop. Additionally, example usage and detailed docstrings have been included to guide developers on how to implement these methods in their projects.
---
<!-- start pr-codex -->
---
## PR-Codex overview
The focus of this PR is to add `fetchProofsERCXX` methods for ERC721, ERC20, and ERC1155 airdrop contracts.
### Detailed summary
- Added `fetchProofsERC721`, `fetchProofsERC20`, and `fetchProofsERC1155` methods
- Updated `claimERC20` to use `fetchProofsERC20`
- Added detailed documentation for each method
- Renamed `fetchProofsrERC20` to `fetchProofsERC20`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR adds Vietnamese locale support for the ConnectButton components and updates various language files for the ConnectWallet feature.
### Detailed summary
- Added Vietnamese locale for ConnectButton components
- Updated language files for ConnectWallet screens and wallets with Vietnamese translations
> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/wallets/local/locale/vi.ts`, `packages/thirdweb/src/react/web/wallets/shared/locale/vi.ts`, `packages/thirdweb/src/react/web/ui/ConnectWallet/locale/vi.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
## Problem solved
Adds 2 new optional fields to usage event schema:
* evmRequestParams
* providerIp
Allows a new possible source for the event - `rpcV2`
## Changes made
- [x] service-utils: Update usage tracker schema
## How to test
## Contributor NFT
Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.
```Address: ```
<!-- start pr-codex -->
---
## PR-Codex overview
This PR updates the schema for the usage tracker event in the `service-utils` package to include new fields `evmRequestParams` and `providerIp`.
### Detailed summary
- Added `evmRequestParams` field to the usage event schema
- Added `providerIp` field to the usage event schema
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
The focus of this PR is to add a `type` prop for the `TransactionButton` component in the `thirdweb` package.
### Detailed summary
- Added `type` prop for `TransactionButton`
- Updated `TransactionButton` component to include `type` attribute for button element
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
Initially this is for interacting with other frameworks like frog.fm
Might be useful elsewhere idk
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on exporting a new utils method `getClaimParams` for thirdweb Drop contracts.
### Detailed summary
- Added export for `getClaimParams` method in `utils/extensions/drops/get-claim-params.js`
- Exported type `GetClaimParamsOptions` for thirdweb Drop contracts
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
The focus of this PR is to add support for Zora1155 in ERC1155 > getOwned.
### Detailed summary
- Added support for Zora1155 contract in ERC1155 > getOwned function
- Updated functions to handle Zora1155 contract methods
- Introduced new functions for Zora1155 contract interaction
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR focuses on fixing extension contract detection and enhancing ownership function detection for ERC721 contracts.
### Detailed summary
- Fixed extension contract detection in `detectExtension.ts`
- Added ownership function detection in `getOwnedNFTs.test.ts`
- Updated imports for test clients and contract utils
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
2024-07-11 19:32:30 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
<!-- start pr-codex -->
## PR-Codex overview
This PR focuses on updating the `MediaRenderer` component to only render the video poster if it's an image.
### Detailed summary
- Updated `MediaRenderer` to conditionally render video poster based on MIME type
- Improved handling of poster rendering for better compatibility
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
The focus of this PR is to fix the search functionality in the Network Selector screen by optimizing chain queries and improving user experience.
### Detailed summary
- Added `useChainsQuery` and `useChainQuery` functions for chain data retrieval
- Improved search functionality by optimizing chain queries and handling loading states
- Updated dependencies and imports for better code organization
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
### TL;DR
Added a new chain definition for the 'Blast' chain.
### What changed?
- Added a new file `blast.ts` in `chain-definitions`
- Defined the Blast chain with ID 81457, name 'Blast', and native currency 'Ether'.
- Added Blastscan as the block explorer with corresponding URL and API URL.
- Updated `chains.ts` to export the `blast` chain.
### How to test?
1. Verify that the `blast.ts` file exists in the `chain-definitions` directory.
2. Check that the chain ID, name, and native currency are correctly defined.
3. Ensure the block explorer details are accurate.
4. Confirm that `chains.ts` exports the `blast` chain.
### Why make this change?
This change adds support for the Blast chain, which may be required for upcoming features or integrations. Including it ensures that the system can recognize and interact with the Blast blockchain.
---
<!-- start pr-codex -->
---
## PR-Codex overview
This PR adds the `blast` chain preset to `thirdweb` package.
### Detailed summary
- Added `blast` chain definition in `blast.ts`
- Exported `blast` in `chains.ts` for use in `thirdweb` package
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR enhances ERC20 functionality and token details display.
### Detailed summary
- Added `transferBatch()` extension to `erc20.ts`
- Updated `TokenDetails` component to include `chainId`
- Improved ERC20 contract handling in `useTxNotifications`
- Updated `TokenBurnButton` and `TokenAirdropButton` components to use V5 contract handling
> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/tokens/components/airdrop-button.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/transfer-button.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/supply.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/airdrop-form.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/transfer-form.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/burn-form.tsx`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR focuses on enhancing JWT utils, updating API host paths, and optimizing user authentication handling.
### Detailed summary
- Export JWT utils, fix naming of `decodeJWT`
- Update API host paths to use relative paths
- Optimize user authentication handling in various components
> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-delete-partner.ts`, `apps/dashboard/src/components/app-layouts/app.tsx`, `apps/dashboard/src/components/buttons/TransactionButton.tsx`, `apps/dashboard/src/pages/dashboard/settings/notifications.tsx`, `apps/dashboard/src/components/engine/overview/transaction-timeline.tsx`, `apps/dashboard/src/pages/dashboard/settings/devices.tsx`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-add-partner.ts`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/hooks/use-update-ecosystem.ts`, `apps/dashboard/src/app/(dashboard)/dashboard/connect/pay/page.tsx`, `apps/dashboard/src/pages/dashboard/engine/index.tsx`, `apps/dashboard/src/pages/dashboard/settings/billing.tsx`, `apps/dashboard/src/components/engine/engine-instances-table.tsx`, `apps/dashboard/src/pages/dashboard/settings/usage.tsx`, `apps/dashboard/src/pages/dashboard/settings/gas-credits.tsx`, `apps/dashboard/src/pages/dashboard/settings/api-keys/index.tsx`, `apps/dashboard/src/pages/api/server-proxy/api/[...paths].tsx`, `apps/dashboard/src/pages/dashboard/connect/analytics.tsx`, `apps/dashboard/src/components/storage/your-files.tsx`, `apps/dashboard/src/pages/api/server-proxy/pay/[...paths].tsx`, `apps/dashboard/src/components/engine/engine-list.tsx`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayVolume.ts`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayNewCustomers.ts`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayPurchases.ts`, `apps/dashboard/src/pages/dashboard/connect/in-app-wallets.tsx`, `apps/dashboard/src/middleware.ts`, `apps/dashboard/src/components/pay/PayAnalytics/hooks/usePayCustomers.ts`, `apps/dashboard/src/pages/dashboard/connect/account-abstraction.tsx`, `apps/dashboard/src/app/login/page.tsx`, `apps/dashboard/src/app/components/ThirdwebMiniLogo.tsx`, `apps/dashboard/src/app/api/auth/ensure-login/route.ts`, `apps/dashboard/src/app/login/auth-actions.ts`, `apps/dashboard/src/components/buttons/MismatchButton.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useLoggedInUser.ts`, `apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
This PR introduces the ability to add NFTs to the connect modal in the thirdweb package. By using the `supportedNFTs` configuration, users can customize which NFTs are shown in the 'View Funds' section within the details modal. This update includes modifications to several TypeScript files to support the new functionality, adjustments in the UI components to handle NFT displays, and updates to hooks and utility functions to fetch and display owned NFTs.
---
<!-- start pr-codex -->
---
## PR-Codex overview
The focus of this PR is to add support for NFTs in the connect modal and customize the NFTs shown in the "View Funds" screen.
### Detailed summary
- Added support for NFTs in the connect modal with `supportedNFTs`
- Customized NFTs shown in the "View Funds" screen with `supportedNFTs`
- Updated components and types to handle NFTs
- Added NFT customization examples in documentation
> The following files were skipped due to too many changes: `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ViewFunds.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx`, `packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ViewNFTs.tsx`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR focuses on fixing Transaction Button callbacks not being called when a transaction is executed in the Pay Modal.
### Detailed summary
- Added `rejectTx` parameter with reason in `useSendTransaction.ts`
- Added `resolveTx` parameter in `useSendTransaction.ts`
- Updated `useSendTransaction` in `useSendTransaction.tsx` to handle `rejectTx` and `resolveTx`
- Added `onTxSent` callback in `TxModal` and `ExecutingTxScreen` to handle transaction data
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
Introducing a patch in the `thirdweb` library to address wallet disconnect events. The main changes involve making the `onDisconnect` function asynchronous and ensuring that it correctly emits disconnect events. Affected files include `coinbaseWebSDK.ts` and `index.ts` in the `thirdweb/src/wallets` directory.
---
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on fixing wallet disconnect events not being emitted in the `thirdweb` package.
### Detailed summary
- Added `async` keyword to `onDisconnect` function in `injected/index.ts` and `coinbaseWebSDK.ts`
- Replaced `disconnect` with `onDisconnect` in `onConnect` functions in both files
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
2024-07-05 01:30:32 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>