Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
modified all mumbai references to be generic (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
saminacodes authored Apr 15, 2024
1 parent 112b817 commit d09caca
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 38 deletions.
6 changes: 3 additions & 3 deletions src/app/account/api-keys/use/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ import os
secret_key = os.environ['SECRET_KEY']
private_key = os.environ['PRIVATE_KEY']

sdk = ThirdwebSDK.from_private_key(private_key, "mumbai", SDKOptions(secret_key=secret_key))
sdk = ThirdwebSDK.from_private_key(private_key, "<chain_id>", SDKOptions(secret_key=secret_key))
```

</TabsContent>
Expand All @@ -113,9 +113,9 @@ func main() {
secretKey := "..."

// Creates a new SDK instance to get read-only data for your contracts, you can pass:
// - a chain name (mainnet, rinkeby, goerli, polygon, mumbai, avalanche, fantom)
// - a chain name (mainnet, rinkeby, goerli, polygon, avalanche, fantom)
// - a custom RPC URL
sdk, err := thirdweb.NewThirdwebSDK("mumbai", &thirdweb.SDKOptions{
sdk, err := thirdweb.NewThirdwebSDK("<chain_id>", &thirdweb.SDKOptions{
SecretKey: secretKey,
})
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ With a thirdweb API key, you get access to bundler and paymaster infrastructure
| Chain | Mainnet | Testnet |
| ----------------- | ------- | -------------------- |
| Ethereum || ✅ (goerli, sepolia) |
| Polygon || ✅ (mumbai, amoy) |
| Polygon || ✅ (amoy) |
| Arbitrum (one, nova) || ✅ (goerli, sepolia) |
| Optimism |||
| Gnosis |||
Expand Down
8 changes: 3 additions & 5 deletions src/app/engine/guides/airdrop-nfts/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export const metadata = createMetadata({

Engine makes it effortless for any developer to airdrop NFTs at scale. You sponsor the gas so your users only need a wallet address!

> This guide references Polygon Mumbai testnet and NextJS but is applicable for any EVM chain and full-stack framework.
<DocImage
src={OverviewImage}
alt="Airdrop overview"
Expand All @@ -27,7 +25,7 @@ Engine makes it effortless for any developer to airdrop NFTs at scale. You spons
## Prerequisites

- An Engine instance
- A [backend wallet](/engine/features/backend-wallets) with [MATIC on Mumbai](https://mumbaifaucet.com/)
- A [backend wallet](/engine/features/backend-wallets) with currency to pay for gas
- A deployed NFT contract that can be claimed by the backend wallet
- A client ID and secret key from the [API Keys page](https://thirdweb.com/dashboard/settings/api-keys)

Expand Down Expand Up @@ -58,7 +56,7 @@ function ClaimPage() {

function Example() {
return (
<ThirdwebProvider activeChain="mumbai" clientId="<thirdweb_client_id>">
<ThirdwebProvider activeChain="<chain_id>" clientId="<thirdweb_client_id>">
<ClaimPage />
</ThirdwebProvider>
);
Expand All @@ -76,7 +74,7 @@ export async function POST(request: Request) {
const { userWalletAddress } = await request.json();

await fetch(
"<engine_url>/contract/mumbai/<nft_contract_address>/erc1155/mint-to",
"<engine_url>/contract/<chain_id>/<nft_contract_address>/erc1155/mint-to",
{
method: "POST",
headers: {
Expand Down
8 changes: 3 additions & 5 deletions src/app/engine/guides/nft-checkout/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ This guide uses thirdweb Engine to sell NFTs with credit card:

The buyer receives the NFT without requiring wallet signatures or gas funds.

> This guide references Polygon Mumbai testnet and NextJS but is applicable for any EVM chain and full-stack framework.
<DocImage src={OverviewImage} alt="NFT checkout overview" />

## Prerequisites

- A thirdweb client ID and secret key from the [API Keys page](https://thirdweb.com/dashboard/settings/api-keys)
- An Engine instance
- A [backend wallet](/engine/features/backend-wallets) with [MATIC on Mumbai](https://mumbaifaucet.com/)
- A [backend wallet](/engine/features/backend-wallets) with currency to pay for gas
- An [access token](/engine/features/authentication) for your Engine instance
- A deployed NFT contract that can be claimed by the backend wallet
- A [Stripe account](https://dashboard.stripe.com/register) on test mode (no real payments will be made)
Expand All @@ -40,7 +38,7 @@ Use [`<ConnectWallet>`](/react/latest/components/ConnectWallet) to prompt the bu
```tsx
function Home() {
return (
<ThirdwebProvider activeChain="mumbai" clientId="<thirdweb_client_id>">
<ThirdwebProvider activeChain="<chain_id>" clientId="<thirdweb_client_id>">
<PurchasePage />
</ThirdwebProvider>
);
Expand Down Expand Up @@ -169,7 +167,7 @@ export async function POST(req: NextRequest) {
accessToken: "<engine_access_token>",
});
await engine.erc1155.mintTo(
"mumbai",
"<chain_id>",
"<nft_contract_address>",
"<backend_wallet_address>",
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/engine/references/typescript/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const engine = new Engine({

await engine.erc20.mintTo(
// chain
"mumbai",
"<chain_id>",
// contract address
"0x365b83D67D5539C6583b9c0266A548926Bf216F4",
// backend wallet address
Expand Down
1 change: 0 additions & 1 deletion src/app/payments/nft-checkout/erc20-pricing/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export const metadata = createMetadata({

Make sure your contract requests the correct USDC token address from thirdweb. These are the supported USDC token addresses.

- USDC on Mumbai: [0x0fa8781a83e46826621b3bc094ea2a0212e71b23](https://mumbai.polygonscan.com/address/0x0fa8781a83e46826621b3bc094ea2a0212e71b23)
- USDC on Polygon: [0x3c499c542cef5e3811e1192ce70d8cc03d5c3359](https://polygonscan.com/address/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359)
- USDC on Goerli: [0x07865c6E87B9F70255377e024ace6630C1Eaa37F](https://goerli.etherscan.io/address/0x07865c6E87B9F70255377e024ace6630C1Eaa37F)
- USDC on Ethereum: [0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48](https://etherscan.io/address/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48)
Expand Down
1 change: 0 additions & 1 deletion src/app/payments/nft-checkout/faq/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ Here are some faucets to receive testnet funds:

| Chain | Currency | Faucet link |
| :----------------- | :------- | :---------------------------------- |
| Mumbai (Polygon) | MATIC | `https://faucet.polygon.technology` |
| Sepolia (Ethereum) | ETH | `https://sepoliafaucet.com` |
| Goerli (Optimism) | ETH | `https://faucet.paradigm.xyz` |

Expand Down
2 changes: 1 addition & 1 deletion src/app/payments/nft-checkout/go-live-checklist/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Before you go live on mainnet, be sure to review this checklist to ensure your p
<Step title="Test your expected flow works on testnet">
Testing on mainnet is costly! Please test your contract and checkout implementation on testnet.

- For Polygon projects, please test on Mumbai.
- For Polygon projects, please test on Amoy.
- For Ethereum projects, please test on Sepolia.
- Visit the [overview page](/payments) to see a list of supported testnets.

Expand Down
4 changes: 2 additions & 2 deletions src/app/payments/nft-checkout/pre-built-contracts/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Helpful tips for each field:
| ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **When will this phase start?** | thirdweb can only mint NFTs after this date. |
| **How many NFTs will you drop in this phase?** | Remember to create NFTs on the **NFTs** tab for NFT Drop contracts. |
| **How much do you want to charge to claim each NFT?** | For Mumbai, this price must be ≤ 0.0001 MATIC. <br />For Goerli, this price must be ≤ 0.0001 ETH. <br /><br />On production, there is a $2,000 price limit. Please fill out [this Typeform](https://fw3786mcxwl.typeform.com/to/B0xIFoiu) to request an increase. |
| **What currency do you want to use?** | Supported currencies on thirdweb: <br />- Mumbai: MATIC <br />- Polygon: MATIC, USDC, WETH <br />- Goerli: ETH <br />- Ethereum: ETH, USDC |
| **How much do you want to charge to claim each NFT?** | For Goerli, this price must be ≤ 0.0001 ETH. <br /><br />On production, there is a $2,000 price limit. Please fill out [this Typeform](https://fw3786mcxwl.typeform.com/to/B0xIFoiu) to request an increase. |
| **What currency do you want to use?** | Supported currencies on thirdweb: - Polygon: MATIC, USDC, WETH <br />- Goerli: ETH <br />- Ethereum: ETH, USDC |
| **Who can claim NFTs during this phase?** | If you have an allowlist, please add thirdweb's minter wallets. <br />Otherwise leave this blank. |
| **How many NFTs can be claimed per transaction?** | This value must be Unlimited. Otherwise thirdweb's minter wallets will not be able to mint more than this amount. |
| **How many seconds do wallets have to wait in-between claiming?** | This value must be 0. Otherwise thirdweb's minter wallets will fail when many mints occur at once. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ If the chain you are looking for is not one of default supported chains, you can

```jsx
import { ThirdwebProvider } from "@thirdweb-dev/react-native";
import { Mumbai } from "@thirdweb-dev/chains";
import { <chain_id> } from "@thirdweb-dev/chains";

function App() {
return (
<ThirdwebProvider activeChain={Mumbai} clientId="your-client-id">
<ThirdwebProvider activeChain={<chain_id>} clientId="your-client-id">
<YourApp />
</ThirdwebProvider>
);
Expand All @@ -71,10 +71,10 @@ you can override any properties of a chain, such as the `rpc` field.

```jsx
import { ThirdwebProvider } from "@thirdweb-dev/react-native";
import { Mumbai } from "@thirdweb-dev/chains";
import { <chain_id> } from "@thirdweb-dev/chains";

const activeChain = {
...Mumbai,
...<chain_id>,
rpc: ["https://<your-rpc-to-use>.com"], // Override the "rpc" field.
// ... Override any other fields you want to customize.
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ If the chain you are looking for is not one of default supported chains, you can

```jsx
import { ThirdwebSDKProvider } from "@thirdweb-dev/react-native";
import { Mumbai } from "@thirdweb-dev/chains";
import { <chain_id> } from "@thirdweb-dev/chains";

function App() {
return (
<ThirdwebSDKProvider activeChain={Mumbai} clientId="your-client-id">
<ThirdwebSDKProvider activeChain={<chain_id>} clientId="your-client-id">
<YourApp />
</ThirdwebSDKProvider>
);
Expand All @@ -71,10 +71,10 @@ you can override any properties of a chain, such as the `rpc` field.

```jsx
import { ThirdwebSDKProvider } from "@thirdweb-dev/react-native";
import { Mumbai } from "@thirdweb-dev/chains";
import { <chain_id> } from "@thirdweb-dev/chains";

const activeChain = {
...Mumbai,
...<chain_id>,
rpc: ["https://<your-rpc-to-use>.com"], // Override the "rpc" field.
// ... Override any other fields you want to customize.
};
Expand Down
1 change: 0 additions & 1 deletion src/app/react-native/v0/common/defaultChains.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Details } from "@doc";
"ethereum",
"goerli",
"polygon",
"mumbai",
"arbitrum",
"arbitrum-goerli",
"optimism",
Expand Down
8 changes: 4 additions & 4 deletions src/app/react/v4/ThirdwebProvider/props/activeChain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ If the chain you are looking for is not one of default supported chains, you can

```jsx
import { ThirdwebProvider } from "@thirdweb-dev/react";
import { Mumbai } from "@thirdweb-dev/chains";
import { <chain_id> } from "@thirdweb-dev/chains";

function App() {
return (
<ThirdwebProvider activeChain={Mumbai} clientId="your-client-id">
<ThirdwebProvider activeChain={<chain_id>} clientId="your-client-id">
<YourApp />
</ThirdwebProvider>
);
Expand All @@ -71,10 +71,10 @@ you can override any properties of a chain, such as the `rpc` field.

```jsx
import { ThirdwebProvider } from "@thirdweb-dev/react";
import { Mumbai } from "@thirdweb-dev/chains";
import { <chain_id> } } from "@thirdweb-dev/chains";

const activeChain = {
...Mumbai,
...<chain_id>,
rpc: ["https://<your-rpc-to-use>.com"], // Override the "rpc" field.
// ... Override any other fields you want to customize.
};
Expand Down
8 changes: 4 additions & 4 deletions src/app/react/v4/ThirdwebSDKProvider/props/activeChain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ If the chain you are looking for is not one of default supported chains, you can

```jsx
import { ThirdwebSDKProvider } from "@thirdweb-dev/react";
import { Mumbai } from "@thirdweb-dev/chains";
import { <chain_id>} from "@thirdweb-dev/chains";

function App() {
return (
<ThirdwebSDKProvider activeChain={Mumbai} clientId="your-client-id">
<ThirdwebSDKProvider activeChain={<chain_id>} clientId="your-client-id">
<YourApp />
</ThirdwebSDKProvider>
);
Expand All @@ -71,10 +71,10 @@ you can override any properties of a chain, such as the `rpc` field.

```jsx
import { ThirdwebSDKProvider } from "@thirdweb-dev/react";
import { Mumbai } from "@thirdweb-dev/chains";
import { <chain_id> } from "@thirdweb-dev/chains";

const activeChain = {
...Mumbai,
...<chain_id>,
rpc: ["https://<your-rpc-to-use>.com"], // Override the "rpc" field.
// ... Override any other fields you want to customize.
};
Expand Down
1 change: 0 additions & 1 deletion src/app/react/v4/common/defaultChains.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Details } from "@doc";
"ethereum",
"goerli",
"polygon",
"mumbai",
"arbitrum",
"arbitrum-goerli",
"optimism",
Expand Down

0 comments on commit d09caca

Please sign in to comment.