Skip to content

Commit

Permalink
fix regex for solc pattern matching
Browse files Browse the repository at this point in the history
  • Loading branch information
jwasinger committed Dec 13, 2024
1 parent 55778ba commit 68f4019
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion accounts/abi/bind/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ func bind(types []string, abis []string, bytecodes []string, fsigs []map[string]
var findDeps func(contract *tmplContract) map[string]struct{}
findDeps = func(contract *tmplContract) map[string]struct{} {
// 1) match all libraries that this contract depends on
re, err := regexp.Compile(`__\\$([a-f0-9]+)\\$__`)
re, err := regexp.Compile(`__\$([a-f0-9]+)\$__`)
if err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/bind/v2/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (d *depTreeBuilder) buildDepTrees(pattern, contract string) {
node.overrideAddr = &addr
}
// iterate each referenced library in the unlinked code, recurse and built its subtree.
reMatchSpecificPattern, err := regexp.Compile(`__\\$([a-f0-9]+)\\$__`)
reMatchSpecificPattern, err := regexp.Compile(`__\$([a-f0-9]+)\$__`)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 68f4019

Please sign in to comment.