mirror of https://github.com/ConsenSys/mythril
Support Panic(uint256) calls for asserts in v0.8.0+ (#1514)
* Support panic() asserts * Use typing extensionspull/1518/head
parent
067d2c0b47
commit
89bc36baa8
@ -0,0 +1,21 @@ |
||||
pragma solidity ^0.8.0; |
||||
|
||||
|
||||
contract Exceptions { |
||||
|
||||
uint val; |
||||
|
||||
function change_val() public { |
||||
val = 1; |
||||
} |
||||
function assert1() public pure { |
||||
uint256 i = 1; |
||||
assert(i == 0); |
||||
} |
||||
|
||||
function fail() public view { |
||||
assert(val==2); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1 @@ |
||||
608060405234801561001057600080fd5b5060f18061001f6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c8063a02f5b99146041578063a9cc4718146049578063b34c3610146051575b600080fd5b60476059565b005b604f6063565b005b60576075565b005b6001600081905550565b6002600054146073576072608c565b5b565b600060019050600081146089576088608c565b5b50565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fdfea2646970667358221220cdbce6751f5dd32798edbe8c5cefae09753627f94e3f6e4a1f33afdb28a32e5464736f6c63430008060033 |
Loading…
Reference in new issue