FAQ

About Engine

Which contracts work with Engine?

Engine supports reads and writes to any contract verified on the blockchain explorer, including any contract deployed via thirdweb. Note: Some endpoints allow providing the contract ABI to support any unverified contract.

Engine also supports deploys for thirdweb prebuilt contracts including NFTs, tokens, marketplaces, and smart accounts.

If you have a question about a particular contract type, contact us.

How are Engine and the thirdweb Contract SDK different?

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 onchain and off-chain activity

Additionally, Engine is built on top of the thirdweb SDK and has the same capabilities.

Using Engine

How do I wait for a transaction to be mined?

Write calls to contracts do not block until they are mined. Instead they enqueue an async job and immediately return a reference to the job called queueId.

Here are three ways to determine when the job is mined:

  • Use webhooks to notify your backend when a transaction event occurs.

  • Poll the /transaction/status/<queue_id> endpoint.

  • 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 customize my RPC?

Use Update Chain Configuration to override a chain's settings.

Example

POST /configuration/chains

Headers

Content-Type: application/json
Authorization: Bearer <access_token>

Body

[
{
"name": "Polygon Mainnet",
"chain": "Polygon",
"slug": "polygon",
"chainId": 137,
"rpc": ["https://<custom_rpc_url>"],
"nativeCurrency": {
"name": "MATIC",
"symbol": "MATIC",
"decimals": 18
}
}
]