2700 Commits
Author SHA1 Message Date
Edward SunandGitHub e7bf498995 Add testMode to buyWithCrypto pay options (#4435) 2024-09-06 11:06:55 -07:00
MananTank 498d543bdc Fix getFunctionId implementation (#4443)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates `getFunctionId` in `function-id.ts` to use `randomBytesHex` instead of `uint8ArrayToHex`.

### Detailed summary
- Replaced `uint8ArrayToHex` with `randomBytesHex` function
- Changed `functionIdCache` from WeakMap to Map

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-06 17:54:43 +00:00
jnsdls 9b083ff67b [Update] Refactor ethers adapter and pin ethers version (#4430)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the `ethers` package version across multiple packages and introduces new exports in the `ethers5.ts` and `ethers6.ts` files.

### Detailed summary
- Updated `ethers` package version to `"5.7.2"`
- Added new exports in `ethers5.ts` and `ethers6.ts`
- Modified imports in `provider-setup.tsx` to use updated exports

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-05 22:13:34 +00:00
87d6b6a5b5 Integrate modular core contracts + mintableERCxxx extensions (#3413)
Co-authored-by: Krishang <[email protected]>
Co-authored-by: Yash <[email protected]>
Co-authored-by: Yash <[email protected]>
2024-09-06 07:25:06 +12:00
Jonas DanielsandGitHub bf61c4bf2a update deps (part 1) (#4419) 2024-09-05 11:48:44 -07:00
kien-ngo fa6809d500 [SDK] Add ERC1155 getOwnedTokenIds (#4345)
## Problem solved

Let's say I need a list of owned tokenids for rendering a list of <NFT.Media />. Using getOwnedNFTs is a waste of requests, so I split the code from the current getOwnedNFTs to make a new function

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a new function `getOwnedTokenIds` to retrieve ERC1155 tokenIds and their balances for a wallet address, along with related tests.

### Detailed summary
- Added `getOwnedTokenIds` function to retrieve ERC1155 tokenIds and balances
- Updated `getOwnedNFTs` to use `getOwnedTokenIds`
- Added tests for `getOwnedTokenIds`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-05 09:58:46 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
e6f8b3edad Version Packages (#4396)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-05 21:54:21 +12:00
jnsdls 153af0e61e [Update] Refactor account deployment check in ERC4337 extension (#4418)
address: https://app.graphite.dev/github/pr/thirdweb-dev/js/4413/Update-Refactor-NFT-reveal-functionality-and-batch-lazy-minting#comment-PRRC_kwDOH5MG4s5oAmQb

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the `isAccountDeployed` function by replacing the `getBytecode` call with `isContractDeployed` for improved readability and efficiency.

### Detailed summary
- Replaced `getBytecode` call with `isContractDeployed` for checking contract deployment status
- Updated function return logic for clarity and simplicity

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-05 08:44:21 +00:00
Jonas DanielsandGitHub 60c092f87b [Update] Refactor NFT reveal functionality and batch lazy minting (#4413) 2024-09-05 01:33:31 -07:00
jnsdls 4ad441e2f7 [Update] Refactor ContractChecklist and add feature detection (#4400)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add support for additional ERC721 metadata and claim conditions, optimize contract checklist components, and improve feature detection.

### Detailed summary
- Added support for `isSharedMetadataSupported` and `getClaimConditions` in ERC721.
- Optimized contract checklist component for ERC721, ERC1155, and ERC20 contracts.
- Improved feature detection for lazy minting, claim conditions, and account factory creation.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-05 06:43:55 +00:00
jnsdls 0f8679a3c1 nft extension detection v5 (#4399)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds support for checking if specific ERC721 and ERC1155 methods are supported by contracts. It also updates function exports and improves code consistency.

### Detailed summary
- Added functions to check method support for ERC721 and ERC1155 contracts
- Updated function exports for minting, updating metadata, and token URI
- Improved code consistency and clarity in various files

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc721/read/getNFTs.ts`, `packages/thirdweb/src/extensions/erc1155/write/mintAdditionalSupplyTo.ts`, `apps/dashboard/src/contract-ui/tabs/claim-conditions/page.tsx`, `packages/thirdweb/src/exports/extensions/erc721.ts`, `apps/dashboard/src/contract-ui/tabs/claim-conditions/components/claim-conditions.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/table.tsx`, `packages/thirdweb/src/extensions/erc1155/drops/write/updateMetadata.ts`, `packages/thirdweb/src/extensions/erc721/drops/write/updateMetadata.ts`, `apps/dashboard/src/contract-ui/hooks/useRouteConfig.tsx`, `apps/dashboard/src/core-ui/nft-drawer/useNftDrawerTabs.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/page.tsx`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-05 06:43:54 +00:00
jnsdls 54f0294e5e [Update] Enhance ERC1155 and ERC20 claim condition handling and detection (#4397)
<!-- start pr-codex -->

## PR-Codex overview
This PR enhances ERC1155 Drop ClaimCondition functionality.

### Detailed summary
- Added `isGetActiveClaimConditionSupported` function
- Updated `getActiveClaimCondition` and `claimTo` methods
- Added `isClaimToSupported` function
- Updated `lazyMint` method and added `isLazyMintSupported` function

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc1155/drops/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc20/drops/write/setClaimConditions.ts`, `packages/thirdweb/src/extensions/erc20/drops/write/claimTo.ts`, `packages/thirdweb/src/extensions/erc1155/drops/read/getClaimConditions.ts`, `packages/thirdweb/src/extensions/erc1155/drops/write/resetClaimEligibility.ts`, `packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/claimCondition.ts`, `packages/thirdweb/src/extensions/erc1155/drop1155.test.ts`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-05 05:53:00 +00:00
jnsdls 52c931ac0f human-readable-abi (#4395) 2024-09-05 05:52:59 +00:00
jnsdls a09822429b [Update] Remove single-phase claim condition support (#4394)
<!-- start pr-codex -->

## PR-Codex overview
This PR removes unusable single-phase claim condition extensions for ERC20, ERC721, and ERC1155 tokens.

### Detailed summary
- Removed unused single-phase claim condition extensions for ERC20, ERC721, and ERC1155 tokens
- Updated export functions for ERC20, ERC721, and ERC1155 tokens
- Refactored `getActiveClaimCondition` functions for ERC1155 and ERC721 tokens to handle unknown phase types

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc20/drops/read/getActiveClaimCondition.ts`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-05 05:52:57 +00:00
2982b3844c Fixed onBack function on GetStartedScreen (when can't connect in any way) (#4383)
Co-authored-by: farhan <[email protected]>
2024-09-05 15:19:12 +12:00
jnsdls c5b9d1c5dd [Extensions] Enhance ERC20 Drop ClaimCondition functionality (#4392)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance the ERC20 Drop ClaimCondition feature by adding metadata support and improving claim condition retrieval.

### Detailed summary
- Added `metadata` field to `setClaimConditions` function in ERC20 Drop
- Updated function selectors and inputs in ERC20 Drop
- Renamed `ById` to `MultiById` for clarity
- Improved claim condition retrieval logic
- Added support for `resetClaimEligibility` in ERC20 Drop
- Updated exports and imports for clarity

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc20/drops/read/getClaimConditions.ts`, `packages/thirdweb/src/extensions/erc20/drop20.test.ts`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-05 02:30:44 +00:00
kumaryash90 f383fc7484 Resolve implementation from matic proxy implementation slot (#4393)
## Problem solved

keccak256("matic.network.proxy.implementation") - used in polygon USDT proxy: https://polygonscan.com/address/0xc2132d05d31c914a87c6611c10748aeb04b58e8f#code

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the Matic (Polygon) proxy contract implementation resolution in the codebase.

### Detailed summary
- Added resolution for Matic proxy contract implementation slot
- Updated test cases for Matic proxy contract implementation
- Added support for Polygon chain in test setup
- Defined Polygon chain constants and RPC URLs
- Updated Ethereum and Polygon chain definitions

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-04 23:55:47 +00:00
jnsdls f9c351c22d [Update] Refactor claim condition retrieval and add support check (#4391)
<!-- start pr-codex -->

## PR-Codex overview
This PR enhances ERC721 Drop ClaimCondition functionality by adding new methods and improving existing ones.

### Detailed summary
- Added `claimCondition` method to `IDrop.json`
- Updated `getClaimParams` in `get-claim-params.ts` to use `ZERO_ADDRESS`
- Added `isClaimToSupported` and `isLazyMintSupported` functions
- Updated `lazyMint` and `claimTo` functions
- Added support check functions for various methods

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/claimCondition.ts`, `packages/thirdweb/src/extensions/erc721/drops/read/getActiveClaimCondition.ts`, `packages/thirdweb/src/extensions/erc721/drops/read/getClaimConditions.ts`, `packages/thirdweb/src/extensions/erc721/drop721.test.ts`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-04 23:19:30 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
257e4283d2 Version Packages (#4365)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-04 15:21:10 -07:00
Edward SunandGitHub 82a30afd4b Supported chain and tokens using overriden state (#4388) 2024-09-04 14:34:33 -07:00
MananTank 9e8d3e6639 Add props for hiding send, receive and buy buttons on ConnectButton (#4382)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `ConnectButton` component by adding props to hide "Send", "Receive", and "Buy" buttons in the details modal.

### Detailed summary
- Added props to hide "Send", "Receive", and "Buy" buttons in the `ConnectButton` component details modal
- Updated `ConnectButtonProps` with new boolean props for hiding buttons
- Modified `Details.tsx` to conditionally display buttons based on the new props

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-04 20:31:32 +00:00
MananTank d74e61b581 Fix Swap Fees layout in Pay UI drawer (#4390)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing the Swap Fees layout in the fees drawer in the pay UI.

### Detailed summary
- Updated `SwapFees` component layout in `Fees.tsx` to align items to the left
- Removed `align` prop from `SwapFees` component in `BuyScreen.tsx`
- Created `SwapFeesRightAligned` component for right-aligned fees display in `ConfirmationScreen.tsx`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-04 20:20:27 +00:00
jnsdls ad61b64b4b [Update] Refactor ERC4337 extension detection and UI (#4378)
### TL;DR

Enhanced ERC4337 support with new functions and improved contract detection.

### What changed?

- Added new ERC4337 extension functions for account management and permissions.
- Implemented support checks for various ERC4337 functions.
- Updated contract UI hooks to use new detection methods for ERC4337 features.
- Removed redundant code and simplified contract UI components.
- Improved type safety and consistency across ERC4337-related functions.

### How to test?

1. Test the new ERC4337 functions in a development environment.
2. Verify that the contract UI correctly detects and displays ERC4337 features.
3. Check that account management, permissions, and factory functionalities work as expected.
4. Ensure that the support checks for ERC4337 functions return correct results.

### Why make this change?

This change improves the detection and support for ERC4337 smart contract accounts. It enhances the developer experience by providing more granular control over account features and permissions. The updates also streamline the codebase, making it easier to maintain and extend ERC4337 functionality in the future.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates account permissions and extensions in the dashboard.

### Detailed summary
- Updated imports and components in `AccountPermissionsPage`, `AccountsPage`, and `AccountPage`.
- Added support for `isAddAdminSupported`, `isAddSessionKeySupported`, `isRemoveSessionKeySupported` functions in ERC4337 extensions.
- Added support for `isGetAllActiveSignersSupported`, `isGetAllAdminsSupported`, `isGetAllSignersSupported`, `isIsActiveSignerSupported` functions in account permissions.

> The following files were skipped due to too many changes: `packages/thirdweb/src/exports/extensions/erc4337.ts`, `apps/dashboard/src/contract-ui/hooks/useRouteConfig.tsx`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-04 16:39:04 +00:00
kien-ngo 8abcf3d4c3 [Portal] Update useSendTransaction docs (#4380)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the example and improve clarity in the `useSendTransaction` hook documentation.

### Detailed summary
- Updated the example from "Using a prepared contract call" to "Sending a prepared contract call"
- Added comments for clarity in the example code
- Added `chain` and `client` properties to the prepared transaction object

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-04 11:17:27 +00:00
joaquim-verges 2ce8840d80 feat: zksync deploys (#4346)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR increases the size limit for `thirdweb (cjs)` to 105 kB, adds an event `ContractDeployed`, and improves error handling and EIP712 transaction support.

### Detailed summary
- Increased size limit for `thirdweb (cjs)` to 105 kB
- Added `ContractDeployed` event
- Improved error messages with detailed information
- Added EIP712 transaction support for zksync
- Refactored deployment address computation and metadata handling

> The following files were skipped due to too many changes: `packages/thirdweb/src/contract/deployment/zksync/zkDeployContract.ts`, `packages/thirdweb/src/transaction/actions/zksync/send-eip712-transaction.test.ts`, `packages/thirdweb/src/contract/deployment/zksync/zkDeployProxy.ts`, `packages/thirdweb/package.json`, `packages/thirdweb/src/contract/deployment/zksync/zkDeployCreate2Factory.ts`, `packages/thirdweb/src/contract/deployment/utils/bootstrap.ts`, `packages/thirdweb/src/contract/deployment/zksync/zkDeployDeterministic.ts`, `packages/thirdweb/src/extensions/prebuilts/deploy-published.ts`, `packages/thirdweb/src/utils/any-evm/zksync/constants.ts`, `pnpm-lock.yaml`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-04 07:14:25 +00:00
jnsdls edb95d00ca [Extensions] Expose permission detection logic (#4375)
### TL;DR

Exposed permission detection logic for the Extensions module.

### What changed?

- Added `is*Supported` functions for various permission-related operations.
- Exported these new functions to make them accessible to users.
- Implemented `isGetAllRoleMembersSupported` function to check if both `getRoleMember` and `getRoleMemberCount` are supported.
- Renamed `grant.ts` to `grantRole.ts` for consistency.

### How to test?

1. Import the new `is*Supported` functions from the permissions module.
2. Pass an array of contract function selectors to these functions.
3. Verify that they correctly identify whether the corresponding permission operations are supported.

Example:
```typescript
import { isGetAllRoleMembersSupported } from "thirdweb/extensions/permissions";

const supported = isGetAllRoleMembersSupported(["0x..."]);
console.log("getAllRoleMembers supported:", supported);
```

### Why make this change?

This change allows developers to programmatically detect which permission-related operations are supported by a given contract. This is particularly useful when working with contracts that may implement only a subset of the permissions interface, enabling more robust and flexible integration with various smart contracts.

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `thirdweb` package by exposing permission detection logic for various role-related operations.

### Detailed summary
- Exposes permission detection logic for `hasRole`, `revokeRole`, `getRoleAdmin`, `renounceRole`, and more
- Renamed `grant.js` to `grantRole.js`
- Added new exports for supported permission operations
- Added a new function `isGetAllRoleMembersSupported` to check support for `getAllRoleMembers` operation

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-04 06:56:14 +00:00
Joaquim VergesandGitHub 73e5dc7276 fix direct transfers to the same wallet (#4319) 2024-09-04 14:16:14 +12:00
jnsdls 0246529e61 [Update] Migrate contract analytics to v5 (#4366)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on updating imports and types related to ABI parameters in the codebase.

### Detailed summary
- Updated imports from `"@thirdweb-dev/sdk"` to `"abitype"`
- Changed types to use `AbiParameter` instead of previous types like `Abi`, `AbiFunction`, `AbiEvent`
- Fixed type errors and updated type annotations throughout the codebase

> The following files were skipped due to too many changes: `apps/dashboard/src/components/contract-functions/interactive-abi-function.tsx`, `apps/dashboard/src/contract-ui/tabs/overview/components/NFTDetails.tsx`, `packages/thirdweb/src/extensions/thirdweb/read/contractType.ts`, `apps/dashboard/src/contract-ui/tabs/code/components/code-overview.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx`, `apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx`, `apps/dashboard/src/contract-ui/tabs/analytics/page.tsx`, `apps/dashboard/src/contract-ui/tabs/overview/page.tsx`, `apps/dashboard/src/components/contract-components/hooks.ts`, `apps/dashboard/src/components/contract-functions/contract-function.tsx`, `apps/dashboard/src/contract-ui/hooks/useRouteConfig.tsx`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-04 01:54:02 +00:00
kien-ngo 066aede2d1 [SDK] Allow specifying "to" and "from" props for the ClaimButton (#4363)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance the `ClaimButton` component by allowing the specification of "from" and "to" props for different types of claims.

### Detailed summary
- Added ability to specify "from" and "to" props for `ClaimButton`
- Updated `Erc721ClaimParams` and `Erc1155ClaimParams` types
- Added `to` and `from` props to `Erc20ClaimParams`
- Updated `getERC1155ClaimTo` and `getERC20ClaimTo` functions to handle `from` prop

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-03 02:55:57 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
cb6d7a3b00 Version Packages (#4331)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-03 14:52:24 +12:00
kien-ngo 915e7fb879 [SDK] FIx merkle tree proof for Drop contracts (#4344)
internal discussion: https://thirdwebdev.slack.com/archives/C04DP04AF1V/p1725028836481129

<!-- start pr-codex -->

---

## PR-Codex overview
**Focus:** This PR focuses on fixing the Merkle tree proof for Drop contracts in the `thirdweb` package.

### Detailed summary
- Fixed sorting of leaves in `MerkleTree.ts`.
- Renamed `ADDRESS_ZERO` to `ZERO_ADDRESS`.
- Updated logic for fetching proofs in `fetchProofsForClaimer`.
- Added a test for large Merkle trees in `MerkleTree.test.ts`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-03 00:52:23 +00:00
kien-ngo aa556f17b6 [Portal] Update docs for useActiveWallet (#4352)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance the `useActiveWallet` hook by adding examples demonstrating its usage for account and network change events.

### Detailed summary
- Added examples for basic usage, account change event, multiple accounts changed event, and network change event in the `useActiveWallet` hook.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-02 23:43:54 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a9add4f266 chore(deps): bump viem from 2.19.3 to 2.21.1 (#4356)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 15:18:02 -07:00
jnsdls 470f4db74e v5 extension detection (dashboard) (#4303)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to introduce a new library `@shazow/whatsabi` and update contract UI components and ERC20 checks.

### Detailed summary
- Added `@shazow/whatsabi` library
- Updated contract UI components
- Enhanced ERC20 token checks
- Improved settings page structure

> The following files were skipped due to too many changes: `pnpm-lock.yaml`, `apps/dashboard/src/contract-ui/hooks/useRouteConfig.tsx`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-02 18:02:12 +00:00
kien-ngo 5489311e45 [SDK] Add test for getOwnedNFTs 1155 (#4351)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a test for fetching owned ERC1155 token IDs.

### Detailed summary
- Added test for fetching owned token IDs
- Imported necessary modules for testing
- Defined test parameters and expectations
- Deployed ERC1155 contract and minted tokens
- Fetched and validated owned token IDs

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-02 17:47:09 +00:00
gregfromstl 5475551e5d [TS SDK] Feature: Accept a string for signature mint UID (#4270)
## Problem solved

Auto-encodes strings passed to `generateSignatureMint` across all token types. This change could cause confusion since the response uid from the contract will still be in hex form.

<!-- start pr-codex -->

---

## PR-Codex overview
This PR allows accepting string UIDs for signature minting in ERC721 and ERC20 contracts.

### Detailed summary
- Updated functions to accept and encode string UIDs for minting signatures
- Added tests for generating mint signatures with custom string UIDs
- Updated dependencies and peer dependencies in package.json

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-01 19:11:35 +00:00
joaquim-verges a2f2c7e172 fix(smart-wallet): Improve error message for connection failures (#4343)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR improves error handling in smart wallet connection by providing a more informative error message when encountering an RPC error.

### Detailed summary
- Improved error message when smart wallet connection fails due to RPC error
- Added dynamic error message including original error message or "unknown error"

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-01 02:41:31 +00:00
MananTank 3dc675e69c Dialog Modal z-index fixes, Fix depedency sort lint error (#4340)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update dialog components in multiple files with new styling classes and z-index values.

### Detailed summary
- Updated `DialogContent` styling and z-index in various files
- Added `dialogOverlayClassName` in multiple dialog components
- Updated dependencies in `react-native-adapter/package.json`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-09-01 00:22:19 +00:00
kien-ngo ff3abfa79e [SDK] Add tests for ethers5 Adapter (#4339)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to export functions `toEthersProvider`, `toEthersContract`, and `fromEthersContract` in `ethers5.ts`, and update test cases in `ethers5.test.ts` for these functions.

### Detailed summary
- Exported `toEthersProvider`, `toEthersContract`, and `fromEthersContract` functions in `ethers5.ts`
- Updated test cases in `ethers5.test.ts` for `toEthersContract` and `fromEthersContract`
- Added imports and test cases for new functions and modules

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-08-31 08:18:30 +00:00
kien-ngo 29374a711f [SDK] Add tests for updateMetadata extensions (#4338)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the metadata of ERC721 and ERC1155 NFTs by adding a `client` parameter to the `updateMetadata` function.

### Detailed summary
- Added `client` parameter to `updateMetadata` function in ERC721 and ERC1155 NFTs.
- Updated test files to include `client` parameter in function calls.
- Improved NFT metadata updating process.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-08-31 08:13:30 +00:00
kien-ngo b417d6fe2d [SDK] Document the claim behavior where claiming address is the same as PrimarySaleRecipient address (#4337)
Internal discussion: https://thirdwebdev.slack.com/archives/C04LA5X7FNE/p1718033032416319
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add a test for claiming ERC1155 tokens without paying if the claiming address is the same as the PrimaryRecipientAddress.

### Detailed summary
- Added a test to demonstrate claiming without payment if address matches PrimaryRecipientAddress.
- Imported `deployERC20Contract` for ERC20 deployment.
- Included Solidity code documentation for safe transfer behavior.
- Updated test logic for claiming ERC20 tokens without payment.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-08-31 03:36:24 +00:00
gregfromstl 8b137f0fe2 [React SDK] Fix: Hide in-app wallet connection option in pay embed (#4336)
The PayEmbed is missing the proper context to handle in-app wallet connections. Given this is an unlikely user use case, we'll disable it for now until the PayEmbed can be fully refactored.

CNCT-1762

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on hiding the in-app wallet connection in the Pay Embed feature of the `WalletSwitcherConnectionScreen` and filtering out the in-app wallet option in the `BuyScreen`.

### Detailed summary
- Hide in-app wallet connection in Pay Embed feature
- Filter out in-app wallet option in BuyScreen

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-08-31 00:53:36 +00:00
kien-ngo fd051797b7 [SDK] ERC1155 ClaimTo test with Allowlist (#4333)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance the ERC1155 claimTo extension by adding support for claiming NFTs with an allowlist feature.

### Detailed summary
- Added support for claiming NFTs with an allowlist feature
- Updated test cases to include claiming with an allowlist
- Modified contract setup and transaction handling for allowlist functionality

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-08-31 00:15:53 +00:00
gregfromstl 6432e8dc6b [TS SDK] Feature: L2 ENS name resolution (#4334)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds L2 ENS name resolution functionality to the Thirdweb package.

### Detailed summary
- Added L2 ENS name resolution
- Updated cache key in resolve-name.ts
- Added new constants in constants.ts
- Exported new functions and constants in ens.ts
- Updated resolve-address.ts and resolve-l2-name.ts for Basename resolution
- Added resolve-l2-name test cases
- Added resolve-l2-name functionality and related files

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-08-30 20:12:58 +00:00
kien-ngo bdb814df6c [SDK] Fix token approval for CreateDirectListingButton (#4327)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing NFT approval for `CreateDirectListingButton`.

### Detailed summary
- Added checks for ERC721 and ERC1155 asset types
- Updated NFT contract retrieval
- Implemented token approval logic for ERC721 and ERC1155
- Removed unnecessary imports

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-08-30 15:05:56 +00:00
Jonas DanielsGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
e46b3d3e2e Version Packages (#4320)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-30 21:48:00 +12:00
edwardysun c97b1a5d7e Fix default "Pay with" chain (#4328)
## Problem solved

When supported source chains is updated, update `fromChain` to take the first chain on the supported sources list instead of defaulting to `polygon`

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the default source chain selection in `PayEmbed`.

### Detailed summary
- Updated default source chain selection logic in `BuyScreen.tsx`
- Refactored the dependencies array in `useEffect` hook for better performance

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-08-30 08:03:15 +00:00
kien-ngo 42d5c65e49 [SDK] NFT Prebuilt components (#4179)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds NFT prebuilt components for displaying NFT metadata, including name, description, and media.

### Detailed summary
- Added `image_url` property to `NFT` type
- Introduced NFT prebuilt components: `NFT`, `NFT.Media`, `NFT.Name`, `NFT.Description`
- Implemented functions to fetch and display NFT metadata
- Updated test cases for NFT components

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-08-30 03:00:16 +00:00
gregfromstl 3e425ecc68 [React SDK] Fix: Accessbility warnings (#4322)
Fixes #4313

<!-- start pr-codex -->

---

## PR-Codex overview
This PR fixes accessibility warnings in the `Modal` component by adding a visually hidden title for screen readers.

### Detailed summary
- Added visually hidden title for screen readers in the `Modal` component
- Set `aria-describedby` attribute to `undefined` in `Dialog.Content` to improve accessibility

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-08-29 22:55:31 +00:00
gregfromstl 9d6eb27081 [TS SDK] Fix: Contract deployments with smart accounts (#4306)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on fixing programmatic deployments with smart accounts in the `useSendToken` hook.

### Detailed summary
- Updated error message for invalid receiver address
- Allowed empty strings for deployment transactions in `encodeAddress` function

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
2024-08-29 21:25:15 +00:00