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 `crypto.randomBytes` and `ethers.randomBytes`: A Comparison

No preview available for this content.

Oct 24, 2024
Read More
Tutorial

Working with `BigNumber` in ethers.js: A Guide for Version 6

You can create BigNumber instances in several ways, including from numbers, strings, hexadecimal values, or even other BigNumber instances.

  • From a Number:

Oct 24, 2024
Read More
Tutorial

How to Query ERC-20 Token Balances and Transactions Using Ethers.js and Etherscan API

To follow along with this tutorial, you’ll need:

  • Node.js installed on your machine.
  • A basic understanding of JavaScript.
  • An Etherscan API key (explained below).
  • Familiarity with Ethers.js for blockchain interaction.

Oct 24, 2024
Read More
Tutorial

Etherscan vs Infura: Choosing the Right API for Your Blockchain Application

  • Rate Limits: Infura’s free tier provides a generous number of requests (e.g., 100,000 requests per day) and supports more requests as you scale. This makes it more suitable for real-time dApps.
  • Pricing: Infura’s paid plans offer higher limits and additional features like access to Layer 2 networks.
  • Use Etherscan if:
  • You only need to read blockchain data.
  • You want to build tools for analytics or explorers.
  • You don’t need to send transactions or interact directly with smart contracts.
  • Use Infura if:
  • You need to interact with the Ethereum blockchain in real-time.
  • You’re building dApps, wallets, or tools that require transactions.
  • You need to write data to the blockchain, such as sending Ether or deploying contracts.

Oct 24, 2024
Read More
Tutorial

Sending Transactions and Interacting with Smart Contracts Using Infura and Ethers.js

  • Infura Provider: You connect to the Ethereum network using the Infura provider (infuraProvider), which allows you to interact with Ethereum nodes.
  • Private Key: Replace 'YOUR_PRIVATE_KEY' with your Ethereum wallet’s private key (keep it secure).
  • Recipient Address: Replace '0xRecipientEthereumAddress' with the Ethereum address you want to send Ether to.
  • Gas and Fees: The gasLimit and gasPrice fields are required for sending transactions. The getGasPrice function retrieves the current gas price from the Infura node.

Once the script is ready, run it using Node.js:

Oct 24, 2024
Read More