Skip to content

Commit

Permalink
Merge branch 'master' into spendpermissions-tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
hughescoin authored Dec 20, 2024
2 parents 349ddc3 + a636ee2 commit 9e08037
Show file tree
Hide file tree
Showing 44 changed files with 125 additions and 91 deletions.
2 changes: 1 addition & 1 deletion apps/base-docs/base-learn/docs/learning-objectives.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Use the script to regenerate this file.

### [The `useAccount` Hook](./reading-and-displaying-data/useAccount.md)

- Implement the `useAccount`` hook to show the user's address, connection state, network, and balance
- Implement the `useAccount` hook to show the user's address, connection state, network, and balance
- Implement an `isMounted` hook to prevent hydration errors

### [The `useReadContract` Hook](./reading-and-displaying-data/useReadContract.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can use this for connection-status-based rendering, to enable or disable con

By the end of this guide you should be able to:

- Implement the `useAccount`` hook to show the user's address, connection state, network, and balance
- Implement the `useAccount` hook to show the user's address, connection state, network, and balance
- Implement an `isMounted` hook to prevent hydration errors

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 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 simple increments age when called.

<details>

Expand Down
6 changes: 3 additions & 3 deletions apps/base-docs/docs/building-with-base/base-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ Certain contracts are mandatory according to the [OP Stack SDK](https://stack.op
| DelayedWETHProxy (FDG) | [0x489c2E5ebe0037bDb2DC039C5770757b8E54eA1F](https://sepolia.etherscan.io/address/0x489c2E5ebe0037bDb2DC039C5770757b8E54eA1F) |
| DelayedWETHProxy (PDG) | [0x27A6128F707de3d99F89Bf09c35a4e0753E1B808](https://sepolia.etherscan.io/address/0x27A6128F707de3d99F89Bf09c35a4e0753E1B808) |
| DisputeGameFactoryProxy | [0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1](https://sepolia.etherscan.io/address/0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1) |
| FaultDisputeGame | [0x5062792ED6A85cF72a1424a1b7f39eD0f7972a4B](https://sepolia.etherscan.io/address/0x5062792ED6A85cF72a1424a1b7f39eD0f7972a4B) |
| FaultDisputeGame | [0xB7fB44a61fdE2b9DB28a84366e168b14D1a1b103](https://sepolia.etherscan.io/address/0xB7fB44a61fdE2b9DB28a84366e168b14D1a1b103) |
| L1CrossDomainMessenger | [0xC34855F4De64F1840e5686e64278da901e261f20](https://sepolia.etherscan.io/address/0xC34855F4De64F1840e5686e64278da901e261f20) |
| L1ERC721Bridge | [0x21eFD066e581FA55Ef105170Cc04d74386a09190](https://sepolia.etherscan.io/address/0x21eFD066e581FA55Ef105170Cc04d74386a09190) |
| L1StandardBridge | [0xfd0Bf71F60660E2f608ed56e1659C450eB113120](https://sepolia.etherscan.io/address/0xfd0Bf71F60660E2f608ed56e1659C450eB113120) |
| L2OutputOracle | [0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254](https://sepolia.etherscan.io/address/0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254) |
| MIPS | [0x47B0E34C1054009e696BaBAAd56165e1e994144d](https://sepolia.etherscan.io/address/0x47B0E34C1054009e696BaBAAd56165e1e994144d) |
| MIPS | [0x69470D6970Cd2A006b84B1d4d70179c892cFCE01](https://sepolia.etherscan.io/address/0x69470D6970Cd2A006b84B1d4d70179c892cFCE01) |
| OptimismMintableERC20Factory | [0xb1efB9650aD6d0CC1ed3Ac4a0B7f1D5732696D37](https://sepolia.etherscan.io/address/0xb1efB9650aD6d0CC1ed3Ac4a0B7f1D5732696D37) |
| OptimismPortal | [0x49f53e41452C74589E85cA1677426Ba426459e85](https://sepolia.etherscan.io/address/0x49f53e41452C74589E85cA1677426Ba426459e85) |
| PermissionedDisputeGame | [0x593D20C4c69485B95D11507239BE2C725ea2A6fD](https://sepolia.etherscan.io/address/0x593D20C4c69485B95D11507239BE2C725ea2A6fD) |
| PermissionedDisputeGame | [0x68f600e592799c16D1b096616eDbf1681FB9c0De](https://sepolia.etherscan.io/address/0x68f600e592799c16D1b096616eDbf1681FB9c0De) |
| PreimageOracle | [0x92240135b46fc1142dA181f550aE8f595B858854](https://sepolia.etherscan.io/address/0x92240135b46fc1142dA181f550aE8f595B858854) |
| ProxyAdmin | [0x0389E59Aa0a41E4A413Ae70f0008e76CAA34b1F3](https://sepolia.etherscan.io/address/0x0389E59Aa0a41E4A413Ae70f0008e76CAA34b1F3) |
| SystemConfig | [0xf272670eb55e895584501d564AfEB048bEd26194](https://sepolia.etherscan.io/address/0xf272670eb55e895584501d564AfEB048bEd26194) |
Expand Down
2 changes: 1 addition & 1 deletion apps/base-docs/docs/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This page lists contract addresses for onchain apps that we have deployed.

:::info

Two community projects, [BaseX](https://basex-test.vercel.app/swap?currencyA=ETH&currencyB=0x036CbD53842c5426634e7929541eC2318f3dCF7e&focus=source) and [DapDap](https://testnet.base.dapdap.net/uniswap/swap), provide testnet interfaces for Uniswap contracts if you prefer to interact in the browser instead of with the contracts directly.
If you prefer interacting through a browser instead of directly with the contracts, you can try this community project: [DapDap](https://testnet.base.dapdap.net/uniswap/swap), which provides testnet interfaces for Uniswap contracts.

:::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Decommissioning Public Geth Archive Snapshots
slug: /decomissioning-public-geth-archive-snapshots
description: Public Geth archive snapshots will be decommissioned on December 15th, 2024.
slug: /decommissioning-public-geth-archive-snapshots
description: Public Geth archive snapshots were decommissioned on December 15th, 2024.
keywords:
[
Geth,
Expand All @@ -20,18 +20,12 @@ hide_table_of_contents: true

# Decommissioning Public Geth Archive Snapshots

As part of our ongoing efforts to optimize our services, we will be deprecating the Public Geth Archive Snapshots on _December 15th, 2024_. We understand that this change may affect your operations if you rely on these snapshots for maintaining your Ethereum infrastructure. This notice aims to provide you with a potential path forward and offer solutions to ensure a smooth transition.
As part of our ongoing efforts to optimize our services, Public Geth Archive Snapshots were deprecated on _December 15th, 2024_. We understand that this change may affect your operations if you rely on these snapshots for maintaining your Ethereum infrastructure. This notice aims to provide you with a potential path forward and offer solutions to ensure a smooth transition.

## Recommended Path Forward

We recommend switching to Reth going forward. We will continue to maintain the Reth archive snapshot.

If you need continued Geth support, we would advise that you maintain your own snapshot that is specific to your infrastructure e.g. EBS on AWS.

To sync a Geth Archive node to tip:

- Download the latest Geth Archive snapshot ~30 days old
- Use a beacon endpoint with historical blob data
- Alternatively you can run your own [blob archiver](https://github.com/base-org/blob-archiver) if you don't want to rely on a third party

If you have any questions or would like assistance, please reach out to us on [Discord](https://base.org/discord) or [GitHub](https://github.com/base-org/base-node).
2 changes: 1 addition & 1 deletion apps/base-docs/docs/tools/basenames-onchainkit-tutorial.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Basenames + OnchainKit Tutorial
slug: /basenames-tutorial-with-onchainkit
description: 'A tutorial that teaches how to intergrate Basenames to your wagmi/viem App using OnchainKit'
description: 'A tutorial that teaches how to integrate Basenames to your wagmi/viem App using OnchainKit'
author: hughescoin
keywords: ['build on base', 'viem', 'wagmi', 'frontend', 'onchain app development']
tags: ['account abstraction']
Expand Down
2 changes: 1 addition & 1 deletion apps/base-docs/docs/tools/bridges-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ See the [sample code repository](https://github.com/base-org/guides/tree/main/br

:::caution

**Double check the token address for ERC-20s** You can use any ERC-20 that is
**Double-check the token address for ERC-20s** You can use any ERC-20 that is
supported on the network. You can check what assets are on Base and the
corresponding contract address via [this hub](https://github.com/ethereum-optimism/ethereum-optimism.github.io/tree/master/data).
Ensure there is an address for `base`, [example](https://github.com/ethereum-optimism/ethereum-optimism.github.io/blob/master/data/WETH/data.json#L16-L18).
Expand Down
15 changes: 11 additions & 4 deletions apps/base-docs/docs/tools/data-indexers.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,22 @@ To get started, visit the [developer documentation](https://academy.subquery.net

## The Graph

[The Graph](https://thegraph.com/) is an indexing protocol for organizing blockchain data and making it easily accessible with GraphQL.
[The Graph](https://thegraph.com/) is an indexing protocol that provides an easy way to query blockchain data through APIs known as subgraphs.

Base applications can use GraphQL to query open APIs called subgraphs, to retrieve data that is indexed on the network. With The Graph, you can build serverless applications that run entirely on public infrastructure.
With The Graph, you can benefit from:
- **Decentralized Indexing**: Enables indexing blockchain data through multiple indexers, thus eliminating any single point of failure
- **GraphQL Queries**: Provides a powerful GraphQL interface for querying indexed data, making data retrieval super simple.
- **Customization**: Define your own logic for transforming & storing blockchain data. Reuse subgraphs published by other developers on The Graph Network.

To get started, visit the [documentation](https://thegraph.com/docs/en/) or see [this quickstart](https://thegraph.com/docs/en/cookbook/quick-start/) on how to create, deploy, and query a subgraph.
Follow this [quick-start](https://thegraph.com/docs/en/quick-start/) guide to create, deploy, and query a subgraph within 5 minutes.

#### Supported Networks

- [Base Mainnet](https://thegraph.com/docs/en/#supported-networks)
- Base Mainnet
- Base Sepolia (Testnet)

See [all supported networks](https://thegraph.com/docs/en/#supported-networks)


---

Expand Down
2 changes: 1 addition & 1 deletion apps/base-docs/docs/tools/ethers.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const ethers = require('ethers');

## Connecting to Base

You can connect to Base by instantiating a new ethers.js `JsonRpcProvider` object with a RPC URL of the Base network:
You can connect to Base by instantiating a new ethers.js `JsonRpcProvider` object with an RPC URL of the Base network:

```javascript
const ethers = require('ethers');
Expand Down
2 changes: 1 addition & 1 deletion apps/base-docs/docs/tools/hardhat.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ networks: {
accounts: [process.env.PRIVATE_KEY as string],
gasPrice: 1000000000,
},
// for Sepolia testnet
// for Base Sepolia testnet
"base-sepolia": {
url: "https://sepolia.base.org",
accounts: [process.env.PRIVATE_KEY as string],
Expand Down
2 changes: 1 addition & 1 deletion apps/base-docs/docs/tools/web3.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const { Web3 } = require('web3');

## Connecting to Base

You can connect to Base by instantiating a new web3.js `Web3` object with a RPC URL of the Base network:
You can connect to Base by instantiating a new web3.js `Web3` object with an RPC URL of the Base network:

```javascript
const { Web3 } = require('web3');
Expand Down
2 changes: 1 addition & 1 deletion apps/base-docs/src/components/Banner/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}

.bannerSpacer {
display: hidden;
display: none;
font-size: 0.75rem;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/base-docs/src/css/root.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ html {
--ifm-color-primary-lightest: rgb(146, 224, 208);
--ifm-code-font-size: 95%;
--search-font-size: 16px;
--search-font-weight: 16px;
--search-font-weight: 400;

/* Base Docs Palette */
--base-docs-color-fg: #000000;
Expand Down
8 changes: 4 additions & 4 deletions apps/base-docs/tutorials/docs/0_run-a-base-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,20 @@ In the home directory of your Base Node, create a folder named `geth-data` or `r

:::info

We will be deprecating the Public Geth Archive Snapshots on _December 15th, 2024_ and recommend switching to Reth going forward. We will continue to maintain the Reth archive snapshot.
Public Geth Archive Snapshots were deprecated on _December 15th, 2024_ and recommend switching to Reth going forward. We will continue to maintain the Reth archive snapshot.

:::

| Network | Client | Snapshot Type | Command |
| ------- | ------ | ------------- | --------------------------------------------------------------------------------------------------------------------- |
| Testnet | Geth | Full | `wget https://sepolia-full-snapshots.base.org/$(curl https://sepolia-full-snapshots.base.org/latest)` |
| Testnet | Geth | Archive | `wget https://sepolia-archive-snapshots.base.org/$(curl https://sepolia-archive-snapshots.base.org/latest)` |
| Testnet | Geth | Archive | No longer supported |
| Testnet | Reth | Archive | `wget https://sepolia-reth-archive-snapshots.base.org/$(curl https://sepolia-reth-archive-snapshots.base.org/latest)` |
| Mainnet | Geth | Full | `wget https://mainnet-full-snapshots.base.org/$(curl https://mainnet-full-snapshots.base.org/latest)` |
| Mainnet | Geth | Archive | `wget https://mainnet-archive-snapshots.base.org/$(curl https://mainnet-archive-snapshots.base.org/latest)` |
| Mainnet | Geth | Archive | No longer supported |
| Mainnet | Reth | Archive | `wget https://mainnet-reth-archive-snapshots.base.org/$(curl https://mainnet-reth-archive-snapshots.base.org/latest)` |

You'll then need to untar the downloaded snapshot and place the `geth` subfolder inside of it in the `geth-data` folder you created (unless you changed the location of your data directory).
You'll then need to untar the downloaded snapshot and place the `geth` or `reth` subfolder inside of it in the `geth-data` or `reth-data` folder you created (unless you changed the location of your data directory).

Return to the root of your Base node folder and start your node.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Obtain a rpc url from the [Node product] and store the url as an environment var

![cdp-node](../../assets/images/verify-with-basescan-api/cdp-node-full.png)

Then store it as a environment variable in your terminal:
Then store it as an environment variable in your terminal:

```bash
export BASE_RPC_URL="your_base_rpc_url"
Expand Down
10 changes: 5 additions & 5 deletions apps/base-docs/tutorials/docs/2_ock-fund-tutorial.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 'Build a Smart Wallet Funding app with OnchainKit'
slug: /build-smart-wallet-funding-app
description: Learn how to create a app that detects if a smart wallet has ETH and prompts users to add funds if needed.
description: Learn how to create an app that detects if a smart wallet has ETH and prompts users to add funds if needed.
author: hughescoin
keywords: [
Account Abstraction,
Expand Down Expand Up @@ -29,9 +29,9 @@ In this tutorial, you'll learn how to build an onchain app that checks a user's
By the end of this tutorial you should be able to:

- Set up a project using the [OnchainKit App Template]
- Configure the app for to onboard users easily using [Smart Wallets]
- Configure the app to onboard users easily using [Smart Wallets]
- Implement balance checking and conditional rendering
- Use the Fund component to allow users to add buy tokens from their wallet without leaving your app
- Use the Fund component to allow users to buy tokens from their wallet without leaving your app

## Prerequisites

Expand Down Expand Up @@ -85,7 +85,7 @@ coinbaseWallet.preference = 'smartWalletOnly';

## Implementing Balance Checking

Now well implement a check on the user's wallet to see if they have enough funds. Before we implement this check, let's create a helper function that grabs the user's Ethereum balance using [viem]. To do so, create a `utils.ts` file in the `src` directory that creates a client connected to Base and fetches the user's ETH balance:
Now we'll implement a check on the user's wallet to see if they have enough funds. Before we implement this check, let's create a helper function that grabs the user's Ethereum balance using [viem]. To do so, create a `utils.ts` file in the `src` directory that creates a client connected to Base and fetches the user's ETH balance:

```typescript
import { createPublicClient, http } from 'viem';
Expand Down Expand Up @@ -167,7 +167,7 @@ Sweet! Now our conditional rendering is in full force. If a user clicks on the `

## Conclusion

Congratulations! You've built a app that checks a user's smart wallet balance and provides appropriate options based on their funds.
Congratulations! You've built an app that checks a user's smart wallet balance and provides appropriate options based on their funds.
This app can serve as a foundation for more complex onchain applications that require users to have funded smart wallets.

---
Expand Down
Loading

0 comments on commit 9e08037

Please sign in to comment.