Function cleanupAccounts

Cleanup accounts array so there are no sparse values (i.e. empty values in the middle, this is not compatible with many of the web3 libraries (web3.js and viem)).

  • Parameters

    • values: (undefined | `0x${string}`)[]

      original array

    Returns `0x${string}`[]

    Returns copy of array which makes 0x00..., null, undefined and empty string mark the end of the array This is useful for cleaning up the array of accounts.