Ethereum Smart Contracts Development Tutorials, Guides & Insights
Unlock 1+ expert-curated ethereum smart contracts tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your ethereum smart contracts skills on DeveloperBreeze.
Adblocker Detected
It looks like you're using an adblocker. Our website relies on ads to keep running. Please consider disabling your adblocker to support us and access the content.
Working with `BigNumber` in ethers.js: A Guide for Version 6
Tutorial October 24, 2024
const num1 = BigNumber.from(10);
const num2 = BigNumber.from(5);
console.log(num1.add(num2).toString()); // "15"
console.log(num1.sub(num2).toString()); // "5"BigNumber instances can be compared using various methods such as eq (equals), lt (less than), and gt (greater than).