hoodquidity/packages/contracts/lib/openzeppelin-contracts/test/utils/Create3.t.sol
Денис Зефиров dba2811447 Hoodquidity: liquidity campaigns for Robinhood Chain stock token markets
Full build: Vite/React acid-terminal frontend (BEARER design system,
Panchang/Sentient/Fragment Mono, neon layer, palette audit script),
HoodquidityVaults Foundry contracts (single+dual deposits via Chainlink-style
feeds, hybrid exit, 10% platform fee, boost, Genesis LP), Reown AppKit wallet
connect with Robinhood Chain testnet (46630), live data from Dexscreener and
onchain reads, partner portal, design-sync setup for claude.ai/design.

Deploy: static via Forgejo Actions platform, BUILD_DIR=apps/web/dist (.env).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 08:32:28 +04:00

25 lines
983 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {Test} from "forge-std/Test.sol";
import {Create3} from "@openzeppelin/contracts/utils/Create3.sol";
contract Create3Test is Test {
function testSymbolicComputeAddressSpillage(bytes32 salt, address deployer) public pure {
address predicted = Create3.computeAddress(salt, deployer);
bytes32 spillage;
assembly ("memory-safe") {
spillage := and(predicted, 0xffffffffffffffffffffffff0000000000000000000000000000000000000000)
}
assertEq(spillage, bytes32(0));
}
function testSymbolicDeployMatchesComputeAddress(bytes32 salt) public {
// Minimal init code that deploys a contract with empty runtime code (PUSH1 0, PUSH1 0, RETURN).
bytes memory bytecode = hex"60006000f3";
address predicted = Create3.computeAddress(salt);
address deployed = Create3.deploy(0, salt, bytecode);
assertEq(deployed, predicted);
}
}