Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brian doyle/add connecting to chain mod #132

Merged
merged 8 commits into from
Nov 20, 2023

Conversation

briandoyle81CB
Copy link
Contributor

@briandoyle81CB briandoyle81CB commented Nov 17, 2023

What changed? Why?
Add a guide for connecting to the blockchain using providers.

Notes to reviewers

How has it been tested?


![Select Chain](../../assets/images/connecting-to-the-blockchain/quicknode-select-chain.png)

For now, pick `Base Mainnet`, but you'll probably want to delete this endpoint and create a new one for Goerli or Sepolia when you start building. The free tier only allows you to have one at a time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use testnet now for this lesson?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong reason, other than it's already imported, and IMO neat to connect to the "real" thing.

@amhayslipcb
Copy link
Contributor

The one thing I didn't understand is why you're presenting several providers and what the differences in all those providers are. How does one choose?


### Public Providers

Many tutorials and guides, as well getting started guides for libraries such as [wagmi], will 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.
Copy link
Contributor

@taycaldwell taycaldwell Nov 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of this guide makes mention of the wagmi team's tooling wagmi, viem. Feels like we're specifically promoting them, although the reader may not be familiar with those offerings.

I know this is an ongoing debate - but is it possible to reword the content in a way that doesn't feel bias towards specific third party library / tooling, since this guide isn't reliant or specific to those libraries? (other page is wagmi/rainbowkit specific, but this one doesn't seem like it has to be).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can with this one. It's going to be wrapped as a single guide for connecting using them, and will eventually also be embedded in the frontend series for Basecamp, which also uses Rainbowkit/Wagmi/Viem. The references are foreshadowing tasks that they'll be doing in the step by step part.

Were it a blog post, we'd definitely need to neutralize it.

Copy link
Contributor

@taycaldwell taycaldwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Left some minor comments.

@cb-heimdall cb-heimdall dismissed taycaldwell’s stale review November 20, 2023 15:43

Approved review 1737859268 from taycaldwell is now dismissed due to new commit. Re-request for approval.

@briandoyle81CB briandoyle81CB marked this pull request as ready for review November 20, 2023 15:44
@briandoyle81CB briandoyle81CB merged commit ea4aca0 into master Nov 20, 2023
3 checks passed
@briandoyle81CB briandoyle81CB deleted the brian-doyle/add-connecting-to-chain-mod branch November 20, 2023 20:28
| eth_getlogs | 75 | 20 |
| eth_getbalance | 19 | 20 |

To give you an idea of usage amounts, a single wagmi `useContractRead` hook set to `watch` for changes on a single `view` will call `eth_blocknumber` and `eth_call` one time each, every 4 seconds.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this can be configured?

amhayslipcb pushed a commit to amhayslipcb/base-web that referenced this pull request Nov 28, 2023
* Start doc

* Add connecting to blockchain reading

* Address Aaron's feedback

* Partial: Add configuring providers

* Partial

* Apply feedback, final edits, sidebar

* Fix rainbowkit link

* Fix typo
kirkas pushed a commit that referenced this pull request Oct 21, 2024
* Start doc

* Add connecting to blockchain reading

* Address Aaron's feedback

* Partial: Add configuring providers

* Partial

* Apply feedback, final edits, sidebar

* Fix rainbowkit link

* Fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants