Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecated mumbai, updated to amoy #49

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
> [!Important]
> This repository is referencing the `mumbai` chain.
> This repository is using the `Polygon Amoy Testnet` chain.
>
> `Mumbai` [is deprecated since 08/04/2024](https://blog.thirdweb.com/deprecation-of-mumbai-testnet/), meaning the code in this repository will no longer work out of the box.
> Previously, this repository referenced the `Mumbai` testnet which [was deprecated since 08/04/2024](https://blog.thirdweb.com/deprecation-of-mumbai-testnet/).
>
> You can still use this repository, however you will have to switch any references to `mumbai` to another chain.
> The code has been updated to use the Polygon Amoy Testnet (Chain ID: 80002) instead.

# ERC721 Drop Claim Page

Expand Down Expand Up @@ -60,6 +60,24 @@ export const chainConst = Sepolia;

If your chain is not included in the `@thirdweb-dev/chains` package, you can provide the chain information yourself by creating an object as mentioned [here](https://portal.thirdweb.com/react/react.thirdwebprovider#custom-evm-chains)

#### Example for Polygon Amoy Testnet

```ts
export const chainConst = {
chainId: 80002,
rpc: ["https://80002.rpc.thirdweb.com"],
nativeCurrency: {
name: "MATIC",
symbol: "MATIC",
decimals: 18,
},
shortName: "amoy",
slug: "polygon-amoy",
testnet: true,
chain: "Polygon",
name: "Polygon Amoy Testnet",
};
```

### 3. Customize the Styling

Expand Down
15 changes: 14 additions & 1 deletion src/consts/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,20 @@ export const contractConst = "0x436492DBc2E30E56FaC8F2297BD1964833c0687d";

// The name of the chain your contract is deployed to.
// Refer to README.md on how to specify the chain name.
export const chainConst = "mumbai";
export const chainConst = {
chainId: 80002,
rpc: ["https://80002.rpc.thirdweb.com"],
nativeCurrency: {
name: "MATIC",
symbol: "MATIC",
decimals: 18,
},
shortName: "amoy",
slug: "polygon-amoy",
testnet: true,
chain: "Polygon",
name: "Polygon Amoy Testnet",
};

// It is IMPORTANT to provide your own API key to use the thirdweb SDK and infrastructure.
// Please ensure that you define the correct domain for your API key from the API settings page.
Expand Down