Skip to content

Instantly share code, notes, and snippets.

@hkalodner
Created December 5, 2024 19:44
Show Gist options
  • Select an option

  • Save hkalodner/ac5868e6860dea88b0b4e03ed7353391 to your computer and use it in GitHub Desktop.

Select an option

Save hkalodner/ac5868e6860dea88b0b4e03ed7353391 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
pragma solidity ^0.8.13;
import {console} from "forge-std/console.sol";
contract MyScript {
function run() external {
uint8 op = 0;
uint256 amount = 0;
address upgradeExecutor = 0x0EE7AD3Cc291343C9952fFd8844e86d294fa513F;
bytes memory call1Data = abi.encodeWithSignature(
"execute(address,bytes)",
0x6B9a2769B259f36FBd503fec0bbF4408459a3876,
hex"857d1ab7000000000000000000000000c47dacfbaa80bd9d8112f4e8069482c2a3221336000000000000000000000000041f85dd87c46b941dc9b15c6628b19ee5358485"
);
bytes memory call2Data = abi.encodeWithSignature(
"executeCall(address,bytes)",
0x995a9d3ca121D48d21087eDE20bc8acb2398c8B1,
abi.encodeWithSignature(
"invalidateKeysetHash(bytes32)",
0xc5c63298424f1b41c805c2a8bf16a2334b3817cd75c04aff53f631852673e4a0
)
);
console.logBytes(abi.encodePacked(
uint8(op),
address(upgradeExecutor),
uint256(amount),
uint256(call1Data.length),
bytes(call1Data),
uint8(op),
address(upgradeExecutor),
uint256(amount),
uint256(call2Data.length),
bytes(call2Data)
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment