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

Function encodeAddress

src/utils/abi/encodeAbiParameters.ts:224–227  ·  view source on GitHub ↗
(value: Hex)

Source from the content-addressed store, hash-verified

222 | ErrorType
223
224function encodeAddress(value: Hex): PreparedParam {
225 if (!isAddress(value)) throw new InvalidAddressError({ address: value })
226 return { dynamic: false, encoded: padHex(value.toLowerCase() as Hex) }
227}
228
229type EncodeArrayErrorType =
230 | AbiEncodingArrayLengthMismatchErrorType

Callers 1

prepareParamFunction · 0.85

Calls 2

padHexFunction · 0.85
isAddressFunction · 0.50

Tested by

no test coverage detected