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.
34 lines
592 B
34 lines
592 B
3 years ago
|
pragma solidity >=0.8.0 <0.9.0;
|
||
|
pragma abicoder v2;
|
||
|
|
||
10 months ago
|
import "./Library_solc8.sol";
|
||
|
|
||
3 years ago
|
error InvalidSomeAddress(address someAddress);
|
||
|
|
||
10 months ago
|
using Library_solc8 for uint256;
|
||
3 years ago
|
|
||
10 months ago
|
contract ContractA {
|
||
1 year ago
|
mapping(bytes32 key => uint256) public authorization;
|
||
3 years ago
|
address public someAddress;
|
||
|
|
||
|
function throwError(address _add) external {
|
||
|
this;
|
||
|
|
||
|
if (_add == address(0)) {
|
||
|
revert InvalidSomeAddress(_add);
|
||
|
}
|
||
|
|
||
|
someAddress = _add;
|
||
|
}
|
||
3 years ago
|
|
||
|
function checkSomething() external {
|
||
|
uint a = 5;
|
||
|
|
||
|
unchecked {
|
||
|
a++;
|
||
|
}
|
||
|
|
||
|
unchecked {}
|
||
|
}
|
||
3 years ago
|
}
|