Skip to content

Commit

Permalink
Merge branch 'master' into correction
Browse files Browse the repository at this point in the history
  • Loading branch information
rebustron authored Jan 18, 2025
2 parents 0e8b335 + d67d5c2 commit 255fb91
Show file tree
Hide file tree
Showing 167 changed files with 3,112 additions and 2,517 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
// We utilize class properties
'react/state-in-constructor': 'off',

// Dont use prop types since were using TypeScript
// Dont use prop types since we are using TypeScript
'react/default-props-match-prop-types': 'off',
'react/forbid-foreign-prop-types': 'off',
'react/forbid-prop-types': 'off',
Expand Down Expand Up @@ -135,7 +135,7 @@ module.exports = {
'@typescript-eslint/prefer-string-starts-ends-with': 'error',

// Hard to migrate
// Errors for all try/catch blocks and any types from third-parties
// Errors for all try/catch blocks and any types from third parties
'@typescript-eslint/no-unsafe-member-access': 'off',
},
};
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/docs_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ body:
id: other
attributes:
label: Additional context
description: Add any other context or screenshots about the concern can be added here.
description: Add any additional context or screenshots about the concern here.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ out/
!.yarn/sdks
!.yarn/versions
.pnp.*
# prevent people from accidentally commiting a package-lock
# prevent people from accidentally committing a package-lock
package-lock.json

# Env files
Expand Down
13 changes: 10 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
// Prettier
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true, // use ⌘-K S to format without saving
"editor.formatOnSave": true, // use ⌘-K S (or Ctrl-K S) to format without saving

// Disable built-in formatters
"html.format.enable": false,
Expand All @@ -15,8 +15,15 @@
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},

// ESLint
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
"eslint.packageManager": "yarn",
"eslint.useESLintClass": true,
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The following is a set of guidelines for contributing to Base Web. These are jus

## Code of Conduct

This project and everyone participating in it are governed by our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
This project and everyone participating in it is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.

## How Can I Contribute?

Expand Down
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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

Expand All @@ -81,38 +81,47 @@ 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
{
"name": "Your Project Name",
"tags": ["category"],
"description": "A brief description of your project (less than 200 characters)",
"url": "https://your-project-url.com",
"imageUrl": "/images/partners/your-project-logo.png"
"imageUrl": "/images/partners/your-project-logo.png",
"category": "Your Project Category",
"subcategory": "Your Project Subcategory"
}
```

- name: Your project's name
- tags: An array with _one_ of the following categories: `bridge`, `dao`, `defi`, `gaming`, `infra`, `nft`, `onramp`, `social`, `wallet`, `security`
- description: A brief description of your project, must be less than 200 characters
- url: Your project's website URL
- imageUrl: Path to your project's logo image
- category: Your project's category, _one_ of: `consumer`, `defi`, `infra`, `onramp`, `wallet`
- subcategory: Your project's subcategory, with the following options associated with each category
- `consumer`: _One_ of `creator`, `crypto taxes`, `dao`, `gaming`, `messaging`, `music`, `nft`, `payments`, `real world`, `social`
- `defi`: _One_ of `dex`, `dex aggregator`, `insurance`, `lending/borrowing`, `liquidity management`, `portfolio`, `stablecoin`, `yield vault`
- `infra`: _One_ of `ai`, `bridge`, `data`, `depin`, `developer tool`, `identity`, `node provider`, `raas`, `security`
- `onramp`: _One_ of `centralized exchange`, `fiat on-ramp`
- `wallet`: _One_ of `account abstraction`, `multisig`, `self-custody`

4. When adding and/or updating a logo, place a 192x192 pixel PNG file in the `web/apps/web/public/images/partners/`. The file should be named appropriately (e.g., your-project-name.png). The logo should be an App Store or Play Store iconographic version, not a full wordmark.

5. Create a pull request with your changes.

By opening a PR to add your project, you authorize and license Coinbase on a non-exclusive, worldwide, irrevocable, sublicensable, and royalty free basis to reproduce, distribute, transmit, make available, perform, display, or otherwise use the submitted Multimedia Assets for any purpose, including any marketing or promotional activities related to Base or Coinbase. Any goodwill associated with use of trademarks submitted in your Multimedia Assets will inure to your benefit. You further acknowledge and represent that you have all IP rights in the Multimedia Assets, that the Multimedia Assets do not infringe the rights of any third party, and that you have the right to grant this license to Coinbase.
By opening a PR to add your project, you authorize and license Coinbase on a non-exclusive, worldwide, irrevocable, sublicensable, and royalty-free basis to reproduce, distribute, transmit, make available, perform, display, or otherwise use the submitted Multimedia Assets for any purpose, including any marketing or promotional activities related to Base or Coinbase. Any goodwill associated with use of trademarks submitted in your Multimedia Assets will inure to your benefit. You further acknowledge and represent that you have all IP rights in the Multimedia Assets, that the Multimedia Assets do not infringe the rights of any third party, and that you have the right to grant this license to Coinbase.

**Note:** Submissions do not guarantee inclusion and all submissions are subject to review. Your project must be live on Base to potentially be included. Ensure all information is accurate and up-to-date.

#### Tips for a successful submission
#### Submission requirements

- App content adheres to the [Base Editorial Style Guide](https://github.com/base-org/brand-kit/blob/main/guides/editorial-style-guide.md)
- 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

---
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ By the end of this lesson you should be able to:

By default, `public` functions can be called by **anyone**, without restriction. Often this is desirable. You want any user to be able to see what NFTs are for sale on your platform, sign up for a service, or read various items stored in state.

However, there will be many functions you **don't** want any user to be able to do, such as setting the fee for using the app, or withdrawing all of the funds in the contract! A common pattern to protect these functions is to use `modifier`s to make sure that only the owner can call these functions.
However, there will be many functions you **don't** want any user to be able to do, such as setting the fee for using the app, or withdrawing all funds in the contract! A common pattern to protect these functions is to use `modifier`s to make sure that only the owner can call these functions.

:::caution

Expand Down
2 changes: 1 addition & 1 deletion apps/base-docs/base-learn/docs/arrays/arrays-exercise.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The simple and obvious solution is to simply iterate through `numbers` and count
Go ahead and write it on your own. It needs to:

- Instantiate a `uint` to hold the results
- Iterate through all of the values in `numbers` and increment that number if the value is even
- Iterate through all values in `numbers` and increment that number if the value is even
- Return the result

You should end up with something like:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Click the linked address to your contract to return to the contract page. You'll

:::tip

If you have imports, you'll need to right click on the name of the file and choose `Flatten`. Submit the newly generated `filename_flattened.sol` for verification.
If you have imports, you'll need to right-click on the name of the file and choose `Flatten`. Submit the newly generated `filename_flattened.sol` for verification.

:::

Expand All @@ -69,7 +69,7 @@ With your contracts verified, you can interact with them using online tools and
[`sepolia.basescan.org`]: https://sepolia.basescan.org/
[coinbase]: https://www.coinbase.com/wallet
[faucet]: https://docs.base.org/tools/network-faucets
[set up]: https://www.youtube.com/watch?v=CZDgLG6jpgw
[set up]:
[coinbase settings]: https://docs.cloud.coinbase.com/wallet-sdk/docs/developer-settings
[BaseScan]: https://sepolia.basescan.org/
[faucets on the web]: https://coinbase.com/faucets
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ You now have the power to put smart contracts on the blockchain! You've only dep
[coinbase]: https://www.coinbase.com/wallet
[metamask]: https://metamask.io/
[faucet]: https://docs.base.org/tools/network-faucets
[set up]: https://www.youtube.com/watch?v=CZDgLG6jpgw
[set up]:
[coinbase settings]: https://docs.cloud.coinbase.com/wallet-sdk/docs/developer-settings
[Metamask Settings]: https://support.metamask.io/hc/en-us/articles/13946422437147-How-to-view-testnets-in-MetaMask
[BaseScan]: https://sepolia.basescan.org/
Expand Down
2 changes: 1 addition & 1 deletion apps/base-docs/base-learn/docs/etherscan/etherscan-sbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In this article, you'll learn about Etherscan, a blockchain explorer to inspect
By the end of this lesson, you should be able to:

- List some of the features of Etherscan
- Read data from the Bored Apes Yacht Club contract on Etherscan
- Read data from the Bored Ape Yacht Club contract on Etherscan
- Write data to a contract using Etherscan.

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Reuse `Lock__factory` but use the connect function and pass the address of the n
✔ should have the right owner
✔ shouldn't allow to withdraw before unlock time (51ms)
✔ shouldn't allow to withdraw a non owner
✔ should allow to withdraw a owner
✔ should allow to withdraw an owner
6 passing (2s)
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ Finally, test that the owner can withdraw. You can manipulate the time similarly
<summary>Reveal code</summary>

```tsx
it('should allow to withdraw a owner', async () => {
it('should allow to withdraw an owner', async () => {
const balanceBefore = await ethers.provider.getBalance(await lockInstance.getAddress());

// Its value will be the one we lock at deployment time.
Expand Down Expand Up @@ -320,7 +320,7 @@ You can then run `npx hardhat test` and you should get:
✔ should have the right owner
✔ shouldn"t allow to withdraw before unlock time (51ms)
✔ shouldn"t allow to withdraw a non owner
✔ should allow to withdraw a owner
✔ should allow to withdraw an owner
6 passing (2s)
```
Expand Down
4 changes: 2 additions & 2 deletions apps/base-docs/base-learn/docs/imports/imports-sbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ The [docs] start with installation instructions, which we'll return to when we s

Find the documentation for the `EnumerableSet` under _Utils_. This library will allow you to create [sets] of `bytes32`, `address`, and `uint256`. Since they're enumerated, you can iterate through them. Neat!

### Implementing the OpenZeppelin EnumeratedSet
### Implementing the OpenZeppelin EnumerableSet

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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ Gas is a vital component of Ethereum. It's what regulates the execution of all t

[Ethereum Docs]: https://ethereum.org/en/developers/docs/
[Mastering Ethereum]: https://github.com/ethereumbook/ethereumbook
[Ethereum demonimations]: https://www.gemini.com/en-US/cryptopedia/satoshi-value-gwei-to-ether-to-wei-converter-eth-gwei
[Ethereum denominations]: https://www.gemini.com/en-US/cryptopedia/satoshi-value-gwei-to-ether-to-wei-converter-eth-gwei
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Click the chevron to expand your contract in the Deployed Contracts section of t

![Function Buttons](../../assets/images/introduction-to-solidity/remix-contract-buttons.png)

Let's click the retrieve button first. Before clicking, make a prediction: given that the `number` variable was instantiated without a value, what do you thing the return will be?
Let's click the retrieve button first. Before clicking, make a prediction: given that the `number` variable was instantiated without a value, what do you think the return will be?

Go ahead and click – the result will appear below the button as:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The editor pane loads with the Remix home screen, which contains news, helpful l

![Remix Editor](../../assets/images/introduction-to-solidity/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 large 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 Down
8 changes: 4 additions & 4 deletions apps/base-docs/base-learn/docs/learning-objectives.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ Use the script to regenerate this file.

### [ERC-20 Implementation](./erc-20-token/erc-20-token-sbs.md)

- Describe OpenZepplin
- Import the OpenZepplin ERC-20 implementation
- Describe OpenZeppelin
- Import the OpenZeppelin ERC-20 implementation
- Describe the difference between the ERC-20 standard and OpenZeppelin's ERC20.sol
- Build and deploy an ERC-20 compliant token

Expand Down 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 All @@ -255,4 +255,4 @@ Use the script to regenerate this file.

- Implement wagmi's `useSimulateContract` and `useWriteContract` to send transactions to a smart contract
- Configure the options in `useSimulateContract` and `useWriteContract`
- Call a smart contract function on-demand using the write function from `useWriteContract`, with arguments and a value
- Call a smart contract function on-demand using the write function from `useWriteContract`, with arguments and a value
2 changes: 1 addition & 1 deletion apps/base-docs/base-learn/docs/mappings/mappings-sbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Deploy and test again. Success!

One challenging limitation of the `mapping` data type is that it is **not** iterable - you cannot loop through and manipulate or return **all** values in the `mapping`.

At least not with any built in features, but you can solve this on your own. A common practice in Solidity with this and similar problems is to use multiple variables or data types to store the right combination needed to address the issue.
At least not with any built-in features, but you can solve this on your own. A common practice in Solidity with this and similar problems is to use multiple variables or data types to store the right combination needed to address the issue.

### Using a Helper Array

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ transact to MinimalToken.transfer errored: Error encoding arguments: Error: bad

A more guaranteed way to destroy, or _burn_ a token, is to transfer it to the default address `0x0000000000000000000000000000000000000000`. This address is unowned and unownable, making it mathematically impossible to retrieve any tokens that are sent to it. Redeploy and try it out by sending 1000 tokens to the zero address.

The `totalSupply` remains unchanged, and the balance of the zero address are visible, but those tokens are stuck there forever.
The `totalSupply` remains unchanged, and the balance of the zero address is visible, but those tokens are stuck there forever.

:::info

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ In this guide, you've learned how to use the `watch` feature of `useBlockNumber`
[wagmi]: https://wagmi.sh/
[`useReadContract`]: https://wagmi.sh/react/hooks/useReadContract
[`useReadContract` hook]: ./useReadContract
[`useBlocNumber`]: https://wagmi.sh/react/api/hooks/useBlockNumber
[`useBlockNumber`]: https://wagmi.sh/react/api/hooks/useBlockNumber
[removed]: https://wagmi.sh/react/guides/migrate-from-v1-to-v2#removed-watch-property
[`useReadContracts`]: https://wagmi.sh/react/hooks/useReadContracts
[`pollingInterval`]: https://wagmi.sh/react/api/createConfig#pollinginterval
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
Loading

0 comments on commit 255fb91

Please sign in to comment.