forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: split
IPrecompile
and TestSuite
contracts + move tests
- Loading branch information
Showing
5 changed files
with
207 additions
and
204 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-License-Identifier: LGPL-3.0 | ||
pragma solidity 0.8.28; | ||
|
||
/// @dev Interface of precompiled contract for implementation via `precompilegen`. | ||
interface IPrecompile { | ||
function Echo(string memory) external view returns (string memory); | ||
|
||
function Echo(uint256) external view returns (uint256); | ||
|
||
function HashPacked(uint256, bytes2, address) external view returns (bytes32); | ||
|
||
struct Wrapper { | ||
int256 val; | ||
} | ||
|
||
function Extract(Wrapper memory) external view returns (int256); | ||
|
||
function Self() external view returns (address); | ||
|
||
function RevertWith(bytes memory) external; | ||
|
||
function View() external view returns (bool canReadState, bool canWriteState); | ||
|
||
function Pure() external pure returns (bool canReadState, bool canWriteState); | ||
|
||
function NeitherViewNorPure() external returns (bool canReadState, bool canWriteState); | ||
|
||
function Payable() external payable returns (uint256 value); | ||
|
||
function NonPayable() external; | ||
} |
33 changes: 3 additions & 30 deletions
33
libevm/precompilegen/Test.sol → ...recompilegen/testprecompile/TestSuite.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.