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.
33 lines
762 B
Solidity
33 lines
762 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.0;
|
|
|
|
contract StorageSlotSelfDestructableV2 {
|
|
address immutable owner;
|
|
address immutable userToRefund;
|
|
|
|
constructor(address user) payable {
|
|
owner = msg.sender;
|
|
userToRefund = user;
|
|
}
|
|
|
|
function destruct() public {
|
|
require(msg.sender == owner, "NFO");
|
|
selfdestruct(payable(userToRefund));
|
|
}
|
|
}
|
|
|
|
contract StorageSlotSelfDestructableV2_DEBUG {
|
|
address public immutable owner;
|
|
address public immutable userToRefund;
|
|
|
|
constructor(address user) payable {
|
|
owner = msg.sender;
|
|
userToRefund = user;
|
|
}
|
|
|
|
function destruct() public {
|
|
require(msg.sender == owner, "NFO");
|
|
selfdestruct(payable(userToRefund));
|
|
}
|
|
}
|