【发布时间】:2018-11-30 15:55:44
【问题描述】:
我正在研究以太坊的区块链,我想在使用 Solidity 的智能合约中使用过去的交易数据。 如果我在用javascript编写的程序中使用Web3.js模块,我可以很容易地得到这些数据。 但我无法使用 Solidity 在智能合约中获取这些数据。
Solidity 的参考说我们可以通过“block.number”和“block.blockhash(uint blockNumber)”函数获取当前区块号、blockhash 等,但没有提到获取交易数据。 (http://solidity.readthedocs.io/en/latest/units-and-global-variables.html#special-variables-and-functions)
请帮帮我。
【问题讨论】:
标签: blockchain ethereum solidity web3js geth