Dec 19, 2023
Tutorials
ZxStim
ether
.ether
is equal to 10^18 wei
.Compile and deploy the code block below:
solidityEtherUnits.sol// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; contract EtherUnits { uint public oneWei = 1 wei; // 1 wei is equal to 1 bool public isOneWei = 1 wei == 1; uint public oneEther = 1 ether; // 1 ether is equal to 10^18 wei bool public isOneEther = 1 ether == 1e18; }