100 Commits
Author SHA1 Message Date
kien-ngo 28c46b3bc4 Update list-form.tsx (#4551)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the `ListForm` interface and adjust form inputs for creating direct listings and auctions.

### Detailed summary
- Refactored `ListForm` interface for direct listings and auctions
- Adjusted form inputs for price per token in direct listings and auctions

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

<!-- end pr-codex -->
2024-09-12 08:22:26 +00:00
kien-ngo 6077fedd75 [Dashboard] Chain page breadcrumb (#4525)
## 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 new "Add Your Chain" button, implement breadcrumb UI components, and enhance chain filtering options in the dashboard.

### Detailed summary
- Added `AddYourChainButton` component with a link to add a chain
- Implemented breadcrumb UI components (`Breadcrumb`, `BreadcrumbItem`, etc.)
- Enhanced chain filtering options in the dashboard with `AllFilters` and related components

> The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/server/chain-table.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/page.tsx`

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

<!-- end pr-codex -->
2024-09-12 05:56:41 +00:00
kien-ngo d6e9def577 [Dashboard] Fix url params for fn overload (#4324)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR exposes `toFunctionSelector` and updates its usage in the dashboard component for better navigation.

### Detailed summary
- Exposed `toFunctionSelector` in `thirdweb/utils.ts`
- Updated `ContractFunctionsPanel` to use `toFunctionSelector` for navigation based on function selector
- Improved function selection logic in `FunctionsOrEventsListItem` to use `toFunctionSelector`

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

<!-- end pr-codex -->
2024-09-11 16:07:45 +00:00
kien-ngo 20a74eb0f5 [Dashboard] Fix BigInt serialize issue (#4530)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates NFT handling in the wallet and contract UI components. It replaces `BigInt` with `string` for `id` and `supply` fields to prevent serialization errors and improves metadata handling.

### Detailed summary
- Replaced `BigInt` with `string` for `id` and `supply` fields in `WalletNFT` type
- Updated NFT handling in various files to ensure compatibility and prevent serialization errors

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

<!-- end pr-codex -->
2024-09-11 06:22:07 +00:00
kien-ngo 02aabbf97d [SDK] More tests for NFT extensions (#4470)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add tests and functions for updating token URIs in ERC721 and ERC1155 contracts.

### Detailed summary
- Added test for updating metadata in ERC721 contract
- Added test for updating metadata in ERC1155 contract
- Created functions to update token URIs in ERC721 and ERC1155 contracts

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

<!-- end pr-codex -->
2024-09-11 02:09:30 +00:00
kien-ngo bcd033b0ef [SDK] test for ERC20 transferFrom (#4471)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on adding tests for ERC20 token `transferFrom` function with different `amount` and `amountWei` parameters.

### Detailed summary
- Added tests for `transferFrom` function with `amount` parameter
- Added tests for `transferFrom` function with `amountWei` parameter
- Utilized test utilities and prebuilt functions
- Checked balance after transfer for correctness

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

<!-- end pr-codex -->
2024-09-11 00:50:24 +00:00
kien-ngo 052f56a433 [SDK] Add test getApprovalForTransaction.test.ts (#4472)
## 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 test cases for the `getApprovalForTransaction` function in the ERC20 extension.

### Detailed summary
- Added test cases for `getApprovalForTransaction` function
- Imported necessary modules for testing
- Defined test parameters such as chain, client, and accounts
- Tested approval transaction scenarios

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

<!-- end pr-codex -->
2024-09-11 00:20:33 +00:00
kien-ngo ed39b3d5f5 [Portal] Update useProfiles docs (#4501)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the import in `useProfiles.ts` to use `useProfiles` instead of `use`.

### Detailed summary
- Updated import from `use` to `useProfiles` in `useProfiles.ts`

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

<!-- end pr-codex -->
2024-09-10 07:45:38 +00:00
kien-ngo f66bccaba3 [Dashboard] Refactor some code for the Explorer (#4438)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds state management for execution mode (read, write, simulate) and refactors error and data handling in `InteractiveAbiFunction`.

### Detailed summary
- Added `useState` for execution mode
- Refactored error and data handling based on execution mode
- Improved formatting of response data
- Updated button disable conditions for simulation and transaction handling

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

<!-- end pr-codex -->
2024-09-08 05:52:42 +00:00
kien-ngo cab83fb08a [Dashboard] Fix single lazy mint form (#4441)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds functionality to upload images and animations for lazy minting NFTs in the `LazyMintNftForm` component.

### Detailed summary
- Added `upload` import from `thirdweb/storage`.
- Modified form submission to upload image and animation URLs.
- Updated data handling for image and animation URLs.

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

<!-- end pr-codex -->
2024-09-06 15:56:53 +00:00
kien-ngo 232ce67703 [Dashboard] Fix missing updateMetadata form (#4439)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `useNftDrawerTabs` functionality by allowing updates to metadata in addition to token URI.

### Detailed summary
- Updated condition to include support for updating metadata
- Added option to update metadata in the tabs if supported

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

<!-- end pr-codex -->
2024-09-06 09:02:25 +00:00
kien-ngo 94112dc9fa [Playground] Update description (#4436)
## 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 description in the Auth page of the `playground-web` app to provide a more detailed explanation of user authentication using wallets.

### Detailed summary
- Updated the description in the Auth page to explain user authentication using wallets

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

<!-- end pr-codex -->
2024-09-06 08:27:23 +00:00
kien-ngo 9c0797b354 [Dashboard] Explorer to show transaction error message (#4437)
## Problem solved

Before:
<img width="747" alt="image" src="https://github.com/user-attachments/assets/ea60b693-70f9-4a20-8d31-246dc428e580">

After:
<img width="746" alt="image" src="https://github.com/user-attachments/assets/58fd622f-0aad-403f-976e-d06ac01ae0e2">

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `formatError` function in `interactive-abi-function.tsx` to handle different error objects more effectively.

### Detailed summary
- Improved error handling in `formatError` function
- Added a check for `error.message` property
- Removed unnecessary type casting for `error` object

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

<!-- end pr-codex -->
2024-09-06 07:01:06 +00:00
kien-ngo 675614c29a [Dashboard] Fix Speedracer link (#4431)
## 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 link for the gaming solution page from a specific Unreal Engine quickstart to a more general engine-express page.

### Detailed summary
- Updated the href link for the gaming solution page to a more general engine-express URL.

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

<!-- end pr-codex -->
2024-09-06 00:56:18 +00:00
kien-ngo 3a32b11a80 [Dashboard] Tx simulator for Explorer (#4293)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds a new feature to simulate contract transactions before execution, enhancing user experience and safety.

### Detailed summary
- Added `useSimulateTransaction` hook for simulating transactions
- Implemented simulation functionality in `InteractiveAbiFunction`
- Added simulation button and logic for contract functions

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

<!-- end pr-codex -->
2024-09-05 23:48:30 +00: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
kien-ngo 6d75abf196 [Dashboard] Make long support form scrollable (#4398)
<img width="1164" alt="image" src="https://github.com/user-attachments/assets/3a144686-c965-466f-90d3-b95eb1b05e45">

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a CSS class to limit the height and enable horizontal overflow in the `DialogContent` component of the Create Ticket form.

### Detailed summary
- Added `className="max-h-full overflow-x-auto"` to the `DialogContent` component in `create-ticket.client.tsx`.

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

<!-- end pr-codex -->
2024-09-05 01:57:36 +00:00
Kien NgoandGitHub 57fb7fc6fb [Dashboard] Fix CodeSnippet page (#4386) 2024-09-04 08:37:00 -07: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
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
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
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
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
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
kien-ngo c52e1beffb [Dashboard] Fix ERC1155 claim issue (#4335)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the `from` field in the `claim-tab.tsx` component to use the `account.address` value.

### Detailed summary
- Updated `from` field in the `claim-tab.tsx` component to use `account.address` value.

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

<!-- end pr-codex -->
2024-08-30 18:40:38 +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
kien-ngo eac008967c [Dashboard] Add approval step to claim forms (#4326)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance NFT and token claiming functionality by adding approval checks for ERC20 tokens.

### Detailed summary
- Added approval checks for ERC20 tokens before claiming NFTs and tokens
- Improved error handling and notifications for claiming process
- Ensured account detection before claiming to prevent errors

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

<!-- end pr-codex -->
2024-08-30 12:20:26 +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
kien-ngo c6d1f79267 [Dashboard] Handle loading state for marketplace ui (#4321)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on improving error handling in the `list-form.tsx` file by setting `isFormLoading` to false when an error occurs during NFT approval.

### Detailed summary
- Added `setIsFormLoading(false)` to handle error in NFT approval process.

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

<!-- end pr-codex -->
2024-08-30 00:24:32 +00:00
kien-ngo 3aaffe1a70 [Dashboard] Add NFT approval step to Marketplace create listing & auction (#4311)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the `CreateListingButton` and `CreateListingsForm` components to use `mutation` instead of `mutate` for transaction handling.

### Detailed summary
- Refactored `useSendAndConfirmTransaction()` to `useSendAndConfirmTransaction()`
- Renamed `mutate` to `mutation` in `CreateListingButton`
- Updated `useMutationResult` import in `list-form.tsx`
- Replaced `mutate` with `mutation` in `CreateListingsForm`
- Added error handling and approval logic in `CreateListingsForm`

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

<!-- end pr-codex -->
2024-08-29 18:11:43 +00:00
kien-ngo 68ee714e22 [SDK] Add tests: claim conditions for ERC1155 Drop (#4309)
## 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 getting active claim conditions in an ERC1155 contract.

### Detailed summary
- Added imports for test constants and functions
- Added a test case for getting active claim conditions in ERC1155 contract
- Implemented setup and assertions for the test case

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

<!-- end pr-codex -->
2024-08-29 11:18:54 +00:00
kien-ngo 48db1f5281 [Portal] Move some useful support articles to Portal (#4299)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds examples for interacting with Lens protocol and Ethereum Name Service using thirdweb extensions. It also includes a guide on transferring tokens using ERC721, ERC1155, and ERC20 contracts.

### Detailed summary
- Added examples for interacting with Lens protocol and ENS
- Included functions to resolve addresses, names, and avatars
- Provided code snippets for transferring ERC721, ERC1155, and ERC20 tokens
- Updated sidebar with links to new examples pages

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

<!-- end pr-codex -->
2024-08-28 10:57:56 +00:00
kien-ngo e793d44dde [SDK] Update tsdocs for Gasless with OpenZeppelin (#4279)
<!-- start pr-codex -->

## PR-Codex overview
This PR introduces gasless transaction support using OpenZeppelin in various transaction-related functions and components.

### Detailed summary
- Added gasless usage with OpenZeppelin in `sendTransaction`, `sendAndConfirmTransaction`, `useSendTransaction`, and `useSendAndConfirmTransaction`
- Updated code examples in corresponding files for gasless usage with OpenZeppelin

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

<!-- end pr-codex -->
2024-08-27 00:04:00 +00:00
kien-ngo b661ce7b2f [SDK] Deploy VoteERC20 extension (#4264)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds an extension for deploying the `VoteERC20` contract and includes related test cases and contract initialization improvements.

### Detailed summary
- Added extension for deploying `VoteERC20` contract
- Implemented test cases for contract deployment and functionality testing
- Enhanced contract initialization process with better error handling

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/prebuilts/deploy-vote.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/VoteERC20/write/initialize.ts`

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

<!-- end pr-codex -->
2024-08-26 22:45:35 +00:00
kien-ngo bdf9507de8 [Dashboard] Overview page (#4222)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates various components in the contract UI to use the `useContract` hook and `ThirdwebContract` type for better contract handling.

### Detailed summary
- Updated components to use `useContract` hook and `ThirdwebContract` type
- Removed unnecessary imports and code duplication
- Refactored contract-related logic for improved readability

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/overview/components/ContractChecklist.tsx`

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

<!-- end pr-codex -->
2024-08-22 23:48:19 +00:00
kien-ngo 5d6b1e1d0a [Dashboard] Migrate type: ProfileMetadata + ProfileMetadataInput (#4109)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates import paths for `ProfileMetadata` and `ProfileMetadataInput` to `constants/schemas`.

### Detailed summary
- Updated import paths for `ProfileMetadata` and `ProfileMetadataInput` to `constants/schemas` in multiple files.
- Added `ProfileSchemaInput` and `ProfileSchemaOutput` in `schemas.ts`.
- Updated type-casting in `fetchPublisherProfile` function.
- Changed parameter type in `useEditProfileMutation` function.

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

<!-- end pr-codex -->
2024-08-22 21:52:16 +00:00
kien-ngo c49bbd3389 [Dashboard] Remove ethers from list-form (#4241)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the CreateListingsForm component in the listings tab to handle auction creation with improved currency handling.

### Detailed summary
- Refactored currency handling for auction creation
- Added `toUnits` and `toWei` functions
- Imported `decimals` from `thirdweb/extensions/erc20`
- Updated auction creation logic to handle different currencies

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

<!-- end pr-codex -->
2024-08-22 20:55:15 +00:00
kien-ngo f192875547 [Dashboard] Remove bignumber-input since it is for Claim phase v1 (#4242)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to remove the `WaitingTimeInput` component from the `ClaimConditionsPhase` component and related imports.

### Detailed summary
- Deleted `WaitingTimeInput` component import and usage in `ClaimConditionsPhase`
- Removed `WaitingTimeInput` component from the conditional rendering based on `isClaimPhaseV1`

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

<!-- end pr-codex -->
2024-08-22 20:43:49 +00:00
kien-ngo 01dd80fad9 [Dashboard] Hide AnnouncementBanner for Onchain Olympics [Merge after Aug 21] (#4176)
Merge this PR after Aug 21 🙏
2024-08-22 09:38:41 +00:00
kien-ngo 6b9b3efb51 [Dashboard] Account page v5 (#4219)
## 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 contract UI components to use the latest contract data and improve the account creation process.

### Detailed summary
- Updated `useRouteConfig.tsx` to conditionally render `LazyContractAccountsPage`
- Refactored `CreateAccountButton.tsx` to use `ThirdwebContract`
- Modified `page.tsx` to use `ThirdwebContract` and `ExtensionDetectedState` types

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

<!-- end pr-codex -->
2024-08-21 17:14:01 +00:00
kien-ngo 654cbbaa2e [Dashboard] Permission page to v5 (#4218)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to implement a feature that detects and handles permissions enumerable in contracts.

### Detailed summary
- Added detection and handling of `PermissionsEnumerable` feature in contracts
- Updated components to utilize the detected `PermissionsEnumerable` flag
- Refactored and optimized contract permission handling logic

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

<!-- end pr-codex -->
2024-08-21 17:13:58 +00:00
kien-ngo 0c2fd4db98 [Dashboard] Remove ethers from int-input (#4234)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR replaces `parseEther` with `toWei` in `SolidityIntInput` component for input conversion.

### Detailed summary
- Replaced `parseEther` with `toWei` for input conversion
- Updated import from `thirdweb`
- Removed unused import of `useCallback`
- Updated `Button` import from `tw-components`

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

<!-- end pr-codex -->
2024-08-21 17:02:45 +00:00
kien-ngo 2c37732984 [SDK] Fix abi param parsing (#4229)
## 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 parsing functionality for Solidity types in the contract UI components and transaction handling.

### Detailed summary
- Added parsing logic for `string` type in `parseAbiParams`
- Improved handling of different data types in contract transactions
- Added test cases for parsing `string` and `number` in contract transactions

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

<!-- end pr-codex -->
2024-08-21 17:02:36 +00:00
kien-ngo 6b8bde1abf [Dashboard] Replace useSDKChainId (#4217)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor hook dependencies in the dashboard component to use `useDashboardEVMChainId` instead of `useSDKChainId`.

### Detailed summary
- Updated imports to use `useDashboardEVMChainId` from `@3rdweb-sdk/react`
- Replaced all instances of `useSDKChainId` with `useDashboardEVMChainId`

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

<!-- end pr-codex -->
2024-08-21 00:40:41 +00:00
kien-ngo 81b33c7d7c [Dashboard] useContractEvents to v5 (#4215)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates event handling in the dashboard by refactoring components, adding type definitions, and improving event filtering.

### Detailed summary
- Refactored components to handle events using `ThirdwebContract` type
- Added type definitions for `InternalTransaction` and `PreparedEvent`
- Improved event filtering and handling in `useActivity` and `EventsFeed`
- Updated `LatestEvents` and `ContractEventsPage` components to use `ThirdwebContract` type

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/events/components/events-feed.tsx`

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

<!-- end pr-codex -->
2024-08-21 00:40:40 +00:00
kien-ngo e37ac839b2 [Dashboard] claim-condition page (#4208)
## 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 claim conditions for ERC721, ERC1155, and ERC20 contracts.

### Detailed summary
- Updated claim condition tabs for ERC721, ERC1155, and ERC20 contracts
- Added detection of new claim conditions for different contract types
- Refactored components to use updated contract information

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

<!-- end pr-codex -->
2024-08-21 00:24:22 +00:00
kien-ngo 462e1fd2aa [Dashboard] chore: remove getErc (1155) (#4207)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the `useNFTDrawerTabs` function in the `useNftDrawerTabs.tsx` file to use `isERC1155` instead of `erc1155` for better clarity.

### Detailed summary
- Refactored references from `erc1155` to `isERC1155` for clarity
- Updated `contractAddress` and `chainId` values to use `contract` object properties instead of `erc1155`

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

<!-- end pr-codex -->
2024-08-20 23:58:29 +00:00
kien-ngo b4d8be4f91 [Dashboard] Remove some stuff from claim-condition-form (#4206)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the Claim Conditions Form component to use the `useReadContract` hook and `decimals` extension from `thirdweb/extensions/erc20`.

### Detailed summary
- Replaced `useTokenDecimals` with `useReadContract` for token decimals retrieval
- Added `decimals` import from `thirdweb/extensions/erc20`
- Added `useReadContract` import from `thirdweb/react`

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

<!-- end pr-codex -->
2024-08-20 23:57:54 +00:00
kien-ngo 15b7e8cfb8 [Dashboard] Remove type UploadProgressEvent (#4205)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to re-export `UploadProgressEvent` type and import it in `batch-lazy-mint-button.tsx`.

### Detailed summary
- Re-exported `UploadProgressEvent` type from `progress-box.tsx`
- Imported `UploadProgressEvent` in `batch-lazy-mint-button.tsx`

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

<!-- end pr-codex -->
2024-08-20 23:57:52 +00:00
kien-ngo 886094fbac [Dashboard] Migrate /code page to v5 (#4204)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR improves contract code rendering in the dashboard.

### Detailed summary
- Updated rendering logic for contract code in various components
- Added type `AbiType` for compatibility
- Refactored `ContractCodePage` to use `ThirdwebContract` instead of `contractAddress`

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

<!-- end pr-codex -->
2024-08-20 22:36:27 +00:00
kien-ngo 0368ee538e [Dashboard] Add useDashboardOwnedNFTs hook (#4203)
## 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 `quantityOwned` type in the NFTs types, add a new hook for getting owned NFTs, and make adjustments in the Create Listings Form component.

### Detailed summary
- Updated `quantityOwned` type to `bigint` in NFTs types.
- Added `useDashboardOwnedNFTs` hook for fetching owned NFTs.
- Adjusted logic in Create Listings Form component for using the new hook and contract handling.

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

<!-- end pr-codex -->
2024-08-20 21:37:09 +00:00
kien-ngo 86c953f18e [Dashboard] Remove useContract from Explorer page (#4202)
## 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 contract-related components and hooks to use `ThirdwebContract` instead of `SmartContract`.

### Detailed summary
- Updated components and hooks to use `ThirdwebContract` instead of `SmartContract`
- Added conditional rendering based on contract and ABI availability
- Removed unnecessary imports and code snippets

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

<!-- end pr-codex -->
2024-08-20 20:33:38 +00:00
kien-ngo 8b0fd13adb [Dashboard] Sources page to v5 (#4201)
## 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 contract-related components and hooks, resolve ABI types, and improve UX in the dashboard.

### Detailed summary
- Updated components and hooks related to contracts
- Resolved ABI types with `abitype`
- Improved UX in the dashboard by updating sources display

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

<!-- end pr-codex -->
2024-08-20 17:11:57 +00:00
kien-ngo 8dc23e376e [Dashboard] Fix import path (#4200)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the dashboard contract UI tabs page by removing unused imports and refactoring some dependencies.

### Detailed summary
- Removed unused import `thirdwebClient`
- Refactored dependencies related to `3rdweb-sdk/react` and `3rdweb-dev/react`

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

<!-- end pr-codex -->
2024-08-20 10:12:12 +00:00
Kien NgoandGitHub 542f97dc4b [Dashboard] Migrate useContractSources to v5 (#4145) 2024-08-20 21:04:19 +12:00
kien-ngo 46ca21d128 [Dashboard] Explorer page to v5 (#4174)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance contract function interaction by integrating V5 features and updating contract call handling.

### Detailed summary
- Added `useV5DashboardChain` and `getContract` from `lib/v5-adapter` and `thirdweb` respectively
- Updated `ContractFunction` component to use V5 contract and handle contract calls
- Updated `InteractiveAbiFunction` component to use `ThirdwebContract` and improve contract call handling

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

<!-- end pr-codex -->
2024-08-20 08:45:43 +00:00
kien-ngo 551349cbc6 [Dashboard] envs clean-up (#4170)
- [x] Remove a lof of duplicated instances of `ThirdwebClient` & env variables across multiple files
- [x] There's only 1 main ThirdwebClient from now on which can be imported from `lib/thirdweb-client`. It can switch between clientId and secretKey depends on the environment
- [x] All env variables like `DASHBOARD_THIRDWEB_CLIENT_ID`, `DASHBOARD_THIRDWEB_SECRET_KEY`, `isProd` etc. now live inside `@/constants/env`

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates import paths and constants related to the `thirdwebClient` and `isProd` across multiple files.

### Detailed summary
- Updated import paths for `thirdwebClient` and `isProd`
- Replaced `constants/rpc` with `constants/env`
- Removed unused imports and constants

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/overview/page.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/airdrop-tab.tsx`, `apps/dashboard/src/components/app-layouts/app.tsx`, `apps/dashboard/src/components/app-layouts/provider-setup.tsx`, `apps/dashboard/src/contract-ui/tabs/manage/page.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/opengraph-image.tsx`, `apps/dashboard/src/lib/sdk.ts`, `apps/dashboard/src/@/constants/client.ts`, `apps/dashboard/src/app/(dashboard)/(chain)/components/server/chain-icon.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/tx/[txHash]/page.tsx`, `apps/dashboard/src/pages/api/moralis/balances.ts`

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

<!-- end pr-codex -->
2024-08-20 07:55:31 +00:00
kien-ngo 4d85aa56c6 [Dashboard] Fix types for contract published version (#4197)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `publish.tsx` and `index.tsx` files to handle cases where `version` is undefined by defaulting to "latest".

### Detailed summary
- In `publish.tsx`, added a default value of "latest" if `v` is undefined in the `SelectItem` component.
- In `index.tsx`, changed the `version` type from `string` to `string | undefined` and added a default value of "latest" if `version` is undefined when constructing the `PublishedContractOG` object.

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

<!-- end pr-codex -->
2024-08-20 07:18:40 +00:00
kien-ngo cbd6fd87d0 [SDK] Update Lens test (#4188)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on updating a test in `resolveAddress.test.ts` to run only if a secret key is provided.

### Detailed summary
- Updated test to run only if `process.env.TW_SECRET_KEY` is provided.

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

<!-- end pr-codex -->
2024-08-19 21:51:35 +00:00
kien-ngo ef9cc55b69 [Dashboard] Remove v4 code on some Marketplace components
(#4128)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR exposes `max()` and `min()` utility methods for bigints and updates marketplace-related components to use these methods for better handling of large numbers.

### Detailed summary
- Exposes `max()` and `min()` utility methods for bigints in `thirdweb/utils`
- Updates components in `dashboard` related to marketplace to use `max()` and `min()` for handling large numbers efficiently

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/overview/components/MarketplaceDetails.tsx`

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

<!-- end pr-codex -->
2024-08-19 20:06:26 +00:00
kien-ngo 15899ea231 [Dashboard] Fix styling for no-image NFT (#4181)
## 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 styling of the `NFTMedia` component by adding explicit `width` and `height` properties.

### Detailed summary
- Added inline styles for `width` and `height` based on `props`
- Updated `className` to include `border-border` class

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

<!-- end pr-codex -->
2024-08-19 19:47:32 +00:00
kien-ngo bd4669984d [Portal] Update some docs (#4177)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to introduce gasless transaction configurations and transaction annotations.

### Detailed summary
- Added gasless transaction configurations for Engine, OpenZeppelin, and Biconomy providers
- Introduced transaction annotations for Engine, OpenZeppelin, and gasless options
- Updated transaction button components to include transaction annotations
- Exposed GaslessOptions type for gasless transactions configuration

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

<!-- end pr-codex -->
2024-08-19 19:29:55 +00:00
kien-ngo c8f7a68225 [Dashboard] (partial) useContract removal (#4111)
Slowly moving everything upward. This PR mainly focuses on removing `useContract` from the page level (`page.tsx` files)

Routes to test:
- [x] direct listings page
- [x] english auction page
- [x] Split contract page
- [x] Contract account page
- [x] contract settings page
- [x] contract token page

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update various components to use `ThirdwebContract` instead of `contractAddress` and `chainId`.

### Detailed summary
- Update components to use `ThirdwebContract` instead of `contractAddress` and `chainId`
- Replace `useContract` calls with `contract.address`
- Import `ThirdwebContract` type for type checking

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/shared-components/marketplace-table.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/cancel-tab.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/listing-drawer.tsx`, `apps/dashboard/src/contract-ui/tabs/english-auctions/components/table.tsx`, `apps/dashboard/src/contract-ui/tabs/direct-listings/components/table.tsx`, `apps/dashboard/src/contract-ui/tabs/english-auctions/page.tsx`, `apps/dashboard/src/contract-ui/tabs/direct-listings/page.tsx`, `apps/dashboard/src/contract-ui/tabs/split/page.tsx`, `apps/dashboard/src/contract-ui/tabs/overview/page.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/list-button.tsx`, `apps/dashboard/src/contract-ui/tabs/account-permissions/page.tsx`, `apps/dashboard/src/contract-ui/tabs/embed/page.tsx`, `apps/dashboard/src/contract-ui/tabs/settings/page.tsx`, `apps/dashboard/src/contract-ui/tabs/account/page.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/page.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-08-19 18:12:53 +00:00
kien-ngo a43907e2df [SDK] resolveAddress for Lens handles (#4150)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to enhance the `Lens` extension in the `thirdweb` package by adding the ability to resolve addresses and handle crypto transactions efficiently.

### Detailed summary
- Added `resolveAddress` function for handling crypto transactions with lens handles
- Updated contract addresses and overrides for Lens smart contracts
- Created tests for `resolveAddress` function to ensure correct address resolution

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

<!-- end pr-codex -->
2024-08-18 23:10:46 +00:00
kien-ngo f6d6c86ec0 [Dashboard] Fix ENS resolve issue (#4168)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `thirdwebClient` configuration in `thirdweb-client.ts` to include a `secretKey` option if `DASHBOARD_THIRDWEB_SECRET_KEY` is defined.

### Detailed summary
- Updated `thirdwebClient` configuration to include `secretKey` if `DASHBOARD_THIRDWEB_SECRET_KEY` is defined
- Added conditional logic for `secretKey` presence

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

<!-- end pr-codex -->
2024-08-18 22:21:10 +00:00
kien-ngo 43f9319ac7 [SDK] Add GaslessOptions to useSendAndConfirmTransaction (#4165)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to add Gasless transaction support for the `sendTransaction` and `sendAndConfirmTransaction` functions, as well as for the `useSendTransaction` and `useSendAndConfirmTransaction` hooks.

### Detailed summary
- Added `GaslessOptions` support to `sendTransaction`
- Introduced Gasless usage with `thirdweb Engine` in various transaction-related functions and hooks
- Added `GaslessOptions` configuration to `useSendTransaction` and `useSendAndConfirmTransaction` hooks
- Updated documentation and examples to showcase Gasless transaction usage

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

<!-- end pr-codex -->
2024-08-18 10:05:37 +00:00
kien-ngo fc8daaa2bc [Dashboard] Remove ethers.js (#4163)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on exporting a utility method `isBytes` and updating types to `bigint`.

### Detailed summary
- Exported `isBytes` utility method
- Updated `nextTokenIdToMint` type to `bigint`
- Updated imports for `isAddress`, `isBytes`, and `isHex`
- Refactored display balance calculations to use `toTokens` function

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/nfts/components/batch-lazy-mint-button.tsx`

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

<!-- end pr-codex -->
2024-08-18 07:04:05 +00:00
kien-ngo 9133b45700 [Dashboard] useVote to v5 (#4154)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates TypeScript documentation and refactors Vote-related components for clarity and consistency.

### Detailed summary
- Updated TypeScript documentation for `ProposalVoteInfo`
- Refactored `VoteButton` and `DelegateButton` components to use `ThirdwebContract`
- Improved display of voting token decimals in `Proposal` component

> The following files were skipped due to too many changes: `apps/dashboard/src/@3rdweb-sdk/react/hooks/useVote.ts`

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

<!-- end pr-codex -->
2024-08-18 05:02:05 +00:00
kien-ngo 44c78f4643 [Dashboard] useRemoveContractMutation to v5 + minor cleanups (#4155)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to refactor gasless transaction handling in the Dashboard by centralizing contract addresses and relayer URLs.

### Detailed summary
- Introduced `MULTICHAIN_REGISTRY_CONTRACT` constant for contract address
- Centralized relayer URL and forwarder address in `DASHBOARD_ENGINE_RELAYER_URL` and `DASHBOARD_FORWARDER_ADDRESS`
- Updated functions to use centralized constants for contract addresses and relayer URLs

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

<!-- end pr-codex -->
2024-08-18 03:55:32 +00:00
kien-ngo 7aee37b10f [Dashboard] Replace useSDKChainId with useDashboardEVMChainId (#4144)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to replace the usage of `useSDKChainId` with `useDashboardEVMChainId` in multiple components for better compatibility and functionality.

### Detailed summary
- Replaced `useSDKChainId` with `useDashboardEVMChainId` in multiple components.
- Updated imports and dependencies accordingly.
- Improved compatibility and functionality for the dashboard.

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

<!-- end pr-codex -->
2024-08-18 03:43:32 +00:00
kien-ngo 23a665bdaa [Dashboard] Remove v4 type: OptionalPropertiesInput (#4158)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update the type definition for `attributes` in the `IPropertyFieldValues` interface.

### Detailed summary
- Updated `OptionalPropertiesInput` type definition to be a key-value pair object
- Changed `attributes` type in `IPropertyFieldValues` interface to use the updated type definition

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

<!-- end pr-codex -->
2024-08-18 03:32:30 +00:00
kien-ngo 5fda794569 [SDK] Add more VoteERC20 extensions (for Dashboard) (#4139)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR exposes ERC20Vote extensions and adds more Vote contract extensions.

### Detailed summary
- Exposed ERC20Vote extensions
- Added more Vote contract extensions
- Updated types for vote and proposal states
- Implemented functions for proposal existence, execution, and voting counts

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

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

<!-- end pr-codex -->
2024-08-17 12:28:02 +00:00
kien-ngo 93b3bad783 [SDK] Expose thirdweb extensions (for Dashboard) (#4149)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to export contracts related to Publisher, Multichain Registry, and Contract Factory functionalities.

### Detailed summary
- Added Publisher contract exports for reading and writing operations
- Added Multichain Registry exports for reading and writing operations
- Added Contract Factory export for deploying proxies

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

<!-- end pr-codex -->
2024-08-17 12:02:02 +00:00
kien-ngo 1d9f4e5e3e [Dashboard] MismatchButton to v5 (#4152)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview

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

<!-- end pr-codex -->
2024-08-17 10:01:56 +00:00
kien-ngo 1edd6c7e4c embed-setup.tsx to v5 (#4108)
## 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 Contract Embed feature by integrating with `thirdwebClient` and `useV5DashboardChain`.

### Detailed summary
- Added `thirdwebClient` and `useV5DashboardChain` for contract setup
- Updated `contract` type to `ThirdwebContract`
- Refactored `buildIframeSrc` function to use `ThirdwebContract` properties

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

<!-- end pr-codex -->
2024-08-15 05:37:15 +00:00
kien-ngo 588f19639f [Dashboard] ContractMetadata settings to v5 (#4100)
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the SettingsMetadata component in the contract UI to handle contract data more efficiently.

### Detailed summary
- Refactored the SettingsMetadata component to use ThirdwebContract type
- Updated schema imports and data handling
- Removed unnecessary dependencies and functions

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

<!-- end pr-codex -->
2024-08-15 05:26:34 +00:00
kien-ngo 9d7d513d37 [Dashboard] PrimarySaleRecipient to v5 (#4098)
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on updating the contract UI settings for primary sale recipient address handling.

### Detailed summary
- Updated handling of primary sale recipient address in contract settings UI
- Refactored usage of Thirdweb SDK functions
- Added error handling for invalid recipient address
- Improved transaction handling and form reset functionality

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

<!-- end pr-codex -->
2024-08-15 01:11:20 +00:00
kien-ngo 10de2712dd [Dashboard] Remove useClaimNFT; use erc1155/claimTo (#4102)
The component in this PR is meant for Edition Drop only

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update the `ClaimTab` component to support ERC1155 contracts and improve transaction handling.

### Detailed summary
- Renamed `ClaimTab` component to `ClaimTabERC1155`.
- Updated `ClaimTabERC1155` to work with ERC1155 contracts.
- Improved transaction handling in `ClaimTabERC1155`.
- Removed unnecessary imports and updated dependencies.

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

<!-- end pr-codex -->
2024-08-15 00:59:13 +00:00
kien-ngo be344ac8c4 [Dashboard] Migration Royalties to v5 (#4051)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the `SettingsRoyalties` component to use new contract and royalty information and improves error handling during royalty settings updates.

### Detailed summary
- Updated `SettingsRoyalties` component to use new contract and royalty information
- Improved error handling during royalty settings updates
- Replaced `thirdweb` imports with `sonner` and `thirdweb/react`
- Refactored default royalty info handling and transaction mutation logic

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

<!-- end pr-codex -->
2024-08-15 00:26:39 +00:00
kien-ngo 874ef7af4e [Dashboard] Hide ERC721 Claim button if viewing ERC1155 Drop (#4104)
For Edition Drop we have a dedicated ClaimTabERC1155 inside each Edition's page
2024-08-14 20:10:11 +00:00
kien-ngo 52678e02a8 [Dashboard] use MediaRenderer for contract's avatar (#4095)
- [x] Contract metadata header now uses <MediaRenderer /> instead of <Image/>
This way is works with videos and it gets rid of that weird border-radius bug (see image)

<img width="324" alt="image" src="https://github.com/user-attachments/assets/a57f95c1-eb45-4e6f-8121-0d10358c7c6b">

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the `MetadataHeader` component in the custom-contract folder by replacing the `resolveScheme` function with `MediaRenderer` for image rendering.

### Detailed summary
- Replaced `resolveScheme` with `MediaRenderer` for image rendering
- Updated image rendering logic with additional props
- Removed unused imports and variables

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

<!-- end pr-codex -->
2024-08-14 14:04:07 +00:00
kien-ngo 6b7eedeecb [Dash] various small updates and fixes (#4076)
- [x] Fix clipboard value for the [copy button] inside /explorer page
- [x] Better handling for some edge cases where the contract's compilation target is a very long string
- [x] Instead of displaying "Custom" for non-thirdweb contracts, display the contract type based on the compilation target

<hr />

Before:
<img width="1241" alt="image" src="https://github.com/user-attachments/assets/397cc15f-5941-4a5c-ae11-cae5a7a7fbde">

After:
<img width="830" alt="image" src="https://github.com/user-attachments/assets/2a353e9c-04c8-4d6d-b15f-c26b7f423213">

<hr />

Before:
<img width="665" alt="image" src="https://github.com/user-attachments/assets/93465f35-d3c4-466c-b9cd-ab905c4fc6f1">

After:
<img width="667" alt="image" src="https://github.com/user-attachments/assets/24c59796-913d-42a4-95a2-2a63e6e726c3">

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to enhance how contract metadata is displayed in the dashboard.

### Detailed summary
- Improved handling of long contract names from the thirdweb endpoint
- Updated the display of contract type in the contract table
- Refactored the usage of contract metadata in different components

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

<!-- end pr-codex -->
2024-08-13 07:16:13 +00:00
kien-ngo de1bd6e903 [Dashboard] Fix contract query key (#4073)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor the `useDashboardContractMetadata` hook to use a more descriptive query key and improve code readability.

### Detailed summary
- Refactored the query key to include contract metadata details
- Improved code readability by restructuring the Promise.all block
- Updated the return object format for consistency

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

<!-- end pr-codex -->
2024-08-13 03:56:15 +00:00
kien-ngo e5a046ecdd [Dashboard] Fix missing contract metadata (#4070)
- [x] Remove duplicated formatCompilerMetadata method
- [x] Add getCompilerMetadata method to the SDK
- [x] Add a custom hook for Dashboard for fetching basic contract metadata (useDashboardContractMetadata)

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a contract utility method `getCompilerMetadata()` and update contract metadata handling in the dashboard.

### Detailed summary
- Added `getCompilerMetadata()` utility method to fetch and format compiler metadata
- Updated contract metadata handling in the dashboard components
- Added `useDashboardContractMetadata` hook for fetching contract metadata in the dashboard

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

<!-- end pr-codex -->
2024-08-13 02:07:44 +00:00
kien-ngo 237f5faf42 [Dashboard] Migrate PlatformFees to v5 (#4050)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to migrate zod schemas from SDK v4 to a new location for form validations in the dashboard.

### Detailed summary
- Migrated zod schemas for PlatformFees and Royalties from SDK v4 to `schemas.ts`
- Updated `page.tsx` and `platform-fees.tsx` to use the new zod schemas and adapt to the changes in the SDK
- Refactored form validations and platform fee settings handling in `platform-fees.tsx`

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

<!-- end pr-codex -->
2024-08-13 01:50:49 +00:00
kien-ngo db8695d0e8 [Dashboard]: Migrate major NFT features to v5 (#3998)
# High level changes
- `mint-form.tsx` is "over-abstracted" (not sure if that's the right word) - it's being used for too many different NFT features, making the code hard-to-migrate.
- solution: breaking it down to different component which makes it much easier to remove v4 code

# to test
- [x] UpdateMetadataForm
  - [x] Drop contracts
  - [x] Collection contracts
- [x] SharedMetadataForm
- [x] NFTMintForm
- [x] LazyMintForm

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces NFT extensions for ERC721 and ERC1155 contracts, adds a new `updateTokenURI` function, and updates components for NFT minting and metadata management.

### Detailed summary
- Added NFT extension with `updateTokenURI` function for ERC721 and ERC1155 contracts
- Updated components for NFT minting and metadata management

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/permissions/components/contract-permission.tsx`, `packages/thirdweb/src/extensions/erc721/write/updateTokenURI.ts`, `packages/thirdweb/src/extensions/erc1155/write/updateTokenURI.ts`, `apps/dashboard/src/contract-ui/tabs/nfts/components/shared-metadata-form.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/lazy-mint-form.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/update-metadata-form.tsx`, `apps/dashboard/src/contract-ui/tabs/nfts/components/mint-form.tsx`

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

<!-- end pr-codex -->
2024-08-13 00:27:22 +00:00
kien-ngo 141fd53759 [Dashboard/SDK] Add more Split extensions and remove Split v4 code from Dashboard (#4033)
<!-- start pr-codex -->

## PR-Codex overview
This PR adds more functionality to the `Split` contract extensions, including deploying the `Split` contract, reading recipient addresses and percentages, and testing these features.

### Detailed summary
- Added more Split contract extensions
- Updated `deploys.ts` with new exports for deploying Split contract
- Updated `split.ts` with new exports for reading recipient addresses and percentages
- Modified `page.tsx` to display contract balance using `getContract`
- Added new files for reading recipient addresses and percentages
- Updated `account-balance.tsx` to use `getContract` and `useSplitBalances`
- Added tests for getting all recipient addresses and percentages
- Added functionality to get recipient split percentage and corresponding tests

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/split/__generated__/Split/read/totalShares.ts`, `apps/dashboard/src/contract-ui/tabs/split/components/distribute-button.tsx`, `packages/thirdweb/test/src/test-contracts.ts`, `apps/dashboard/src/@3rdweb-sdk/react/hooks/useSplit.ts`, `packages/thirdweb/src/extensions/prebuilts/deploy-split.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/Split/write/initialize.ts`, `apps/dashboard/src/contract-ui/tabs/split/page.tsx`

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

<!-- end pr-codex -->
2024-08-11 22:17:38 +00:00
kien-ngo c31f25c51e Add Vote extensions (#3993)
- This will be a part of the Dashboard migration to v5
- The changes in modular extensions are probably because whoever added the extensions, was not using the latest generate script (Joaquim modified it to include erc20Value)

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds `erc20Value` functionality to various contract extensions in the `thirdweb` package.

### Detailed summary
- Added `erc20Value` functionality to multiple contract extensions in the `thirdweb` package.

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/modular/__generated__/BatchMetadataERC1155/write/uploadMetadata.ts`, `packages/thirdweb/src/extensions/modular/__generated__/RoyaltyERC721/write/setDefaultRoyaltyInfo.ts`, `packages/thirdweb/src/extensions/modular/__generated__/RoyaltyERC1155/write/setDefaultRoyaltyInfo.ts`, `packages/thirdweb/src/extensions/modular/__generated__/RoyaltyERC721/write/setRoyaltyInfoForToken.ts`, `packages/thirdweb/src/extensions/modular/__generated__/RoyaltyERC1155/write/setRoyaltyInfoForToken.ts`, `packages/thirdweb/src/extensions/modular/__generated__/DelayedRevealBatchMetadataERC721/write/reveal.ts`, `packages/thirdweb/src/extensions/modular/__generated__/MintableERC20/write/completeOwnershipHandover.ts`, `packages/thirdweb/src/extensions/modular/__generated__/ClaimableERC1155/write/setClaimConditionByTokenId.ts`, `packages/thirdweb/src/extensions/modular/__generated__/OpenEditionMetadataERC721/write/setSharedMetadata.ts`, `packages/thirdweb/src/extensions/modular/__generated__/OpenEditionMetadataERC1155/write/setSharedMetadata.ts`, `packages/thirdweb/src/extensions/modular/__generated__/DelayedRevealBatchMetadataERC721/write/uploadMetadata.ts`, `packages/thirdweb/src/extensions/vote/read/quorumNumeratorByBlockNumber.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/token.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/votingDelay.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/votingPeriod.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/COUNTING_MODE.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalIndex.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/BALLOT_TYPEHASH.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalThreshold.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/quorumDenominator.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getAllProposals.ts`, `packages/thirdweb/scripts/generate/abis/vote/Vote.json`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/state.ts`, `packages/thirdweb/src/exports/extensions/vote.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/quorum.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposals.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hasVoted.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotes.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalDeadline.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalSnapshot.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/proposalVotes.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingDelay.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVote.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/getVotesWithParams.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setVotingPeriod.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/relay.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/read/hashProposal.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/setProposalThreshold.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/updateQuorumNumerator.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/propose.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/execute.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReason.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteBySig.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParams.ts`, `packages/thirdweb/src/extensions/vote/__generated__/Vote/write/castVoteWithReasonAndParamsBySig.ts`

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

<!-- end pr-codex -->
2024-08-09 01:38:27 +00:00
kien-ngo 5367eed3b6 Split extensions (#3995)
This will be a part of the Dashboard migration to v5 (Split page)

<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds Split contract extensions for Thirdweb, enabling token-specific functions like distribute and release.

### Detailed summary
- Added new Split contract extensions for token-specific operations
- Included functions like distributeByToken, totalReleasedByToken, releasableByToken
- Updated existing functions to support tokenAddress parameter

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/split/__generated__/Split/read/totalReleased.ts`, `packages/thirdweb/src/extensions/split/__generated__/Split/read/payee.ts`, `packages/thirdweb/src/extensions/split/__generated__/Split/read/shares.ts`, `packages/thirdweb/src/extensions/split/__generated__/Split/read/released.ts`, `packages/thirdweb/src/extensions/split/__generated__/Split/read/releasable.ts`, `packages/thirdweb/src/extensions/split/__generated__/Split/write/release.ts`

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

<!-- end pr-codex -->
2024-08-09 01:23:19 +00:00
kien-ngo 1586d774df Dashboard: Migrate account-signer to v5 (#4019)
<!-- start pr-codex -->

## PR-Codex overview
The focus of this PR is to update the account permissions feature in the dashboard.

### Detailed summary
- Added `thirdwebClient` and `useV5DashboardChain` for contract handling
- Updated `AccountSigners` component to fetch admins and signers
- Refactored `AccountSigner` component for better data handling

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

<!-- end pr-codex -->
2024-08-09 01:11:51 +00:00
kien-ngo 419873a3c6 [Hotfix] ethers v5 adapter (#4014)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to make a small fix in the `ethers5.ts` adapter by replacing the `chainId` parameter with a predefined chain value.

### Detailed summary
- Replaced `chainId` with a predefined chain value in the `fromEthersContract` function in `ethers5.ts` adapter.

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

<!-- end pr-codex -->
2024-08-08 21:53:52 +00:00
kien-ngo 164dbed673 Dashboard v5 Aug 07 run (#3988)
# High-level changes
- [x] ContractMetadata section now fully on v5
- [x] Moved some code of the ClaimCondition section to v5
- [x] Removed claimCondition utils methods -> used the inner logics directly to avoid importing types from v4 packages
- [x] Forcefully hard-coded some types in v4 that are not in v5
## 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 contract metadata handling and claim condition detection.

### Detailed summary
- Updated `ContractMetadata` component to use `ThirdwebContract`
- Improved claim condition detection in various components
- Refactored claim condition form components for better functionality

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/claim-conditions/components/claim-conditions-form/phase.tsx`

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

<!-- end pr-codex -->
2024-08-08 21:08:10 +00:00
kien-ngo e3220d4a8d Dashboard v5: Remove v4 code (#3982)
High-level changes:
- [x] useAdmin migrated to v5
- [x] useAdminOrSelf migrated to v5
- [x] ERC20 mint form to v5
2024-08-07 16:12:49 +00:00
kien-ngo c05a94d985 Dashboard: Delete Marketplace v2 listing page (#3975)
- [x] Marketplace v2 is very outdated
- [x] Marketplace v3 is out for over 2 years
- [x] After the _incident_, people should be on v3 now
- [x] This also helps remove more sdk v4 code

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to refactor and clean up the contract UI listings components.

### Detailed summary
- Removed unused components from listings page
- Updated route configuration for listings
- Refactored ListingStats component
- Updated imports and dependencies

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

<!-- end pr-codex -->
2024-08-06 20:49:05 +00:00
kien-ngo 2500be36e7 Dashboard v5: Aug 05 updates (#3942)
### High level changes
- [x] Deleted `apps/dashboard/src/components/contract-tabs/code/ContractCode.tsx` - doesn't seem to be used anywhere
- [x] Uninstall v4's react-core and wallets packages
- [x] Rename some components's names to make it clear that they are for ERC20 only (`mint-form-erc20`)
- [x] `useTxNotifications` now only accepts v5 contract

### Tested areas
- [x] ERC20 mintTo button
- [x] CreateListingButton (minor change but need to test anyway)
- [x] ContractSidebar.tsx

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to update contract-related components and dependencies.

### Detailed summary
- Updated `CreateListingButton` props in different tab pages
- Added `contractV5` variable in multiple components
- Updated dependencies and removed unused ones

> The following files were skipped due to too many changes: `apps/dashboard/src/contract-ui/tabs/nfts/components/batch-lazy-mint-button.tsx`, `apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx`, `apps/dashboard/src/contract-ui/tabs/shared-components/list-button.tsx`, `apps/dashboard/src/hooks/useTxNotifications.ts`, `apps/dashboard/src/core-ui/sidebar/detail-page.tsx`, `apps/dashboard/src/contexts/error-handler.tsx`, `apps/dashboard/src/contract-ui/tabs/tokens/components/mint-form.tsx`

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

<!-- end pr-codex -->
2024-08-06 05:18:27 +00:00
kien-ngo 0ae539f384 Docs: Update locale table (#3959)
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR updates the language codes for French and Korean in the sign-in customization page.

### Detailed summary
- Updated language code for French to `fr_FR`
- Updated language code for Korean to `ko_KR`

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

<!-- end pr-codex -->
2024-08-06 03:13:25 +00:00
Kien NgoandGitHub 15df5f7cbf Update middleware.ts (#3798) 2024-07-24 15:18:34 +00:00