From 80c4c8ad150f3271415fa719702a921c0f065209 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 8 Jul 2025 07:52:27 +0000 Subject: [PATCH 1/2] Remove deprecated deployPackContract documentation and references Co-authored-by: samina --- apps/portal/public/llms-full.txt | 53 -------------------------------- apps/portal/public/llms.txt | 2 +- apps/portal/redirects.mjs | 2 ++ 3 files changed, 3 insertions(+), 54 deletions(-) diff --git a/apps/portal/public/llms-full.txt b/apps/portal/public/llms-full.txt index aa114f28cbe..81f0029746a 100644 --- a/apps/portal/public/llms-full.txt +++ b/apps/portal/public/llms-full.txt @@ -5533,60 +5533,7 @@ let returnType: Promise; The deployed contract address. --- -## DEPLOY.deployPackContract -Deprecated - -\[Pack contract is incompatible with Pectra update. Support for this contract is being removed in next release.\] - -Deploy a thirdweb Pack contract - -### Example - -```ts -import { deployPackContract } from "thirdweb/extensions/deploy"; - -const packAddress = await deployPackContract({ - account, - client, - chain, - params: { - name: "Pack contract name", - symbol: "PACK1155", - }, -}); -``` - -```ts -function deployPackContract(options: { - account: Account; - chain: Readonly; - client: ThirdwebClient; - params: PackContractParams; -}): Promise; -``` - -### Parameters - -params for deploying [Pack contract](https://thirdweb.com/thirdweb.eth/Pack) - -#### Type - -```ts -let options: { - account: Account; - chain: Readonly; - client: ThirdwebClient; - params: PackContractParams; -}; -``` - -### Returns - -```ts -let returnType: Promise; -``` ---- ## DEPLOY.deployPublishedContract diff --git a/apps/portal/public/llms.txt b/apps/portal/public/llms.txt index d3d9f8a942f..bbded6d57a7 100644 --- a/apps/portal/public/llms.txt +++ b/apps/portal/public/llms.txt @@ -135,7 +135,7 @@ * [DEPLOY.deployERC1155Contract](https://portal.thirdweb.com/references/typescript/v5/deploy/deployERC1155Contract): Deploys an thirdweb ERC1155 contract of the given type. On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well. * [DEPLOY.deployERC20Contract](https://portal.thirdweb.com/references/typescript/v5/deploy/deployERC20Contract): Deploys an thirdweb ERC20 contract of the given type. On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well. * [DEPLOY.deployERC721Contract](https://portal.thirdweb.com/references/typescript/v5/deploy/deployERC721Contract): Deploys an thirdweb ERC721 contract of the given type. On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well. -* [DEPLOY.deployPackContract](https://portal.thirdweb.com/references/typescript/v5/deploy/deployPackContract): \[Pack contract is incompatible with Pectra update. Support for this contract is being removed in next release.\] + * [DEPLOY.deployPublishedContract](https://portal.thirdweb.com/references/typescript/v5/deploy/deployPublishedContract): Deploy an instance of a published contract on a given chain * [DEPLOY.deploySplitContract](https://portal.thirdweb.com/references/typescript/v5/deploy/deploySplitContract): Deploys a thirdweb [Split contract](https://thirdweb.com/thirdweb.eth/Split)On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well. * [DEPLOY.prepareDeterministicDeployTransaction](https://portal.thirdweb.com/references/typescript/v5/deploy/prepareDeterministicDeployTransaction): Deploy a contract deterministically - will maintain the same address across chains. This is meant to be used with published contracts configured with the 'direct deploy' method. Under the hood, this uses a keyless transaction with a common create2 factory. diff --git a/apps/portal/redirects.mjs b/apps/portal/redirects.mjs index 5c4d2c6a9b4..ed27897ebfb 100644 --- a/apps/portal/redirects.mjs +++ b/apps/portal/redirects.mjs @@ -369,6 +369,8 @@ const typescriptRedirects = { "/typescript/sdk.thirdwebsdk.fromwallet": "/references/typescript/v4/ThirdwebSDK#fromWallet", "/typescript/sdk.thirdwebsdk.smartcontract": "/typescript/v4/extensions", + // v5 deploy redirects + "/references/typescript/v5/deploy/deployPackContract": "/contracts", }; const reactNativeRedirects = { From 1641187b805f04d3ed6323c70c0583439c3223e7 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 8 Jul 2025 08:03:45 +0000 Subject: [PATCH 2/2] Remove pack contract documentation and update redirects Co-authored-by: samina --- apps/portal/redirects.mjs | 6 +- .../explore/pre-built-contracts/pack/page.mdx | 56 ------------------- apps/portal/src/app/contracts/faq/page.mdx | 23 ++++++++ apps/portal/src/app/contracts/sidebar.tsx | 8 +-- 4 files changed, 31 insertions(+), 62 deletions(-) delete mode 100644 apps/portal/src/app/contracts/explore/pre-built-contracts/pack/page.mdx create mode 100644 apps/portal/src/app/contracts/faq/page.mdx diff --git a/apps/portal/redirects.mjs b/apps/portal/redirects.mjs index ed27897ebfb..be3d0064344 100644 --- a/apps/portal/redirects.mjs +++ b/apps/portal/redirects.mjs @@ -805,7 +805,7 @@ const contractRedirects = { "/contracts/explore/pre-built-contracts/nft-drop", "/pre-built-contracts/open-edition-erc721": "/contracts/explore/pre-built-contracts/open-edition", - "/pre-built-contracts/pack": "/contracts/explore/pre-built-contracts/pack", + "/pre-built-contracts/pack": "/contracts", "/pre-built-contracts/signature-drop": "/contracts", "/pre-built-contracts/split": "/contracts/explore/pre-built-contracts/split", "/pre-built-contracts/stake-erc20": @@ -818,6 +818,8 @@ const contractRedirects = { "/pre-built-contracts/token-drop": "/contracts/explore/pre-built-contracts/token-drop", "/pre-built-contracts/vote": "/contracts/explore/pre-built-contracts/vote", + // pack contract deprecation redirect + "/contracts/explore/pre-built-contracts/pack": "/contracts", //publish "/publish": "/contracts/publish/overview", "/publish/deployment-options": "/contracts/publish/publish-options", @@ -942,7 +944,7 @@ const otherRedirects = { // solidity sdk "/contracts/nft-drop": "/contracts/explore/pre-built-contracts/nft-drop", "/contracts/nfts-and-tokens": "/contracts", - "/contracts/pack": "/contracts/explore/pre-built-contracts/pack", + "/contracts/pack": "/contracts", "/contracts/split": "/contracts/explore/pre-built-contracts/split", "/contracts/token": "/contracts/explore/pre-built-contracts/token", "/contracts/token-drop": "/contracts/explore/pre-built-contracts/token-drop", diff --git a/apps/portal/src/app/contracts/explore/pre-built-contracts/pack/page.mdx b/apps/portal/src/app/contracts/explore/pre-built-contracts/pack/page.mdx deleted file mode 100644 index 3dc80de208e..00000000000 --- a/apps/portal/src/app/contracts/explore/pre-built-contracts/pack/page.mdx +++ /dev/null @@ -1,56 +0,0 @@ -import { createMetadata } from "@doc"; - -export const metadata = createMetadata({ - image: { - title: "Pack contract", - icon: "contract", - }, - title: "Pack contract | thirdweb", - description: `The packs are ERC1155 NFTs themselves, which can have the metadata you'd expect of an NFT, such as a name, image, description, etc.`, -}); - -# Pack - -The packs are ERC1155 NFTs themselves, which can have the metadata you'd expect of an NFT, -such as a name, image, description, etc. - -When a pack is opened, a pre-defined quantity of tokens are randomly selected from the ones -that were used to create the packs _(that haven't already been selected)_, and awarded to the opener. -The pack NFT is burned as it's opened. - -You can configure how many tokens get selected for the pack: - -- How many tokens are in each "unit" (for ERC20 & ERC1155 tokens - one unit could be multiple tokens). -- How many units are in each pack. - -> **IMPORTANT**: _Pack functions, such as opening of packs, can be costly in terms of gas usage due to random selection of rewards. Please check your gas estimates/usage, and do a trial on testnets before any mainnet deployment._ - -## Use Cases & Examples - -You could use the Pack contract to: - -- Create randomized NFT loot boxes -- Run a randomized raffle where some users open a winning ticket -- Reward your community with token gift boxes - -## Smart Contract Design - -For a detailed exploration of how the pack smart contract works, why it was built, -and it's limitations, visit our [Pack Design Doc](/contracts/design-docs/pack)! - -## Creating & Configuring the Pack - -Learn how to create and configure your smart contract using the [dashboard](https://thirdweb.com/team). - -### Creating a Pack Contract - -Deploy the pack contract to any of our -[supported networks](https://blog.thirdweb.com/guides/which-network-should-you-use) using the button below. - -### Contract Metadata - -To configure the image, name, and description of the contract, click the **Settings** tab: - -### Royalty & Platform Fees - -From the **Settings** tab, you also configure the royalty fee. diff --git a/apps/portal/src/app/contracts/faq/page.mdx b/apps/portal/src/app/contracts/faq/page.mdx new file mode 100644 index 00000000000..6826ebfa152 --- /dev/null +++ b/apps/portal/src/app/contracts/faq/page.mdx @@ -0,0 +1,23 @@ +import { createMetadata, Details } from "@doc"; + +export const metadata = createMetadata({ + title: "Contracts FAQs", + description: "Frequently asked questions about thirdweb contracts", + image: { + title: "Contracts FAQs", + icon: "contract", + }, +}); + +# Contracts FAQs + +
+Pack contracts were officially deprecated after the Pectra release from Ethereum. The pack contract implementation is incompatible with the Pectra update, which introduced breaking changes to the Ethereum protocol. As a result, support for pack contracts has been removed from thirdweb's deployment tools to ensure compatibility and security. + +If you need similar functionality, consider using: +- **Edition Drop contracts** for distributing multiple quantities of NFTs +- **Marketplace contracts** for trading and bundle functionality +- **Custom smart contracts** built with our modular contract framework + +For existing pack contracts, they will continue to function on-chain, but new deployments are no longer supported. +
\ No newline at end of file diff --git a/apps/portal/src/app/contracts/sidebar.tsx b/apps/portal/src/app/contracts/sidebar.tsx index 813784c7140..7260084cbd7 100644 --- a/apps/portal/src/app/contracts/sidebar.tsx +++ b/apps/portal/src/app/contracts/sidebar.tsx @@ -212,10 +212,6 @@ export const sidebar: SideBar = { href: `${prebuiltSlug}/multiwrap`, name: "Multiwrap", }, - { - href: `${prebuiltSlug}/pack`, - name: "Pack", - }, { href: `${prebuiltSlug}/split`, name: "Split", @@ -810,6 +806,10 @@ export const sidebar: SideBar = { { isCollapsible: false, links: [ + { + href: "/contracts/faq", + name: "FAQs", + }, { links: [ {