Exploring Hardhat

Okay so after some digging around, I’ve made the decision on the 21st day of my journey into Web3 that I’ll be sticking to Hardhat for full stack dApp development. At this point, I literally know nothing about Hardhat. No matter. My first step is to use the Hardhat documentation. Basics of Hardhat Installing Hardhat npm init npm install --save-dev hardhat Creating a Hardhat project npx hardhat Getting the available commands npx hardhat in project folder ...

May 31, 2022 · 4 min · Lei

Connecting to Ethereum

These are the main concepts regarding programmatic connections to Ethereum. You use Infura to access Ethereum node via API. Step 1: Sign up on Infura and get the API endpoint. ‘https://mainnet.infura.io/v3/397e0ef1xxx' Step 2: Connect to Web3 1 2 3 4 from web3 import Web3 infura_url='https://mainnet.infura.io/v3/397e0ef1b1dd4f6e85b10c3936724da3' w3 = Web3(Web3.HTTPProvider(infura_url)) w3.isConnected() That’s it! You’re connected to an Ethereum node.

November 2, 2021 · 1 min · Lei

Getting Jupyter Notebook to Work With Web3

I was trying to set up my python environment for accessing web3 data, and there was an issue when I tried to import web3 from within Jupyter notebook. It keeps telling me web3 module not found. Apparently, I should only access web3 from a virtual environment. A virtual environment, it turns out, is a separate environment that you can create that simulates the NPM style of isolated project environments. It allows you to create self-contained dependencies. This is a great article explaining it. ...

November 2, 2021 · 1 min · Lei