Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArbOS11To32UpgradeTest #284

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@
// Server-Side Request Forgery in axios
"GHSA-8hc4-vh64-cxmj",
// Regular Expression Denial of Service (ReDoS) in micromatch
"GHSA-952p-6rrq-rcjv"
"GHSA-952p-6rrq-rcjv",
// cookie accepts cookie name, path, and domain with out of bounds characters
"GHSA-pxg6-pf52-xh8x",
// Elliptic's verify function omits uniqueness validation
"GHSA-434g-2637-qmqr",
// Valid ECDSA signatures erroneously rejected in Elliptic
"GHSA-fc9h-whq2-v747",
// secp256k1-node allows private key extraction over ECDH
"GHSA-584q-6j8j-r5pm",
// Regular Expression Denial of Service (ReDoS) in cross-spawn
"GHSA-3xgq-45jj-v275"
]
}
20 changes: 20 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ const solidity = {
evmVersion: 'cancun',
},
},
'src/mocks/ArbOS11To32UpgradeTest.sol': {
version: '0.8.24',
settings: {
optimizer: {
enabled: true,
runs: 100,
},
evmVersion: 'cancun',
},
},
},
}

Expand Down Expand Up @@ -77,6 +87,16 @@ if (process.env['INTERFACE_TESTER_SOLC_VERSION']) {
evmVersion: 'cancun',
},
},
'src/mocks/ArbOS11To32UpgradeTest.sol': {
version: '0.8.24',
settings: {
optimizer: {
enabled: true,
runs: 100,
},
evmVersion: 'cancun',
},
},
}
}

Expand Down
18 changes: 18 additions & 0 deletions src/mocks/ArbOS11To32UpgradeTest.sol
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");
}
}
Loading