accounts/abi/bind: add missing function

This commit is contained in:
Felix Lange 2025-01-22 20:08:22 +01:00
parent 169a42448c
commit 4e43eec5f7

View file

@ -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
}