const deploySafe = async () => {
try {
const safeFactory1 = await SafeFactory.init({
provider: RPC_URL,
signer: OWNER_1_PRIVATE_KEY,
});
const safeAccountConfig: SafeAccountConfig = {
owners: [OWNER_1_ADDRESS],
threshold: 1,
// Optional params
};
if (safeFactory1) {
/* This Safe is tied to owner 1 because the factory was initialized with the owner 1 as the signer. */
const protocolKitOwner1 = await safeFactory1.deploySafe({
safeAccountConfig,
});
const safeAddress = await protocolKitOwner1.getAddress();
console.log("Your Safe has been deployed:");
console.log(`https://sepolia.etherscan.io/address/${safeAddress}`);
console.log(`https://app.safe.global/sep:${safeAddress}`);
}
} catch (e: any) {
console.error(e.message);
}
};
At first deployment of fresh safe account, i get this error, but the safe account gets deployed tho, and i get the address also
Error: could not coalesce error (error={ "code": -32000, "message": "already known" }, payload={ "id": 22, "jsonrpc": "2.0", "method": "eth_sendRawTransaction", }
But When i run the same function after the first attempt i get this error
Execution reverted: "Create2 call failed" (action="estimateGas", data="0x..", reason="Create2 call failed", transaction={ "data": "0x..", "from": "0x87cd12be2cf76239294D97Ea4978Ee9cC19Fd283", "to": "0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC" }, invocation=null, revert={ "args": [ "Create2 call failed" ], "name": "Error", "signature": "Error(string)" }, code=CALL_EXCEPTION, version=6.13.1)