MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / getSelector

Function getSelector

contracts/scripts/js/diamond.js:21–24  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

19
20// get function selector from function signature
21function getSelector(func) {
22 const abiInterface = new ethers.utils.Interface([func])
23 return abiInterface.getSighash(ethers.utils.Fragment.from(func))
24}
25
26// used with getSelectors to remove selectors from an array of selectors
27// functionNames argument is an array of function signatures

Callers

nothing calls this directly

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected