Solidity教程

Solidity 以太单位

Solidity 中,以太币的单位可以使用 weifinneyszaboether表示。
最小的单位是 wei1e12表示 1 x 10^12
assert(1 wei == 1);
assert(1 szabo == 1e12);
assert(1 finney == 1e15);
assert(1 ether == 1e18);
assert(2 ether == 2000 fenny);

时间单位

与货币单位相似,Solidity中的时间单位如下:
assert(1 seconds == 1);
assert(1 minutes == 60 seconds);
assert(1 hours == 60 minutes);
assert(1 day == 24 hours);
assert(1 week == 7 days);
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4