I'm a beginner of solidity. I just want to test view the event in etherscan but above error problems up.
contract class24{
function get_time_now()public view returns(uint256,uint256){
return (now,block.timestamp);
}
function get_block_info()public view returns(uint blockNumber,bytes32 blockHash,uint256 blockDifficulty){
return (block.number,
blockhash(block.number-1),
block.difficulty);
}
function get_tx_info()public view returns(address msgSender,address origin,uint value){
return (msg.sender,
tx.origin,
msg.value);
}
event setMoney (uint money);
function buy () public payable {
emit setMoney(msg.value);
}
}
However, when I force to deploy the contract by matamask in Rinkeby test network.I'm 100% sure that my wallet has enough eth. The below warning prompt up. Could any tell me why and what can I do?
Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? execution reverted