-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ArbOS11To32UpgradeTest develop base branch (#286)
* ArbOS11To32UpgradeTest * Uses mcopy in ArbOs11TO32UpgradeTest * Fix lint issues --------- Co-authored-by: gzeon <[email protected]>
- Loading branch information
1 parent
9d8a60a
commit 33a495a
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2024, Offchain Labs, Inc. | ||
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
pragma solidity ^0.8.24; | ||
|
||
import "../precompiles/ArbSys.sol"; | ||
|
||
contract ArbOS11To32UpgradeTest { | ||
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"); | ||
} | ||
} |