From 342cf9410aa041fcba265ddc3c4e41224c817ae0 Mon Sep 17 00:00:00 2001 From: Brian Doyle Date: Thu, 1 Feb 2024 12:11:10 -0500 Subject: [PATCH] Remove goerli from basecamp app (#297) --- .../base-camp/docs/arrays/arrays-exercise.md | 4 +- .../control-structures-exercise.md | 4 +- .../deployment-to-testnet-exercise.md | 4 +- .../docs/erc-20-token/erc-20-exercise.md | 4 +- .../docs/erc-721-token/erc-721-exercise.md | 4 +- .../error-triage/error-triage-exercise.md | 4 +- .../docs/imports/imports-exercise.md | 8 +-- .../docs/inheritance/inheritance-exercise.md | 4 +- .../docs/mappings/mappings-exercise.md | 4 +- .../minimal-tokens/minimal-tokens-exercise.md | 4 +- .../docs/new-keyword/new-keyword-exercise.md | 4 +- .../docs/storage/storage-exercise.md | 4 +- .../docs/structs/structs-exercise.md | 4 +- .../guides/nft-minting-frame.md | 57 +++++++++++++++++++ .../src/pages/base-camp/progress.jsx | 2 +- apps/base-docs/src/theme/Root.jsx | 4 +- 16 files changed, 75 insertions(+), 44 deletions(-) create mode 100644 apps/base-docs/docs/building-with-base/guides/nft-minting-frame.md diff --git a/apps/base-docs/base-camp/docs/arrays/arrays-exercise.md b/apps/base-docs/base-camp/docs/arrays/arrays-exercise.md index 5e7066a..eefecff 100644 --- a/apps/base-docs/base-camp/docs/arrays/arrays-exercise.md +++ b/apps/base-docs/base-camp/docs/arrays/arrays-exercise.md @@ -80,9 +80,7 @@ Add `public` functions called `resetSenders` and `resetTimestamps` that reset th [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/control-structures/control-structures-exercise.md b/apps/base-docs/base-camp/docs/control-structures/control-structures-exercise.md index 1859ed6..0948307 100644 --- a/apps/base-docs/base-camp/docs/control-structures/control-structures-exercise.md +++ b/apps/base-docs/base-camp/docs/control-structures/control-structures-exercise.md @@ -42,9 +42,7 @@ Create a function called `doNotDisturb` that accepts a `uint` called `_time`, an [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/deployment-to-testnet/deployment-to-testnet-exercise.md b/apps/base-docs/base-camp/docs/deployment-to-testnet/deployment-to-testnet-exercise.md index 5a519c4..3d489a7 100644 --- a/apps/base-docs/base-camp/docs/deployment-to-testnet/deployment-to-testnet-exercise.md +++ b/apps/base-docs/base-camp/docs/deployment-to-testnet/deployment-to-testnet-exercise.md @@ -22,9 +22,7 @@ Stay tuned for updates! [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/erc-20-token/erc-20-exercise.md b/apps/base-docs/base-camp/docs/erc-20-token/erc-20-exercise.md index 8a5ea2c..63bcd18 100644 --- a/apps/base-docs/base-camp/docs/erc-20-token/erc-20-exercise.md +++ b/apps/base-docs/base-camp/docs/erc-20-token/erc-20-exercise.md @@ -93,9 +93,7 @@ If this vote takes the total number of votes to or above the `quorum` for that v [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/erc-721-token/erc-721-exercise.md b/apps/base-docs/base-camp/docs/erc-721-token/erc-721-exercise.md index 8a60854..cfaa654 100644 --- a/apps/base-docs/base-camp/docs/erc-721-token/erc-721-exercise.md +++ b/apps/base-docs/base-camp/docs/erc-721-token/erc-721-exercise.md @@ -72,9 +72,7 @@ The contract specification contains actions that can only be performed once by a [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/error-triage/error-triage-exercise.md b/apps/base-docs/base-camp/docs/error-triage/error-triage-exercise.md index 18f4289..14dbfb7 100644 --- a/apps/base-docs/base-camp/docs/error-triage/error-triage-exercise.md +++ b/apps/base-docs/base-camp/docs/error-triage/error-triage-exercise.md @@ -82,9 +82,7 @@ contract ErrorTriageExercise { [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/imports/imports-exercise.md b/apps/base-docs/base-camp/docs/imports/imports-exercise.md index c97d316..9fe56a1 100644 --- a/apps/base-docs/base-camp/docs/imports/imports-exercise.md +++ b/apps/base-docs/base-camp/docs/imports/imports-exercise.md @@ -57,13 +57,13 @@ Remember, the compiler will automatically create a getter for `public` `struct`s ## Submit your Contract and Earn an NFT Badge! (BETA) -:::caution +:::caution #### Contract Verification Best Practices To simplify the verification of your contract on a blockchain explorer like BaseScan.org, consider these two common strategies: -1. **Flattening**: This method involves combining your main contract and all of its imported dependencies into a single file. This makes it easier for explorers to verify the code since they only have to process one file. +1. **Flattening**: This method involves combining your main contract and all of its imported dependencies into a single file. This makes it easier for explorers to verify the code since they only have to process one file. 2. **Modular Deployment**: Alternatively, you can deploy each imported contract separately and then reference them in your main contract via their deployed addresses. This approach maintains the modularity and readability of your code. Each contract is deployed and verified independently, which can facilitate easier updates and reusability. @@ -75,9 +75,7 @@ To simplify the verification of your contract on a blockchain explorer like Base [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/inheritance/inheritance-exercise.md b/apps/base-docs/base-camp/docs/inheritance/inheritance-exercise.md index 6b4bfa4..c933ac2 100644 --- a/apps/base-docs/base-camp/docs/inheritance/inheritance-exercise.md +++ b/apps/base-docs/base-camp/docs/inheritance/inheritance-exercise.md @@ -102,9 +102,7 @@ contract InheritanceSubmission { [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/mappings/mappings-exercise.md b/apps/base-docs/base-camp/docs/mappings/mappings-exercise.md index 825c124..c5109d3 100644 --- a/apps/base-docs/base-camp/docs/mappings/mappings-exercise.md +++ b/apps/base-docs/base-camp/docs/mappings/mappings-exercise.md @@ -59,9 +59,7 @@ Add a function called `resetUserFavorites` that resets `userFavorites` for the s [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/minimal-tokens/minimal-tokens-exercise.md b/apps/base-docs/base-camp/docs/minimal-tokens/minimal-tokens-exercise.md index 3d8d788..192f862 100644 --- a/apps/base-docs/base-camp/docs/minimal-tokens/minimal-tokens-exercise.md +++ b/apps/base-docs/base-camp/docs/minimal-tokens/minimal-tokens-exercise.md @@ -50,9 +50,7 @@ A failure of either of these checks should result in a revert with an `UnsafeTra [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/new-keyword/new-keyword-exercise.md b/apps/base-docs/base-camp/docs/new-keyword/new-keyword-exercise.md index 5090d04..2faacab 100644 --- a/apps/base-docs/base-camp/docs/new-keyword/new-keyword-exercise.md +++ b/apps/base-docs/base-camp/docs/new-keyword/new-keyword-exercise.md @@ -78,9 +78,7 @@ The `AddressBookFactory` contains one function, `deploy`. It creates an instance [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/storage/storage-exercise.md b/apps/base-docs/base-camp/docs/storage/storage-exercise.md index 955610b..9c35e5a 100644 --- a/apps/base-docs/base-camp/docs/storage/storage-exercise.md +++ b/apps/base-docs/base-camp/docs/storage/storage-exercise.md @@ -102,9 +102,7 @@ function debugResetShares() public { [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/base-camp/docs/structs/structs-exercise.md b/apps/base-docs/base-camp/docs/structs/structs-exercise.md index 7288fe9..d881e3a 100644 --- a/apps/base-docs/base-camp/docs/structs/structs-exercise.md +++ b/apps/base-docs/base-camp/docs/structs/structs-exercise.md @@ -63,9 +63,7 @@ Add a public function called `resetMyGarage`. It should delete the entry in `gar [Testnets](../deployment-to-testnet/test-networks) are not permanent! Base Goerli [will soon be sunset](https://base.mirror.xyz/kkz1-KFdUwl0n23PdyBRtnFewvO48_m-fZNzPMJehM4), in favor of Base Sepolia. -We recommend changing the network to **Base Sepolia**, and submitting your contracts there. While it is still supported, you can change the network to Base Goerli to see your existing NFT. - -However, as these are separate networks with separate data, your NFTs **will not** transfer over. +As these are separate networks with separate data, your NFTs **will not** transfer over. **Don't worry!** We've captured the addresses of all NFT owners on Base Goerli and will include them when we release the mechanism to transfer these NFTs to mainnet later this year! You can also redeploy on Sepolia and resubmit if you'd like! diff --git a/apps/base-docs/docs/building-with-base/guides/nft-minting-frame.md b/apps/base-docs/docs/building-with-base/guides/nft-minting-frame.md new file mode 100644 index 0000000..1ac7414 --- /dev/null +++ b/apps/base-docs/docs/building-with-base/guides/nft-minting-frame.md @@ -0,0 +1,57 @@ +--- +title: 'Minting an NFT in a Frame' +description: Make a Farcaster frame that allows users to min an NFT on your dime. +keywords: [ + Solidity, + ERC-721, + token, + NFT, + farcaster, + frames + farcaster frames, + ] +hide_table_of_contents: false +--- + +Intro + +--- + +## Objectives + +By the end of this lesson you should be able to: + +- Programmatically generate and return json metadata for ERC-721 tokens +- Deterministically construct unique svg art in a smart contract +- Generate deterministic, pseudorandom numbers + +--- + +## Prerequisites + +### ERC-721 Tokens + +This guide assumes that you are able to write, test, and deploy your own ERC-721 tokens using the Solidity programming language. If you need to learn that first, check out our content in [Base Camp] or the sections specific to [ERC-721 Tokens]! + +### Onchain App Development + +You'll need to be comfortable building onchain apps. + +--- + +## Setup + +Start by creating a project with the [Build Onchain Apps Template]. Follow the setup instructions in the README and be sure to set an environment variable for wallet connect. + +--- + +## Conclusion + +In this tutorial, + +--- + +[Base Camp]: https://base.org.camp +[ERC-721 Tokens]: https://docs.base.org/base-camp/docs/erc-721-token/erc-721-standard-video +[testnet version of Opensea]: https://testnets.opensea.io/ +[Build Onchain Apps Template]: https://github.com/coinbase/build-onchain-apps diff --git a/apps/base-docs/src/pages/base-camp/progress.jsx b/apps/base-docs/src/pages/base-camp/progress.jsx index b137881..59179b0 100644 --- a/apps/base-docs/src/pages/base-camp/progress.jsx +++ b/apps/base-docs/src/pages/base-camp/progress.jsx @@ -1,4 +1,4 @@ -// eslint-disable-next-line import/no-unresolved +import React from 'react'; import Layout from '@theme/Layout'; import StudentProgress from '../../components/StudentProgress/index'; diff --git a/apps/base-docs/src/theme/Root.jsx b/apps/base-docs/src/theme/Root.jsx index 7332e99..dd1179e 100644 --- a/apps/base-docs/src/theme/Root.jsx +++ b/apps/base-docs/src/theme/Root.jsx @@ -6,14 +6,14 @@ import { RainbowKitProvider, } from '@rainbow-me/rainbowkit'; import { configureChains, createConfig, WagmiConfig } from 'wagmi'; -import { baseGoerli, baseSepolia } from 'wagmi/chains'; +import { baseSepolia } from 'wagmi/chains'; import { jsonRpcProvider } from 'wagmi/providers/jsonRpc'; import { Provider as CookieManagerProvider, Region } from '@coinbase/cookie-manager'; import { cookieManagerConfig } from '../utils/cookieManagerConfig'; import { CookieBanner } from '@coinbase/cookie-banner'; export const { chains, publicClient } = configureChains( - [baseGoerli, baseSepolia], + [baseSepolia], [ jsonRpcProvider({ rpc: (chain) => ({ http: chain.rpcUrls.default.http[0] }),