diff --git a/README.md b/README.md index 61d60a1fbe2..aa06b1f34cb 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Base is a secure, low-cost, developer-friendly Ethereum L2 built to bring the ne ## Setup -1. Ensure `nvm` is [installed](https://github.com/nvm-sh/nvm#install--update-script). +1. Ensure that `nvm` is [installed](https://github.com/nvm-sh/nvm#install--update-script). 2. Clone the repository. 3. If `nvm` doesn't auto-load the Node.js environment when changing to the repo directory, run `nvm use`. 4. Enable Yarn by running `corepack enable`. @@ -71,7 +71,7 @@ yarn workspace @app/bridge dev ## Contributing -We welcome contributions to Base! To contribute, please see [CONTRIBUTING.md](CONTRIBUTING.md). +We welcome contributions to Base! For guidelines on how to contribute please refer to [CONTRIBUTING.md](CONTRIBUTING.md). ### Updating the Base Ecosystem Page @@ -81,7 +81,7 @@ If you're a builder who wants to add or update your project on the [Base Ecosyst 2. Create a new branch for your changes. -3. Update the `web/apps/web/src/data/ecosystem.json` with your project information. All fields are required. Each entry should follow this format: +3. Update the `web/apps/web/src/data/ecosystem.json` with your project information. All fields are required. Each entry should follow the format below: ```json { @@ -120,7 +120,7 @@ By opening a PR to add your project, you authorize and license Coinbase on a non - App has been live on Base for at least 30 days - App has a Terms of Service and Privacy Policy - App supports HTTPS and 301 redirects HTTP requests -- App is not a TGE, ICO, airdrop, claim, or similar +- App is not a TGE (Token Generation Event), ICO (Initial Coin Offering), airdrop, claim, or similar - Landing page is a Base-specific page for users who will becoming from base.org - Active development and community engagement can be observed without issue diff --git a/apps/base-docs/base-learn/docs/arrays/arrays-exercise.md b/apps/base-docs/base-learn/docs/arrays/arrays-exercise.md index eefecff9385..dbb3e6016a0 100644 --- a/apps/base-docs/base-learn/docs/arrays/arrays-exercise.md +++ b/apps/base-docs/base-learn/docs/arrays/arrays-exercise.md @@ -50,7 +50,7 @@ Write a function called `appendToNumbers` that takes a `uint[] calldata` array c At the contract level, add an `address` array called `senders` and a `uint` array called `timestamps`. -Write a function called `saveTimestamp` that takes a `uint` called `_unixTimestamp` as an argument. When called, it should add the address of the caller to the end of `senders` and the `_unixTimeStamp` to `timestamps`. +Write a function called `saveTimestamp` that takes a `uint` called `_unixTimestamp` as an argument. When called, it should add the address of the caller to the end of `senders` and the `_unixTimestamp` to `timestamps`. :::tip diff --git a/apps/base-docs/base-learn/docs/imports/imports-sbs.md b/apps/base-docs/base-learn/docs/imports/imports-sbs.md index 94440622397..83e5aba2298 100644 --- a/apps/base-docs/base-learn/docs/imports/imports-sbs.md +++ b/apps/base-docs/base-learn/docs/imports/imports-sbs.md @@ -31,7 +31,7 @@ Find the documentation for the `EnumerableSet` under _Utils_. This library will Create a new file to work in and add the `pragma` and license identifier. -In Remix, you can import libraries directly from Github! +In Remix, you can import libraries directly from GitHub! ```solidity import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/structs/EnumerableSet.sol"; diff --git a/apps/base-docs/base-learn/docs/storage/simple-storage-sbs.md b/apps/base-docs/base-learn/docs/storage/simple-storage-sbs.md index 82605b02cd6..bea6deeba4c 100644 --- a/apps/base-docs/base-learn/docs/storage/simple-storage-sbs.md +++ b/apps/base-docs/base-learn/docs/storage/simple-storage-sbs.md @@ -149,7 +149,7 @@ Review the **Warning** in the [layout] section of the docs for more details! ### Add a Function to Update `age` -It would also be good to be able to update the `age` value. This problem has slightly different considerations. Sadly, `age` will never go down. It should also probably only go up by one year for each update. The `++` operator works in Solidity, so we can use that to create a function that simple increments age when called. +It would also be good to be able to update the `age` value. This problem has slightly different considerations. Sadly, `age` will never go down. It should also probably only go up by one year for each update. The `++` operator works in Solidity, so we can use that to create a function that simply increments age when called.
diff --git a/apps/base-docs/tutorials/docs/0_deploy-with-hardhat.md b/apps/base-docs/tutorials/docs/0_deploy-with-hardhat.md index ffb994f2c98..9cbf8f4ddf1 100644 --- a/apps/base-docs/tutorials/docs/0_deploy-with-hardhat.md +++ b/apps/base-docs/tutorials/docs/0_deploy-with-hardhat.md @@ -291,7 +291,7 @@ etherscan: { :::info -When verifying a contract with Basescan on testnet (Sepolia), an API key is not required. You can leave the value as `PLACEHOLDER_STRING`. On mainnet, you can get your Basescan API key from [here](https://basescan.org/myapikey) after you sign up for an account. +You can get your Basescan API key from [basescan.org](https://basescan.org/myapikey) when you sign up for an account. ::: diff --git a/apps/base-docs/tutorials/docs/0_deploy-with-tenderly.md b/apps/base-docs/tutorials/docs/0_deploy-with-tenderly.md index c45d2580519..69fc704dcfb 100644 --- a/apps/base-docs/tutorials/docs/0_deploy-with-tenderly.md +++ b/apps/base-docs/tutorials/docs/0_deploy-with-tenderly.md @@ -417,4 +417,4 @@ For more information on the Tenderly full-stack infrastructure, check out the fo - [Documentation](https://docs.tenderly.co/) - [Blog](https://blog.tenderly.co/) -- [Twitter](https://twitter.com/TenderlyApp) +- [Twitter](https://x.com/TenderlyApp) diff --git a/apps/base-docs/tutorials/docs/2_email-campaign-with-resend.md b/apps/base-docs/tutorials/docs/2_email-campaign-with-resend.md index 47d0866ec3c..f4c0a6f23a8 100644 --- a/apps/base-docs/tutorials/docs/2_email-campaign-with-resend.md +++ b/apps/base-docs/tutorials/docs/2_email-campaign-with-resend.md @@ -288,7 +288,7 @@ export const EmailTemplate: React.FC> = ({ firstNam ); ``` -In `src/app/page.tsx` add the following section to display wether the user is a member or not: +In `src/app/page.tsx` add the following section to display whether the user is a member or not: ```html
{code && (
- Claim your free creator basename — See you{' '} - Friday at Botanica + Claim your free basename — Thanks for joining us!
)} diff --git a/apps/web/src/components/Basenames/RegistrationSearchInput/index.tsx b/apps/web/src/components/Basenames/RegistrationSearchInput/index.tsx index 70bf4844c1e..9332d2f122f 100644 --- a/apps/web/src/components/Basenames/RegistrationSearchInput/index.tsx +++ b/apps/web/src/components/Basenames/RegistrationSearchInput/index.tsx @@ -33,7 +33,7 @@ function SuggestionEntry({ }, [handleSelectName, suggestion]); return ( - @@ -217,8 +217,8 @@ export default function RegistrationSearchInput({ const handleSelectName = useCallback( (name: string) => { - setDropdownOpen(false); setSelectedName(name.trim()); + setDropdownOpen(false); }, [setSelectedName], ); @@ -298,7 +298,7 @@ export default function RegistrationSearchInput({ ) : isNameAvailable === true ? ( <> - diff --git a/apps/web/src/components/Basenames/RegistrationSuccessMessage/USDCClaimModal.tsx b/apps/web/src/components/Basenames/RegistrationSuccessMessage/USDCClaimModal.tsx new file mode 100644 index 00000000000..3ec6a9082be --- /dev/null +++ b/apps/web/src/components/Basenames/RegistrationSuccessMessage/USDCClaimModal.tsx @@ -0,0 +1,42 @@ +import classNames from 'classnames'; +import { Button, ButtonVariants } from 'apps/web/src/components/Button/Button'; + +type USDCClaimModalProps = { + message: string; + onClose: () => void; +}; + +function handleButtonClick() { + window.open('https://www.coinbase.com/usdc', '_blank', 'noopener noreferrer'); +} + +function USDCClaimModal({ message, onClose }: USDCClaimModalProps) { + const popupClasses = classNames( + 'fixed top-0 left-0 w-full h-full flex items-center justify-center', + ); + + return ( +
+
+ +

{message}

+ +
+
+ ); +} + +export default USDCClaimModal; diff --git a/apps/web/src/components/Basenames/RegistrationSuccessMessage/index.tsx b/apps/web/src/components/Basenames/RegistrationSuccessMessage/index.tsx index ce8e0301813..8280961bdfd 100644 --- a/apps/web/src/components/Basenames/RegistrationSuccessMessage/index.tsx +++ b/apps/web/src/components/Basenames/RegistrationSuccessMessage/index.tsx @@ -5,13 +5,40 @@ import { } from 'apps/web/src/components/Basenames/RegistrationContext'; import { Button, ButtonVariants } from 'apps/web/src/components/Button/Button'; import { ActionType } from 'libs/base-ui/utils/logEvent'; -import { useCallback } from 'react'; +import { useCallback, useState } from 'react'; +import { useAccount } from 'wagmi'; +import USDCClaimModal from './USDCClaimModal'; export default function RegistrationSuccessMessage() { - const { setRegistrationStep, redirectToProfile } = useRegistration(); + const { setRegistrationStep, redirectToProfile, code } = useRegistration(); + + const { address } = useAccount(); const { logEventWithContext } = useAnalytics(); + const [popupMessage, setPopupMessage] = useState(null); + + const claimUSDC = useCallback(() => { + setPopupMessage('USDC is being sent to your wallet'); + fetch(`${process.env.NEXT_PUBLIC_USDC_URL}?address=${address}`, { + method: 'GET', + headers: { 'Content-Type': 'application/json' }, + }) + .then(async (response) => { + if (!response.ok) { + const resp = (await response.json()) as { error: string }; + throw new Error(resp.error); + } + setPopupMessage('USDC claimed successfully!'); + }) + .catch((error) => { + setPopupMessage(`${error.message}`); + console.error('Error:', error); + }); + }, [address]); + + const closePopup = useCallback(() => setPopupMessage(null), []); + const customizeProfileOnClick = useCallback(() => { logEventWithContext('customize_profile', ActionType.click); setRegistrationStep(RegistrationSteps.Profile); @@ -23,19 +50,28 @@ export default function RegistrationSuccessMessage() { }, [logEventWithContext, redirectToProfile]); return ( -
-

- Congrats! -
This name is yours! -

-
- - + <> + {popupMessage && } +
+

+ Congrats! +
This name is yours! +

+
+ {code ? ( + + ) : ( + + )} + +
-
+ ); } diff --git a/apps/web/src/components/GetStarted/GetInvolved.tsx b/apps/web/src/components/GetStarted/GetInvolved.tsx index b7e0e1d12e0..e57c115c569 100644 --- a/apps/web/src/components/GetStarted/GetInvolved.tsx +++ b/apps/web/src/components/GetStarted/GetInvolved.tsx @@ -21,13 +21,21 @@ export default async function GetInvolved() { topRight={} classnames="bg-teal-80 border-teal-80" /> + 04} + topRight={} + classnames="bg-teal-60 border-teal-60" + /> 02} topRight={} - classnames="bg-teal-60 border-teal-60" + classnames="bg-teal-80 border-teal-80" /> 03} topRight={} - classnames="bg-teal-80 border-teal-80" + classnames="bg-teal-60 border-teal-60" />
diff --git a/apps/web/src/components/base-org/root/SlidingTextSection/index.tsx b/apps/web/src/components/base-org/root/SlidingTextSection/index.tsx index 7cf9f7720a3..bd2f1f12eca 100644 --- a/apps/web/src/components/base-org/root/SlidingTextSection/index.tsx +++ b/apps/web/src/components/base-org/root/SlidingTextSection/index.tsx @@ -8,7 +8,7 @@ import { CSSProperties, useRef } from 'react'; export default function SlidingTextSection() { const containerRef = useRef(null); - const text = ' Base is for everyone - بایس للجمیع - Base es para todos - 基地适合所有人 - La Base è per tutti - Base est pour tout le monde - Base ni ya kila mtu - Base yɛ ma obiara - Base nye amesiame tɔ - Base ji he ni mɔ fɛɛ mɔ yɔɔ - Base är för alla - Base สำหรับทุกคน - '; + const text = ' Base is for everyone - بایس للجمیع - Base es para todos - 基地适合所有人 - La Base è per tutti - Base est pour tout le monde - Base ni ya kila mtu - Base yɛ ma obiara - Base nye amesiame tɔ - Base ji he ni mɔ fɛɛ mɔ yɔɔ - Base är för alla - Base สำหรับทุกคน - Бейз для каждого - Бейз для кожного - '; const containerClasses = classNames( 'relative w-full overflow-hidden rounded-2xl bg-blue p-8', diff --git a/apps/web/src/data/ecosystem.json b/apps/web/src/data/ecosystem.json index 2c7f294ab2f..39744688baa 100644 --- a/apps/web/src/data/ecosystem.json +++ b/apps/web/src/data/ecosystem.json @@ -1032,8 +1032,8 @@ }, { "name": "Alien Base", - "url": "https://app.alienbase.xyz/", - "description": "Alien Base is the Base-native decentralized exchange ecosystem. Use it to trade blue chip assets and derivatives, or check out Area 51 to play with experimental tokens, predictions and lotteries", + "url": "https://alienbase.xyz/", + "description": "Alien Base is building a Base trading hub for efficiently trading tokens and memecoins onchain. Offering aggregated liquidity, limit orders, yield farming and more, Alien technology helps you use Base.", "category": "defi", "subcategory": "dex", "imageUrl": "/images/partners/alienbase.webp" @@ -3645,5 +3645,13 @@ "description": "BlockAI combines blockchain and AI to offer decentralized access to innovative tools like Text and image generation, video summarization, games, etc.", "url": "https://base.blockai.dev", "imageUrl": "/images/partners/blockai.png" + }, + { + "name": "Turnkey", + "category": "infra", + "subcategory": "developer tool", + "description": "Turnkey is an enterprise-grade operating system for wallets: powerful, modular, and built to adapt to any use case from embedded wallets to programmatic backend crypto automation.", + "url": "https://www.turnkey.com/", + "imageUrl": "/images/partners/turnkey.png" } ] diff --git a/apps/web/src/hooks/useWriteContractsWithLogs.ts b/apps/web/src/hooks/useWriteContractsWithLogs.ts index 9f187782c2b..ee0751e7b33 100644 --- a/apps/web/src/hooks/useWriteContractsWithLogs.ts +++ b/apps/web/src/hooks/useWriteContractsWithLogs.ts @@ -150,7 +150,7 @@ export default function useWriteContractsWithLogs({ return; } - // Onchain TransactionReceipt Successfull with logs + // Onchain TransactionReceipt Successful with logs if (transactionReceipt?.status === 'success' && sendCallsResult?.receipts?.length) { const logs = transactionReceipt.logs; const decodedUserOperationEventLog = logs