web3-development-basics
Introduction
Developing dApps and interacting with Smart Contracts is quite different from Web2, and at times challenging due to little information on this topic compared to other areas of software development.
This developer guide is a quick overview of the space, including references to libraries and guides that are great starting points. Reading this guide should help you identify areas that you might need to learn a bit more about and prepare you for the following SwapX-specific guides.
It is assumed that you know the basics about Ethereum and the blockchain, including some terminology. If you already know how to build dApps and interact with ethersJS etc. you can safely skip this guide.
RPCs
The access point to the blockchain are RPC nodes. They are the standardized interface to read data from smart contracts, send transactions and interact with on-chain protocols.
RPCs are either full or archival nodes with a (JSON-RPC) interface.
To support Ethereum's decentralization, one can host a node themselves, for example by using one of the implementations listed below:
- geth - The original (reference) implementation of the Ethereum protocol
- erigon - A very efficient archival node implementation
- Nethermind - An Ethereum implementation focused on stability
As achieving high availability and making sure your node is synced all the time turns out to be quite challenging, there are nodes as a service (RPC) providers that you can use, especially in production environments. When choosing an RPC provider, we suggest you look for an RPC service that supports websockets as they provide far superior performance than HTTP connections. To ensure interoperability, you should also ensure that your RPC provider adheres strictly to the JSON-RPC standard and doesn't require custom requests.
Chainnodes is a robust RPC provider with generous free tier that you can use in both development and production environments. For testing purposes you could also use a free public RPC endpoint, for example from Chainlist.