MCPcopy Create free account
hub / github.com/GCWing/BitFun / contractOwnerHasKnownSource

Function contractOwnerHasKnownSource

scripts/audit-theme-colors.test.mjs:31–40  ·  view source on GitHub ↗
(owner)

Source from the content-addressed store, hash-verified

29];
30
31function contractOwnerHasKnownSource(owner) {
32 return String(owner ?? '')
33 .split(';')
34 .map(entry => entry.trim())
35 .filter(Boolean)
36 .some(entry => SOURCE_OWNER_ROOTS.some(sourceRoot => (
37 entry === sourceRoot
38 || entry.startsWith(`${sourceRoot}/`)
39 )));
40}
41
42function contractOwnerMatchesRoot(contract, sourceRoot) {
43 return String(contract.owner ?? '')

Callers 1

Calls 1

trimMethod · 0.80

Tested by

no test coverage detected