Skip to content

Commit

Permalink
Uses mcopy in ArbOs11TO32UpgradeTest
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoximenes committed Dec 16, 2024
1 parent cd9b8d6 commit 54ec0a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mocks/ArbOS11To32UpgradeTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ pragma solidity ^0.8.24;
import "../precompiles/ArbSys.sol";

contract ArbOS11To32UpgradeTest {
function mcopy() external view {
function mcopy() external returns (bytes32 x) {
assembly {
mstore(0x20, 0x9) // Store 0x9 at word 1 in memory
mcopy(0, 0x20, 0x20) // Copies 0x9 to word 0 in memory
x := mload(0) // Returns 32 bytes "0x9"
}
require(ArbSys(address(0x64)).arbOSVersion() == 55 + 32, "EXPECTED_ARBOS_32");
}
}

0 comments on commit 54ec0a9

Please sign in to comment.