erigon-pulse/tests/contracts/selfDestructor.sol
Kian b40e81bf3a
Fix 'make bindings' (#6824)
Solidity 0.8.0 breaks the current use of `payable` in these test
contracts, resulting in errors like
```
Error: Type address is not implicitly convertible to expected type address payable.
  --> selfDestructor.sol:10:9:
   |
10 |         address payable nil = address(0);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

Related to #6680
2023-02-10 09:03:45 +07:00

14 lines
234 B
Solidity

pragma solidity >=0.5.0;
contract selfDestructor {
int value;
constructor() public {
value = 1;
}
function selfDestruct() public {
address payable nil = payable(0);
selfdestruct(nil);
}
}