Transactions are paid with ether.
거래는 ETH로 지불된다.
Similar to how one dollar is equal to 100 cent, one ether is equal to 1018 wei.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
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;
}
솔리디티 1이더 1018웨이
Solidity - If / Else (0) | 2022.12.23 |
---|---|
Solidity - Gas (0) | 2022.12.22 |
Solidity - Reading and Writing to a State Variable (0) | 2022.12.21 |
Solidity - Immutable (0) | 2022.12.21 |
Solidity - Constants (0) | 2022.12.21 |