web3

Build a crypto wallet using Rust: steps how to

In this tutorial, we are going to build a crypto wallet with Rust. The aim of this tutorial is to be educational. To learn the concepts of what it takes to implement a crypto wallet. That means we will dive a bit deeper than if we were to use more helper crates. We will go through the process of creating our very own crypto wallet step by step. Our end result will be a wallet that is able to manage Ethereum based assets. Specifically, it will be able to send and receive cryptocurrency. The completed project can be found on…

Rust Web3 token transactions from blocks: how to

In this tutorial, we will learn about how to get token transactions info with Web3 and Rust. What we will learn is how to get the latest block’s transactions. Then loop through those transactions, find which of them are ERC20 smart contracts, get the token name, and also which method was used in the transaction. For example, approval, transfer, mintItem, etc. that kind of thing. This is a follow-up to my article: Rust Web3 connect to Ethereum blockchain: how to. Note: since we will not be performing any transactions in this project, it is safe to use a connection to…

How to swap on Uniswap V2 with Rust Web3

In this article, we will go through the steps of how to swap tokens on Uniswap V2 with Rust and Web3. Using the Rust programming language we will connect to the Ethereum (test) network and interact with Uniswap. There are multiple versions of Uniswap, but in this article, we will perform transactions with Uniswap V2. Important: We will use infura.io to get a connection to an Ethereum node for this article. Infura.io will not maintain any private keys on our behalf to sign transactions with. That means we have to sign the transactions ourselves and send a raw transaction. Instead…

Rust Web3 connect to Ethereum blockchain: how to

In this article for semi-beginners, we are going to learn how to connect to Ethereum with the web3 crate and Rust. We will connect using a WebSocket and then retrieve the balance of our account. Finally, we will use a token smart contract to retrieve information about the token. Please note that we will be using the Rinkeby test network for our interactions. So, if an address for a smart contract or token doesn’t seem to work, make sure that you are using the Rinkeby network. Please look at my GitHub for the full project: rust-web3-basics-tutorial. Please also see this…