Skip to content

Commit

Permalink
feat: detect clones with immutable args
Browse files Browse the repository at this point in the history
  • Loading branch information
banteg committed Aug 10, 2023
1 parent 62995eb commit f8a8fe2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ape_ethereum/ecosystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def get_proxy_info(self, address: AddressType) -> Optional[ProxyInfo]:
ProxyType.Clones: r"36603057343d52307f830d2d700a97af574b186c80d40429385d24241565b08a7c559ba283a964d9b160203da23d3df35b3d3d3d3d363d3d37363d73(.{40})5af43d3d93803e605b57fd5bf3", # noqa: E501
ProxyType.ZeroAge: r"3d3d3d3d363d3d37363d73(.{40})5af43d3d93803e602a57fd5bf3",
ProxyType.SoladyPush0: r"5f5f365f5f37365f73(.{40})5af43d5f5f3e6029573d5ffd5b3d5ff3",
ProxyType.ClonesWithImmutableArgs: r"3d3d3d3d363d3d3761007f603736393661007f013d73(.{40})5af43d3d93803e603557fd5bf3.*",
}
for type, pattern in patterns.items():
match = re.match(pattern, code)
Expand Down
1 change: 1 addition & 0 deletions src/ape_ethereum/proxies.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class ProxyType(IntEnum):
Delegate = 8 # eip-897 delegate proxy
ZeroAge = 9 # a more-minimal proxy
SoladyPush0 = 10 # solady push0 minimal proxy
ClonesWithImmutableArgs = 11 # https://github.com/wighawag/clones-with-immutable-args/blob/master/src/ClonesWithImmutableArgs.sol


class ProxyInfo(ProxyInfoAPI):
Expand Down

0 comments on commit f8a8fe2

Please sign in to comment.