【发布时间】:2019-06-22 21:54:17
【问题描述】:
我在solidity中创建了另一个函数来返回结果(getGameNumbers),但我可以将它添加到 oraclizeCall 函数enter image description here
async WinningNumbers () {
const {accounts, contract}=this.state;
this.state.contract.methods.GenerateGameNumbers().send({from: accounts[0],gas:5000000, fromBlock: 'latest', toBlock: 'latest'+1},(err,results) =>{
if(results !=null){
this.setState({
winNum: (results)
})
}
})
}
我在控制台中得到交易哈希而不是结果
【问题讨论】:
-
我认为您正在寻找的是在这个问题中:ethereum.stackexchange.com/questions/6002/transaction-status
-
@ChamsddinBouzaine 现在可能会在屏幕上打印交易哈希
标签: reactjs ethereum solidity truffle oraclize