UNPKG

ethers-tools

Version:

Contains tools for work with web3 contracts.

14 lines (13 loc) 393 B
/** * @public * @param {import('../../types/entities/index.js').MulticallTags} tags * @returns {import('../../types/entities/index.js').Tagable} */ export const multicallNormalizeTags = (tags) => { if (typeof tags === 'object' || Array.isArray(tags)) { return JSON.stringify(tags, (_, value) => typeof value === 'bigint' ? value.toString() : value ); } return tags; };