diff --git a/src/routes/diamond/[address]/EditFacet.svelte b/src/routes/diamond/[address]/EditFacet.svelte index 6fbd91e..08fd020 100644 --- a/src/routes/diamond/[address]/EditFacet.svelte +++ b/src/routes/diamond/[address]/EditFacet.svelte @@ -22,6 +22,8 @@ parseAbi, zeroAddress, type WriteContractReturnType, + type AbiItem, + type AbiFunction, } from 'viem' import type { Chain } from 'viem/chains' import ConnectWallet from './ConnectWallet.svelte' @@ -263,6 +265,13 @@ } } } + + const getFunctionSelector = (m: AbiFunction) => { + if (m.name.indexOf('unknown_') > -1) { + return m.name.split('_')[1] + } + return toFunctionSelector(m) + }