mirror of https://github.com/ConsenSys/mythril
Fix parsing of compiler version and reformat file (#1787)
* Fix parsing of compiler version (patch version) * Add test to check version-patch fixpull/1789/head
parent
2a37d2801a
commit
39b79cae8a
@ -0,0 +1,21 @@ |
|||||||
|
// SPDX-License-Identifier: MIT |
||||||
|
pragma solidity ^0.8; // Patch version - X.y[.z] is missing |
||||||
|
|
||||||
|
contract EtherWallet { |
||||||
|
address payable public owner; |
||||||
|
|
||||||
|
constructor() { |
||||||
|
owner = payable(msg.sender); |
||||||
|
} |
||||||
|
|
||||||
|
receive() external payable {} |
||||||
|
|
||||||
|
function withdraw(uint256 _amount) external { |
||||||
|
require(msg.sender == owner, "caller is not owner"); |
||||||
|
payable(msg.sender).transfer(_amount); |
||||||
|
} |
||||||
|
|
||||||
|
function getBalance() external view returns (uint256) { |
||||||
|
return address(this).balance; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue