MCPcopy Create free account
hub / github.com/wevm/viem / parsePaymasterArray

Function parsePaymasterArray

src/zksync/utils/parseEip712Transaction.ts:22–33  ·  view source on GitHub ↗
(arr: Hex[])

Source from the content-addressed store, hash-verified

20 }
21
22 function parsePaymasterArray(arr: Hex[]) {
23 if (arr.length === 0) return undefined
24 if (arr.length !== 2)
25 throw new BaseError(
26 `Invalid paymaster parameters, expected to have length of 2, found ${arr.length}!`,
27 )
28
29 return {
30 paymaster: arr[0],
31 paymasterInput: arr[1],
32 }
33 }
34
35 const raw = fromRlp(payload.slice(1)) as Hex[]
36 const paymasterParams = parsePaymasterArray(raw[15] as unknown as Hex[])

Callers 1

parseEip712TransactionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected