create-eth
Version:
Create a Scaffold-ETH-2 app
9 lines (5 loc) • 379 B
text/typescript
// To be used in JSON.stringify when a field might be bigint
// https://wagmi.sh/react/faq#bigint-serialization
export const replacer = (_key: string, value: unknown) => (typeof value === "bigint" ? value.toString() : value);
export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
export const isZeroAddress = (address: string) => address === ZERO_ADDRESS;