@@ -1277,35 +1277,4 @@ contract SafeTransferLibTest is SoladyTest {
12771277 assertEq (mover.code, hex "3d35ff " );
12781278 assertEq (mover, SafeTransferLib.ETH_MOVER);
12791279 }
1280-
1281- function _deployOneTimeVault (address to , uint256 amount ) internal returns (address vault ) {
1282- /// @solidity memory-safe-assembly
1283- assembly {
1284- to := shr (96 , shl (96 , to)) // Clean upper 96 bits.
1285- for {} 1 {} {
1286- let m := mload (0x40 )
1287- // If the mover is missing or bricked, deploy a minimal accrual contract
1288- // that withdraws all ETH to `to` when being called only by `to`.
1289- mstore (
1290- add (m, 0x1f ), 0x33146025575b600160005260206000f35b3d3d3d3d47335af1601a573d3dfd
1291- )
1292- mstore (m, or (to, shl (160 , 0x6034600b3d3960343df3fe73 )))
1293- // Compute and store the bytecode hash.
1294- mstore8 (0x00 , 0xff ) // Write the prefix.
1295- mstore (0x35 , keccak256 (m, 0x3f ))
1296- mstore (0x01 , shl (96 , address ())) // Deployer.
1297- mstore (0x15 , 0 ) // Salt.
1298- vault := keccak256 (0x00 , 0x55 )
1299- if iszero (
1300- mul (
1301- returndatasize (),
1302- call (gas (), vault, amount, codesize (), 0x00 , codesize (), 0x00 )
1303- )
1304- ) { if iszero (create2 (0 , m, 0x3f , 0 )) { revert (codesize (), codesize ()) } } // For gas estimation.
1305-
1306- mstore (0x40 , m)
1307- break
1308- }
1309- }
1310- }
13111280}
0 commit comments