Overview
Item.isReceive checks whether an ABI item represents a receive function (payable, no data).
Type guard for receive ABI items
Item.isReceive checks whether an ABI item represents a receive function (payable, no data).
import { Abi } from '@tevm/voltaire/Abi';
const item = { type: 'receive', stateMutability: 'payable' } as const;
if (Abi.Item.isReceive(item)) {
// Handle receive definition
}
Was this page helpful?
Suggestions