Skip to content

Instantly share code, notes, and snippets.

@Vectorized
Last active December 7, 2025 13:27
Show Gist options
  • Select an option

  • Save Vectorized/1cb8ad4cf393b1378e08f23f79bd99fa to your computer and use it in GitHub Desktop.

Select an option

Save Vectorized/1cb8ad4cf393b1378e08f23f79bd99fa to your computer and use it in GitHub Desktop.
Safe Move ETH (Mover + Vault)
solc Vault.yul --bin --optimize-runs=1 --evm-version=istanbul --strict-assembly

The variables

factory: 0x4e59b44847b379578588920cA78FbF26c0B4956C (Nick's factory)

salt: 0x0000000000000000000000000000000000000000771afb1968f078025ab1be60

address: 0x00000000000073c48c8055bD43D1A53799176f0D

initcode:

0x623d35ff3d526003601df3

initcodehash: 0xd35dacfbc3fde42ac9345e6e9eb0d468413ed62843fecddb45e0db78d4b2a124

factory calldata (this is essentially <salt><initcode>):

0x000000000000000000000000000000000000000063d76c4f57ebf10084429e18623d35ff3d526003601df3

How to deploy?

  1. Go to Remix https://remix.ethereum.org

  2. Compile this contract

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

contract Empty {
    fallback() external payable {}
}
  1. Under the "Deploy & run transactions tab", select "Injected Provider -- Your Browser Crypto Wallet".

  2. Under the "At Address" field, paste 0x4e59b44847b379578588920cA78FbF26c0B4956C into the `Load contract from Address".

  3. Scroll down, and under the "Low level interactions" calldata field, paste the factory calldata (see above).

  4. Click "Transact". If the simulation doesn't show out-of-gas, it means the contract has not been deployed on that particular network yet. Use https://chainlist.org/ to add all the various networks (including test networks) and somehow find ways to bridge ETH into these networks.

object "Vault" {
code {
datacopy(returndatasize(), dataoffset("runtime"), datasize("runtime"))
return(returndatasize(), datasize("runtime"))
}
object "runtime" {
code {
if eq(caller(), 0x112233445566778899aa112233445566778899aa) {
if iszero(call(gas(), caller(), selfbalance(), returndatasize(), returndatasize(), returndatasize(), returndatasize())) {
revert(returndatasize(), 0x00)
}
}
mstore(0x00, 1)
return(0x00, 0x20)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment