Skip to content

Commit

Permalink
feat: add the identity precompile
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgar2017 committed Dec 6, 2024
1 parent 9c80958 commit 9549358
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ contract C {
// ====
// EVMVersion: >=constantinople
// ----
// testHighLevel() -> FAILURE
// testLowLevel() -> FAILURE
// testHighLevel() -> 1
// testLowLevel() -> 0xc76596d400000000000000000000000000000000000000000000000000000000
// testHighLevel2() -> FAILURE
3 changes: 1 addition & 2 deletions solidity/ethereum/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3497,8 +3497,7 @@ entries:
precompile_extcodesize_check.sol:
hash: '0x8bde8f1038d88fc0890b453cf9e801ee'
enabled: true
comment: Expected replaced with failures
version: '>=0.6.2'
version: '>=0.8.0'
return_size_bigger_than_expected.sol:
hash: '0x6fae6783c4ac99fb6983790b67a5ffc4'
enabled: true
Expand Down
4 changes: 2 additions & 2 deletions solidity/simple/system/forwarder.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! { "cases": [] }
//! { "ignore": true, "cases": [] }

// SPDX-License-Identifier: MIT OR Apache-2.0

pragma solidity >=0.8.0;

contract Test {
contract Forwarder {
address immutable _target;

constructor(address target) payable {
Expand Down
14 changes: 14 additions & 0 deletions solidity/simple/system/identity.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//! { "ignore": true, "cases": [] }

// SPDX-License-Identifier: MIT OR Apache-2.0

pragma solidity >=0.8.0;

contract Identity {
fallback() external {
assembly {
calldatacopy(0, 0, calldatasize())
return(0, calldatasize())
}
}
}

0 comments on commit 9549358

Please sign in to comment.