Skip to main content
Version: v2

Send transactions with Passport

Learn how to send blockchain transactions using Immutable Passport in your Unreal game.

Overview

Passport provides two methods for sending transactions on zkEVM:

  1. ZkEvmSendTransactionWithConfirmation (Recommended) - Waits for transaction confirmation
  2. ZkEvmSendTransaction - Returns immediately with transaction hash
💡Token Restrictions
Games can only use ERC-20 tokens issued by the game itself, meaning currencies like ETH, USDC, IMX, USDT, etc. cannot be used in-game.

Prerequisites

📋Prerequisites
  • The zkEVM send transaction requires pre-approval.
  • Must have first called ConnectEvm to set up the zkEVM provider and ZkEvmRequestAccounts to login the user.

Implementation

To send a transaction on zkEVM, use UImmutablePassport::ZkEvmSendTransaction or UImmutablePassport::ZkEvmSendTransactionWithConfirmation methods. You need to provide three parameters:

  • to: The destination address
  • value: The value to transfer for the transaction in wei
  • data: Byte string containing the associated data of the message
💡Gas Properties
This method does not support the gas, gasPrice, maxPriorityFeePerGas, or maxFeePerGas properties as the relayer abstracts these away from the user. Additionally, the from property is not supported as the user's Passport wallet address is used instead.

Sends a transaction to the network, signs it using the logged-in Passport account, and waits for the transaction to be included in a block.

Zk Evm Send Transaction with Confirmation

  • ZkEvmGetBalance - Gets the balance of the given address in wei
  • ZkEvmGetTransactionReceipt - Retrieves transaction information for a given transaction hash

Next Steps

After sending transactions, you might want to: