hoodquidity/packages/contracts/lib/forge-std/test/StdConstants.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

38 lines
1.3 KiB
Solidity

// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.13 <0.9.0;
import {StdConstants} from "../src/StdConstants.sol";
import {Test} from "../src/Test.sol";
contract StdConstantsTest is Test {
function testVm() public view {
assertEq(StdConstants.VM.getBlockNumber(), 1);
}
function testVmDerivation() public pure {
assertEq(address(StdConstants.VM), address(uint160(uint256(keccak256("hevm cheat code")))));
}
function testConsoleDerivation() public pure {
assertEq(StdConstants.CONSOLE, address(uint160(uint88(bytes11("console.log")))));
}
function testDefaultSender() public view {
assertEq(StdConstants.DEFAULT_SENDER, msg.sender);
}
function testDefaultSenderDerivation() public pure {
assertEq(StdConstants.DEFAULT_SENDER, address(uint160(uint256(keccak256("foundry default caller")))));
}
function testDefaultTestContract() public {
assertEq(StdConstants.DEFAULT_TEST_CONTRACT, address(new Dummy()));
}
function testDefaultTestContractDerivation() public view {
assertEq(address(this), StdConstants.VM.computeCreateAddress(StdConstants.DEFAULT_SENDER, 1));
assertEq(StdConstants.DEFAULT_TEST_CONTRACT, StdConstants.VM.computeCreateAddress(address(this), 1));
}
}
contract Dummy {}