I got the "Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
" in remix while using the drawWinnerdrawWinner
functionemphasized text
enter// codeSPDX-License-Identifier: hereGPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
* @custom:dev-run-script ./scripts/deploy_with_ethers.ts
*/
contract firire {
function withdrawal(uint256 amount) public {
require(amount <= 100000000000000000, "error");
payable(msg.sender).transfer(amount);
}
fallback() external payable {}
receive() external payable {}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
@title Storage
@dev Store & retrieve value in a variable
@custom:dev-run-script ./scripts/deploy_with_ethers.ts */ contract firire {
function withdrawal(uint256 amount) public { require(amount <= 100000000000000000, "error"); payable(msg.sender).transfer(amount); }
fallback() external payable {}
receive() external payable {} }