This file contains 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
s{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
{-# LANGUAGE Rank2Types #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-} | |
-- A version of the code from <http://fun-discoveries.blogspot.se/2016/03/compilation-as-typed-edsl-to-edsl.html> | |
-- which avoids incomplete matching on `Val` and `Ref`. |
This file contains 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
# @license MIT | |
# @author Philogy <https://github.com/Philogy> | |
from eth_utils.abi import function_signature_to_4byte_selector | |
from eth_utils.crypto import keccak | |
from math import ceil, log2 | |
import pyperclip | |
def find_reselector_nonce(selectors, mask): |