Skip to content

Commit

Permalink
Merge pull request #3822 from NomicFoundation/docs-coinbase-wallet
Browse files Browse the repository at this point in the history
Add coinbase wallet to docs
  • Loading branch information
fvictorio committed Apr 18, 2023
2 parents f3eafce + 17e38ed commit b80801f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Incompatible EIP155-based V 2710 and chain id 31337. See the second parameter of

This is because MetaMask mistakenly assumes all networks in `http://127.0.0.1:8545` to have a chain id of `1337`, but Hardhat uses a different number by default. **Please upvote [the MetaMask issue about it](https://github.com/MetaMask/metamask-extension/issues/10290) if you want this fixed.**

In the meantime, to resolve this you can set the `chainId` of Hardhat Network to `1337` in your Hardhat config:
In the meantime, consider using an alternative wallet that doesn't have this problem, like [Coinbase Wallet](https://www.coinbase.com/wallet).

If you want to use MetaMask, you can work around this issue by setting the `chainId` of Hardhat Network to `1337` in your Hardhat config:

```
networks: {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/hardhat-network/docs/overview/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Hardhat Network is simply another network. If you wanted to be explicit, you cou

### Running stand-alone in order to support wallets and other software

Alternatively, Hardhat Network can run in a stand-alone fashion so that external clients can connect to it. This could be MetaMask, your Dapp front-end, or a script. To run Hardhat Network in this way, run:
Alternatively, Hardhat Network can run in a stand-alone fashion so that external clients can connect to it. This could be a wallet, your Dapp front-end, or a script. To run Hardhat Network in this way, run:

```
$ npx hardhat node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ Lock with 1 ETH deployed to: 0x5FbDB2315678afecb367f032d93F642f64180aa3

### Connecting a wallet or Dapp to Hardhat Network

By default, Hardhat will spin up a new in-memory instance of Hardhat Network on startup. It's also possible to run Hardhat Network in a standalone fashion so that external clients can connect to it. This could be MetaMask, your Dapp front-end, or a script.
By default, Hardhat will spin up a new in-memory instance of Hardhat Network on startup. It's also possible to run Hardhat Network in a standalone fashion so that external clients can connect to it. This could be a wallet, your Dapp front-end, or a script.

To run Hardhat Network in this way, run `npx hardhat node`:

Expand Down
4 changes: 4 additions & 0 deletions docs/src/content/hardhat-runner/docs/guides/verifying.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ We are going to use the [Sepolia testnet](https://ethereum.org/en/developers/doc
const INFURA_API_KEY = "KEY";

// Replace this private key with your Sepolia account private key
// To export your private key from Coinbase Wallet, go to
// Settings > Developer Settings > Show private key
// To export your private key from Metamask, open Metamask and
// go to Account Details > Export Private Key
// Beware: NEVER put real Ether into testing accounts
Expand All @@ -82,6 +84,8 @@ module.exports = {
const ALCHEMY_API_KEY = "KEY";

// Replace this private key with your Sepolia account private key
// To export your private key from Coinbase Wallet, go to
// Settings > Developer Settings > Show private key
// To export your private key from Metamask, open Metamask and
// go to Account Details > Export Private Key
// Beware: NEVER put real Ether into testing accounts
Expand Down
6 changes: 3 additions & 3 deletions docs/src/content/tutorial/boilerplate-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ npm install
npx hardhat node
```

Here we just install the npm project's dependencies, and by running `npx hardhat node` we spin up an instance of Hardhat Network that you can connect to using MetaMask. In a different terminal in the same directory, run:
Here we just install the npm project's dependencies, and by running `npx hardhat node` we spin up an instance of Hardhat Network that you can connect to using your wallet. In a different terminal in the same directory, run:

```
npx hardhat --network localhost run scripts/deploy.js
Expand All @@ -61,9 +61,9 @@ npm run start

Then open [http://127.0.0.1:3000/](http://127.0.0.1:3000/) in your browser and you should see this: ![](/front-5.png)

Set your network in MetaMask to `127.0.0.1:8545`.
Click the button to connect your wallet. If you are using MetaMask, make sure you have selected the `Localhost 8545` network.

Now click the button in the web app. You should then see this:
After connecting your wallet, you should see this:

![](/front-2.png)

Expand Down
7 changes: 6 additions & 1 deletion docs/src/content/tutorial/deploying-to-a-live-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ require("@nomicfoundation/hardhat-toolbox");
const INFURA_API_KEY = "KEY";
// Replace this private key with your Sepolia account private key
// To export your private key from Coinbase Wallet, go to
// Settings > Developer Settings > Show private key
// To export your private key from Metamask, open Metamask and
// go to Account Details > Export Private Key
// Beware: NEVER put real Ether into testing accounts
Expand Down Expand Up @@ -91,6 +93,8 @@ require("@nomicfoundation/hardhat-toolbox");
const ALCHEMY_API_KEY = "KEY";
// Replace this private key with your Sepolia account private key
// To export your private key from Coinbase Wallet, go to
// Settings > Developer Settings > Show private key
// To export your private key from Metamask, open Metamask and
// go to Account Details > Export Private Key
// Beware: NEVER put real Ether into testing accounts
Expand All @@ -116,8 +120,9 @@ We're using [Infura](https://infura.io) or [Alchemy](https://alchemy.com/), but
To deploy on Sepolia you need to send some Sepolia ether to the address that's going to be making the deployment. You can get testnet ether from a faucet, a service that distributes testing-ETH for free. Here is one for Sepolia:

- [Alchemy Sepolia Faucet](https://sepoliafaucet.com/)
- [Coinbase Sepolia Faucet](https://coinbase.com/faucets/ethereum-sepolia-faucet) (only works if you are using the Coinbase Wallet)

You'll have to change Metamask's network to Sepolia before transacting.
You'll have to change your wallet's network to Sepolia before transacting.

:::tip

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/tutorial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ To follow this tutorial you should be able to:
- Operate a [terminal](https://en.wikipedia.org/wiki/Terminal_emulator)
- Use [git](https://git-scm.com/doc)
- Understand the basics of how [smart contracts](https://ethereum.org/learn/#smart-contracts) work
- Set up a [Metamask](https://metamask.io/) wallet
- Set up a [Coinbase](https://www.coinbase.com/wallet) or [Metamask](https://metamask.io/) wallet

If you can't do any of the above, follow the links and take some time to learn the basics.

0 comments on commit b80801f

Please sign in to comment.