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 8f5de30
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 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
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 8f5de30

Please sign in to comment.