Skip to content

Commit

Permalink
fix typos / broken links (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanetMo authored Feb 5, 2024
1 parent de25da4 commit 67e96af
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Hardhat is a developer tool that provides a simple way to deploy, test, and debu

## Objectives

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

- Setup Hardhat for Base
- Create an NFT smart contract for Base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ keywords: ["Foundry", "smart contract", "ERC-721", "Base", "Base test network",

This article will provide an overview of the [Foundry](https://book.getfoundry.sh/) development toolchain, and show you how to deploy a contract to **Base Sepolia** testnet.

Foundry is a powerful suite of tools to develop, test, and debug your smart contracts. It is comprised of several individual tools:
Foundry is a powerful suite of tools to develop, test, and debug your smart contracts. It comprises several individual tools:

- `forge`: the main workhorse of Foundry — for developing, testing, compiling, and deploying smart contracts
- `cast`: a command-line tool for performing Ethereum RPC calls (e.g. interacting with contracts, sending transactions, and getting onchain data)
- `cast`: a command-line tool for performing Ethereum RPC calls (e.g., interacting with contracts, sending transactions, and getting onchain data)
- `anvil`: a local testnet node, for testing contract behavior from a frontend or over RPC
- `chisel`: a Solidity [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop), for trying out Solidity snippets on a local or forked network

Expand All @@ -30,7 +30,7 @@ For production / mainnet deployments the steps below in this guide will be almos

## Objectives

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

- Setup Foundry for Base
- Create an NFT smart contract for Base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you're already familiar with Remix, you probably want to jump down to [here].

## Objectives

By the end of this lesson you should be able to:
By the end of this lesson, you should be able to:

- List the features, pros, and cons of using Remix as an IDE
- Deploy and test the Storage.sol demo contract in Remix
Expand All @@ -44,7 +44,7 @@ The editor pane loads with the Remix home screen, which contains news, helpful l

![Remix Editor](../../../assets/images/deployment-with-remix/editor-pane.png)

You'll edit your code in the editor pane. It also has most of the features you're expecting, such as syntax and error highlighting. Note that in Remix, errors are not underlines. Instead, you'll see an❗to the left of the line number where the error is present.
You'll edit your code in the editor pane. It also has most of the features you're expecting, such as syntax and error highlighting. Note that in Remix, errors are not underlined. Instead, you'll see an❗to the left of the line number where the error is present.

At the top, you'll see a big green arrow similar to the _Run_ button in other editors. In Solidity, this compiles your code, but it does not run it because you must first deploy your code to the simulated blockchain.

Expand All @@ -64,15 +64,15 @@ As with many other editors, the left panel in Remix has a number of vertical tab

## Plugins

Most of the features in Remix are plugins and the ones you'll use the most are active by default. You can view and manage plugins by clicking the plug button in the lower-left corner, right above the settings gear. You can turn them off and on by clicking activate/deactivate, and some, such as the _Debug_ plugin will be automatically activated through other parts of the editor.
Most of the features in Remix are plugins, and the ones you'll use the most are active by default. You can view and manage plugins by clicking the plug button in the lower-left corner, right above the settings gear. You can turn them off and on by clicking activate/deactivate, and some, such as the _Debug_ plugin will be automatically activated through other parts of the editor.

### Solidity Compiler

The first default plugin (after the search function) is the _Solidity Compiler_. Be sure to check the `Auto compile` option. Smart contracts are almost always in very small files, so this shouldn't ever cause a performance problem while editing code.

The `Compile and Run script` button in this plugin is a little misleading. This is **not** how you will usually run your contract through testing. You can click the `I` button for more information on this feature.

Finally, if you have errors in your contracts, the complete text for each error will appear at the bottom of the pane. Try it out by introducing some typos to `1_Storage.sol`.
Finally, if you have errors in your contracts, the complete text for each error will appear at the bottom of the page. Try it out by introducing some typos to `1_Storage.sol`.

### Deploy & Run Transactions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ In this guide, we'll give you an overview of using the [thirdweb CLI](https://po

## Objectives

By the end of this lesson you should be able to:
By the end of this lesson, you should be able to:

- Create a project with a smart contract using thirdweb
- Deploy smart contracts using thirdweb
Expand Down Expand Up @@ -138,7 +138,7 @@ For production / mainnet deployments select `Base` (mainnet) as the network rath

:::

Once your contract is deployed, you'll be redirected to a [dashboard](https://portal.thirdweb.com/dashboard) for managing your contract.
Once your contract is deployed, you'll be redirected to a [dashboard](https://thirdweb.com/dashboard) for managing your contract.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ keywords:
hide_table_of_contents: false
---

Onchain apps need frontends, sometimes called dApps, to enable your users to interact with your smart contracts. A _provider_ makes the connection from frontend to blockchain, and is used to read data and send transactions.
Onchain apps need frontends, sometimes called dApps, to enable your users to interact with your smart contracts. A _provider_ makes the connection from frontend to the blockchain, and is used to read data and send transactions.

---

## Objectives

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

- Compare and contrast public providers vs. vendor providers vs. wallet providers
- Select the appropriate provider for several use cases
Expand All @@ -40,21 +40,21 @@ In blockchain development, the term _provider_ describes a company or service th

These services enable interacting with smart contracts without the developer needing to run and maintain their own blockchain node. Running a node is expensive, complicated, and challenging. In most cases, you'll want to start out with a provider. Once you start to get traction, you can evaluate the need to [run your own node], or switch to a more advanced architecture solution, such as utilizing [Subgraph].

Figuring out which type of provider to use can be a little confusing at first. As with everything blockchain, the landscape changes rapidly and search results often return out-of-date information.
Figuring out which type of provider to use can be a little confusing at first. As with everything blockchain, the landscape changes rapidly, and search results often return out-of-date information.

:::info

New onchain devs sometimes get the impression that there are free options for connecting their apps to the blockchain. Unfortunately, this is not really true. Blockchain data is still 1's and 0's, fetched by computation and served to the internet via servers.

It costs money to run these and you will eventually need to pay for the service.
It costs money to run these, and you will eventually need to pay for the service.

:::

You'll encounter providers divided into three general categories: Public Providers, Wallet Providers, and Vendor Providers

### Public Providers

Many tutorials and guides, including the getting started guide for [wagmi], use a _Public Provider_ as the default to get you up and running. Public means that they're open, permissionless, and free, so the guides will also usually warn you that you need to add another provider if you don't want to run into rate limiting. Listen to these warnings! The rate-limits of public providers are severe and you'll start getting limited very quickly.
Many tutorials and guides, including the getting started guide for [wagmi], use a _Public Provider_ as the default to get you up and running. Public means that they're open, permissionless, and free, so the guides will also usually warn you that you need to add another provider if you don't want to run into rate limiting. Listen to these warnings! The rate-limits of public providers are severe, and you'll start getting limited very quickly.

In wagmi, the `publicClient` is just a wrapper setting up a [JSON RPC] provider using the `chain` and `rpcUrls` listed in Viem's directory of chain information. For example, you can view the [data for Base Sepolia here].

Expand All @@ -66,17 +66,17 @@ Many wallets, including Coinbase Wallet and MetaMask, inject an Ethereum provide

Under the hood, these are also just JSON RPC providers. Similar to public providers, they are rate-limited.

Older tutorials for early libraries tended to suggest using this method for getting started, so you'll probably encounter references to it. However, it's fallen out of favor and you'll want to use the public provider for your initial connection experiments.
Older tutorials for early libraries tended to suggest using this method for getting started, so you'll probably encounter references to it. However, it's fallen out of favor, and you'll want to use the public provider for your initial connection experiments.

### Vendor Providers

A growing number of vendors provide access to blockchain nodes as a service. Visiting the landing pages for [QuickNode] or [Alchemy] can be a little confusing. Each of these vendors provides a wide variety of services, SDKs, and information.

Luckily, you can skip most of this if you're just trying to get your frontend connected to your smart contracts. You'll just need to sign up for an account and get an endpoint, or a key, and configure your app to connect to the provider(s) you choose.
Luckily, you can skip most of this if you're just trying to get your frontend connected to your smart contracts. You'll just need to sign up for an account, and get an endpoint, or a key, and configure your app to connect to the provider(s) you choose.

It is worth digging in to get a better understanding of how these providers charge you for their services. The table below summarizes some of the more important API methods, and how you are charged for them by each of the above providers.

Note that the information below may change, and varies by network. Each provider also has different incentives, discounts, and fees for each level of product. They also have different allowances for calls per second, protocols, and number of endpoints. Please check the source to confirm!
Note that the information below may change, and vary by network. Each provider also has different incentives, discounts, and fees for each level of product. They also have different allowances for calls per second, protocols, and number of endpoints. Please check the source to confirm!

| | [Alchemy Costs] | [QuickNode Costs] |
| :-------------- | :--------------- | :---------------- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ hide_table_of_contents: false

## Objectives

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

- Set up a provider in wagmi and use it to connect a wallet
- Protect API keys that will be exposed to the front end
Expand Down Expand Up @@ -73,7 +73,7 @@ Note that these providers are using React's context feature to pass the blockcha

Before you can do anything else, you need to obtain a _WalletConnect_ `projectId`.

Open up the [WalletConnect] homepage, and create an account and/or sign in using the method of your choice.
Open up the [WalletConnect] homepage, and create an account, and/or sign in using the method of your choice.

Click the `Create` button in the upper right of the `Projects` tab.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ In this tutorial, you will explore the essential debugging features offered by H

One of the key features of Hardhat is the ability to use `console.log` for writing debugging logs in your smart contracts. In order to use it, you must include `hardhat/console.sol` in the contract you wish to debug.

In the following contract `Lock.sol` for example, you include `hardhat/console.sol` by importing it and adding a few `console.log`s in the constructor with the text "Creating" and the Ether balance of the contract. This can help you not only with tracking that the contract was created successfully but also, more importantly, with the ability to include additional logs such as the balance of the contract after is was created:
In the following contract `Lock.sol` for example, you include `hardhat/console.sol` by importing it and adding a few `console.log`s in the constructor with the text "Creating" and the Ether balance of the contract. This can help you not only with tracking that the contract was created successfully but also, more importantly, with the ability to include additional logs such as the balance of the contract after it was created:

```solidity
// SPDX-License-Identifier: UNLICENSED
Expand Down Expand Up @@ -100,7 +100,7 @@ describe("Lock Tests", function () {
});
```

Notice a single test is included in order to get proper logs. However, you're only interested in the creation process that happens in the `before` hook. Then, you can run:
Notice that a single test is included in order to get proper logs. However, you're only interested in the creation process that happens in the `before` hook. Then, you can run:

```bash
npx hardhat test
Expand Down Expand Up @@ -143,7 +143,7 @@ These log functions are handy when the type you intend to log doesn't fall withi

While debugging your smart contracts, it's crucial to be familiar with common errors that can arise during development. Recognizing these errors and knowing how to resolve them is an important skill.

In our [Basecamp] series of tutorials, we cover a few compile-time errors in [Error Triage]. Other errors such as `reverts` or `index out of bounds errors` can be unexpected during the runtime of the smart contract.
In our [Basecamp] series of tutorials, we cover a few compile-time errors in [Error Triage]. Other errors, such as `reverts` or `index out of bounds errors` can be unexpected during the runtime of the smart contract.

The following explores typical techniques to debug these types of errors.

Expand Down Expand Up @@ -281,7 +281,7 @@ function createLock(uint256 _unlockTime) external payable {

Attempting to access arrays at an invalid position can also cause errors.

If you wish to retrieve all the `Lock` contract instances being created in the previous example, you can make the `locks` array public. In order to illustrate this example though, you can create a custom function called `getAllLocks`:
If you wish to retrieve all the `Lock` contract instances being created in the previous example, you can make the `locks` array public. In order to illustrate this example, though, you can create a custom function called `getAllLocks`:

```solidity
contract LockCreator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ By the end of this lesson, you should be able to:

## Overview

The Solidity Coverage plugin allow you to analyze and visualize the coverage of your smart contracts' test suite. This enables you to see what portions of your smart contract are being tested and what areas may have been overlooked. It's an indispensable plugin for developers seeking to fortify their testing practices and ensure robust smart contract functionality.
The Solidity Coverage plugin allows you to analyze and visualize the coverage of your smart contracts' test suite. This enables you to see what portions of your smart contract are being tested and what areas may have been overlooked. It's an indispensable plugin for developers seeking to fortify their testing practices and ensure robust smart contract functionality.

## Setting up the Solidity Coverage plugin

Expand Down
4 changes: 2 additions & 2 deletions apps/base-docs/docs/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ The steps below explain how to get your token on the Base Token List.

### Step 1: Deploy your token on Base

Select your preferred bridging framework and use it to deploy an ERC-20 for your token on Base. We recommend you use the framework provided by Base's [standard bridge](https://github.com/ethereum-optimism/specs/blob/main/specs/bridges.md) contracts, and furthermore deploy your token using the [OptimismMintableERC20Factory](https://docs.base.org/base-contracts/#l2-contract-addresses). Deploying your token on Base in this manner provides us with guarantees that will smooth the approval process. If you choose a different bridging framework, its interface must be compatible with that of the standard bridge, otherwise it may be difficult for us to support.
Select your preferred bridging framework and use it to deploy an ERC-20 for your token on Base. We recommend you use the framework provided by Base's [standard bridge](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/bridges.md) contracts, and furthermore deploy your token using the [OptimismMintableERC20Factory](https://docs.base.org/base-contracts/#l2-contract-addresses). Deploying your token on Base in this manner provides us with guarantees that will smooth the approval process. If you choose a different bridging framework, its interface must be compatible with that of the standard bridge, otherwise it may be difficult for us to support.

### Step 2: Submit details for your token

Follow the instructions in the [GitHub repository](https://github.com/ethereum-optimism/ethereum-optimism.github.io) and submit a PR containing the required details for your token. You must specify in your token's data.json file a section for ‘base-sepolia' and/or ‘base’ . The change you need to submit is particularly simple if your token has already been added to the Optimism token list. For example, [this PR](https://github.com/ethereum-optimism/ethereum-optimism.github.io/commit/27ab9b2d3388f7feba3a152e0a0748c73d732a68) shows the change required for cbETH, which was already on Optimism's token list and relies on the Base standard bridge.
Follow the instructions in the [GitHub repository](https://github.com/ethereum-optimism/ethereum-optimism.github.io) and submit a PR containing the required details for your token. You must specify in your token's data.json file a section for ‘base-sepolia' and/or ‘base’. The change you need to submit is particularly simple if your token has already been added to the Optimism token list. For example, [this PR](https://github.com/ethereum-optimism/ethereum-optimism.github.io/commit/27ab9b2d3388f7feba3a152e0a0748c73d732a68) shows the change required for cbETH, which was already on Optimism's token list and relies on the Base standard bridge.

### Step 3: Await final approval

Expand Down
Loading

0 comments on commit 67e96af

Please sign in to comment.