• Creates a transaction-like object that represents a NEON token transfer.

    Type Parameters

    • T

      The expected type of the transaction-like object, commonly TransactionRequest from ethers.js.

    Parameters

    • from: string

      The sender address in hexadecimal format - Neon EVM address.

    • to: string

      The recipient address in hexadecimal format - commonly token transfer contract address.

    • amount: Amount

      The amount of tokens to transfer, represented as a number, string, or bigint.

    • data: string

      The additional data to include in the transaction, represented as a string.

    Returns T

    An object representing the transaction, cast to the expected type T.

    import { TransactionRequest } from 'ethers';

    const fromAddress = "0x1234567890abcdef1234567890abcdef12345678";
    const toAddress = "0xabcdef1234567890abcdef1234567890abcdef12";
    const amount = "10";
    const data = "0x";

    const transaction: TransactionRequest = neonNeonTransaction<TransactionRequest>(fromAddress, toAddress, amount, data);