You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
502 B
30 lines
502 B
// SPDX-License-Identifier: MIT
|
|
pragma solidity >=0.8.0 <0.9.0;
|
|
pragma abicoder v2;
|
|
|
|
error InvalidSomeAddress(address someAddress);
|
|
|
|
contract ContractA {
|
|
|
|
address public someAddress;
|
|
|
|
function throwError(address _add) external {
|
|
this;
|
|
|
|
if (_add == address(0)) {
|
|
revert InvalidSomeAddress(_add);
|
|
}
|
|
|
|
someAddress = _add;
|
|
}
|
|
|
|
function checkSomething() external {
|
|
uint a = 5;
|
|
|
|
unchecked {
|
|
a++;
|
|
}
|
|
|
|
unchecked {}
|
|
}
|
|
}
|
|
|