Using Openfort to make transactions on chain.
Web3 gaming brings new challenges, especially in handling transactions at scale. Transactions, in this context, aren't just financial; they adjust in-game currency, grant items, and enable crafting.
Openfort's transaction system and monitoring infrastructure allows you to put any transaction on any EVM-compatible chain that we support.
We ensure that any valid transaction will end up in a block regardless of reorgs, dropped transactions, or gas spikes all while supporting throughput of 5,000+ transaction requests per second. By the end of this section you’ll have:
- Authorized a new contract call on your project
- Broadcast a transaction intent via the Openfort API
- Registered a webhook to receive realtime updates about transaction statuses
- Queried the status of the transaction to get the full receipt
How Transactions Work#
When a player, or any entity, interacts with the blockchain, the process begins with a transaction intent. Think of this as a formal declaration or a request for a particular action on the blockchain. Below are the steps that unfold:
- Initiation: The player's client or the game server sends an authenticated transaction intent to the Openfort API. This intent carries vital information:
- Sender's Address: The blockchain address initiating the action.
- Recipient's Address: The blockchain address that will receive any assets or data.
- Transaction Data: This includes the specifics of the action, e.g., the number of tokens to transfer or the type of item to craft.
- Verification & Processing: Upon receiving the intent, Openfort's infrastructure:
- Verifies the authenticity and validity of the request.
- Processes the transaction, ensuring all data on the blockchain gets updated as intended.
- Confirmation: Once processed, the system returns a transaction hash. This unique identifier serves as proof of the transaction and can be used to track its status or fetch further details.
To ensure smooth execution of transaction intents, the player's account must have native tokens in the network to cover transaction fees. But, there's flexibility! You can sponsor these transaction fees or let players pay them using ERC20 tokens, depending on your setup.
Interested? Dive deeper into our Gas policies for more information.
Understanding Transaction Intent variables#
A transaction intent encompasses more than just the sender's and recipient's addresses. At its core, it carries what's known as the transaction data.
With Openfort, you have the flexibility to further refine your transactions. You can:
- Optimistic transactions: Transactions to be resolved even before they reach the on-chain after validation and simulation, speeding up the latency of sending a transaction on-chain.
- Define interactions: Import your smart contracts, like gaming assets, with which players can engage.