DeveloperBreeze

Blockchain Development Programming Tutorials, Guides & Best Practices

Explore 30+ expertly crafted blockchain development tutorials, components, and code examples. Stay productive and build faster with proven implementation strategies and design patterns from DeveloperBreeze.

Tutorial

Understanding and Using the Etherscan API to Query Blockchain Data

By the end of this tutorial, you will be able to retrieve blockchain information such as transaction history and token balances through simple API calls.

Before you begin, you’ll need the following:

Oct 24, 2024
Read More
Tutorial

Getting Wallet Balance Using Ethers.js in Node.js

Wallet Address: 0xYourEthereumAddress
Wallet Balance: 2.345 ETH
  • Ethers.js: We are using Ethers.js to interact with the Ethereum blockchain. Ethers.js simplifies the process of querying the blockchain and formatting the data for developers.
  • Provider: Whether you use Infura or a public node, the provider allows us to connect to the Ethereum network. Infura is commonly used because of its reliability and scalability, but public nodes can work as well if you're looking for a simple alternative.
  • getBalance(): This function queries the Ethereum network for the balance of the wallet in wei (the smallest unit of ETH). We then use ethers.utils.formatEther() to convert the balance from wei to Ether.

Oct 24, 2024
Read More
Tutorial

Understanding 0x000000000000000000000000000000000000dead Address and Token Burns in Ethereum

The "0x000000000000000000000000000000000000dead" address is used as a burn address because it is widely recognized as a destination for token destruction. Since tokens sent to this address are permanently locked and cannot be retrieved, it’s an ideal address for conducting token burns. It is a well-established convention across many blockchain projects.

For example, in token burn events, project developers often send tokens to this address to signal to the community that those tokens are now out of circulation. This is usually followed by a public announcement, detailing the number of tokens burned and the reasons behind the burn.

Oct 24, 2024
Read More
Tutorial
solidity

Writing an ERC-20 Token Contract with OpenZeppelin

     mkdir my-token
     cd my-token
  • Initialize a new Hardhat project:

Aug 22, 2024
Read More
Tutorial
solidity

Understanding Gas and Optimization in Smart Contracts

  • Choose data structures that minimize gas consumption. For example, mappings are generally more gas-efficient than arrays for storing large datasets.
  • Example: Use a mapping instead of an array for storing user balances.

5. Avoid Unnecessary Computations

Aug 22, 2024
Read More