Program Address
function determineAddress(bytes memory bytecode, uint256 salt)
public
view
returns (address)
{
bytes32 hash = keccak256(
abi.encodePacked(
bytes1(0xff), address(deployer), salt, keccak256(bytecode)
)
);
return address(uint160(uint256(hash)));
}Last updated