Docs

Prevent duplicate blockchain transactions with Engine

Phillip Ho

Engine now supports idempotency keys for write transactions.

Many of you have asked for Engine to prevent duplicate transactions when retrying requests. This feature prevents costly and irreversible errors like transferring funds or minting NFTs more than once.

If an x-idempotency-key header is provided, Engine only submits the transaction if there was not another transaction sent with the idempotency key in the past 24 hours. Subsequent calls with the same idempotency key return the original transaction queueId.

Example fetch request to ensure tokens are transferred only once. This call can be safely retried more than once.

This feature is added to v0.0.29.
Learn more about Preventing Duplicate Transactions.

What is Engine?

thirdweb Engine is an open-source server for your web3 app to read, write, and deploy contracts to the blockchain.

Self-host for free or get a cloud-hosted Engine for $99/month.