diff --git a/src/mocks/Program.sol b/src/mocks/Program.sol index 2ff15f43..871847c3 100644 --- a/src/mocks/Program.sol +++ b/src/mocks/Program.sol @@ -9,6 +9,10 @@ import "@openzeppelin/contracts/utils/Strings.sol"; contract ProgramTest { event Hash(bytes32 result); + function callSelfDestruct(address addr) external { + selfdestruct(payable(addr)); + } + function callKeccak(address program, bytes calldata data) external { // in keccak.rs // the input is the # of hashings followed by a preimage diff --git a/src/mocks/SelfDestruct.sol b/src/mocks/SelfDestruct.sol new file mode 100644 index 00000000..ffc9a5dc --- /dev/null +++ b/src/mocks/SelfDestruct.sol @@ -0,0 +1,11 @@ +// Copyright 2022-2023, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +contract SelfDestruct { + function callSelfDestruct(address addr) external { + selfdestruct(payable(addr)); + } +}