diff --git a/accounts/abi/bind/dep_tree_test.go b/accounts/abi/bind/dep_tree_test.go index 66dba9dc7d..50c8a68b80 100644 --- a/accounts/abi/bind/dep_tree_test.go +++ b/accounts/abi/bind/dep_tree_test.go @@ -17,6 +17,7 @@ package bind import ( "fmt" + "regexp" "testing" "github.com/ethereum/go-ethereum/common" @@ -330,3 +331,14 @@ func TestContractLinking(t *testing.T) { } } } + +func parseLibraryDeps(unlinkedCode string) (res []string) { + reMatchSpecificPattern, err := regexp.Compile(`__\$([a-f0-9]+)\$__`) + if err != nil { + panic(err) + } + for _, match := range reMatchSpecificPattern.FindAllStringSubmatch(unlinkedCode, -1) { + res = append(res, match[1]) + } + return res +}