FAQ
About Engine
What are the differences between Engine and thirdweb SDKs?
Engine is a server that manages your backend wallets and how they interact with contracts. This difference unlocks capabilities that thirdweb and other web3 SDKs, including:
- Management of KMS backend wallets
- Fine-grained access control with access tokens
- Transaction parallelization to handle higher throughput per wallet
- Observability and retries on stuck transactions
- Webhooks on completed transactions to sync on-chain and off-chain activity
Additionally, Engine is built on top of the thirdweb SDK and has the same capabilities.
Does Engine work with all thirdweb smart contracts?
Yes. Engine has intuitive interfaces to deploy prebuilt contracts, manage smart wallets, run a marketplace, and more.
Does Engine work with my non-thirdweb smart contracts?
Yes. Engine can read and write to any EVM contract with low-level API calls, including providing raw calldata. ERC-721 and ERC-1155 APIs can also be used for contracts imported to thirdweb.
Using Engine
How do I wait until a transaction completes?
APIs that call contract write methods (i.e. transactions sent from your backend wallets) enqueue an async job and return a corresponding queueId
.
On the backend, use webhooks to be notified when a transaction event occurs.
On frontend clients, use websockets:
const socket = new WebSocket(
"wss://<engine_url>/transaction/status/<queue_id>?token=<session_token>",
);
socket.onmessage = (event) => {
const res = JSON.parse(event.data);
console.log("Received data:", JSON.parse(res.result));
};
How do I cancel a transaction?
If a transaction is has not yet been mined or failed, cancel the transaction with POST /transaction/cancel
.
Or to cancel a transaction in the Engine dashboard, select the Cancel transaction button next to the status in the Transactions table.
How do I customize RPC URLs?
Set the CHAIN_OVERRIDES
environment variable to the path to a JSON file or internet-accessible URL. The default value is ./chain-overrides.json
if found. See the example format.
Troubleshooting
Why is Engine unable to connect to my Postgres DB?
Here are some common troubleshooting tips:
- Ensure the Postgres DB is running in Docker:
- In same container, ensure the
host
in thePOSTGRES_CONNECTION_URL
is set tolocalhost
. - In different container, ensure the
host
in thePOSTGRES_CONNECTION_URL
is set tohost.docker.internal
.
- In same container, ensure the
- Ensure the Postgres DB connection URL and credentials are correct.
- Ensure the database name exists on the Postgres DB.