From 4e43eec5f7d0723bdd4f37f65a64e5dde740867a Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 22 Jan 2025 20:08:22 +0100 Subject: [PATCH] accounts/abi/bind: add missing function --- accounts/abi/bind/dep_tree_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 +}