This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define macro MAIN() = takes(0) returns(0) { | |
// sol.stop | |
__VERBATIM(0x01) | |
// sol.ctxSetting | |
__VERBATIM(0x00) | |
// store origin at memory location 0 | |
origin push0 mstore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from z3 import * | |
selector = BitVec('selector', 32) | |
expr = 107 + 4 * (selector % 16) | |
codesize = 128 | |
s = Solver() | |
s.add(expr < codesize) | |
possible_jump_table_values = set([]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass | |
from typing import Tuple | |
bytes32 = int | |
address = int | |
@dataclass | |
class Context: | |
context_address: address |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://twitter.com/0xYYY_/status/1562091599731228672 | |
# put this before `source $ZSH/oh-my-zsh.sh` | |
FOUNDRY_PLUGIN_DIR=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/foundry | |
fpath+=$FOUNDRY_PLUGIN_DIR | |
fup () { | |
if ! command -v foundryup &> /dev/null | |
then | |
echo "Install foundryup first: https://getfoundry.sh" |
OlderNewer