今日来介绍一些单位跟全域变数相关的东西
在任何数字後面加上 wei
、gwei
、ether
就会变成货币单位,预设就是 wei
assert(1 wei == 1);
assert(1 gwei == 1e9);
assert(1 ether == 1e18);
在任何数字後面加上 seconds
,就会变成时间相关参数,预设是 seconds
1 == 1 seconds
1 minutes == 60 seconds
1 hours == 60 minutes
1 days == 24 hours
1 weeks == 7 days
//目前的gas 值
block.gaslimit (uint)
//目前的区块编号
block.number (uint)
//区块难度
block.difficulty (uint)
//区块时间
block.timestamp
//矿工的位址
block.coinbase (address)
//目前chain id
block.chainid (uint)
//剩余的gas
gasleft()
//发送讯息给function的位址
msg.sender (address)
//完整的calldata
msg.data (bytes)
//发送多少以太币
msg.value (uint)
//交易的gas price
tx.gasprice (uint)
//交易发送者的位址
tx.origin (address)
明天再来介绍一些数学函式跟错误处理的相关函式。
>>: OpenStack Neutron 介绍 — OVN Plug-in 架构
这是我在win 10用visual studio 来编译cpython的原始码,可以参考[your ...
呼...这两天稍作休息终於复活了。 到目前为止,我们的 Angular app 还只能在本机自 hi...
铁人30天,实际在不简单,在这30天的过程,中间一度想要放弃、不知道要写什麽。 能持续产出优质文章的...
您的订阅是我制作影片的动力 订阅点这里~ 影片程序码 library(naniar) data(ir...
前几章中的操作过程中,我们已经可以顺利的将 Windows 10 在虚拟客体机当中安装起来运作,但...