Yashotantra Academy
AI · Blockchain · Cloud · Data
Dark mode active
Learn
Tracks
ABCD
Certification
More
▾
Dark mode active
Learn
Tracks
ABCD
Certification
Study
Theory
Code Lab
Build
Solidity IDE
Staking Sandbox
Simulation
Reference
Wallets
Gas Fees
Explorers
← Code Lab
React Native
0/50 solved · 0%
All lessons
lesson
code
Performance · hard
39. BigInt precision for wei math
Avoid floating-point error in on-chain amounts.
Write `addWei(a, b)` accepting two wei amounts as strings, returning their sum as a string, using `BigInt` for exact precision.
Required in your answer:
BigInt(
Reveal solution
Run & check
Reset
Transpiled, then run in a sandbox
function addWei(a, b) { // TODO }
Output appears here.
← 38. Wrapping a native module call
40. Simulating TurboModule lazy loading →