Skip to content

Instantly share code, notes, and snippets.

View 0xClandestine's full-sized avatar
🧙

clandestine.eth 0xClandestine

🧙
View GitHub Profile
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.27;
import "src/test/integration/users/User.t.sol";
import "src/test/integration/IntegrationChecks.t.sol";
contract Integration_StorageGaps is IntegrationCheckUtils {
function assertSlotEq(address target, uint256 slot, uint256 value) internal {
assertEq(uint256(vm.load(target, bytes32(slot))), value, "Slot value mismatch");
}
@0xClandestine
0xClandestine / LegacyToNameSpaceConversion.t.sol
Last active January 14, 2025 20:39
Legacy Storage (slots assigned by compiler) to Namespace storage (slots explicitly assigned by us).
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {Test, console} from "forge-std/Test.sol";
contract LegacyStorage {
uint256 public number;
function setNumber(uint256 newNumber) public {
number = newNumber;