diff --git a/script/GetDeterminsticParam.s.sol b/script/GetDeterminsticParam.s.sol index 92225938..48db8a2c 100644 --- a/script/GetDeterminsticParam.s.sol +++ b/script/GetDeterminsticParam.s.sol @@ -11,18 +11,6 @@ import {LibString} from "solady/utils/LibString.sol"; import {Create2} from "@openzeppelin/contracts/utils/Create2.sol"; contract GetDeterminsticParam is ZoraDeployerBase { - function stringToUint(string memory s) public pure returns (uint) { - bytes memory b = bytes(s); - uint result = 0; - for (uint256 i = 0; i < b.length; i++) { - uint256 c = uint256(uint8(b[i])); - if (c >= 48 && c <= 57) { - result = result * 10 + (c - 48); - } - } - return result; - } - // copied from: https://github.com/karmacoma-eth/foundry-playground/blob/main/script/MineSaltScript.sol#L17C1-L36C9 function mineSalt(address deployer, bytes32 initCodeHash, string memory startsWith) public returns (string memory saltStr, address expectedAddress) { string[] memory args = new string[](8); @@ -70,12 +58,5 @@ contract GetDeterminsticParam is ZoraDeployerBase { console.log("salt: ", saltString); console.log("expected address: ", expectedAddress); - - address addressFromSalt = Create2.computeAddress(bytes32(stringToUint(saltString)), creationCodeHash, deployerAddress); - - console.log("resulting address from salt: ", expectedAddress); - - // make sure they are equal: - assert(addressFromSalt == expectedAddress); } }