Skip to main content

How to enable pre-approved transactions

Passport allows players to authorise low risk transactions without having to break the flow of their gaming experience.

This guide will walk you through the process of enabling pre-approved transactions in your game for your custom or preset contracts.

set up pre-approved transactionsset up pre-approved transactions
💡Who is this for?
Any technical or non-technical stakeholders (eg. developers, project managers) wanting to build on Immutable.

Why use pre-approved transactions?

Confirmation screens disrupt game immersion by forcing players to interact with them outside of the game. To maintain immersion without compromising on security, games can enable pre-approved transactions for their players, creating a seamless web3 game experience.

Using pre-approved transactions will allow your game to implement advanced functionality with web3 game assets, such as in-game marketplaces and crafting.

What types of transactions are eligible?

In order for a transaction to be eligible for pre-approval, they must conform to the rules below:

Transaction TypeSupported
TransfersOnly for your game's custom ERC20s/ERC721/ERC1155s linked via Immutable Hub
MintingOnly for your game's custom ERC20s/ERC721/ERC1155s linked via Immutable Hub
BurnsOnly for your game's custom ERC20s/ERC721/ERC1155s linked via Immutable Hub
CraftingOnly for your game's custom ERC20s/ERC721/ERC1155s linked via Immutable Hub
Listings & TradesOnly for your game's custom ERC20s/ERC721/ERC1155s linked via Immutable Hub
Custom Contract InteractionsOnly for interactions with contracts which are linked via Immutable Hub.
Your custom contract may only interact with your game's custom ERC20s/ERC721s/ERC1155s
Native Token TransfersNo

How to enable pre-approved transactions for my game

1. Join Immutable Hub and deploy an ERC20 and NFT contract

You will need an Immutable Hub account, along with an ERC20 and NFT contract deployed.

The NFT can be an ERC721 or ERC1155 contract.

Follow this tutorial for detailed setup and deployment instructions.

2. Create a Native Passport client

Once your Immutable Hub account is set up and contracts have been deployed, navigate to your project's Passport Configuration page and add a new client. You will need to choose the Native application type. Add your application name, a redirect URL and a logout URL before saving the Passport client.

⚠️Warning
Pre-approved transactions are only supported for Native Passport clients (e.g. mobile apps, desktop games). Transactions sent from Web Passport clients cannot be pre-approved.

For more details on Passport client configuration, see the Passport client setup documentation

In order for transactions to be pre-approved, the contracts must be linked to an environment in your Immutable Hub account. Linking a contract enables pre-approvals for all Native Passport clients across your organisation.

💡Need to link a custom contract?
  • When linking a custom contract, you will also need to link any contracts that it interacts with. For example, to pre-approve a Rewards contract transaction which distributes a custom ERC20, you will need to link both the Rewards contract and the custom ERC20.
  • If you are using a proxy contract, you will need to link both the proxy contract and implementation contract.

For contract linking steps, see the following tutorial.

4. Start using pre-approved transactions in your game

You're now ready to start utilising pre-approved transactions!

Below are some quick-start guides for setting up Passport:

(Optional) Allow players to list and purchase items from the Immutable Orderbook

We're working on a detailed guide for enabling in-game marketplaces. In the meantime, join our developer Discord to keep updated.


Related content