Ether e Wei
WEB3DEV Team
# Ether e Wei
Transações são pagas com ether.
Da mesma forma que 1 real equivale a 100 centavos, 1 ether equivale a 1018 wei.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract UnidadesEther {
uint public oneWei = 1 wei;
// 1 wei é igual a 1
bool public isOneWei = 1 wei == 1;
uint public oneEther = 1 ether;
// 1 ether é igual a 10^18 wei
bool public isOneEther = 1 ether == 1e18;
}