Skip to content

Commit 763bd77

Browse files
authored
Merge pull request #284 from OffchainLabs/arbos_11_to_32_upgrade_test
ArbOS11To32UpgradeTest
2 parents e0a698e + faf77b3 commit 763bd77

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

audit-ci.jsonc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@
6565
// Server-Side Request Forgery in axios
6666
"GHSA-8hc4-vh64-cxmj",
6767
// Regular Expression Denial of Service (ReDoS) in micromatch
68-
"GHSA-952p-6rrq-rcjv"
68+
"GHSA-952p-6rrq-rcjv",
69+
// cookie accepts cookie name, path, and domain with out of bounds characters
70+
"GHSA-pxg6-pf52-xh8x",
71+
// Elliptic's verify function omits uniqueness validation
72+
"GHSA-434g-2637-qmqr",
73+
// Valid ECDSA signatures erroneously rejected in Elliptic
74+
"GHSA-fc9h-whq2-v747",
75+
// secp256k1-node allows private key extraction over ECDH
76+
"GHSA-584q-6j8j-r5pm",
77+
// Regular Expression Denial of Service (ReDoS) in cross-spawn
78+
"GHSA-3xgq-45jj-v275"
6979
]
7080
}

hardhat.config.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ const solidity = {
4444
evmVersion: 'cancun',
4545
},
4646
},
47+
'src/mocks/ArbOS11To32UpgradeTest.sol': {
48+
version: '0.8.24',
49+
settings: {
50+
optimizer: {
51+
enabled: true,
52+
runs: 100,
53+
},
54+
evmVersion: 'cancun',
55+
},
56+
},
4757
},
4858
}
4959

@@ -77,6 +87,16 @@ if (process.env['INTERFACE_TESTER_SOLC_VERSION']) {
7787
evmVersion: 'cancun',
7888
},
7989
},
90+
'src/mocks/ArbOS11To32UpgradeTest.sol': {
91+
version: '0.8.24',
92+
settings: {
93+
optimizer: {
94+
enabled: true,
95+
runs: 100,
96+
},
97+
evmVersion: 'cancun',
98+
},
99+
},
80100
}
81101
}
82102

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2024, Offchain Labs, Inc.
2+
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
3+
// SPDX-License-Identifier: BUSL-1.1
4+
5+
pragma solidity ^0.8.24;
6+
7+
import "../precompiles/ArbSys.sol";
8+
9+
contract ArbOS11To32UpgradeTest {
10+
function mcopy() external returns (bytes32 x) {
11+
assembly {
12+
mstore(0x20, 0x9) // Store 0x9 at word 1 in memory
13+
mcopy(0, 0x20, 0x20) // Copies 0x9 to word 0 in memory
14+
x := mload(0) // Returns 32 bytes "0x9"
15+
}
16+
require(ArbSys(address(0x64)).arbOSVersion() == 55 + 32, "EXPECTED_ARBOS_32");
17+
}
18+
}

0 commit comments

Comments
 (0)