• Creates a mainnet-compatible execution instruction from raw transaction data for Neon EVM.

    This function generates a TransactionInstruction for executing a Neon EVM transaction within the Solana blockchain on mainnet. It derives necessary accounts, encodes transaction data, and constructs the instruction with the appropriate keys.

    Parameters

    • solanaWallet: PublicKey

      The public key of the Solana wallet initiating the transaction.

    • neonWallet: string

      The Ethereum-style Neon wallet address in hex format.

    • neonEvmProgram: PublicKey

      The public key of the Neon EVM program.

    • neonRawTransaction: string

      The raw Neon transaction in hex format.

    • neonKeys: AccountMeta[]

      The list of required account metadata.

    • chainId: number

      The chain ID of the target blockchain.

    • OptionalneonPoolCount: string = NEON_TREASURY_POOL_COUNT

      The number of Neon treasury pools (optional, defaults to NEON_TREASURY_POOL_COUNT).

    Returns TransactionInstruction

    A Solana TransactionInstruction for executing the Neon transaction on mainnet.

    const instruction = createExecFromDataInstructionV2Mainnet(
    userWallet,
    "0x1234567890abcdef1234567890abcdef12345678",
    neonProgram,
    "0xabcdef...",
    accountKeys,
    245022926
    );
    transaction.add(instruction);