MCPcopy Create free account
hub / github.com/api3dao/airnode / safeDecode

Function safeDecode

packages/airnode-node/src/evm/abi-encoding.ts:5–12  ·  view source on GitHub ↗
(encodedParameters: string)

Source from the content-addressed store, hash-verified

3import { ApiCallParameters } from '../types';
4
5export function safeDecode(encodedParameters: string): ApiCallParameters | null {
6 // It's unlikely that we'll have to deal with invalid parameters, but just in case,
7 // wrap the decoding in a try/catch
8 const goDecode = goSync(() => decode(encodedParameters));
9 if (!goDecode.success) return null;
10
11 return goDecode.data;
12}

Callers 1

Calls 1

decodeFunction · 0.90

Tested by

no test coverage detected