"I only deployed RecoveryFactory
and never deployed Withdraw
or anything else. When RecoveryFactory
was deployed, no salt was created. If there were a salt, I wouldn't be asking. That's why I'm confused—when was this 'salt' supposed to be generated? Because nothing provided a salt when I deployed RecoveryFactory
."
/**
*Submitted for verification at Arbiscan.io on 2025-05-09
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Withdraw {
address payable public owner;
constructor(address payable _owner) {
owner = _owner;
}
function withdraw() public {
require(msg.sender == owner, "Not owner");
(bool success, ) = owner.call{value: address(this).balance}("");
require(success, "Transfer failed");
}
}
contract RecoveryFactory {
function deploy(bytes32 salt, address payable _owner) public returns (address) {
address addr;
bytes memory bytecode = abi.encodePacked(
type(Withdraw).creationCode,
abi.encode(_owner)
);
assembly {
addr := create2(0, add(bytecode, 0x20), mload(bytecode), salt)
}
require(addr != address(0), "Deploy failed");
return addr;
}
function getWithdrawBytecodeHash(address payable _owner) external pure returns (bytes32) {
bytes memory bytecode = abi.encodePacked(
type(Withdraw).creationCode,
abi.encode(_owner)
);
return keccak256(bytecode);
}
function computeAddress(bytes32 salt, bytes32 bytecodeHash) external view returns (address) {
return address(uint160(uint(
keccak256(abi.encodePacked(
bytes1(0xff),
address(this),
salt,
bytecodeHash
))
)));
}
}
This code what i have deployed
Anyone please help mei lose big amount 2.6eth losing cause this contract
https://arbiscan.io/address/0x33216fde0fe48249f7775b7a7f50c013c7f2e1c9#code
This is