Ethers-rs allows application to connect the blockchain using web3 providers. Providers act as an interface between applications and an Ethereum node, allowing you to send requests and receive responses via JSON-RPC messages.
Some common actions you can perform using a provider include:
* Getting the current block number
* Getting the balance of an Ethereum address
* Sending a transaction to the blockchain
* Calling a smart contract function
* Subscribe logs and smart contract events
* Getting the transaction history of an address
Providers are an important part of web3 libraries because they allow you to easily interact with the Ethereum blockchain without having to manage the underlying connection to the node yourself.
Code below shows a basic setup to connect a provider to a node: