This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function create2Address(address deployer, bytes32 salt, bytes32 codeHash) pure returns (address) { | |
return address(uint160(uint256(keccak256(abi.encodePacked(hex"ff", deployer, salt, codeHash))))); | |
} | |
contract Factory { | |
address public caller; | |
function fetch(bytes32 salt) public { | |
caller = msg.sender; | |
new Funder{salt: salt}(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.25; | |
import {Test, console2 as console} from "forge-std/Test.sol"; | |
contract ABCTest is Test { | |
event VaultAuxiliary1(address, string, bytes); | |
function test_xxx() public { | |
binarySearchMinUpperGasLimit(this.process, 100_000_000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import {OwnableUDS} from "UDS/auth/OwnableUDS.sol"; | |
import {UUPSUpgrade} from "UDS/proxy/UUPSUpgrade.sol"; | |
import {ERC1967_PROXY_STORAGE_SLOT} from "UDS/proxy/ERC1967Proxy.sol"; | |
// ------------- storage | |
bytes32 constant DIAMOND_STORAGE_STATIC_PROXY = keccak256("diamond.storage.static.proxy"); |